Opened 6 years ago
Last modified 5 years ago
#4940 new defect
Remove rmgen Iberian Wall hardcoding
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Maps | Keywords: | |
Cc: | Patch: |
Description
rmgen currently hardcodes that Iberians and only Iberians have starting walls.
This fact (and if needed some more arguments) should be moved to the civ definition file.
This way mods can reuse the feature and it makes the library agnostic of game content.
Change History (3)
comment:1 by , 6 years ago
comment:3 by , 5 years ago
While having a "start with walls" attribure in the templates can prevent the hardcoding of the Iberian walls in random maps that likely won't be very suitable for mods as I expect other civilizations to require different shapes. So there also would need to be a "shape" property needed.
If skirmish maps could use the random map code they could place such walls (and if random maps where generated ingame e.g. via trigger or simulations at the first turn skirmish maps could do that).
Skirmish maps support starting walls too by placing
skirmish/structures/iber_wall_short
etc. This ought to become agnostic as well, i.e.skirmish/structures/wall_short
. However the lengths of walls differ per civ, so it's not cleanly feasible.The rmgen starting wall function is
placeGenericFortress
and as of Phab:D900 it looks up the templates in order to position them ideally. So letting rmgen place skirmish walls doesn't work out here.So it seems like skirmish maps have to live with the civ hardcodings while rmgen has the computational power to become civ-agnostic. So it indeed has to be a new property in the civ json file rather than being able to reuse the iber wall skirmish replacement code in rmgen to detect whether initial city walls should be placed.