Author Topic: matters of possession - nwnx  (Read 1062 times)

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
matters of possession - nwnx
« on: June 07, 2016, 08:40:08 am »


               

has anyone successfully used the nwnx  PossessCreature() and UnPossessCreature() functions ?  i'm beginning to think these are just wishware. although it has proved fairly easy to possess another creature using PossessCreature(), the unpossess function doesn't seem to work at all, and i've also found no way to unpossess a creature voluntarily -- i.e., before a specific pre-timed delay has elapsed, such as by adding a custom feat to the possessed creature that can be called from the quickbar or radial. has anyone played around with this and managed to work up something useful ?



               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
matters of possession - nwnx
« Reply #1 on: June 07, 2016, 06:52:20 pm »


               

Possession can be done - however, there are a series of things that can happen that make it a dangerous gambit.


 


Eg: SaveCharacter - will overwrite your 'real' character, with the possessed npc's character.


Levelling up - can crash the server


Resting has weird behavior - like insta rest etc


 


Realistically, to achieve Possession, it would require a lot of hooking in various places, to disable functionality during a possession.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
matters of possession - nwnx
« Reply #2 on: June 07, 2016, 07:52:15 pm »


               

Yes I had little problems with UnPossess. In fact, you need to use Possess on original character instead IIRC.


 


But those functions are higly unstable, there are numerous issues and crashes as Baaleos said.


 


I made my own PossessFunction in nwnx_patch/nwncx_patch plugin, you can test it from here.



               
               

               
            

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
matters of possession - nwnx
« Reply #3 on: June 08, 2016, 01:59:17 am »


               


Possession can be done - however, there are a series of things that can happen that make it a dangerous gambit.


 


Eg: SaveCharacter - will overwrite your 'real' character, with the possessed npc's character.


Levelling up - can crash the server


Resting has weird behavior - like insta rest etc


 


Realistically, to achieve Possession, it would require a lot of hooking in various places, to disable functionality during a possession.




 


yes, i can constate everything you've written here. i thought i was going nuts, but yes, all of that was happening w/these functions. [well, maybe i am going nuts TOO... but that's beside the point... ;p ]


 


 




Yes I had little problems with UnPossess. In fact, you need to use Possess on original character instead IIRC.


 


But those functions are higly unstable, there are numerous issues and crashes as Baaleos said.


 


I made my own PossessFunction in nwnx_patch/nwncx_patch plugin, you can test it from here.




 


yes, you recall correctly. the only thing that i found useful to return control to the original creature object [the pc] was to call PossessCreature() a second time, reversing the parameters. UnPossessCreature() does bupkis.


 


thanks to you both for the info, i won't be using these functions then. shadooow, i'll check out what you've put together. '<img'>


 


thanks.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
matters of possession - nwnx
« Reply #4 on: June 08, 2016, 05:47:32 am »


               


thanks to you both for the info, i won't be using these functions then. shadooow, i'll check out what you've put together. '<img'>




little more info on that:


 


the plugins doesn't require CPP itself to function, however the include 70_inc_nwnx where is PossessCreature function declared is inside CPP 1.72beta package.


 


So either you install it, open toolset, and open 70_inc_nwnx in script editor from core resources and then you save it into your module. (and then you uninstall CPP if you don't want to hazard with beta version)


Or you can get that include in the 1.72 builders resources folder which is part of the archive. So just unpack that, locate 70_inc_nwnx and add it into your module.


 


Note, that you can test this in singleplayer since i have also client version nwncx_patch.