Jump to content

Setting a world to Day 1 without Rollback?


Recommended Posts

I was wondering if it was possible to change the day of a game back to Day 1 without having to rollback.
I was making a type of game in the world similar to the Hunger Games but I want to have it seem fresh when a player spawns instead of having a messed up day counter due to building the world for a long time, including things like hound attacks becoming stronger when I want them to be weak on the first appearance, etc.
Rolling back would reset the progress of building.

Is it possible to set the world to Day 1 without having to rollback?

You could try:

- removing all 0000000xxx files (where xxx stand for days, for example 0000000864) except last one from Master\save\session\xxxx (where xxxx is a folder that is created automatically, for example F22593DE81938B8E) and rename the last file as 0000000001 (for example 0000000864 would be renamed to 0000000001)
- do the same step mentioned above but for Caves folder
- remove all the folders with players profiles (KU_xxx if got encode_user_path set to false or ... forgot the other format..) from the two folders I mentioned above (for Master and Caves)

The world should, in theory at least as I haven't tested this, be at day 1 without loosing any progress, only the players' progress would be reset.

Make a copy of the files and folders and give it a try and reply back. :)

the solution above won't work since the day count isn't based on the name of a saved session, you can have multiple saves for one day

enter this in your console:

local clock = TheWorld.net.components.clock local data = clock:OnSave() data.cycles = 0 clock:OnLoad(data)

as a custom console command:

function c_setday(day)
	local clock = TheWorld.net.components.clock
	local data = clock:OnSave()
	data.cycles = day - 1
	clock:OnLoad(data)
end

 

I had my doubts that the world count would be reset to 1 by renaming a file, but the idea behind what I suggested is that it would, in theory at least, keep the world progress as is and just reset players progress.

Thanks for the code!

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...