Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Infantry cell spot issues #18

Open
Crimsonum opened this issue May 21, 2022 · 1 comment
Open

Infantry cell spot issues #18

Crimsonum opened this issue May 21, 2022 · 1 comment

Comments

@Crimsonum
Copy link

Crimsonum commented May 21, 2022

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 Crimsonum changed the title Infantry at cell spot 4 are invisible and unselectable Infantry cell spot issues May 21, 2022
@ATHSE
Copy link

ATHSE commented Sep 25, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants