Author Topic: DMFI 1.09, adding Custom Skills  (Read 383 times)

Legacy_Evelath

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
DMFI 1.09, adding Custom Skills
« on: March 12, 2011, 01:47:45 am »


               Hello Everyone,

I am attempting to add my own custom skills to the DMFI 1.09 system that runs d20 roll checks whenever a player types the particular skill. (for example: "Bluff" would initiate a d20 roll for bluff, modified by the particular modifier.) 

DMFI 1.09 System

I've modified "dmfi_execute" and added the line:

case 105: iNum = 1; iSide = 20; sAbility="Nature Check, "; iMod = GetSkillRank(SKILL_NATURE, oUser); break;

I've also modified "dmfi_plychat_exe" and added:

    else if ((FindSubString(sLCEmote, "nature") != -1))
        SetLocalInt(oPC, "dmfi_univ_int", 105);

The particular skill is also included in the .2da file for the module.  I've added it to the conversation for the dicebag, and have had no luck.

When a player types: "nature"; they get a 5d0 dice roll.  Not sure where that is coming from, and when I run the dicebag it doesn't work either.  :/

I've tried to figure it out, so much appreciation to anyone who can assist!

Thanks!
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
DMFI 1.09, adding Custom Skills
« Reply #1 on: March 12, 2011, 03:38:24 am »


               HR DM tool has the skills that can be used through the chat commands. You can look through it for help.
nwvault.ign.com/View.php

//// Here some with animal empathy

int iAnimalEmp = TestStringAgainstPattern("**/A.E.**",sSpoke);

if(iAnimalEmp==TRUE)
{
SetLocalInt(oSpeaker, "dmfi_univ_int", 71);
string sNSpoke = StringReplace(sSpoke,"/a.e.","");
string sNSpoke2 = StringReplace(sNSpoke,"/A.E.","");
SetPCChatMessage("");
SetLocalString(oSpeaker, "dmfi_univ_conv", "pc_dicebag");
ExecuteScript("dmfi_execute", oSpeaker);
        return;
}

///////end
It run through the DoDiceBagFunction function in the dmfi_execute script of DMFI
hope this helps you get in the right direction.
               
               

               
            

Legacy_Evelath

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
DMFI 1.09, adding Custom Skills
« Reply #2 on: March 16, 2011, 07:10:12 pm »


               I was able to figure it all out.  If anyone is interested post here and I'll explain the full process. 

Essentially I was missing the declaration of my SKILL_* Constants.  

I'm still trying to figure out the actual dicebag conversation; however the main piece: Typing *nature* rolls a 1d20 + Modifier for the Nature knowledge skill, is working.
               
               

               


                     Modifié par Evelath, 16 mars 2011 - 07:10 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
DMFI 1.09, adding Custom Skills
« Reply #3 on: March 16, 2011, 07:40:34 pm »


               The OnActivate for DMFI 1.09 Sets up some locals  Pre the module event hook.  So you might want to start your search for the missing piece in NW_S3_ActItem01.  this it the script that is ran everytime an item is activated, Before the Event Hook.
               
               

               
            

Legacy_Evelath

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
DMFI 1.09, adding Custom Skills
« Reply #4 on: March 16, 2011, 08:27:43 pm »


               Thanks for that; I included my constant script; and made a few edits to the conversation.  It's working at about 90%.

For some reason, one of my skills isn't being picked up by the conversation; and when I use a diceroll, it returns to a main-menu that doesn't include my "Skill Rolls (New Skills)" category.

I'll take a closer look later this evening.  Thanks a ton for the mention of that file, it helped me find the main culprit of the issue.