Author Topic: Remove HIPS  (Read 630 times)

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
Remove HIPS
« on: March 17, 2011, 01:08:18 am »


               I am running a mod atm using NWNX2-Leto with Shayan's Subrace Engine. I got it to work, I can edit players characters on creation. But how do I edit them after ? I want to be able to remove HIPS when a SD level is taken. I have look everywhere for this script but cant find it. What do I need to do this ? 
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Remove HIPS
« Reply #1 on: March 17, 2011, 01:31:51 am »


               Without using something like NWNX I think the only thing you can do is check for the feat OnPlayerLevelUp and if they have it then knock that player back down a level thus preventing them from ever taking that feat. But the player will never be able to take more SD levels either.

Since you do have NWNX there might be something for that but I am not sure since I don't use it. : (
               
               

               


                     Modifié par GhostOfGod, 17 mars 2011 - 01:36 .
                     
                  


            

Legacy_Thayan

  • Sr. Member
  • ****
  • Posts: 435
  • Karma: +0/-0
Remove HIPS
« Reply #2 on: March 17, 2011, 03:25:40 am »


               Is your server a Windows server? If so, setup NWNX with this plugin and add the nwnx_funcs include script to your module - http://nwvault.ign.c....Detail&id=1447

Then, use the NWNXFuncs_RemoveFeat function within that nwnx_funcs include script to get rid of that feat OnLevelUp. Something like this should do the trick -
if (GetHasFeat(FEAT_HIDE_IN_PLAIN_SIGHT, GetPCLevellingUp()) NWNXFuncs_RemoveFeat(GetPCLevellingUp(), FEAT_HIDE_IN_PLAIN_SIGHT);
               
               

               


                     Modifié par Thayan, 17 mars 2011 - 03:42 .
                     
                  


            

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
Remove HIPS
« Reply #3 on: March 17, 2011, 12:45:36 pm »


               Hey thanks a bunch. I have a few questions though 8). I'm very new to NWNX and dont know how to write a script for it. Could you or anyone write the full script to remove hips on player level up ? The one you gave me does not compile someting about missing a bracket ? Once I see what a script should look like I think I will be able to mimic it.

Oh yah , yes Thayan I am using a windows server and i setup NWNX , now when ever I use a nwnx function do i need to do #include "nwnx_funcs" at the top ?
               
               

               
            

Legacy_Thayan

  • Sr. Member
  • ****
  • Posts: 435
  • Karma: +0/-0
Remove HIPS
« Reply #4 on: March 17, 2011, 01:51:33 pm »


               So once you go through the steps to add the necessary .dll for that plugin and necessary lines to the NWNX.ini, The functions in the nwnx_funcs include script will work just like any other normal functions in NWScript. He did a really good job providing nice descriptions of them so they should be pretty self-explanatory (hopefully).

I provided the example above a little rushed, so it was missing a parenthesis. Here's a complete one with the nwns_funcs include at the top of it as well. This compiles - but remember that you need to have the external .dll/plugin setup first in order for this to work. And (of course) the server always needs to be launched via NWNX or this will not work either.

//mod_onlevelup
//Place this in the module OnLevelUp event, or merge it with your existing LevelUp script

#include "nwnx_funcs"

void main()
{
  object oPC = GetPCLevellingUp();
  if (GetHasFeat(FEAT_HIDE_IN_PLAIN_SIGHT, oPC)) {
    NWNXFuncs_RemoveFeat(oPC, FEAT_HIDE_IN_PLAIN_SIGHT);
    SendMessageToPC(oPC, "Your Hide In Plain Sight ability has been removed.");
  }
}

               
               

               


                     Modifié par Thayan, 17 mars 2011 - 02:03 .
                     
                  


            

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
Remove HIPS
« Reply #5 on: March 17, 2011, 03:38:03 pm »


               Thanks ! ... hmm only thing is dont I need to boot the player from the server somehow ?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Remove HIPS
« Reply #6 on: March 17, 2011, 04:06:51 pm »


               

0pie wrote...

Thanks ! ... hmm only thing is dont I need to boot the player from the server somehow ?

no
               
               

               
            

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
Remove HIPS
« Reply #7 on: March 17, 2011, 06:01:02 pm »


               I'm confused then, all the guides i read for nwnx tell me that in order to edit a character i need to boot them in order for it to take effect. Are the guides outdated or what ? lol

By the way thanks so much for the info '<img'>
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Remove HIPS
« Reply #8 on: March 17, 2011, 06:15:16 pm »


               Well that was true in old days from Shayan subrace engine is from. Shayan uses old and outdated solution that requires booting, but few months back was released a new solution that doesn't need it.

However Shayan havent been updated for it and I dont think it ever will be...
               
               

               
            

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
Remove HIPS
« Reply #9 on: March 17, 2011, 06:54:53 pm »


               Hmm very cool , does the same apply for adding feats and changing ability scores ? .... do i ever need to boot a player after Leto editing them ?
               
               

               
            

Legacy_Thayan

  • Sr. Member
  • ****
  • Posts: 435
  • Karma: +0/-0
Remove HIPS
« Reply #10 on: March 17, 2011, 07:52:20 pm »


               You will not have to boot them when using any of the functions provided by this plugin to do PC modification.