This system will allow a player to show their head instead of their helm, and still benefit from
the effects of the helm. By activating the included widget, their helm is moved to their inventory
and the itemproperties of it copied to their player skin. If the itemproperty is a "Cast Spell"
itemproperty it will be copied to the widget, and thereby be castable.
Equipping any helm after activating the widget will in effect remove the itemproperties applied by
this system. This is accomplished by saving the players skin before combining the itemproperties
from the helm with any that may be existant upon the skin. Then returing that skin to the players,
skin slot when a helm(any) is equipped. Another copy of the skin is databased after the itemproperties
are combined, this skin is used only if a player logs out after having activated the widget,
but not having put a helm on before logging off. This "second" databased skin, is called by the on
client enter of the module.
Two databases per pc are created and at the right time destroyed in this system. They are:
1) GetName(oPC)+GetPCPublicCDKey(oPC)+"CLNHELM"
used to store the skin before combining itemproperties
2) GetName(oPC)+GetPCPublicCDKey(oPC)+"POSTHELM"
used to store the skin after combining itemproperties
TO ADD THIS TO A MODULE THAT HAS NO CUSTOM SCRIPTS IN THE MODULE LEVEL HANDLES:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Import the erf, add "helm_pc_equip" as your modules OnPlayerEquip script.
Add "helm_pc_mod_ent" as your modules OnClientEnter script.
Compile your module(twice)
Save.
The no show helm widget will be found under:
Items -- Custom -- Misc -- Other
You should be done!
Grats.
TO ADD THE MODULE LEVEL SCRIPT REQUIREMENTS TO YOUR ALREADY EXISTING CUSTOM SCRIPTS:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Module Level Script Adjustments:
PLAYER ON EQUIP HANDLE:(I saved the updated version of the default as "helm_pc_equip")
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I added the include "helm_prop_inc" to the default script, then added a call to get the
type of item equipped, and a call to retrieve a campaign int.
The calls are:
int nType = GetBaseItemType(oItem);
int nSkinCheck = GetLocalInt(GetItemInSlot(17, oPC), "HELMSET");
In the body of the script I added these checks:
if(nType == 17)
{
if(GetCampaignInt(GetName(oPC)+GetPCPublicCDKey(oPC)+"CLNHELM", "HELMSET") == 1)
{
HelmRetrieveSkin(oPC);
}
}
ON CLIENT ENTER:(I saved the updated version of the default as "helm_pc_mod_ent")
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XX
I added the include "helm_prop_inc" to the default script.
Then added:(as the last thing called by this script)
DelayCommand(4.0, HelmClientEnter(oPC));
This was to be an update of my NO SHOW HELMS QUICK system, but grew to be its' own. Link
This is just the module, it has a little test area with a skin stripper to allow perusal of the skin, and a placeable which can be used to "fake" some subrace itemproperties on the player skin. Of course there are helms, and widgets available for testing. The 7zip decompression tool can be found at www.7zip.com
Workin on this to update it so that if there is not enough room in their inventory for the helm or the skin, then a message will be sent to them and the system will dead end. _________________________ Doing it the only way I know how, the Hardway!
I have updated my NonSubrace Compatible system to have an inventory check to insure the helm does not drop to the ground. I am currently busy with a system for another builder when done with that I will update this system to include inventory checks. _________________________ Doing it the only way I know how, the Hardway!
From fredseeker at 2009-11-23 23:43:30
Q:If I use this then I do not need the old No-Helms?
A: No you do not need the old sys.
Q:The skin is is still applied if the character's inventory is full?
A: sorry no if the char inventory is full the skin will fall to the ground. and the helm will also. I had thought to add a check to insure the pc inventory had space but thought of it after the system was posted. I am reinstalling NWN to my puter and may, I say may give that a go. But, I really don't know that I should update it as such, if yall would like such a thing let me know.
_________________________ Doing it the only way I know how, the Hardway!
[q]Some ?s about this. I have cep 2.1 installed, on all expansions game 1.69. I use shayans subs, (newest). I have experienced several issues and was just curious.
1. does is keep the AC (or can it be setup to keep it?
2. I have multiple skins remaining in inventory, starting when the helm is swapped out. So, I wear a helm, then activate the widget, then it comes off. When I go to place another one on, or even if the original helm is put back on, I get a skin in inventory. From this point on, each and every time a new skin joins the ranks of my inventory.
3. I made a helm that had two spells, one twice a day, the other unlimited, and neither were available on the widget for use.
Can anyone out there who has used this touch a bit on those questions ?
I have imported the erf and taken the script sections from the two module files, I'm sure that's not the issue.
Thanks[/q]
Once I have NWN back up and running we will get these all addressed, and thanks for the intrest in my system. _________________________ Doing it the only way I know how, the Hardway!
I just sent an email to you with an answer with your question here is the solution I have come up with as to the Shayan thing so far:
if(GetIsSubraceApplied(oPC))//---
{//this would tell us that the subrace has been applied to the pcskin
if(GetCampaignInt(GetName(oPC)+GetPCPublicCDKey(oPC+"POSTHELM",HELMSET"))
{//this would tell us the helm bonus was applied to a subrace applied //skin
oHelmSkin = RetrieveCampaignObject(GetName(oPC)
+GetPCPublicCDKey(oPC+"POSTHELM","PC_BUFFSKIN", lP, oPC, oPC);
DestroyObject(oSkin, 0.0);
AssignCommand(oPC, ActionEquipItem(oHelmSkin, 17));
DestroyCampaignDatabase(GetName(oPC)+GetPCPublicCDKey(oPC)+"POSTHELM");
}
else
{//this else tells us the helmprops have not been applied to a subrace updated skin
//Apply the Shayan subrace skin here
//because the subrace has been applied but not the helmprops
}
}
else
{//this tells us the subrace props have not been applied to this pc
if(GetCampaignInt(GetName(oPC)+GetPCPublicCDKey(oPC)+"POSTHELM", "HELMSET"))
{//doin this would tell us the helm bonus was applied to a nonsubrace applied skin
oHelmSkin = RetrieveCampaignObject(GetName(oPC)
+GetPCPublicCDKey(oPC+"POSTHELM","PC_BUFFSKIN", lP, oPC, oPC);
DestroyObject(oSkin, 0.0);
AssignCommand(oPC, ActionEquipItem(oHelmSkin, 17));
DestroyCampaignDatabase(GetName(oPC)+GetPCPublicCDKey(oPC)+"POSTHELM");
}
//In the event we pass the above calls without a skin being applied it is determined that
//no skin subrace or helm properties have been applied to the player skin
}
You could also have that as a single func as so, this is with the assumption that the following are defined prior to the new function being called
lP as location of the pc
oPC as the player char
oSkin as the skin currently on the PC when entering the module
ALSO any other definitions Shayans would need
void MYWORLDENTERSKIN(object oPC, location lP);
//this simply makes it so that a funciton will show in the right hand listing
void MYWORLDENTERSKIN(object oPC, location lP)//I would change MYWORLD to your world name
{
if(GetIsSubraceApplied(oPC))//---
{//this would tell us that the subrace has been applied to the pcskin
if(GetCampaignInt(GetName(oPC)+GetPCPublicCDKey(oPC+"POSTHELM",HELMSET"))
{//this would tell us the helm bonus was applied to a subrace applied //skin
oHelmSkin = RetrieveCampaignObject(GetName(oPC)
+GetPCPublicCDKey(oPC+"POSTHELM","PC_BUFFSKIN", lP, oPC, oPC);
DestroyObject(oSkin, 0.0);
AssignCommand(oPC, ActionEquipItem(oHelmSkin, 17));
DestroyCampaignDatabase(GetName(oPC)+GetPCPublicCDKey(oPC)+"POSTHELM");
}
else
{//this else tells us the helmprops have not been applied to a subrace updated skin
//Apply the Shayan subrace skin here
//because the subrace has been applied but not the helmprops
}
}
else
{//this tells us the subrace props have not been applied to this pc
if(GetCampaignInt(GetName(oPC)+GetPCPublicCDKey(oPC)+"POSTHELM", "HELMSET"))
{//doin this would tell us the helm bonus was applied to a nonsubrace applied skin
oHelmSkin = RetrieveCampaignObject(GetName(oPC)
+GetPCPublicCDKey(oPC+"POSTHELM","PC_BUFFSKIN", lP, oPC, oPC);
DestroyObject(oSkin, 0.0);
AssignCommand(oPC, ActionEquipItem(oHelmSkin, 17));
DestroyCampaignDatabase(GetName(oPC)+GetPCPublicCDKey(oPC)+"POSTHELM");
}
//In the event we pass the above calls without a skin being applied it is determined that
//no skin subrace or helm properties have been applied to the player skin
}
}
THE ABOVE SHOULD with a minor bit of tweakin to add the Shayans stuff give you a func that you could add to the end of your onclient enter that would look as such:::
//Main body of script///
{
///more scipting blah, blah blah//////
MYWORLDENTERSKIN(oPC, lP);//this called last will apply proper skin
}
I appoligize for my long delay I had become a bit despondant as to NWN, and have recently gotten custody of my daughter. One lead me to complacency and the the other to wonderous distraction. I am workin now to reinstall NWN and get this snafu answered. _________________________ Doing it the only way I know how, the Hardway!
Just took your module (from above) and put her online under a different name, to test. I don't receive skin errors such as keeping them in inventory, but I do have my subrace skin data removed, so thus losing all of the initial bonuses.
Does anyone else out there have any words for what they had to do to get the cast spell properties to work, and keep shayans subrace skins, or to reapply em ? Do I need to make a call for that myself ?
Some ?s about this. I have cep 2.1 installed, on all expansions game 1.69. I use shayans subs, (newest). I have experienced several issues and was just curious.
1. does is keep the AC (or can it be setup to keep it?
2. I have multiple skins remaining in inventory, starting when the helm is swapped out. So, I wear a helm, then activate the widget, then it comes off. When I go to place another one on, or even if the original helm is put back on, I get a skin in inventory. From this point on, each and every time a new skin joins the ranks of my inventory.
3. I made a helm that had two spells, one twice a day, the other unlimited, and neither were available on the widget for use.
Can anyone out there who has used this touch a bit on those questions ?
I have imported the erf and taken the script sections from the two module files, I'm sure that's not the issue.
Very happy to see the downloads going up and the problems still none existent. _________________________ Doing it the only way I know how, the Hardway!
Once again, I am happy there are no issues to resolve with this so far. I would like to point out that if anyone wants to tweak/redistribute this do so without regard to myself. I would rather see the work move forward and onward than my name be known. _________________________ Doing it the only way I know how, the Hardway!
Yes, I am still keeping an eye on this, and very happy to know that people are not having any difficulties with it. As a side note this will work even if there are no "subrace" or other itemproperties applied to the skin by other systems. _________________________ Doing it the only way I know how, the Hardway!
As a side note this system should also work well without subrace/other itemproperties applied to the skin from other scripts. _________________________ Doing it the only way I know how, the Hardway!
Just a note, you dont need the block of code above, it is the include which is in the erf. I posted it so that it may be perused before hand. So, just ignore those [url] [/url] things, if you do copy the above block of code you would do well to remove them. _________________________ Doing it the only way I know how, the Hardway!
I copied my code from above, pasted to a notepad, removed the [url] and [/url] stuff updated and they remained so I will assume this is related to posting it there. It appears only to effect the switch/case statements. _________________________ Doing it the only way I know how, the Hardway!
Glancing over my code in the block of code above I see [url] somehow got into my code. I did not put that in there and will move to rectify that. _________________________ Doing it the only way I know how, the Hardway!
Thank you if you have need of assistance with this, please post here, I will be checking this page for a while yet to insure this is pleasing. _________________________ Doing it the only way I know how, the Hardway!