Opened 9 years ago

Last modified 13 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 Langbart)

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:1 by mimo, 9 years ago

Following r16270, the garrison info is now expected from the map JSON file. An example is given in the maps/scenarios/Sicilia_Nomad.xml:

"Garrison": {
  "holder1": [ent11, ent12, ... ],
  "holder2": [ent21, ent22, ... ]
}

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.

Last edited 9 years ago by mimo (previous) (diff)

comment:2 by trompetin17, 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 Silier, 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 Freagarach, 3 years ago

Description: modified (diff)

In r24161 Store turret positions in map files.

Follow up on r23529. Allows saving turret positions in the map file, instead of relying on the order in which the entities are added.

Differential Revision: D2614 Reviewed by: @wraitii Comments by: @Angen, @bb, @vladislavbelov.

comment:5 by Langbart, 13 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 the Script tags
Note: See TracTickets for help on using tickets.