FA2sp icon indicating copy to clipboard operation
FA2sp copied to clipboard

Infantry cell spot issues

Open Crimsonum opened this issue 2 years ago • 1 comments

InfantryTypes can exist at 5 different cell spots (also called "subcells") within a cell. These spots use values 0-4, encoded as the 6th infantry parameter (see code below). Unfortunately, FA2 doesn't register infantry at the last spot (spot value 4). Infantry at this spot are invisible in the editor and cannot be selected. This is especially problematic when editing vanilla maps, as they sometimes contain infantry at these spots.

In addition, when placing infantry in a cell in FA2, they are placed at spots 0-2, not in 2-4 as seems to be intended. In vanilla maps, infantry are never placed at spots 0-1, probably due to how they overlap at the cell center.

Example map code:

[Infantry]
0=Neutral,E1,256,82,87,4,Guard,64,None,0,-1,0,1,0

The number 4 is the cell spot parameter.

For more information on cell spots, see ModEnc.

Crimsonum avatar May 21 '22 11:05 Crimsonum

I think the placement within the cell needs to correlate with the *OccupationBits= setting too. Not all terrain objects (trees specifically in this case) allow infantry to occupy every corner or center of the cell, so if placed on a cell with a tree, only the available spots should be used, which would also affect how many can occupy it.

ATHSE avatar Sep 25 '22 19:09 ATHSE