Page 1 of 1
UnitType ODF parameter
Posted: Sun Dec 05, 2021 3:31 pm
by Sporadia
The ODFs have a parameter called UnitType which affects the AI behaviour. Does anyone know if there's any documentation or thread which compares how the different UnitType options behave? So far, I've only found bits and pieces about some of them.
Edit: I actually have some more specific questions related to this. Which UnitType options will slice into vehicles with a fusion cutter (if it affects this behaviour at all)? Does UnitType affect mines and detpacks?
Re: UnitType ODF parameter
Posted: Sun Dec 05, 2021 9:06 pm
by MileHighGuy
I think the engineer's unit type will slice into stuff. I also think it affects whether they want to place a mine or not. I think the standard trooper unittype makes it more keen to try to doge your fire too? I don't really know. I did some digging on this in the forums a while ago.
Re: UnitType ODF parameter
Posted: Wed Dec 08, 2021 7:35 pm
by Sporadia
Done some digging of my own, and I'm dumping all the information I've found for future reference. I haven't tested any of this. A lot of the stuff people have written about
UnitType starts with "I think..." "If I remember..." etc. Or it's something that I've only seen posted once. So I'm writing
claim before the things which don't have much evidence, and linking all the sources (links in italics).
This is all about AI behaviour unless stated otherwise. ie. It doesn't apply to human players.
Hint Nodes
Land Node:
JetJump Node:
Snipe Node:
VehicleCover Node:
Mine Node:
Fortification Node:
UnitType ODF parameter
Trooper
Assault
- Assumption: Does something extra with the rocket launcher. (reason: The ODF parameter doc. See below.)
- Claim: Won't use the health and ammo dispenser at all. (From a test.)
- Doesn't do repairs. (Verified.)
- Claim: Doesn't slice into vehicles. (From a test.)
- Claim: More likely to take cover. ie. Potentially more responsive to the Cover hint node.
Anti-Armor
- Assumption: Does something extra with the rocket launcher. (reason: The ODF parameter doc. See below.)
- Claim: Won't use the health and ammo dispenser at all. (From a test.)
- Doesn't do repairs. (Verified.)
- Claim: Doesn't slice into vehicles. (From a test.)
Scout
- Claim: The only UnitType that will use the Snipe hint node. (Very likely, see above.)
- Claim: Won't use the health and ammo dispenser at all. (From a test.)
- Doesn't do repairs. (Verified.)
- Claim: Doesn't slice into vehicles. (From a test.)
Pilot
Support
- Will actively seek other players so it can dispense health and ammo. (Verified.)
- One of the only UnitType values that uses the fusion cutter to do repairs. (Verified.)
- Slices into vehicles with the fusion cutter. (Verified.)
- 3 of the officers use this UnitType, and I haven't come across a reason why. Also note that the Bothan Spy doesn't use this UnitType.
- I don't know how this behaves differently to Pilot on land maps. So why are they both used?
Repair
- Will actively seek other players so it can dispense health and ammo. (Verified.)
- One of the only UnitType values that uses the fusion cutter to do repairs. (Verified.)
- Slices into vehicles with the fusion cutter. (Verified.)
Special
- Will actively seek other players so it can dispense health and ammo. (Verified.)
- One of the only UnitType values that uses the fusion cutter to do repairs. (Verified.)
- Slices into vehicles with the fusion cutter. (Verified.)
- I've seen a few threads which mention this:
Code: Select all
Scout
Anti-Armor rocket
Assault rocket
Repair
Support repair
Pilot
Trooper
Special - repair
It's taken from Psych0Fred's ODF parameters doc. Under the Soldier class, if you scroll down to the bottom of it's parameters you will eventually find that list. The document isn't laid out very well and I didn't trust this information at first. But I've tested 2 things based on this extract so far and they've both been true. 1) Repair, Anti-Armor and Special are real values of UnitType. 2) The Special UnitType will do repairs with the fusion cutter and the Anti-Armor won't. So it looks like this really is a list of the different UnitType values. I still don't know why it's not placed under UnitType in the doc; it's a messy doc.
Bonus:
The ODF parameter AISizeType will change what path a unit follows ie. When people are making maps, they can (and usually do) add filters to the AI pathing so that it only affects a specific
AISizeType. It's not relevant to the UnitType parameter; it's just something else to be aware of.
Psych0Fred Docs:
AI related docs folder.
All links:
Updated: 10/12/2021
Re: UnitType ODF parameter
Posted: Wed Dec 08, 2021 9:02 pm
by MileHighGuy
Much appreciated research!
Re: UnitType ODF parameter
Posted: Thu Dec 09, 2021 7:48 pm
by Sporadia
Claim Testing
I've taken a look at this to see if these are real UnitType values:
Code: Select all
Scout
Anti-Armor rocket
Assault rocket
Repair
Support repair
Pilot
Trooper
Special - repair
Spoiler alert, they are. Whenever you use a value for UnitType that isn't real it will leave a severity 2 error in the debug log. The extra values of "anti-armor", "repair" and "special" do not leave this error. I've also tested them with the fusion cutter since that's one of the things I was interested in. And I've looked at the claim that some UnitType values don't use the powerup dispenser.
See Test:
Test 2
I tested every UnitType to see if it could repair space vehicles. The only one which could was the Pilot.
I've also extended test 1 to see how the other UnitType values behave.
See Test:
Re: UnitType ODF parameter
Posted: Thu Dec 09, 2021 11:52 pm
by MileHighGuy
so whats the difference between "assault rocket" and "assault"?
Re: UnitType ODF parameter
Posted: Thu Dec 09, 2021 11:59 pm
by Sporadia
Question:
MileHighGuy wrote: ↑Thu Dec 09, 2021 11:52 pm
so whats the difference between "assault rocket" and "assault"?
Answer:
Code: Select all
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11349)
Unrecognized UnitType "assault rocket" in soldier "tes_inf_cisguy"
"assault rocket" doesn't work. At this point I think the word
rocket is pointing out that the AI does something special with the rocket launcher for Assualt and Anti-Armor. Same as the word
repair in
support repair. Edit: But since it doesn't say
pilot repair I'm not sure it's that reliable.
Re: UnitType ODF parameter
Posted: Fri Dec 10, 2021 12:09 am
by MileHighGuy
okay, interesting!
EDIT: I wonder if you could decipher the full list of unit types by looking for their strings in the decompiled game exe?