Author Topic: Using the events x2_mod_def_load and x2_mod_def_act in the OC  (Read 576 times)

Legacy_SleepyMage

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Using the events x2_mod_def_load and x2_mod_def_act in the OC
« on: February 20, 2016, 09:20:24 am »


               

I found a few topics in the forum about similar subjects, almost identical in fact, but they did not address the why and how in the end. I was hoping to get this clarified here.


 


I recently installed NwN Diamond from GoG and set about installing my previously used mods. One of them is the Rod of Fast Buffing. As of one year ago it worked normally with virtually the same setup. The only difference is that I switched to Windows 10 and the NwVault site was abandoned and then salvaged by the community. Now when I attempt to load up the mod it returns an error that it is "built in a newer version of the game or corrupt". Attempting to import the .erf file also returns an directory creation error.


 


Long story short, I figured out that I can still load the item from the .uti and .ncs files. Loading it up in another custom module, Buff Device, made the rod work but it wasn't activating in the OC when spawned. After flailing around in the toolset I also found that I can call the OC's OnActivateItem, OC's OnLoadModule, x2_mod_def_load, and x2_mod_def_act scripts one after the other successfully without interference... so far.


 


The problem is solved on my end, but I'm not sure why it happened in the first place. I asked a few questions on other forums and would like to go back and post my solution or a simpler one for others to use.


 


Questions


 


1 - Previously the RoFB mod required you to create new character in the module, pick up the rod, and export the character. This character can be then loaded into the OC and the rod worked normally. How does this solve the problem with the event scripts?


 


2 - Loading the Buff Device module and using the above method no longer works, not even with the mods own buff device. Why is that?


 


3 - Is there an overall simpler solution to making the RoFB work in the OC than what I have done?