Gamers logo

DayZ Console Modding V2.5

How to make guns and vehicles spawn with all their parts.

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

In this next part of the series I'm going to cover one of the more straightforward changes you can make to your DayZ xml files, making vehicles and guns spawn with all their parts attached ready to go. Doing this can massively improve the quality of life on your servers, especially if wanting to make things a little easier. For the most part the only file we'll be making changes to is cfgspawnabletypes.xml. But first we should despawn all the vehicles that have already spawned across the map by default. To do this open Events.xml and scroll down to the entries for spawning vehicles. You should see four for cars and one for trucks. On these events set <active> to 0, then hit save, upload the file to Nitrado and finally do a server restart.

(example of vehicle event with <active> set to 0)

With the vehicles now despawned from the map, open cfgspawnabletypes.xml and like before scroll down to the entries for spawning vehicles. You should see fifteen of these, three of them are for the trucks and twelve are for cars. Each of these entries list the parts for the colour and model of the vehicle along with the chance values for those parts to then spawn on them. All that needs to be done here to make the vehicles spawn fully built is raising every chance value for each part on all fifteen entries to "1.00".

(example of a vehicle entry in cfgspawnabletypes.xml)

Once you have saved and uploaded these changes, go back to Events.xml, set <active> to 1 on all five vehicle entries and once again save, upload and do another server restart. This will reactivate the vehicle events, spawning vehicles across the map fully built, ready to go. Just be aware that for some reason, fully built vehicles spawn with no water in the tank.

Now that you have your vehicles set to spawn with all their parts attached, its time to get to work on the guns. Here just like we did with the vehicles we raise the chance values on parts for the gun entries in cfgspawnabletypes.xml to "1.00" which will make them have 100% chance of being attached to the guns when they spawn. There is one exception to this which is any weapons that have multiple parts for the same slot listed. On these you have two options. One way is to simply set one part to "1.00" and the others to "0.00". The other option is to split the chance values between the number of possible parts. An easy example being if there are four possible parts for the same slot, to set all of their chance values to "0.25" for an even chance of any of them being selected.

(cfgspawnabletypes.xml FAL example)

The reason I didn't set the individual item chance values for the optics in the example above to "1.00" as well is because, the "attachments chance" for each list of items handle how likely one of the parts in the list will be selected, then the chance value on each item line decides how likely they will be the one selected to attach to the gun. With the chance values now set to make guns spawn fully built, you should once again save, upload and then retsart your server. After that any and all new spawns of guns will have all their parts attached. Just be aware that any guns already on the map will not be effected by these changes.

One last thing you can also do, especially if you are wanting your guns to be spawning full of ammo as well, is to go into types.xml and set the <quantmin> and <quantmax> on all entries for gun mags to "100". Again Just like with the actual guns this won't effect instances already on the map, but once the changes go live all new gun spawns will have full ammunition as well as any new spawns of clips & mags across the map.

(example types.xml entry for a gun mag)

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

Just in case you missed them, here are the previous parts to the series:

https://vocal.media/stories/day-z-console-modding-v2-1

https://vocal.media/stories/day-z-console-modding-v2-2

https://vocal.media/stories/day-z-console-modding-v2-3

https://vocal.media/gamers/dayz-console-modding-v2-4

Now although simply reading this article does help support me in my efforts to make coding Dayz XML easier for all, it doesnt help keep the lights on! ;) So if you found that this or any of my other articles have helped you please donate to the cause via one of the methods below:

http://paypal.me/mrflyingbiscuits

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

walkthrough
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.