Talk:ROUTES.DAT

From UFOpaedia
Revision as of 13:23, 8 January 2016 by Morgan525 (talk | contribs) (→‎Offset 19 (0x13): observation on byte 13h)
Jump to navigation Jump to search

Regarding offset 23, Zombie, were you attempting to "clarify" or "correct" it?

Previously it stated that 0-value nodes CAN spawn units, but only if all other nodes are taken...

- Bomb Bloke 21:07, 26 August 2008 (PDT)


"Correct" it. In any case, 0-value "spawn" nodes can never have units placed there period. They are only used for alien pathfinding. If all the spawn points with values of 1 or greater get filled and there are still alien units waiting to be placed on the map yet, they don't. This follows the same basic premise as an auto-win base defense mission. --Zombie 22:11, 27 August 2008 (PDT)


Some wild guesses about the "flags" byte on non-base missions: Aliens patrol around using the spawn points, but sometimes they "guard" a certain point. A theory is that the chance the next state is just guarding this spawnpoint is higher when the "flags" byte is higher. So they save TUs, thus making a strong defense(reaction shots). When the flags is zero, they will not stand still on the point and continue patrolling. You will notice that inside UFO's the values are higher, this makes that aliens inside UFOs have a higher defensive advantage. So this byte can actually be called the "offensive (x-com base)/defensive (others)" decision score. --Daiky 07:26, 21 July 2011 (EDT)


Offset 19 (0x13)

According my observation this is a bit field

 bit0 (1)  = this node is only for flying units (mobility bit, used for spawning).
 bit1 (2)  = this node is only for small units (used for spawning).
 bit2 (4)  = this node is only for flying units (movement type).
 bit3 (8)  = this node was used for NPC placement (runtime bit).
 bit4 (16) = this node is only for civilians (runtime bit, cleared when aliens nowhere else to go).
 bit5 (32) = cannot be used as patrol point.

so

 0 = Any (small walk, large walk, small flying, large flying)
 1 = Flying (small flying, large fly)
 2 = Small (small flying, small walk)
 3 = Flying Small (flying small)

--Volutar 05:29, 23 September 2011 (EDT)

From what I've made of the bit4, it's set unit a unit in patrol mode reaches it as a destination. Once set, the AI for patrol mode units will skip this node for a destination. It seems to ensure that patrol units always move to new areas.--Tycho (talk) 08:23, 8 January 2016 (EST)

Offset 20

Actually it's not a "rank", it's more abstract version of "rank" which is used by many ranks (if there's no other appropriate spawnpoints left). At the end of priority list are points with value 0. Same value 0 used for spawning "scout" units, which are mainly spawned outside of UFO, and just hanging around (their AI have quite different route priorities). If there is no free spawn points found - unit marked as "dead" instead of spawning.

 Scout     0
 Commander 4 > 3 > 5 > 8 > 7 > 2 > 0
 Leader    4 > 3 > 5 > 8 > 7 > 2 > 0
 Engineer  5 > 4 > 3 > 2 > 7 > 8 > 0
 Medic     7 > 6 > 2 > 8 > 3 > 4 > 0
 Navigator 3 > 4 > 5 > 2 > 7 > 8 > 0
 Soldier   2 > 5 > 3 > 4 > 6 > 8 > 0
 Terrorist 2 > 5 > 3 > 4 > 6 > 8 > 0
 XCom      1 > 0 > 2

So, 1st priority spawn points confirmed to be as they listed on main page. But almost any of these spawn point can be used by number of alien ranks, not only by those you assigned to.

 0 = Scout/Any rank
 1 = X-Com
 2 = Soldier/Terrorist, Medic, Engineer/Navigator, Commander/Leader
 3 = Navigator, Commander/Leader, Engineer/Soldier/Terrorist, Medic
 4 = Commander/Leader, Engineer/Navigator, Soldier/Terrorist, Medic
 5 = Engineer, Commander/Leader/Navigator
 6 = ..., Medic, Soldier/Terrorist
 7 = Medic, Commander/Leader/Engineer/Navigator
 8 = ..., Commander/Leader/Medic, Engineer/Navigator/Soldier/Terrorist

--Volutar 03:21, 26 September 2011 (EDT)

little note: "scout" is also a civilian spawn node, they also only spawn at 0 --Daiky 15:30, 30 December 2011 (EST)

Node link offset 2 (travel unit type)

This is a bitfield with values as mask for kind of units.

 bit0 (1)  = this node is only for units in fly mode (mobility bit).
 bit1 (2)  = this node is only for small units.
 bit2 (4)  = this node is only for flying units (movement type).
 *bit3 (8)  = this link was already processed for path estimation (runtime bit).

so

 0= any units
 1= units of any size in fly mode
 2= small units flying or not
 3= small units in fly mode
 4= any size of flyers
 5= any size of flyers in fly mode
 6= small flyers
 7= small flying flyers

Actually I dont know why there are TWO bits (0 and 2) which stand for flying... AFAIR every flying alien unit unable to walk, so they always have movement type "Fly" and mobility bit "fly mode" (like floaters, who are unable to use steps). Probably some of walking alien units was planned to have flying abilities, but abandoned for some reason. --Volutar 01:51, 27 September 2011 (EDT)

Offsets 0x15 (21) & 0x16 (22)

They seems to be used for AI patrol route distortion for BaseDefence mission type. Before (and including) 30th turn of battle Aliens seems to be attracted by route nodes having one of these (or both) flags set (as boolean field). It's more like a target points, and they seems to be not interested in others at all. But after 30th turn of battle Aliens seems to be wandering all over the place without paying attention on these flags.

It can be confirmed by clearing all these flags from XCOM base module maps, and setting them only for "lift" module nodes. Apparently they will be swarming around lift area, without trying to get somwehere else. But after 30 turn they must scatter. --Volutar 00:05, 28 September 2011 (EDT) Yes, this was confirmed. Though if Alien spots your unit, it will pursue (in Snipe mode), no matter what routes and flags are --Volutar 00:51, 28 September 2011 (EDT)

I wonder why there are so-called targetpoints (flags 5 in base defense) in the small rooms around the hangar? Also, on terror sites there are flags 1 (and I found a flags 2 on a roof). They seem to be somewhat random, however on maps with buildings, the nodes with flags 1 are mostly inside. An explanation may be that aliens are attracted to these flags 1 nodes as targetpoints, making aliens targetting the inside of buildings to terrorise civilians. On larger UFOs, the flags seems to have the same value as priority? Which might be an error in the data? Or maybe the flags values are not used in UFOs at all. There is a theory that until a certain turn aliens will prefer to stay inside and around the UFO before spreading to the outside, this might be controlled by this flags. On other terrain once and a while there is a flags 1 value, the rest is 0. It could be aliens walk around and stand still and look around on the nodes with flags 1. --Daiky 15:45, 5 January 2012 (EST)

Regarding the small rooms I've seen aliens hiding on those, I can't remember if their are spawn points also though. I've made quite a few attempts are figuring out what the values meant on terrain modes I've created, usually based on the assumption that the higher the number on the flag the more the AI would 'choose' to go to that point. Can't really say that it worked all the time.
I've always disregarded the theory that aliens leave their craft after turn 8. While it may seem that way, a more easy explanation is simply that the more aliens you have on a confined space, the longer it will take for them to reach the outside because they will block each other's movement (unless they spot a hostile unit, their scouting mode seems to be to go from one waypoint to the other unless they are blocked). Again most of this can't be exactly trusted because without some sort of proof, which I dont have other than observation. Hobbes 19:20, 5 January 2012 (EST)
"the higher the number on the flag the more the AI would 'choose' to go to that point."; I also think this is a "weight" value when evaluating the next target node, but it's possible there is still some randomness on top of that, otherwise alien behaviour could become too predictable.
Note that offset 0x2B (43) on unitref.dat also has something to do with pathfinding...
--Daiky 05:45, 6 January 2012 (EST)
I got no clue about 'offset 0x2B (43) on unitref.dat' means :) I'm not used to code, just using software that others created to mod things :) Hobbes 18:10, 8 January 2012 (EST)

Just read an old chat I had with BladeFireLight a while ago. This is what I wrote: 'I tried it three times.....on the first I randomly attributed higher values to nodes in upper levels, on the second I attributed high values to specific nodes located on top of stairs and so forth, on the third I increased the value of the highest nodes and put high values on specific nodes to make sure that the aliens would choose them.............I ran each test about some 20 times using VIS and on the last one the (aliens definitly kept themselves to the higher levels' (VIS is an XComUtil flag that reveals the entire battlefield). 'I think it's more a matter of probability....if you have a node with links to three others with the same value and one of them is in a higher level, there's one third of a chance that he'll go upstairs' Hobbes 18:30, 8 January 2012 (EST)

Started going over the .RMP files to create the routes for my terrain replacement mod for UFO. The theory of 'the higher the number on this flag, the most likely it will influence the AI' seems to stick by looking at the distribution of the values, specially regarding UFOs. The bridges and engine areas of the larger UFOs usually have much higher values (>5) in clusters, most likely to force the aliens to stay on those areas, as usually seen during (it can also be inferred that they are used to create 'ambushes'). The question still to be answered is what the AI does exactly - there are 2 main hypothesis at this point - a) that they are used by aliens on patrol/guard when choosing the next node that they will travel to (higher values are preferred over the lower ones) or b) that the number determines the time that the alien will spend on that node (which would be useful to set up snipers and ambushes. I will test for b) later. Hobbes 10:31, 26 January 2012 (EST)