Gamers logo

DayZ Console Modding V2.3

Custom spawning chests, vehicles, buildings and more

By L.RPublished 2 years ago 5 min read
1
(image source: https://store.steampowered.com/agecheck/app/221100/)

Welcome to the third installment of my DayZ Modding guide for console server owners. The previous article focused on default events that are already coded into the XML files, which handle the spawning of animals, helis, cars and more. This time I shall introduce you to creating your own custom events, so you can place game objects almost anywhere on the map.

First a recap on how each line effects the in-game workings of the Events.xml file:

<event name="ItemCustomExample> </event> - The opening and then closing tags used for each entry within events.xml, as well as declares the event name for use in cfgeventspawns.xml.

<nominal> - This is the total amount of potential locations that can have a spawn of the event.

<min> - This is the lower bound. When there is only this many instances of an event left on the map, the server will begin to spawn more up to nominal value.

<max> - This is the upper bound. When this many instances of the event have spawned the server will stop spawning more.

<lifetime> - Assuming no player interaction (meaning that no player has come within the saferadius) this is the amount of time each spawn of an event will stay on the map before despawning.

<restock> - This is the amount of time between individual spawns of an event up until nominal or max value has been spawned across the map.

<saferadius> - This value determines how close/far away from a player, other events and base objects an instance of an event can spawn. Each time a player comes within this distance of an event it will reset to the value it is set to here. If it is set to 0 it could in theory spawn on top of a player and also can't be effected by player proximity unless they literally sit on top of the precise co-ordinates.

<distanceradius> - This is the minimum distance that instances of an event can spawn from each other.

<cleanupradius> - How far away a player must get before the events despawn timer (lifetime) kicks in.

<flags deletable="0" init_random="0" remove_damaged="1" /> all three of these "flags" accept one of two values: 1=on and 0=off.

  • deletable - This decides if individual spawns of event can be despawned when the event lifetime reaches zero.

  • init_random - unknown, is set to 0 on all events.

  • remove_damaged - This value decides if ruined truck/car or killed (animal/zombie) spawns are removed. (effects not well understood)

<position> - This value determines if spawn is relative to a "fixed" position or to "player" proximity.

<limit> - If this option is set as "child" the event will spawn one of the objects from the "<child" lines at each usable location, up until nominal value is on the map. If this is set to "mixed" then a combination of the child min/max values and the parent min/max values above are used to detrmine the spawn ratios. "custom" is another valid value but it's direct effects are not yet known or fully understood..

<active> Determines if the event is activly spawning on the map or not. 1=on 0=off.

<children> </children> - the opening and closing tags for the "child" lines that then go between them.

<child lootmax="0" lootmin="0" max="50" min="30" type="PileOfWoodenPlanks"/> - Each of these "<child" line tell the server what game object/s and how many of them the event handles.

  • lootmax and lootmin (when applicable) determine the minimum and maximum amount of loot objects that can spawn around an instance of an event.

  • min and max determine the amount of the designated game object the event can spawn.

  • type is the file name for the game object you wish the event to spawn on the map.

With the quick recap out of the way, the first thing to ensure when you are naming your custom made events is that you prefix the names you choose for them with one of these words:

"Animal" - must be used when the event spawns animal objects. "AnimalWolfCustom" as a working example.

"Item" - must be used when the event spawns items. "ItemSeachest" as an example.

"Vehicle" - must be used when the event spawns trucks or cars. "VehicleSarkaCustom" as an example.

"Static" - must be used for events that spawn buildings and/or other game objects like heli crashes and police wrecks. "StaticCustomHeli" for example.

(Example entry in events.xml to spawn a single water pump)

The events.xml code example shown above, tells your server to spawn 1 instance of the event on the map including 1 instance of the "Land_Misc_Well_Pump_Blue" object with a lifetime of "500" seconds in a "fixed" position. This means that the pump will always be at the coordinates designated in cfgeventspawns.xml instead of only spawning when a player is in the same area and will respawn every 500 seconds provided no other objects or players are blocking the spawn point.

(Example entry in cfgeventspawns.xml telling the server where to spawn the waterpump)

There are two easy ways o get the coordinates to then use for your custom events. You can either use position data from server logs by taking damage on the spot you want to spawn a game object, or you can use the Izurvive online map to copy/paste the desired coordinates. Just be aware that positions pulled from izurvive only give us the X and Y positions in this format (1234.12 / 1234.12). You will need to seperate these two values to then use them in your files. The "a" value sets the rotation facing north/south and can be any whole number from 0-360. 0/360 = North facing, 180 = south facing as simple examples.

For more help, support and guidance please join my Discord: https://discord.gg/pp5JJDu

If you would like to support me in my efforts to try to make coding Dayz XML easier for all, please donate to the cause via one of the two methods below:

http://paypal.me/mrflyingbiscuits

https://cash.app/%C2%A3Rventris

how to
1

About the Creator

L.R

I mostly find myself here to release creative flair, but also like to pass on what knowledge I can, so the odd tutorial and/or guide worms it's way to the forefront of my mind along the way =)

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.