So, what I did was bundled Hide and Move Silently together as Stealth, Bluff and persuade together as Diplomacy, ect... The issue I am having, is that the script I need to make the skills artificially bump the other, will not work and I can not figure out why.
The script
#include "nwnx_funcs"#include "x0_i0_stringlib"#include "pp_skills_inc"void main(){
object oPC = GetPCItemLastEquippedBy(); object oItem = GetPCItemLastEquipped();
if(!GetItemHasItemProperty(oItem, ITEM_PROPERTY_SKILL_BONUS)) { SendMessageToPC(oPC, "No item props, returning."); return;
}
int nStealth = GetItemPropertySkill(oItem, SKILL_HIDE); int nDiplomacy = GetItemPropertySkill(oItem, SKILL_BLUFF); int nPerception = GetItemPropertySkill(oItem, SKILL_SPOT); int nDisableDevice = GetItemPropertySkill(oItem, SKILL_DISABLE_TRAP) ; int nCraft = GetItemPropertySkill(oItem, SKILL_CRAFT_ARMOR);
SendMessageToPC(oPC, "The Hide Property is: " + IntToString(nStealth));
//Modify the skills NWNXFuncs_ModSkill(oPC, SKILL_MOVE_SILENTLY, nStealth); NWNXFuncs_ModSkill(oPC, SKILL_LISTEN, nPerception); NWNXFuncs_ModSkill(oPC, SKILL_OPEN_LOCK, nDisableDevice); NWNXFuncs_ModSkill(oPC, SKILL_PERSUADE, nDiplomacy); NWNXFuncs_ModSkill(oPC, SKILL_SEARCH, nPerception); NWNXFuncs_ModSkill(oPC, SKILL_SET_TRAP, nDisableDevice); NWNXFuncs_ModSkill(oPC, SKILL_CRAFT_TRAP, nCraft); NWNXFuncs_ModSkill(oPC, SKILL_CRAFT_WEAPON, nCraft);
SendMessageToPC(oPC, "Successfully set skills."); SendMessageToPC(oPC, "MS: "+IntToString(GetSkillRank(SKILL_MOVE_SILENTLY, oPC, FALSE))); SendMessageToPC(oPC, "Listen: "+IntToString(GetSkillRank(SKILL_LISTEN, oPC, FALSE))); SendMessageToPC(oPC, "Open Lock: "+IntToString(GetSkillRank(SKILL_OPEN_LOCK, oPC, FALSE))); SendMessageToPC(oPC, "Persuade: "+IntToString(GetSkillRank(SKILL_PERSUADE, oPC, FALSE))); SendMessageToPC(oPC, "Search "+IntToString(GetSkillRank(SKILL_SEARCH, oPC, FALSE))); SendMessageToPC(oPC, "SetTrap: "+IntToString(GetSkillRank(SKILL_SET_TRAP, oPC, FALSE)));
SetLocalInt(oItem, "Stealth_Boost", nStealth); SetLocalInt(oItem, "Diplomacy_Boost", nDiplomacy); SetLocalInt(oItem, "Perception_Boost", nPerception); SetLocalInt(oItem, "DisableDevice_Boost", nDisableDevice); SetLocalInt(oItem, "Craft_Boost", nCraft);
}
The include
// iprp_getskills - Functions to get skill bonus stats from an item.//// 2012 - eeriegeek
// Get the nth skill bonus on item oItem. Return -1 if no skill found.// Values match the SKILL_* constants and index column of skills.2da.//int GetItemPropertySkill(object oItem, int nth=1);
// Get the nth skill numeric bonus on item oItem. Return -1 if no skill found.//int GetItemPropertySkillValue(object oItem, int nth=1);
// Get the nth skill display name on item oItem. Return "" if no skill found.//string GetItemPropertySkillDisplayName(object oItem, int nth=1);
int GetItemPropertySkill(object oItem, int nth=1){ int i = 1; itemproperty ipFoo = GetFirstItemProperty(oItem); while (GetIsItemPropertyValid(ipFoo)) { int nItemPropertyType = GetItemPropertyType(ipFoo); if (nItemPropertyType == 52) { if (i == nth) { int nItemPropertySubType = GetItemPropertySubType(ipFoo); return (nItemPropertySubType); } else { i += 1; } } ipFoo = GetNextItemProperty(oItem); } return -1;}int GetItemPropertySkillValue(object oItem, int nth=1){ int i = 1; itemproperty ipFoo = GetFirstItemProperty(oItem); while (GetIsItemPropertyValid(ipFoo)) { int nItemPropertyType = GetItemPropertyType(ipFoo); if (nItemPropertyType == 52) { if (i == nth) { int nItemPropertySubType = GetItemPropertySubType(ipFoo); int nCostTable = GetItemPropertyCostTable(ipFoo); int nCostTableValue = GetItemPropertyCostTableValue(ipFoo); string sCostTable_2DA_ResRef = Get2DAString("iprp_costtable","Name",nCostTable); string sCostTableValue_2DA_Value = Get2DAString(sCostTable_2DA_ResRef,"Value",nCostTableValue); int iCostTableValue_2DA_Value = StringToInt(sCostTableValue_2DA_Value); return (iCostTableValue_2DA_Value); } else { i += 1; } } ipFoo = GetNextItemProperty(oItem); } return -1;}string GetItemPropertySkillDisplayName(object oItem, int nth=1){ int i = 1; itemproperty ipFoo = GetFirstItemProperty(oItem); while (GetIsItemPropertyValid(ipFoo)) { int nItemPropertyType = GetItemPropertyType(ipFoo); if (nItemPropertyType == 52) { if (i == nth) { int nItemPropertySubType = GetItemPropertySubType(ipFoo); string sItemPropertySubtype2DA = Get2DAString("itempropdef","SubTypeResRef",nItemPropertyType); string sItemPropertySubTypeName = Get2DAString(sItemPropertySubtype2DA,"Name",nItemPropertySubType); string sItemPropertySubTypeDialogName = GetStringByStrRef(StringToInt(sItemPropertySubTypeName)); int nCostTable = GetItemPropertyCostTable(ipFoo); int nCostTableValue = GetItemPropertyCostTableValue(ipFoo); string sCostTable_2DA_ResRef = Get2DAString("iprp_costtable","Name",nCostTable); string sCostTableValue_2DA_Name = Get2DAString(sCostTable_2DA_ResRef,"Name",nCostTableValue); string sCostTableValue_2DA_Value = Get2DAString(sCostTable_2DA_ResRef,"Value",nCostTableValue); string sCostTableValue_Dialog_Name = GetStringByStrRef(StringToInt(sCostTableValue_2DA_Name)); int iCostTableValue_2DA_Value = StringToInt(sCostTableValue_2DA_Value); return (sItemPropertySubTypeDialogName + " " + sCostTableValue_Dialog_Name); } else { i += 1; } } ipFoo = GetNextItemProperty(oItem); } return "";}