User Tools

Site Tools


building:spawn:sinfar_system

This is an old revision of the document!


Sinfar Spawning System

This system is technically unlimited: it can support any object type, any number of object, spawn condition or spawn location… but for now it is very limited. If you need an extra feature, please request it instead of making your own system.

Spawning Events

Objects will spawn during a scripted area event called “WokeUp” (msds_wokeuparea) and despawn during an area event called “Area Suspend” (msds_suspendarea). Both events can be registered on a specific area with the following variable event:

  • EVENT_SUSPEND
    This event happens when no player has been in the area for a number of second define by the variable MSDS_SUSPEND_AREA_TIMER here: msds_include.
  • EVENT_WOKEUP
    This event happens when a player enter an area after that is has been suspended.

Spawning a Single Object at a Specific Location.

  1. Create a waypoint at the specific location
  2. Set the tag of the waypoint to: SPAWN_<type letter>_<object blueprint>, where <type letter> is “C” for a creature or “P” for a placeable and <object blueprint> is the ResRef of the placeable or creature that you want to spawn.
    For example, the tag: “SPAWN_C_MOB_WOLF” will spawn this cute wolf: mob_wolf.utc:

Spawning Multiple Objects Inside a Determined Zone

  1. Create a trigger and define the zone with it.
  2. Set the tag of the trigger to SPAWN_C_<object blueprint>.
    For now only creatures are supported.
  3. Add the SPAWN_MIN and SPAWN_MAX integer variables on the trigger to define the minimum and maximum number of creature that should be spawned. Everytime that the area is “reset”, there will be a random number between those 2 values, of creatures spawned:

Spawning Conditions

You can control when the objects will spawn with the following variables:

Variable NameTypeDescription
SPAWN_CHANCEIntegerPercent of chance that the object(s) spawn
SPAWN_TIMEInteger1 = Spawn only during the day
2 = Spawn only during the night
SPAWN_FREQUENCYIntegerMinimum number of seconds after which to re-spawn the objeects. By default objects will re-spawn after that the area has been “suspended” which happen when a player enter the area after that no player has been in it for a number of seconds define by the MSDS_SUSPEND_AREA_TIMER variable here: msds_include. This variable can only extend this duration and the spawning will still only happen in the area “woke-up” event.
building/spawn/sinfar_system.1552241546.txt.gz · Last modified: 2019/03/10 14:12 by Mavrixio