Hello. So I've been play testing with the events.xml file and I've come to a hard conclusion that the "restock" value does not work at all. Not sure if this has been reported already or if this is a known bug but I've been messing around with lots of different values and nothing changes. Any possible explanation for this or does need to be fixed? Cheers.
Description
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- N/A
- Operating System
- Windows 7
- Category
- General
- Spawn an event
- Add a restock value
- Let event despawn
- Restock isnt taken into account.
Seems like they respawn everytime after 45secs after despawn of an event when another item is required to spawn again. It would also help if we could get some documentation of the whole file. Seems like events/types/eventgroups/eventspawns/economy.xml hasnt got one which would be really useful.
Event Timeline
What are the event min/max values? It works just like the types.xml file. It will need to reach the minimum and restock back to the max value. It will also depend if your limit is child, parent, mixed etc.
For what it's worth, I have run into this, as well. Say I want:
- one dynamic contaminated zone active at a time
- them to last 10 minutes
- to have a 30-minute gap between when the previous zone lifted and the next one spawned
I set the Lifetime to 600, the restock to 1800, and the max events to 1:
<event name="StaticContaminatedArea"> <nominal>1</nominal> <min>1</min> <max>1</max> <lifetime>600</lifetime> <restock>1800</restock> <saferadius>0</saferadius> <distanceradius>120</distanceradius> <cleanupradius>0</cleanupradius> <secondary>InfectedNBC</secondary> <flags deletable="1" init_random="1" remove_damaged="0"/> <position>fixed</position> <limit>parent</limit> <active>1</active> <children> <child lootmax="0" lootmin="0" max="1" min="1" type="ContaminatedArea_Dynamic"/> </children> </event>
However, oddly enough there only ends up being 15 minutes total between events:
16:05:01 [CE][VehicleRespawner] (PRIContaminatedArea) :: Respawning: "StaticContaminatedArea"
16:20:26 [CE][VehicleRespawner] (PRIContaminatedArea) :: Respawning: "StaticContaminatedArea"
I've messed around with so many values its insane. As @sanguine00 said above, try that event and it wont do what is required.
It doesn't work like that. It only restocks if you have more than one event instance. Your max/nominal values need to be higher than the minimum value, in order for the event to restock in intervals, using the specified value back to the nominal.
It works exactly like the types.xml Restock tag.
Already tried that. I put the min to 0. No difference. I've tried with other higher numbers with nom and max above the min. No difference.
How much distance apart are the other eventspawn locations you have? Could they not be spawning in because your player is too close etc?
Josie Garfunkle and Dabz Doritos have confirmed that restock works for their events after speaking to them. 🤔
I am only testing one event and I’ve set the parameters so I can be next to it and it can respawn.
Josie is the owner of the GCode discord. Have you tried adding a second coordinate, say 200m away? So the event switches between locations?
The restock won't activate in this case though, because there's only one event at one location.
It's like having a piece of loot set to 1 nominal and 1 min in types.xml, and expecting the restock value to kick in there.
So what you’re saying it I need at least a nominal of 2 and 2 event locations for restock to work. Or do I just need a second coordinate?
Make the nominal what you like, but ensure it's higher than the min value. Having more locations closer together will let you observe the restock working. I believe the airstrike event with the test explosion as the child, uses the restock method to stagger the explosions.
You effectively want something like the below:
<event name="StaticAirStrike1"> <nominal>3</nominal> <min>3</min> <max>4</max> <lifetime>5</lifetime> <restock>10</restock> <saferadius>0</saferadius> <distanceradius>1</distanceradius> <cleanupradius>1</cleanupradius> <flags deletable="1" init_random="0" remove_damaged="0"/> <position>fixed</position> <limit>mixed</limit> <active>1</active> <children> <child lootmax="0" lootmin="0" max="4" min="3" type="ExplosionTest"/> </children> </event> <event name="StaticAirStrike2"> <nominal>3</nominal> <min>3</min> <max>4</max> <lifetime>5</lifetime> <restock>11</restock> <saferadius>0</saferadius> <distanceradius>1</distanceradius> <cleanupradius>1</cleanupradius> <flags deletable="1" init_random="0" remove_damaged="0"/> <position>fixed</position> <limit>mixed</limit> <active>1</active> <children> <child lootmax="0" lootmin="0" max="4" min="3" type="ExplosionTest"/> </children> </event> <event name="StaticAirStrike3"> <nominal>3</nominal> <min>3</min> <max>4</max> <lifetime>5</lifetime> <restock>12</restock> <saferadius>0</saferadius> <distanceradius>1</distanceradius> <cleanupradius>1</cleanupradius> <flags deletable="1" init_random="0" remove_damaged="0"/> <position>fixed</position> <limit>mixed</limit> <active>1</active> <children> <child lootmax="0" lootmin="0" max="4" min="3" type="ExplosionTest"/> </children> </event> <event name="StaticAirStrike4"> <nominal>3</nominal> <min>3</min> <max>4</max> <lifetime>5</lifetime> <restock>13</restock> <saferadius>0</saferadius> <distanceradius>1</distanceradius> <cleanupradius>1</cleanupradius> <flags deletable="1" init_random="0" remove_damaged="0"/> <position>fixed</position> <limit>mixed</limit> <active>1</active> <children> <child lootmax="0" lootmin="0" max="4" min="3" type="ExplosionTest"/> </children> </event> Having the limit as 'Mixed' gives the desired airstrike effect and staggered restock values allows the events to effectively loop. You might need to have multiple events to get the desired effect.