Jump to content

Reusing resurrection stones


Recommended Posts

Hi!

 

Can I make changes to the game's mechanics by just changing the script in the data/scripts folder? I'm not seeking to make a stand alone/redistributable mod; I just want to tweak the game a bit for now. Is this advisable/sane?

 

If so then I'd like to ask for a bit of help understanding how resurrection stones work. I've added debugging statements (I presume print("here!") is the way to go, right?) to the Resurrector:Resurrect function in the resurrector.lua file and they print out fine. I can see this function is calling whatever doresurrect method happens to be on the resurrector. In case the resurrector is a resurrectionstone then I guess the function that'll be called is doresurrect of resurrectionstone.lua, correct? Well, this is where I'm stuck: no print statement seem to execute in the resurrectionstone.lua file on death/resurrection. It's as if I'm looking at the wrong file or... I've even tried commenting out the lightning strike and it still strangely happens. Is the game reverting my changes? Am I looking at the wrong file?

Link to comment
Share on other sites

Hello! You're off to a good start!

 

You can tweak files directly, but the mod API offers two attractive alternatives:

  1. Make a basic mod, add a scripts folder with a copy of the file you want to tweak. You can change that one, and the game will load it instead of the original if the mod is enabled.
  2. In a mods modmain.lua, one can use various PostInit functions and such to modify game content in a way that's highly compatible with other mods.

 

Debug prints are very useful. But in this case its neither "being on the wrong track" nor "witchery", probably you're using RoG. When RoG is enabled, the files from data/DLC0001 override the base game ones (similiar to method 1 for tweaking I mentioned above). RoG has its own resurrectionstone.lua which loads instead.

Link to comment
Share on other sites

@adrianton3,

yes u can just make changes to the games scripts without making a mod, just be aware, that when there's a gameupdate, which updates this file, your changes will be gone, and u will have to reapply them(and dont just backup the file with your changes and the paste the whole file back in, since this will remove the actual change from the update and might break the game).

also, if u ever want play DST, this is ofc. not feasible anymore, unless all of the player on your server make that change.

As for your change not taking effect, be aware that there is a subfolder SteamApps\common\dont_starve\data\DLC0001 for RoG. many files have seperate versions for DS and RoG, u will probably want to make your changes in both.

if u still cant get it to work, post the part of the code that u actually changed pls.

Link to comment
Share on other sites

Yes, thank you both! The game was rightfully ignoring my changes to the non-RoG files. I got everything working now :D

I thought mods only add extra characters or prefabs to the game, not change existing game mechanics - if that's so then yes, a mod sounds like the way to go. 

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