Jump to content

Rolling back to day 1? -- SOLVED


Recommended Posts

EDIT: Figured it out, steps are in my other post

 

Hey, I'm wondering if it's possible to rollback to day 1 on my server. We really like the gen and basically wanted to restart the same world with different characters.

I found some info about this, but it didn't work for me. 

 

print(TheWorld.meta.seed)

You can apply a seed to your world generation by editing Steam\steamapps\common\Don't Starve Together\data\scripts\worldgen_main.lua

You edit this part by replacing the X's with your seed and removing the 2 dashes before SEED. It should come up as line 4 if you're using notepad++ or something similar.

--SEED = XXXXXXXXX -- Force roads test level 3

 

Does this method still work? I thought I did it correctly but maybe I didn't. The command c_rollback(#ofdays) works, but only for the default 4-5 days it saves. 

Link to comment
Share on other sites

26 minutes ago, humanbean said:

Does this method still work? I thought I did it correctly but maybe I didn't. The command c_rollback(#ofdays) works, but only for the default 4-5 days it saves. 

I think you have to create a new world, and cannot rollback your old world, but it will actually work the way you want it. When you change the code in worldgen_main.lua to have "SEED =" your seed, that seed applies to every world that is generated, so only the new ones. But new ones will be clones of whatever old world had that seed.

You'll want to change the seed back to random after you create the new old world, I imagine, or all your worlds are going to be clones of each other.

Just my guess though. Haven't tested it.

...

 

SEED = os.getenv("SEED") ........

 

Link to comment
Share on other sites

Just figured it out. Gonna write the steps because while looking for the answer I found a few ways of (attempting) to do it. So hopefully this helps someone in the future :p

 

  • While DST is open in your world gen you'd like to copy, open console and type: print(GetWorld().meta.seed)
  • Write down the 10 digit number that appears in the console window
  • Goto Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\databundles
  • Unzip scripts.zip/rar/7z/etc in the previous folder (\data) and place it in a new folder named "scripts"
  • Rename scripts.rar (in \databundles) to something else, like backup_scripts.rar
  • Open your new scripts folder and look for worldgen_main.lua (make a copy and name it "backup" just in case of mistakes), open with notepad/etc
  • Look at the 4th line, stating "--SEED = xxxxxxxxxx -- Force roads test level 3"
  • Input your 10 digit Seed number obtained in game, replacing those 10 numbers
  • Erase the 2 "--" before "SEED" (allowing the code to run), save the edited worldgen_main.lua
  • Open DST, start new game with the same size your desired world gen was and POOF!
  • I also used the same less/default/more/lots options as my original gen, not sure if that's needed or not, but the size being the same is needed otherwise it doesn't load

 

Hope that makes sense! If a mod wants to edit the forum titled to have "SOLVED" at the end that might help out! Thanks

Link to comment
Share on other sites

Oh, yeah you also have to unzip the scripts bundle, if you hadn't done that yet. Glad you figured it out!

Again, be sure to add the "--" back, if you want to generate new worlds that aren't just a copy of your old one.

Link to comment
Share on other sites

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...