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 ?
Remove HIPS
Débuté par
0pie
, mars 17 2011 01:08
#1
Posté 17 mars 2011 - 01:08
#2
Posté 17 mars 2011 - 01:31
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. : (
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 .
#3
Posté 17 mars 2011 - 03:25
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);
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 .
#4
Posté 17 mars 2011 - 12:45
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 ?
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 ?
#5
Posté 17 mars 2011 - 01:51
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.
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 .
#6
Posté 17 mars 2011 - 03:38
Thanks ! ... hmm only thing is dont I need to boot the player from the server somehow ?
#7
Posté 17 mars 2011 - 04:06
no0pie wrote...
Thanks ! ... hmm only thing is dont I need to boot the player from the server somehow ?
#8
Posté 17 mars 2011 - 06:01
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
By the way thanks so much for the info
#9
Posté 17 mars 2011 - 06:15
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...
However Shayan havent been updated for it and I dont think it ever will be...
#10
Posté 17 mars 2011 - 06:54
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 ?
#11
Posté 17 mars 2011 - 07:52
You will not have to boot them when using any of the functions provided by this plugin to do PC modification.





Retour en haut






