official-antistasi-community / A3-Antistasi

Antistasi Community Version - work in progress - Discord https://discord.com/invite/TYDwCRKnKX
https://antistasi.de
Other
226 stars 156 forks source link

initZones refactor #1555

Closed jaj22 closed 2 years ago

jaj22 commented 3 years ago

Is your feature request related to a problem? Please describe. initZones (the code that sets up marker arrays, especially city and radio markers) is currently a disaster zone because it contains data specific to individual maps, mixed in with a lot of general purpose code. It's often necessary to edit this to correctly add a new map, but this is usually ignored until obvious problems arise. Ideally all map-specific data would be easily accessible and in an obvious location.

Describe the solution you'd like The plan is to move the map-specific data from initZones to files in the individual map template folders, something like "mapData[worldname].sqf". The worldname isn't necessary for execution but may be more convenient depending on the editing tools people are using.

Variables that contain x/y/z positions should ideally be changed to use SQM markers instead. Examples include manual radio towers and missing/misplaced villages. This will require additional code in prepareMarkerArrays.

Additional map-specific variables could be added to these files to adjust game balance and AI behaviour. For example, Maximum land and air attack distance could be map-specific variables. I keep forgetting other useful examples, so I'll add them to this issue when they come up.

Bob-Murphy commented 2 years ago

add map-relevant stuff from initGarrisons.sqf

        case "tanoa": {
            _mrkCSAT = ["airport_1", "seaport_5", "outpost_10", "control_20"];
            _controlsCSAT = ["control_20"];
Bob-Murphy commented 2 years ago

We also could add the terrain type in said file which currently is hardcoded in selector.sqf with something like terrain = "arid" or so.

Current list from selector:

aridmaps = ["altis","kunduz","malden","tem_anizay","takistan","sara"];
tropicalmaps = ["tanoa","cam_lao_nam"];
temperatemaps = ["enoch","chernarus_summer","vt7","tembelan"];
arcticmaps = ["chernarus_winter"];