Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

How to use custom skills in script ?


I try to add some custom skills on my module but I have an issue with it. Actually the skills.2da is on the hak file, I can create a character with that skill correctly etc... no problem with that.

But.. I cannot use this skill on my scripts. the "constant" of the new skill is not in the base list and if I try to create the constat by myself with an include (const int SKILL_XXX =28; for example), it's seems ok but commands like GetSkillRank is not working with my custom one. (I used the line 28 and if I put on chat the value of the skill with GetSkillRank, Always 0... but it's ok with the base skills)

Do you know what I can do to resolve that?


  • FreshLemonBunFreshLemonBun Member Posts: 872
    It seems to work fine for me. Can you provide any more details?

    Otherwise I would suggest for you to create the simplest test situation with a barebones module and a hak with only skills.2da in it.

    A script on the area's onenter event should be something like this.

    void test(object oPC) { int nSkill = GetSkillRank(28, oPC); SendMessageToPC(oPC, IntToString(nSkill)); nSkill = GetSkillRank(28, oPC, TRUE); SendMessageToPC(oPC, IntToString(nSkill)); } void main() { object oPC = GetEnteringObject(); DelayCommand(6.0f, test(oPC)); }

    Make a new character, put ranks into the skill, and once you enter the area wait a few seconds. If it still doesn't work then double check the hak has been added and there are no strange things in the 2da. As a sanity check you can use Get2DAString(string s2DA, string sColumn, int nRow) to check your 2da direction.

Sign In or Register to comment.