OnActivateItem Help
Zephirius
Member Posts: 419
Just trying to add some nifty elements to the PC's skin and am having trouble with it. Sort of going for an Uber lore/Spell Penetration thingy...
Code:
Right now skin #2 is the only one being applied to the PC's skin. I don't understand why?
Code:
// Grimoire of Improved Lore & Knowledge object oUsed7 = GetItemActivated(); oPC = GetItemActivator(); if (GetTag(oUsed7) == "GRIMOIRE_KNOWLEDGE") { // Skin #1 object oSkin = SKIN_SupportGetSkin(oPC); itemproperty ipAward = ItemPropertyBonusFeat(FEAT_SKILL_AFFINITY_LORE); AddItemProperty(DURATION_TYPE_PERMANENT, ipAward, oSkin); // Skin #2 oSkin = SKIN_SupportGetSkin(oPC); itemproperty ipAward2 = ItemPropertyBonusFeat(IP_CONST_FEAT_SPELLPENETRATION); AddItemProperty(DURATION_TYPE_PERMANENT, ipAward2, oSkin); // Skin #3 oSkin = SKIN_SupportGetSkin(oPC); itemproperty ipAward3 = ItemPropertyBonusFeat(FEAT_EPIC_SKILL_FOCUS_LORE); AddItemProperty(DURATION_TYPE_PERMANENT, ipAward3, oSkin); //Skin #4 oSkin = SKIN_SupportGetSkin(oPC); itemproperty ipAward4 = ItemPropertyCastSpell(IP_CONST_CASTSPELL_LEGEND_LORE_5, 3); AddItemProperty(DURATION_TYPE_INSTANT, ipAward4, oSkin); }
Right now skin #2 is the only one being applied to the PC's skin. I don't understand why?
0
Comments
The info you need to add entries in iprp_feats is found in feats.2da.
...how and where do I find the germane paramater information so that I can type and edit the .2da?
Name: 1968
Label: skillaffinitylore
Cost: 1 (it doesn't matter much if you're adding it to a skin, but would affect the cost of an item if it were in a shop)
FeatIndex: 234
*edit*
I'm forgetting something important!
ItemPropertyBonusFeat() doesn't use this type of constant: FEAT_SKILL_AFFINITY_LORE. It uses IP_CONST_FEAT_SPELLPENETRATION.
You'll see that IP_CONST_FEAT_SKILL_AFFINITY_LORE doesn't exist. But you can just use the line# from iprp_feats instead. For example: ItemPropertyBonuseFeat(63)
*more edits*
Handy editor for 2da on the vault:
https://neverwintervault.org/project/nwn1/other/tool/tlkedit2-2datlkgfferf-editor
All the 2da files from the game:
https://neverwintervault.org/project/nwnee/other/nwn-ee-819313-full-2da-source
Yata written by and maintained by kevL's
TR