-
Notifications
You must be signed in to change notification settings - Fork 44
[Server Hosting] How to create AI Crash Patrols
Inside your mpmissions/dayzoffline.mapname/expansion/settings/
you will find the AIPatrolSettings.json
Each patrol will have the follow config:
{
"Faction": "West",
"Formation": "",
"LoadoutFile": "",
"NumberOfAI": -3,
"Behaviour": "HALT_OR_ALTERNATE",
"Speed": "WALK",
"UnderThreatSpeed": "SPRINT",
"CanBeLooted": 1,
"UnlimitedReload": 0,
"AccuracyMin": -1.0,
"AccuracyMax": -1.0,
"ThreatDistanceLimit": -1.0,
"DamageMultiplier": -1.0,
"MinDistRadius": -2.0,
"MaxDistRadius": -2.0,
"DespawnRadius": -2.200000047683716,
"MinSpreadRadius": 5.0,
"MaxSpreadRadius": 20.0,
"Chance": 1.0,
"WaypointInterpolation": "",
"DespawnTime": -1.0,
"RespawnTime": -2.0,
"ClassName": "Wreck_UH1Y"
} <=== without a comma if it's the last waypoint
This setting allows you to specify what faction this patrol will be in. You can currently choose between these factions:
- West -> Friendly toward Civilian and West
- East -> Friendly toward Civilian and East
- Raiders -> Hostile toward everyone, including other Raiders (unless they are part of the same group)
- Mercenaries -> Hostile toward everyone except other Mercenaries
- Civilian -> Friendly toward any faction that is not hostile to them (so by default, West, East, Civilian, Passive and Guards)
- Passive -> Always friendly toward others until attacked
- Guards -> Always friendly toward other guards, friendly toward other AI and players as long as they don't raise their weapon
- Shamans -> Friendly towards other shamans, won't attack or be attacked by Zs and animals
Formation of the group. Valid values Column
, File
, Vee
, Wall
or RANDOM
.
The name of your loadout.json containing the weapons, outfit and gear they will carry with them. For example "HumanLoadout"
How many AI will be in this patrol.
If you set this setting to a negative number, the system will spawn a random amount of AI between 1 and the specified number with the sign removed.
For example -6 will tell the game to spawn between 1 and 6 AI.
Desired behaviour of your patrol.
- HALT -> The patrol won't move
- LOOP -> The patrol will follow the waypoints from start to finish, then return to start and repeat. Should only be used if the last waypoint is close to the first waypoint, as the AI will just go in a more or less straight line from finish back to start.
- ALTERNATE -> The patrol will follow the waypoints from start to finish, then from finish to start and repeat
- HALT_OR_ALTERNATE -> The patrol will spawn with a random behaviour of either ALTERNATE or HALT
Maximum speed allowed for the AI when not in combat.
- STATIC
- WALK
- JOG
- SPRINT
- RANDOM -> will give a result between STATIC and SPRINT
- RANDOM_NONSTATIC -> will give a result between WALK and SPRINT
Maximum speed allowed for the AI when in combat.
- STATIC
- WALK
- JOG
- SPRINT
- RANDOM -> will give a result between STATIC and SPRINT
- RANDOM_NONSTATIC -> will give a result between WALK and SPRINT
If set to 1, AI can be looted once dead. If set to 0, they cannot be looted (the item in their hand can still be taken as it will drop to the ground)
If set to 1, AI will be able to reload infinitely if they have a spare mag or ammo in their inventory (mags will refill automagically).
Minimum accuracy of this patrol (0.0-1.0)
- If set to -1 will use the AccuracyMin setting used on the top of the config file.
Maximum accuracy of this patrol (0.0-1.0)
- If set to -1 will use the AccuracyMax setting used on the top of the config file.
The required minimum distance from a player to spawn. If a player is closer than MinDistRadius meters, then the patrol won't spawn
- If set to -2 will use the MinDistRadius setting used on the top of the config file.
The required maxium distance from a player to spawn. If a player is further away than MaxDistRadius meters, then the patrol won't spawn
- If set to -2 will use the MinDistRadius setting used on the top of the config file.
This setting allows you to make each of your waypoints randomized in a radius defined by min/max spread. If you want your waypoints to be accurate, keep this setting at 0.
Spawn chance for this patrol as a value between 0.0 (0%) and 1.0 (100%).
If any interpolation should be used on the given waypoints to smooth out the path at turns. Valid values CatmullRom
, NaturalCubic
, UniformCubic
or empty string (no interpolation).
To illustrate the difference using four waypoints arranged in a zig-zag pattern, look at the following image (image is more exaggerated than the result you will get, as we have an angle threshold of 5 degrees and a distance threshold of 4.5 meters to limit the number of generated points):
How long will it take for the patrol to despawn if no players are in MaxDistRadius.
- If set to -1 will use the DespawnTime setting used on the top of the config file.
How long until this patrol can respawn?
- If set to -1 they won't respawn
- If set to -2 will use the RespawnTime setting used on the top of the config file.
The scripted Object to spawn onto
This is how it should look like once configured
"ObjectPatrols": [
{
"Faction": "West",
"Formation": "",
"LoadoutFile": "",
"NumberOfAI": -3,
"Behaviour": "HALT_OR_ALTERNATE",
"Speed": "WALK",
"UnderThreatSpeed": "SPRINT",
"CanBeLooted": 1,
"UnlimitedReload": 0,
"AccuracyMin": -1.0,
"AccuracyMax": -1.0,
"ThreatDistanceLimit": -1.0,
"DamageMultiplier": -1.0,
"MinDistRadius": -2.0,
"MaxDistRadius": -2.0,
"DespawnRadius": -2.200000047683716,
"MinSpreadRadius": 5.0,
"MaxSpreadRadius": 20.0,
"Chance": 1.0,
"WaypointInterpolation": "",
"DespawnTime": -1.0,
"RespawnTime": -2.0,
"ClassName": "Wreck_UH1Y"
},
{
"Faction": "East",
"Formation": "",
"LoadoutFile": "",
"NumberOfAI": -3,
"Behaviour": "HALT_OR_ALTERNATE",
"Speed": "WALK",
"UnderThreatSpeed": "SPRINT",
"CanBeLooted": 1,
"UnlimitedReload": 0,
"AccuracyMin": -1.0,
"AccuracyMax": -1.0,
"ThreatDistanceLimit": -1.0,
"DamageMultiplier": -1.0,
"MinDistRadius": -2.0,
"MaxDistRadius": -2.0,
"DespawnRadius": -2.200000047683716,
"MinSpreadRadius": 5.0,
"MaxSpreadRadius": 20.0,
"Chance": 1.0,
"WaypointInterpolation": "",
"DespawnTime": -1.0,
"RespawnTime": -2.0,
"ClassName": "Wreck_Mi8_Crashed"
},
{
"Faction": "East",
"Formation": "",
"LoadoutFile": "PoliceLoadout",
"NumberOfAI": -3,
"Behaviour": "HALT_OR_ALTERNATE",
"Speed": "WALK",
"UnderThreatSpeed": "SPRINT",
"CanBeLooted": 1,
"UnlimitedReload": 0,
"AccuracyMin": -1.0,
"AccuracyMax": -1.0,
"ThreatDistanceLimit": -1.0,
"DamageMultiplier": -1.0,
"MinDistRadius": -2.0,
"MaxDistRadius": -2.0,
"DespawnRadius": -2.200000047683716,
"MinSpreadRadius": 5.0,
"MaxSpreadRadius": 20.0,
"Chance": 1.0,
"WaypointInterpolation": "",
"DespawnTime": -1.0,
"RespawnTime": -2.0,
"ClassName": "Land_Wreck_sed01_aban1_police"
}
]
Copyright© 2020-2023 DayZ Expansion Mod Team. We do not authorize any entity to publish this DayZ Standalone modification without licensing from the DayZ Expansion Mod Team.