Datasheet Modding/Sandbox/Spawners

## Spawners

Spawners are utilized to create groups of ships on the map and fill the game with NPC entities.

### /

This field defines the name of the spawner (Unique String)

### Group

This field defines the name of the static group the spawner is assigned to (String). This is the origin location of the spawner.

References the Sandbox/Static Group values

### Entity

This field defines the name of the static entity the spawner is assigned to (String). This is the origin location of the spawner.

References the Sandbox/Static Entity

### Spawn Type

This field defines the Spawn type of the spawner (Predefined String)

Available spawn types (known):

* Air Patrol
* Warships
* Submarine
* Convoy
* Transport
* Coastal Defense Patrol
* Reserve

### Activity

This field defines the activity of the spawner (Float) . It is the % chance the entity type will appear. This value is evaluated once per in game day.

Examples:

* 100% - a spawner will create the defined spawner type every day.
* 0% - a spawner will create never create a spawner type

(Tip this is the closest method currently available to define the frequency of a spawner. Example if you want a spawner to create a convoy every 7 days. The daily activity rate would be 1/7 or 16.6%)

### Patrol Speed

This field defines the Patrol speed (Int) of the spawner in ? Knts. (0-1000). This speed only applies to unloaded entities (groups not near the player).

Once loaded near the player the entities will follow the defined speed for the entity type (see Entities/Types)

Example: 7 (7 Knts)

### Start Date

This field defines the start date of the spawner

Format: YYYY-MM-DD Example 1939-09-31

### End Date

This field defines the end date of the spawner

* Format: YYYY-MM-DD
* Example: 1939-09-31

### Target Region or City

This field defines the Destination of the spawner

The following type of values can be used for this field

* Region
	+ Format [Region]
	+ Example: British Coast (references values from Sandbox/Regions)
* Grid
	+ Format [Grid Name] (references values from Sandbox/World Grids)
	+ Example AN, AN2, BF34
* Grid with Patrol Weight
	+ Format [Grid Name]:[Weight (float)]
	+ Examples: AN2:1, AN:0.3, BF:0.01
* City/Port
	+ Format: [Static Group]:[Static Entity]
	+ Example Alexandria:Port of Alexandria

Specific Target Region or City value formats depend on the spawner type selection

* Air Patrol: Grid, Grid with Patrol Weight
* Warships: Grid, Grid with Patrol Weight
* Submarine: Grid Grid with Patrol Weight
* Convoy: City/Port
* Transport: City/Port
* Coastal Defense Patrol: Region
* Reserve: N/A

### Countries

This field defines the list of Countries that can be utilized by the spawner.

* Format [Country]:[Weight] (references values from Sandbox/Countries)
	+ This can be a comma separated list of country values
	+ Country values can also utilize a weight value (float)
* Examples
	+ GB,IE
	+ GB:1,IE:0.2

### Group Name

This field defines a custom group name with is used as the display name within the map for a group contact.

* Format [Group Name (string)]
* Example: A Custom Convoy Name
* By Default, when no value is given, the name is based of the spawner type: "Unidentified Convoy" or "Warship Code" or "Air Patrol Code" the exact syntax is defined in the Locales/UI ?

Note: Not all spawner types can currently utilize the Group Name value, Only Transports and Convoys spawners are able to utilize this datasheet value as the group contact name

Tip: The Group Name can be useful for providing a generic identification of a group contact for the player (i.e Unknown Merchant Vessel or Large Convoy). It can also be utilized for debugging a specific spawner by giving a unique name to quickly identify the spawner on the map (i.e Spawner #123)

### Waypoints

This field defines the waypoints utilized by the spawner

* Utilizes a comma separated list of waypoints enclosed in parenthesis '()'
	+ Example ([Waypoint 1]),([Waypoint 2])

The values of the waypoint are separated by semicolons ';'

* Waypoint Format: ([Decimal Lat];[Decimal Long];[Radius Nmi? (optional)])
	+ Example: (57.00;13.10;10)
	+ Example: (47.00;15.00)

Waypoints do not have to be provided for a spawner, as the group will automatically try to plot a course to the destination region, grid, port.

When waypoints are defined for spawners, the waypoints are first utilized for the spawned group. Once all waypoints are complete then the Target Region or Grid is automatically plotted from the last waypoint.

Note: When ships travel along waypoints they will try to plot the best course to the next waypoint. So if there is a coastal region in between two waypoints the spawner group will try to generate the best path to the next waypoint. However if the distance to the next waypoint is too great or too complex to plot, a straight line / direct course may be generated, which could cause a spawner to travel through land)

Tip: waypoints are useful to provide navigation in close proximity to bodies of land, within small bodies of water, navigation near ports, and long travel distances.

### Contents

This field defines the content of a spawned group. The entity category used within the spawner as well as the number of entities for each category

Utilizes a semicolon separated list of Entity categories followed by a comma separated list of weights for the number of ships used for that category.

* Format: [Entity Category] (Ship # Weights)
* Example: Freighter (0, 1)

Entity Category references the values from Entities.xlsx/Types/Category

The "Ship # Weights" are defined within a comma separated list of weights for each integer of possible n number of ships

* Format ([0 ships], [1 ship], [2 ships], [3 ships], etc) Alternatively, where n=0, (n, n+1, n+2, n+3, etc.)
* Example: Freighter (1, 0, 0.5, 1)
	+ Explanation: a weight of 1 is defined for the spawner having 0 Freighters spawn, a weight of 0 is defined for the spawner having 1 Freighter spawn, a weight of 0.5 is for the spawner having 2 Freighters spawn, and a weight of 1 is defined for having 3 Freighters spawn.

### Min Hour (Relative to Sunrise)

This field defines the minimum time of day relative to sunrise that a spawner will spawn

* Format (Float)
* Example: 0 (the entity will only start spawning at sunrise)
* Example: -100 ( the entity will spawn after midnight)

Example: 1.5 ( if sunrise is at 0500 the entity will only spawn after 0630)

Note: the time of sunrise will be different at different times of year/ locations on the globe

### Max Hour (Relative to Sunset)

This field defines the maximum time of day relative to sunrise that a spawner will remain on patrol / active

* See format and examples above

After this time relative to sunset, the spawned group will attempt to return to the origin port or airfield.

(Tip: this is useful for defining limits on when air patrols or coastal defense groups are away from port or their home base)

### Max Fuel

This field defines the maximum travel distance for a spawned group

* Format: (Float)
* Example: 3000.0

Comment: This seems to calculate the maximum travel distance in (Km?) that a group has travelled, once the value reaches 0, the group attempts to return to the origin Port/Airfield. This seems to override any value defined in the Entites.xlsx/Type/Range?.