Author Topic: Edit a script in a saved game  (Read 1062 times)

Legacy_Skildron

  • Sr. Member
  • ****
  • Posts: 421
  • Karma: +0/-0
Edit a script in a saved game
« on: February 25, 2014, 12:27:54 pm »


               

Hi there!


 


Is it possible to edit a script in a saved game? The Aielund Saga by Savant should allow three henchmen, but in Act II, when one of them dies and is resurrected, she cannot rejoin my party because of the x2_hen_2comp script that checks if there are already two henchmen present. The script is contained in the module file and as such, in my save games, too. Putting a modified version of the script in my override folder does not help, building a hak and including it in the game resources as a patch does not, either. I think that's because the script is called from the dialog fiiles of the henchies and therefor always uses the version embedded in the module, but there could be something else at work there.


 


Short from editing the module file and starting over, is there any way to edit the script in my saved games?


 


Greetings


Skildron



               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Edit a script in a saved game
« Reply #1 on: February 26, 2014, 11:55:57 pm »


               

The saved Game is a copy of the original module with extra state information saved in it.   


 


A module, saved game, .erf and .hak  are all saved in the ERF file format.   


 


Since the saved game is saved in the same format as a Hak, you can use the hack pack editor that is in the utils folder to open your saved game and replace the script that you want to change.   If the hack pack editor complains that the saved game is not a hak you may have to trick it into opening it.   in windows you can do that by one of two methods.  


 


1.   Right-click on the saved game and select Open with...  then browse to the hak editor.


 


2.   Drag and drop the saved game onto the hack pack editor.    


 


 



               
               

               
            

Legacy_Skildron

  • Sr. Member
  • ****
  • Posts: 421
  • Karma: +0/-0
Edit a script in a saved game
« Reply #2 on: February 27, 2014, 08:12:26 am »


               

Lightfoot, thank you for that missing piece of information. Worked like a charm. I tried editing the saved game with the toolset, but that leads to defective save games. It never occured to me that saves are the same file format as hak and erf files, hence I never tried the hak editor.


 


Greetings


Skildron



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Edit a script in a saved game
« Reply #3 on: March 04, 2014, 11:23:55 pm »


               To patch saved games, you can add a script to the top hak; no need to touch the save. This is especially useful when the author needs to distribute a fix, but anyone can do it using nwhak. Back up first, of course.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Edit a script in a saved game
« Reply #4 on: March 05, 2014, 04:06:16 am »


               


To patch saved games, you can add a script to the top hak; no need to touch the save. This is especially useful when the author needs to distribute a fix, but anyone can do it using nwhak. Back up first, of course.




Assuming the module uses a HAK.