Respawning Garrison

From Savage Game Design Wiki
Revision as of 14:22, 5 June 2022 by Veteran29 (talk | contribs) (Initial documentation of "Respawning Garrison" module)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Respawning Garrison

This page will guide you through adding the Respawning Garrison module to your mission.

This module will continously fill synchronized AI groups with new units until it runs out of tickets or player will step into its area.

Eden Editor - Setting up the garrison

To setup the respawning garrison, place the module in the editor and synchronize it to the AI units, whole group of the synchronized unit will be added to the garrsion. Multiple groups can be added to single garrison. The module can be synchronized to a trigger which will activate the spawning of the units, or alternatively the Code attribute can be used to enable the spawning by returining true. Once the garrison is enabled deactivation of the trigger or returning false from the code will not stop the spawning, garrison does not support other means of deactivation than player getting into the module area.

All synchronized triggers and code work as "or", if only one of them is activated/return true the garrison will be activated.

Attributes:

  • Respawn tickets - how many units can be spawned by the module
  • Code - code condition used to activate the garrison spawning

Spawning behaviour

On the mission start, garrisoned units will be hidden, their simulation and damage will be disabled. Handled groups are not removed, they're just hidden, this allows mission maker to use the editor assigned group variables and waypoints.

Once the module will be activated it will unhide and "enable" the units of the handled groups, after that it will try to maintain the initial amount of units in each of the handled groups, in case of unit in the group dying it will create new one in its place and decrement the amount of tickets by one. Once the amount of available tickets will reach zero the module will stop respawning the units.

Module will use initial position and loadouts of the group for the respawn algorithm, this allows to have precise control of the respawn position, it will be selected randomly from the available pool. This means that the killed unit will be not replaced by exactly same one.

To prevent players from seeing the spawning, the module area is used as an "safezone", if any player is detected in the module area the garrison will interrupt the spawn loop.

Example setup

Example Respawning Garrison module setup.