Hi, I’m quite new to the Nwn1 modding world and I hope you can help me with this simple problem.
I’m trying to figure out how to reload saves in an OC chapter, after making some changes, like adding / modifying some objects in NPCs or after modifying enemies or creatures.
What I noticed with my procedure is this:
-I start a game in Prelude and save it “save1”
-I take the Prelude.nwm file and rename it to Prelude.mod
-I open it with Toolset and add / modify some objects. I save the .mod and rename it back to .nwm, I put it back in its “nwm” folder
-I reload that “save1” game but the game crashes on the loading screen.
What do I miss to be able to modify the campaign as many times as I want, even after having already started a playthrough, and then, after these changes, reload the game and resume it where I left it?
Make all your changes you require, then start a brand new game. A save game will not have changes made to the module when the module is edited after making a save. The save game is a snapshot of what is in the module at that very moment. Perhaps you can edit the save game but I am unfamiliar with such a process.
Thanks for the reply. I was asking this because I had seen in another post that you can edit module scripts.
I had read something similar.
They said to go to the Toolset in “Edit> Module Properties> Events” and change a couple of scripts, specifically they were “OnActivateItem” and OnModuleLoad ".
I was wondering how to do it correctly and thought I’d ask you.
There is a much easier way.
Make an empty module. Edit the scripts (the module inherits them from the base game). With the toolset still open, copy the script .ncs files from modules\temp0 to override.
Now, whether you start a new game or load a save, tag-based scripting will be enabled.
(Of course, you then have to put your custom item templates and scripts into override).
Wow very nice, Proleric, thank you for that.
Specifically which script should I use in the empty module to have this effect?
A couple of short questions.
-Will I have to repeat this same procedure for other chapters as well, creating new .ncs files or just doing it once?
-And finally, by creating an overwrite script, don’t I risk overwriting the original script of a chapter, thus disabling the functions of that chapter indicated in the same fields as the script created by me?
If the scripts are different in each module (haven’t checked) you will need to adapt the approach.
For each module, open in toolset, edit script, copy to override as before. Use the same script name that the module does.
You will need to change OnModuleLoad to turn on tag based scripting. If that switch isn’t there, copy that one line from x2_mod_def_load and turn it on.
OnActivateItem might need changing - if it doesn’t include the tag based scripting lines from x2_mod_def_act, include them.
This should’t interfere with any module-specific items. The point about tag based scripting is that it executes a script which you provide with the same name as the item tag, so your changes to the module code are minimised (following the examples in the default scripts).
you can do it with the hak trick.
although tbh this approach won’t be useful to the OP ; the solution proleric provides later on is much more on-point.
Wow, very interesting, thanks! This forum is endless, I have recently joined and as time passes I realize that there is always a surprise around the corner.
I officially inform anyone who gets here that I have most likely found a solution to the problem and I am testing it.
If it will work correctly without causing errors and bugs, I will soon post a simple and detailed guide to explain how I fixed it.
I noticed that Google doesn’t find much, so I will try to enter many possible keywords that lead to the guide.
I hope the solution works effectively as I would like to help others avoid spending a week figuring out how to fix this.
I take this opportunity to warmly thank each of those present, who have helped and advised me in this problem.
Thank you all!