Jump to content

Improve thievery skills in dialogs


lsass.exe

Recommended Posts

Hi there

 

I wrote a little pickpocket competition between my NPC and Zhurlong (the Halfling thief in the Burnning Wizard Inn in Beregost) and I’d like to end it with a thievery skill improvement for my NPC. I searched through the actions at IESDB but found nothing. Is it even possible? Or do I just look at the wrong place?

Link to comment

Apply a spell (ApplySpellRes action) with an increase to the pickpockets stat (Opcode 92).

Use timing mode 9.

 

I'm not sure if you got ApplySpellRes in bg1, it might be not obvious or outright unavailable.

So, you might want to fall back to simple ApplySpell.

Link to comment

Thanks for all your help!

 

I totally forgot to mention, that I make a BGT-Mod. From the start to the end in one go. So I can use all the ToB scripting stuff.

 

But first I will have to figure out, how to use that ApplySpellRes() thingy with optcodes and stuff. :)

 

 

 

 

PS:

I guess, I can raise DEX and stuff like that the the same way?

Link to comment

Using the ApplySpellRes is fairly easy...

 

In your dialog file at the relevant transition you'd have;

DO ~ApplySpellRES("Spell_File_Name",Target)~

where Spell_File_Name is the 6-7 character file name without the extension and Target is who the spell will affect. So if your spell was ab_100.spl and your target was the last person who talked to the NPC then you would have DO ~ApplySpellRes("ab_100",LastTalkedToBy())~ .

 

Of course none of that will work unless the spell you wish to use has been created. I would recommend using DLTCEP or NI for that. There are others better versed in spell creation than I, so it'll be best if I remain quiet in regards to making spells...

Link to comment

Thanks for your answer! After a little bit of thinking I figuered that out, but I was lost thereafter, because I thought I have to use this optcode (not to forget the timing mode 9) with ApplySpellRES(). (I'm not the sharpest knife in the drawer :))

 

But I think I understand you. I have to create a spell which uses that optcode for raising the thievery abilites and then use that spell with ApplySpellRES() on my NPC, right?

Link to comment

Thank you!

 

Ok, creating spells... i didn't think I'd have to do that for my mod but how difficult can it be anyway... :)

 

I guess I'm going to hit the tutorials this weekend and see what I can accomplish.

Link to comment

Well, I didn't find any tutorials in my quick search so I just startet to tinker with DLTCEP and it was surprisingly easy, even for my standards. :)

 

 

And while I was at it, I made a new innate ability for the npc which works also without problems. But I'd like to display a string above the npcs head, when the ability is used. So I assigned the Optcode (139) which works wonderfully! (and made me really proud of myself ;))

 

With but one single flaw: The string isn't displayed in the game window but in the textbox. I searched the Optcodes but found nothing. How do I do this? Is it even possible?

 

And one more question: I added my optcode string to the extended effects and DLTCEP wrote it automatically in my tlk. Which is not a very clever solution. How can use a string that is read from my tp2 during installation?

Link to comment
With but one single flaw: The string isn't displayed in the game window but in the textbox. I searched the Optcodes but found nothing. How do I do this? Is it even possible?

 

Detect your spell being cast and do DisplayStringHead from the npc script, I guess. Or simply do them in sequence :)

Link to comment
With but one single flaw: The string isn't displayed in the game window but in the textbox. I searched the Optcodes but found nothing. How do I do this? Is it even possible?

 

Detect your spell being cast and do DisplayStringHead from the npc script, I guess. Or simply do them in sequence :)

Ahh, i forgot you have an npc with its own special script.

You can either try the spellcast() stuff, or set a local variable by the spell.

(187 store local variable effect) - i would use the spell's name as the variable name

Then in the script would be something like this:

 

if

global("spinxxx","local",1)

then

response #100

setglobal("spinxxx","local",0)

displaystringhead(myself,~)

end

Link to comment

Thanks for the DLTCEP tip. I'd never found that on my own.

 

 

I bet you are ahead of some old modders

No no no, don't flatter me. My head may be big and round but it's also very empty. ;) I used some basic logic thinking (or what I consider to be logic) and trial and error but that doesn't mean I actually know what I am doing... ^^

 

 

Anyway, back to the string. Could I solve this via the NPCs script? Since he is the only one having that innate, I could check if it was used and then display the string in the game window over his head. Is that going to work? Or would the string be printed even ten rounds after the innate was used?

 

The text is not essentiell for the whole thing, it would just add massive amounts of RP-flavour. But therefore it has to be printed in the game window, since nobody reads the textbox and there allready is the message that the innate was casted...

 

 

 

EDIT:

I shouldn't answer the phone before sending my reply... :)

 

So, my script thinking wasn't total bullcrap. What a relief. ;)

 

Thanks a lot, guys. I'll try that until my fingers are bleeding or the stuff works!

Link to comment

Archived

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

×
×
  • Create New...