Author Topic: Player controling animals or NPC's  (Read 1336 times)

Legacy_Bidler

  • Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Player controling animals or NPC's
« on: December 13, 2011, 03:00:29 am »


               Is there a way to give a player limited or full control of an animal or NPC that the DM creates?
               
               

               
            

Legacy_wyldhunt1

  • Sr. Member
  • ****
  • Posts: 443
  • Karma: +0/-0
Player controling animals or NPC's
« Reply #1 on: December 13, 2011, 06:36:14 am »


               If you mean direct control, such as they can do with a wizards familiar, I don't know of any way to allow it.
You can, however, make fairly complex scripts that could allow any number of commands/emotes to be obeyed by the animal.
The easiest way would be to set them as a henchmen and then add custom code to either the modules OnChat event or the NPC's OnConversation event.
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Player controling animals or NPC's
« Reply #2 on: December 13, 2011, 11:00:24 am »


               nwnx funcs for win32 does have a PossessCreature command.

It does allow the possession, you need to handle the unpossession via the unpossesscreature command too.

You need to control somethings while possessed, as some player actions, can crash the server, if done while possessing an npc.

Also - Player Characters can be overwrote with the npc they are possessing, if the server exports while possessed.
               
               

               
            

Legacy_wyldhunt1

  • Sr. Member
  • ****
  • Posts: 443
  • Karma: +0/-0
Player controling animals or NPC's
« Reply #3 on: December 14, 2011, 05:47:22 pm »


               That's good to know.
Do you know which player actions can crash the server while they're possessing?
We might be able to find some use for this.
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Player controling animals or NPC's
« Reply #4 on: January 03, 2012, 03:49:23 pm »


               things such as leveling up, or attempting to rest as an npc (at least from my early tests) - resulted in a crash.

It is dangerous too.
You need to override the save character functionality that ur server uses.
If save character is called while the player is possessing a creature, their bic file will get overwrote with the creature.

When the player logs in again, they will have lost their character, and the creature will be their permanent host.

Dangerous if they log out while possessing.