Opened 9 years ago
Last modified 14 months ago
#3008 new enhancement
Atlas should handle garrisoned units
Reported by: | mimo | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Atlas editor | Keywords: | |
Cc: | Patch: |
Description (last modified by )
With #2984, maps can have garrisoned units (useful for example for nomad sea map). This is set in the script map in its .xml
file. If holder
is the GarrisonHolder
entity, and ent1, ent2, entN
the entities to garrison, the script would be:
<?xml version="1.0" encoding="UTF-8"?> <Scenario version="7"> <Script> let cmpGarrisonHolder = Engine.QueryInterface(holder, IID_GarrisonHolder) if (cmpGarrisonHolder) cmpGarrisonHolder.initGarrison = [ent1, ent2, entN]; </Script>
Atlas should be able to deal with such garrisoned units:
- find a way to display garrisoned units
generate such a script from all garrisoned units when saving a map (done)
Change History (5)
comment:2 by , 9 years ago
the ticket #1404 show how to do garrisoned unit, and in this way will be supported in atlas lately
comment:3 by , 4 years ago
Description: | modified (diff) |
---|
Support garrisoned enitites defined in map files.
This is adding support to handle garrisoned entities defined in map files by game engine and atlas allowing future extension for atlas ui and solving recreation of entites on init in D1958. Also solving deepfreeze described in D2562.
Differential Revision; https://code.wildfiregames.com/D2597 Ticket: #3008 Patch by: Freagarach Comments by: elexis
comment:4 by , 4 years ago
Description: | modified (diff) |
---|
comment:5 by , 14 months ago
Description: | modified (diff) |
---|
- use syntax highlighting for the
.xml
part - wiki/WikiProcessors- remove the
<![CDATA[...]]>
part, because it is not needed for executing the code inside theScript
tags
- remove the
Following r16270, the garrison info is now expected from the map JSON file. An example is given in the maps/scenarios/Sicilia_Nomad.xml:
Concerning the Atlas implementation, I would propose something like: when we Ctrl-click on a holder (or the same key as for game garrisoning if different), a new panel appears with the list of units garrisoned inside, and we can drag units from the map to the panel, and vice versa.