Jump to content

Non-Rogues useing Disarm and Lockpicking?


Recommended Posts

Hi everyone,

 

So I have a custom class that I'm working on, the Psionic class, which at the moment is just a hybrid of a Rogue and a Mage (taking some skills and talents from each, and making the duplicated mage skills use Stamina, count as talents rather than spells, and use Dex-10 instead of spellpower). Everything works great except for picking locks and disarming traps.

 

I've looked through and attempted to modify the original script code for core_h, placeable_h, and placeable_core. Placeable objects use placeable_core for their event handler script. The placeable_core script uses functions from placeable_h, and some of those functions make calls to functions in core_h. Most particularly, the placeable_core, when passed a "use the object" event will call Placeable_HandleUsed(event ev) from the placeable_h include file. And specific to my desires, when the event that is passed to placeable_h is of the type PLACEABLE_ACTION_DISARM or PLACEABLE_ACTION_UNLOCK it will handle to code for determining if the attempt is successful or not. Part of that determination calls to the GetDisableDeviceLevel(object oCreature) function in the core_h include file. Now, PLACEABLE_ACTION_DISARM, PLACEABLE_ACTION_UNLOCK, and GetDisableDeviceLevel(object oCreature) all make checks to see if the character making the attempt is a Rogue, and if they are not, then the attempt automatically fails regardless of their Cunning score. I tried to change this behavior by adding my new Psionic class as an option within those same checks, thus checking to see if the character is EITHER a Rogue OR a Psionic before automatically failing the attempt. I also added in the options for improving the chance to succeed based on the duplicated Deft Hands line of skills that the Psionic class uses.

 

This *should* have worked, but for some reason the game still refuses to allow Psionic characters to pick locks or disarm traps. I have also tried using the original script files, duplicating them to new filenames, and integrating the new files. This also does not seem to work.

 

Now I know that there are those two mods out there to make it so that characters can bash or break open locked objects or to provide Mages with some new spells to unlock objects, but neither of those are the way I want this class to handle it. I want them to have the innate ability to deal with locks and traps just like a rogue gets.

 

Can anyone help me figure out what the problem is? Is this something that is hard-coded into the game client and cannot be modded? Am I missing some other file that needs to be changed? I looked around in the forums with the search tool a bit and found a couple of posts that mentioned similar sorts of ideas, including this thread, but I didn't find a solution anywhere.

 

Any help is appreciated.

 

Drake

 

[EDIT] I suppose I could just modify my Chargen_ApplyClassAbilities(object oChar, int nClass, int bUnApply = FALSE) in the sys_chargen_h file so that I add HIDDEN_ROGUE (4020) as an ability... I might try that, but I think that adding that ability also adds the rogue class icon in the character sheet gui screen, which isn't really what I want either, though it would admittedly be a minor issue. I'll go try that now, but I would still like alternative fixes.

 

[EDIT] Well that didn't work. I can use the console "addtalent" command to call the addtalent script, and if I do that to add the 4020 ability to the character once they've been created and started the game, then it works fine and I can open locks and such, with the problem of having the Rogue class icon show up in my character sheet. But with trying to add it as an ability in the sys_chargen_h file I get nothing at all... not only do I not get the Rogue class icon, but I seem to also not get the ability to go with it. I think, for now, the easiest thig for me to do will be to create a new book item "Mechanics for Dummies: a practical manual for disabling and disarming non-magical locks and traps" or some such, and have the use item script for it make the same changes as the addtalent script does. Then I can pick a method for loading the item to the character... possibly by adding it to the Ostegar quartermaster merchant inventory or something. Anyway, if anyone has any better ideas, let me know please.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...