Jump to content

Improve thievery skills in dialogs


lsass.exe

Recommended Posts

Well, while testing something completly different I just happened to use the innate ability and the string was printed. I didn't change anything after I gave up a few hours ago and I have not the slighest idea why it works now.

 

But I don't care! :)

 

I used Modify Global Variable [265] with a 6 character long variable I wrote into the 1. Resource field. Maybe tomorrow it will fail again and if it does, I go nuts then. But for today I'm very pleased with myself. ^^

Link to comment

If you're talking about the spell that you are applying via dialog, I would just add DisplayStringHead(myself,~text~) to the dialog action when the spell is applied.

 

If you're talking about a different spell that the player could cast at anytime, follow the suggestions previously given as I've no experience in doing that.

Link to comment

No no, I wrote some banters for Biowares thief-NPCs and my NPC where they show off to each other or discuss neat tricks or stuff like that and from a pure RP point of view they should gain something by that (5% here and there, you know). Also I think the Player has to be rewarded with some benefits for sitting through my writing. :)

 

The string is a different thing. For various reasons my NPC gets an Innate called "Sniffle" and as I saw it working in game for the first time I was very proud of myself and immediately decided that he needs a *Snif, snif* above his head when he uses the Innate. And since I'm a pighead I refuse to back off from anything even if it costs me my sanity.

 

As mentioned, I used Script: Modify Global Variable [265] (because Script: Store Local Variable [187] didn't work) but I think Script: Set/Modify Variable [309] would work to. But I have not tested it, since it works and I never change a running something I barely understand. ;)

 

 

Today I tinkered a little bit with items and spells and some things work and some don't. I think I will have more moronic questions regarding optcodes and spells and stuff in the very near future... ;)

Link to comment

This is probably a repeat of information spread throughout several of the previous posts. Putting it in one spot is always good isn't it?

 

I understand now what it is you are trying to do and Avenger has been pointing you in the correct direction.

I would recommend using the opcode (265) Set Global Variable. Trying to use opcode (185) Store Local Variable can be quite tricky to use as DLTCEP states that it can only be used in EFF files.

 

You said that you got opcode (265) to work but wasn't sure how or why. I'll explain a little.

 

For this example, in the spell's opcode 265 we set the global name to absnif and the value to 1

Then in the override script for the NPC we would add a block that looks like the following:

IF
Global("absnif","GLOBAL",1)
THEN
RESPONSE #100
DisplayStringHead(Myself,~text~)
SetGlobal("absnif","GLOBAL",0)
END

What this does is when and only when the the global "absnif" is set to 1 will the "text" be displayed over the NPC's head. To prevent the text from being spammed over the NPC's head the global "absnif" is set to 0 so that this block is no longer true. This then means that the only time this script block would be used is after the innate spell has been used.

 

You can expand upon this to allow for other party members to react to your NPC's usage of this spell. All you need to is add an additional global.

Example:

IF
Global("absnif","GLOBAL",1)
THEN
RESPONSE #100
DisplayStringHead(Myself,~text~)
SetGlobal("absnif","GLOBAL",0)
IncrementGlobal("absnif_react","GLOBAL",1)
END

Then in the given party member's banter file (we're going to use Minsc) you can set up a banter that is triggered when the global "absnif_react" reaches a given number. In the following example we assume:

NPC cre file name -- ab_Sue (Sue as in -- Hey! 'tis Sue)

NPC banter dlg file name -- abBSue

Sue has cast the spell 3 times

Example(not exact .d code):

CHAIN
IF ~Global("absnif_react","GLOBAL",3)
Global("absnif_Minsc1","GLOBAL",0) //not done this one
/* all those other checks for banter go here */~ 
THEN BMINSC sniff1  
~Hey! Be careful with that spell. You make Boo all wet with colored goo!~
DO ~SetGlobal("absnif_Minsc1","GLOBAL",1)~ //keeps this from repeating
== abBSue ~I am SO sorry!~
== BMINSC ~Sorry! Only sorry? Boo needs a bath. Give me your canteen!~
== abBSue ~What? Hey...  You...  That's...~
= ~...the wrong bottle!  Now you've done it, that wasn't water!~
== BMINSC ~You... You witch!  You fix Boo NOW!~
== abBSue ~Well, you can either cut all of his fur off or just be content knowing that now he can sneak up on our enemies.~
== BMINSC ~Sure, if our enemies are hiding in a candy shop.~
= ~Anyone got a pair of scissors?~
EXIT

You can use the banter above if it fits in your mod...

Link to comment

Here I am again... :rolleyes:

 

Since this whole spellstuff with the optcodes is (relativley) easy, I started to implement all the stuff I almost cut because I thought I would never figure out how to do it or would simply be imossible.

 

My current problem is as follows: My NPC is getting sick and I made a sickspell with fatigue and lowerd STR, DEX, etc. and a portrait icon. I set it to duration mode and the duration itself to 21600 (three days). Works well and fine and everything. As long as the NPC doesn't die.

 

So I thought to myself "Ok, I just make a sickspell with timing mode 9 and an anti-sickspell with timing mode 9 that revokes all the penalties. That'll have to work!"

 

But then I realized I have no idea how to remove the portrait icons. Is there a way?

Link to comment

And again... :rolleyes:

 

One of my weapons (a bow) is supposed to protect the wearer from charm, confusion, domination and hold person, like the Shield of Harmony +2 (shld25.itm) does.

 

I looked the shield up and recreated all the neccessary equipping effects on the bow. Result: nothing. So I took a copy of the shld25.itm and changed everything except the eq. effects to my bow. At eq. effects I only changed the colour-optcodes and deleted/added the ac-bonuses (shield)/the attacks per round (bow) but never touched anthing else. Result: Nothing.

 

I don't know what I'm doing wrong... Do I miss something?

Link to comment

*sigh*

 

Thanks! Sometimes I'm just soooooooo tired of myself...

 

 

Well, at least you get the chance to help me with my stupid problems in german AND englisch. That should be something. Not exactly worth, but something else. Good karma for aiding the mentally challenged or stuff like that... :rolleyes:

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...