Author Topic: Virusman And Shadoow  (Read 1577 times)

Legacy_Savagefool

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Virusman And Shadoow
« on: April 21, 2015, 10:02:16 pm »


               

Could I Perhaps get your skypes to talk through a few complex things. There is also a few things I would like to ask about.


For example: A OnSuccessfulDisarm function, and a OnFullInventory function.


I would like to make disarmed weapons go to the inventory, if it's full, store on wand.


 


This is one of a few problems. I don't have much experience with the plugins and how to add things like that, I would like to gain the knowledge. I'm smart and a scripter of quite a few languages so I should get the gist pretty fast.


 


Thank you, i Eagerly await your reply.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Virusman And Shadoow
« Reply #1 on: April 23, 2015, 09:33:12 am »


               

Disarm event would be possible to do however this event is catchable without NWNX already:


1) character lost weapon type of item


2) character is in combat


 


This has of course the disadvantage that it will disallow to drop weapons in combat intentionally, but its something most builders accepted as a neccessary price for it.


 


However, what actually interest me is a complete softcoding of the disarm which would fit my project more. I wasnt working on anything NWN related for 2 months but I will try to look into this.


 


 


As for full inventory, thats a very problematic, its not impossible but the game does not have this event, every item movement simply check for it separately so it would have to be hooked on 100 places.



               
               

               
            

Legacy_leo_x

  • Sr. Member
  • ****
  • Posts: 403
  • Karma: +0/-0
Virusman And Shadoow
« Reply #2 on: April 23, 2015, 11:27:38 am »


               

In case it might save you some time, Disarm is applied as an effect.  So you can hook CNWSEffectListHandler::OnApplyDisarm.  The code there also shows how you could determine if the inventory is full.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Virusman And Shadoow
« Reply #3 on: April 23, 2015, 02:12:18 pm »


               


In case it might save you some time, Disarm is applied as an effect.  So you can hook CNWSEffectListHandler::OnApplyDisarm.  The code there also shows how you could determine if the inventory is full.




Got it done already, but still have to make a port for client etc... It was quite easy to do actually.


               
               

               
            

Legacy_Savagefool

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Virusman And Shadoow
« Reply #4 on: April 23, 2015, 02:32:20 pm »


               

Yeah I was directed towards a plugin called nwnx_silm, it had the things I was looking for, and also in the api. Certain things like  CItemRepository::CheckFit(CNWSITEM*, ...) along with the hooks from h_attack.cpp inside nwnx_silm