Jump to content

Zerzala

How do lifetime, restock and min fit together?

Recommended Posts

The question is simple, but extremely pressing. Let's say I have a certain item registered in a single copy on the server (nominal) and it has a lifetime of 1 hour, and a restock of 24 hours. min is set to 1. Attention question, after 1 hour it will go into restock for 24 hours or the expiration of the lifetime is not considered a reduction of the min value to 0, because it was not picked up by a player and the server will simply place it in a new random place?

Share this post


Link to post
Share on other sites

@Zerzala Sorry but I don't speak English and I have to use Google which translates very roughly. I didn't understand your question very well, if you can explain it in a simpler way for Google translations, maybe I can help you in some way. It would help the exact text of the ^types.xml^ file (only the object you are interested in, you don't need the whole file). 😉

Share this post


Link to post
Share on other sites
  On 2/25/2025 at 11:23 AM, Zerzala said:

The question is simple, but extremely pressing. Let's say I have a certain item registered in a single copy on the server (nominal) and it has a lifetime of 1 hour, and a restock of 24 hours. min is set to 1. Attention question, after 1 hour it will go into restock for 24 hours or the expiration of the lifetime is not considered a reduction of the min value to 0, because it was not picked up by a player and the server will simply place it in a new random place?

Idea of system is simple.

Max - Min = between <- this value would amount of items on your server.

Like: max = 2, min = 1, mid = 1, so 1 item of that class you can find around the map.

Now the lifetime: lifetime is the value, that's defined how long will your item will be stored on the server. Keep in mind, that if item was changed (putted into/out vehicle/storage -> lifetime will be resetted to MAX), each second the lifetime will be moved down, when lifetime of current item reaches 0 -> item would be removed from server. Since that second started the cooldown period (24 hrs, based on your definition), and in range 24 hrs item of that class will not appeared anywhere. That's how it works. When 24hrs timeout is ends - server can spawn new item of that class, and so on...

Edited by Sid Debian

Share this post


Link to post
Share on other sites

i think the restock values are broken since ages for items that uses nominal "1". if u pick up that SINGLE item it will respawn somewhere on the map in an instant - no matter how long u set the restock timer. it doesnt matter if u set the min value to "1" or "0". instant restock always.

theres a ticket about that on their feedback tracker for quite some time.

Share this post


Link to post
Share on other sites
  On 2/26/2025 at 4:20 PM, etwas said:

i think the restock values are broken since ages for items that uses nominal "1". if u pick up that SINGLE item it will respawn somewhere on the map in an instant - no matter how long u set the restock timer. it doesnt matter if u set the min value to "1" or "0". instant restock always.

theres a ticket about that on their feedback tracker for quite some time.

If you're brake your types - that's fine behavior. If you didn't breake the types - that will not ever happens.

Also you forgot about flags behavior, if you didn't set Count_In_Players flag for the item, the Central Economy (CE) will not check that case and if item will be stored somewhere else then on ground, CE will reconsider that's item's count isn't enough and in emergency case will request for respawn items of that class.

Share this post


Link to post
Share on other sites
  On 2/26/2025 at 5:12 PM, Sid Debian said:

If you're brake your types - that's fine behavior. If you didn't breake the types - that will not ever happens.

Also you forgot about flags behavior, if you didn't set Count_In_Players flag for the item, the Central Economy (CE) will not check that case and if item will be stored somewhere else then on ground, CE will reconsider that's item's count isn't enough and in emergency case will request for respawn items of that class.

sorry i dunno what you're trying to tell me? with "break" the types u mean errors in the types.xml? well if that would be the case nothing would spawn at all. my types.xml is fine, validated.

i know hopw flags work and how to set up - the flags arent the issue. theres item xy and it only counts in the map flag. if its set to nominal "1" and taken, it will instantly respawn, no matter the restock values. this values work fine if "nominal" is set to "2" or higher.

heres the nearly 2 year old ticket (in regards to events.xml, but same behaviour): https://feedback.bistudio.com/T172127

Edited by etwas

Share this post


Link to post
Share on other sites
  On 2/26/2025 at 6:07 PM, etwas said:

sorry i dunno what you're trying to tell me? with "break" the types u mean errors in the types.xml? well if that would be the case nothing would spawn at all. my types.xml is fine, validated.

i know hopw flags work and how to set up - the flags arent the issue. theres item xy and it only counts in the map flag. if its set to nominal "1" and taken, it will instantly respawn, no matter the restock values. this values work fine if "nominal" is set to "2" or higher.

heres the nearly 2 year old ticket (in regards to events.xml, but same behaviour): https://feedback.bistudio.com/T172127

Just place the quantmax in front of quantmin, or any also xml-tag. And scheme of XML would be broken and case the 'magic carpet ride'...

Share this post


Link to post
Share on other sites

yea well im sure theres no errors in the file. this can be easily tested with a vanilla file by just changing one entry and make its nominal value "1" and minimal as same or below. pick that item up in-game - use admin tools to check if it respawned again already, below the set restock times.

the restock timers work great if the nominal is "2" or higher.

Share this post


Link to post
Share on other sites

I am interested in the combination restock and lifetime. I'll show you a clear example:
        <nominal>1</nominal>
        <lifetime>7200</lifetime>
        <restock>86400</restock>
        <min>1</min>
Do I understand correctly that after 2 hours my item will disappear and will appear only after 24 hours for two hours?

Share this post


Link to post
Share on other sites
  On 2/27/2025 at 11:24 AM, Zerzala said:

I am interested in the combination restock and lifetime. I'll show you a clear example:
        <nominal>1</nominal>
        <lifetime>7200</lifetime>
        <restock>86400</restock>
        <min>1</min>
Do I understand correctly that after 2 hours my item will disappear and will appear only after 24 hours for two hours?

Take the base: 1 hour = 3600 seconds.

By your numbers:

lifetime = (7200 / 3600) = 2 hours.

restock = (86400 / 3600) = 24 hours.

So your item just spawned, it will be on the same place next 2 hours, then it will be removed, since that 'mark' started 24 hours cooldown. When 24 hours is ended item shall be spawned again (possibly at different location).

  • Like 1

Share this post


Link to post
Share on other sites

@Zerzala Exactly... this is the theory... this is how the game should work... as Sid Debian wrote above.

But keep in mind that DayZ is full of bugs and anomalies, even on CE. So don't be surprised if you don't always get exactly what you set.
But always check the XML files with an online validator, making a mistake with a space or a comma is a snap and the consequences can be the most absurd.
I can recommend:
www.xmlvalidation.com
&
codebeautify.org/xmlvalidator

😉

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×