Page MenuHomeFeedback Tracker

Bonfire Json
New, UrgentPublic

Description

If you spawn in a bonfire with json, it will duplicate on restart and when you remove the file, it won't despawn.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
General

Event Timeline

In types change the bonfire lifetime to match the one of your server session.

Not entirely sure right now, but the problem is 100% that the JSON spawns the bonfire, but bonfires are persistent. So on every restart persistence spawns one back and then the JSON as well. You either need to remove bonfires from the persistence types.xml or set the lifetime so they are never saved - but this would also cause your players to not be able to put any custom-placed one into the basis. They would disappear.

Spawning persistent objects is I think out of the scope of the JSON object spawner. But it would be fixable in that the spawner applies after persistence was loaded and checks if an object at more or less the same position is already present, skipping JSON spawn if persistence had it saved. *Maybe* because it is scripted you could even "fix" this with a mod you write.

Not entirely sure right now, but the problem is 100% that the JSON spawns the bonfire, but bonfires are persistent. So on every restart persistence spawns one back and then the JSON as well. You either need to remove bonfires from the persistence types.xml or set the lifetime so they are never saved - but this would also cause your players to not be able to put any custom-placed one into the basis. They would disappear.

Spawning persistent objects is I think out of the scope of the JSON object spawner. But it would be fixable in that the spawner applies after persistence was loaded and checks if an object at more or less the same position is already present, skipping JSON spawn if persistence had it saved. *Maybe* because it is scripted you could even "fix" this with a mod you write.

Lifetime on types is set to 3 (default to script one?). Since cfggameplay release there was a bug, solved this update, where objects would despawn before server session was completed. I assume standard cleanup took that in. The workaround for us Console folks was to add a lifetime as long as the server session itself. Longer, objects would stack, shorter and they would despawn.
We can't change anything in the script, so we gotta "Improvise. Adapt. Overcome"

@TheDevilsKnock It’s 0 and was 0

Can you try setting lifetime to, if you have for example the server restart set to 4 hours, at 14400, spawn one, remove the file after it spawned in, and check if after a few restarts the bonfire is still there? On a test server of course it would be best.