Difference between revisions of "ROUTES.DAT"

From UFOpaedia
Jump to navigation Jump to search
Line 61: Line 61:
 
<b>22/16</b> - Always seems to be set to 0.
 
<b>22/16</b> - Always seems to be set to 0.
 
(the exception is also seen in TFTD, with a few maps having different values)
 
(the exception is also seen in TFTD, with a few maps having different values)
 +
(there are also 2 nodes on the skyranger map that have a value of 10 --[[User:Daiky|Daiky]] 08:03, 30 July 2011 (EDT))
  
 
<b>23/17</b> - Ranges from 0 to 10, Daishiva calls this the "spawn" byte. A value of 0 makes it impossible for a unit to spawn there.
 
<b>23/17</b> - Ranges from 0 to 10, Daishiva calls this the "spawn" byte. A value of 0 makes it impossible for a unit to spawn there.

Revision as of 12:03, 30 July 2011

This file is only used by tactical saves.

It is a collection of all nodes on the map, and uses much the same format as the .RMP files in the routes folder. Aliens and civilians are placed randomly amongst these nodes when combat begins, and (prior to spotting your units) patrol between them.

If a unit cannot be placed because you've run out of appropriate nodes, it'll use a non-appropriate node instead. This means that sometimes alien leaders won't be inside their ships.

X-Com units don't spawn according to these nodes if you use an Avenger. Need to test the other craft, and base offense/defense missions. - BB

After a new tactical map has been generated from the small map sections, the records are read from the corresponding .RMP files in order of left to right, top to bottom. However the X-Com and Alien craft nodes are always saved until last, and so appear at the end of the file.

Each record is 24 bytes, so the total file size is equal to that times the amount of records in the entire map. Decimal/Hex offsets:

Structure

0/00 - Y position of node.

1/01 - X position of node.

2/02 - Z position of node.

3/03 - Map section counter. All nodes from the first map segment will have this flagged as 0, the nodes from the next map segment as 1, the next segment 2, and so on.

4/04 - 18/12 - Each node can connect to multiple other nodes. These 15 bytes contain 5 records of 3 bytes each, detailing those connections:

  • 0 - The record number of the connected node. 255/FF if unused. When the game engine pieces the small map segments together, if an external node can't be connected, the spare connection record will be disabled. A common example is a connection that would make a unit walk off the playing field. For external node connections this number is FE:North, FD:East, FC:South, FB:West.
  • 1 - The distance to the connected node. If the connected node was not originally in the same .RMP file, this is calculated by adding the two connection distances together.
  • 3 - The type of unit that can travel along this connection.
0 = Any
1 = Flying
2 = Flying Large
3 = Large
4 = Small

19/13 - The type of unit that can spawn at this node.

0 = Any
1 = Flying Small
2 = Small
3 = Flying Large
4 = Large

At least, modulo 8. The above is exhaustive only for reference data in the routes folder, and non-UFO nodes in Battlescape saves.

Bit 3 (value 8) is set for nodes where an alien starts. Whether the alien is alive, or dead from power plant explosion, is irrelevant.

Bit 4 (value 16) may be set for nodes sourced from UFO reference data...and furthermore is sometimes changed by processing during the alien turn for these nodes. Presumed (needs more testing): in patrol mode nodes sourced from UFO reference data, the AI explicitly prefers (but is not guaranteed to) to stop moving on nodes with bit 4 set.

Bits 5-7 are uniformly 0 for medium scouts. Other UFO types have not been verified yet. Neither have terror sites or alien bases.

20/14 - The rank, or the team, of unit that can spawn at this node. (Misc 1 and Misc2 are only used on a few maps of TFTD)

0 = Civilian / "Scout"
1 = X-Com
2 = Alien Soldier
3 = Alien Navigator
4 = Alien Leader / Commander
5 = Alien Engineer
6 = "Misc1"
7 = Alien Medic
8 = "Misc2"

21/15 - Ranges from 0 to 8, Daishiva calls this the "flags" byte. Governs whether an alien will attempt to destroy a base module. Apparently, the higher the number, the greater the chance the aliens will start shooting. So far, this has only been tested on an X-COM base defense mission but seems to hold. No other maps or modules have been tried.

22/16 - Always seems to be set to 0. (the exception is also seen in TFTD, with a few maps having different values) (there are also 2 nodes on the skyranger map that have a value of 10 --Daiky 08:03, 30 July 2011 (EDT))

23/17 - Ranges from 0 to 10, Daishiva calls this the "spawn" byte. A value of 0 makes it impossible for a unit to spawn there.

See Also