DayZ
Spawning different items with different damage values?
So, I’m looking for a way to spawn specific items, or groups of items, with their own damage values. Everything in cfgspawnabletypes is affected the same and I’m not sure how to make it behave otherwise.

Is there a way to have separate sections in the file? For example, one section would be “<damage min="0.1" max="0.2” /> with selected items, and another section with “<damage min="0.8" max="0.9" />”.

Any way to accomplish something like this? The best I can do is include items that I also want to have the one set level of wear or exclude items if I want them to be pristine, but they would lose their cargo function as a result.
< >
Showing 1-7 of 7 comments
Originally posted by ColdNhungry:
Is there a way to have separate sections in the file? For example, one section would be “<damage min="0.1" max="0.2” /> with selected items, and another section with “<damage min="0.8" max="0.9" />”.
i asked that question in the dayz forums, but never received an answer for that. guess u just gotta try it out. im gonna have a look at it when 1.14 goes stable and i wipe my server.

as u already played with that settings:
this values go from 0.0 pristine to 1.0 ruined? at which settings worn, damaged and badly damaged start/end?
but im quite sure it would work seperating items, maybe like this way:
</type>
<damage min="0.8" max="0.9" />
<type name="ItemXY">
Originally posted by etwas:
Originally posted by ColdNhungry:
Is there a way to have separate sections in the file? For example, one section would be “<damage min="0.1" max="0.2” /> with selected items, and another section with “<damage min="0.8" max="0.9" />”.
i asked that question in the dayz forums, but never received an answer for that. guess u just gotta try it out. im gonna have a look at it when 1.14 goes stable and i wipe my server.

as u already played with that settings:
this values go from 0.0 pristine to 1.0 ruined? at which settings worn, damaged and badly damaged start/end?
but im quite sure it would work seperating items, maybe like this way:
</type>
<damage min="0.8" max="0.9" />
<type name="ItemXY">

I can try a bit of testing and let you know, atm I have it at 0.8-0.9, but I'll try different values in the next couple days. I wonder If 0.75 works for example. maybe they are somewhere in between for when they switch condition, unless they are set to 1/10 decimals. Something like:

Pristine: 0.0 - 0.250
Worn: 0.251 - 0.575

or something like that..

For separate items though, I tried inserting damage values per item like you mentioned above, but it is ignored, items following the value at the top. I also tried opening a second table at the bottom:

<spawnabletypes>
<damage min="0.4" max="0.5" />
(other items)
</spawnabletypes>

but it is also ignored, items spawning in back to their default as Pristine.

Guess I'll keep trying stuff :steamsad:
Originally posted by ColdNhungry:
Originally posted by etwas:
i asked that question in the dayz forums, but never received an answer for that. guess u just gotta try it out. im gonna have a look at it when 1.14 goes stable and i wipe my server.

as u already played with that settings:
this values go from 0.0 pristine to 1.0 ruined? at which settings worn, damaged and badly damaged start/end?
but im quite sure it would work seperating items, maybe like this way:
</type>
<damage min="0.8" max="0.9" />
<type name="ItemXY">

I can try a bit of testing and let you know, atm I have it at 0.8-0.9, but I'll try different values in the next couple days. I wonder If 0.75 works for example. maybe they are somewhere in between for when they switch condition, unless they are set to 1/10 decimals. Something like:

Pristine: 0.0 - 0.250
Worn: 0.251 - 0.575

or something like that..

For separate items though, I tried inserting damage values per item like you mentioned above, but it is ignored, items following the value at the top. I also tried opening a second table at the bottom:

<spawnabletypes>
<damage min="0.4" max="0.5" />
(other items)
</spawnabletypes>

but it is also ignored, items spawning in back to their default as Pristine.

Guess I'll keep trying stuff :steamsad:
ah that sucks. i dont see another way then.
Have you tried using this:

https://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding

To my understanding (warning: very very poor understanding :D) it should be possible to apply custom damage values by creating a custom cfgspawnabletypes.xml file.
Originally posted by Coco Rouge:
Have you tried using this:

https://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding

To my understanding (warning: very very poor understanding :D) it should be possible to apply custom damage values by creating a custom cfgspawnabletypes.xml file.

Hum.... I have used that to add a mod to my server, thanks to a reply in another thread.. maybe I can use it for this too? Thanks for bringing it to my attention might be worth a shot. Let's see if I can figure this out as a noob to all this stuff hehe.
Update: I made it all work :)

So, as far as the condition goes it's:

0.0-0.2 = Pristine
0.3-0.4 = Worn
0.5-0.6 = Damaged
0.7-0.9 = Badly Damaged

I also checked to see if they were anywhere in between, say if pristine ended at 0.250 and worn started at 0.251 etc., but they all are in fact rounded up.

For setting any number of items to any spawn condition, simply use the cfgeconomycore.xml to adjust them.

1. I made a folder called "Item_conditions" inside the map's folder, in my case "DayZServer-Namalsk\mpmissions\hardcore.namalsk" (where cfgeconomycore is).
2. Inside I made 2 new files "cfgspawnabletypes_2.xml" and "cfgspawnabletypes_3.xml"
3. Copy/pasted items from the original into the new ones and set the damage at the top to what I wanted.

4. Opened "cfgeconomycore", added these lines:

<!-- Worn Item Condition -->
<ce folder="Item_conditions">
<file name="cfgspawnabletypes_2.xml" type="spawnabletypes" />
</ce>
<!-- Damaged Item Condition -->
<ce folder="Item_conditions">
<file name="cfgspawnabletypes_3.xml" type="spawnabletypes" />
</ce>

For this test I set rifles to worn, pistols to damaged (clothes were already set to badly damaged in the original one), It was a quick in-game check since I had already set all item lifetimes to 5 minutes and everything started spawning in as intended.

Thanks again to @Coco Rouge for reminding me of that file.. guess it skipped my mind since I thought it was specifically for adding mods to the economy hehe :steammocking:
well done dude :) thanks for testing it out and tell us the results!
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Sep 2, 2021 @ 12:29pm
Posts: 7