Jump to content

adding innate abilities from a dialogue


subtledoctor

Recommended Posts

I'm working on a spell that will open a dialogue, give the caster a bunch of choices, and then depending on the chosen response, grant a new innate ability. So:

 

spell --> invisicre --> dialogue --> ??? --> new ability

 

I'm not sure what needs to go where the ??? is. There seems to be an "AddSpecialAbility" script action, but it doesn't take a target...? So if the dialogue is initiated by an invisicre, there doesn't seem to be a way to apply that action to LastSummonerOf(Myself).

 

There seems to be a RemoveSpell action, but no AddSpell action?

 

Do I need to make a secondary spell that uses opcode 171, and ApplySpellRES that to the LastSummonerOf(Myself)? Easy enough to do; but i'd like to know whether this is the optimal method for this.

Link to comment

Next question :) :

 

I currently have this working in a dialogue:

IF ~Global("D5_SKILLS","LOCALS",0)~ THEN REPLY ~Stealth Bonus~ GOTO d5_rogue_1

Instead of checking if a local variable is equal to some value, can I check whether it is at least equal to some value? Like,

IF ~Global("D5_SKILLS","LOCALS",>=0)~ THEN REPLY ~Stealth Bonus~ GOTO d5_rogue_1

Or, if that variable is incremented and I want to limit this script to happening 5 times:

IF ~Global("D5_SKILLS","LOCALS",<5)~ THEN REPLY ~Stealth Bonus~ GOTO d5_rogue_1
Link to comment

Thx. next: can I check more than one conditional there? Like check for both the "D5_SKILLS" local variable to be <5 *and* the speaker's INT score to be >14, then REPLY something and GOTO the next response? Something like,

 

IF ~GlobalLT("D5_SKILLS","LOCALS",5)~ ~GlobalGT("D5_OTHER","LOCALS",0)~ THEN REPLY ~Stealth Bonus~ GOTO d5_rogue_1
Link to comment

No offense, but have you tried to look up in-game files or any NPC mod? :)

I looked at the Weidu docs and got cross-eyed. I've never done anything with dialogue before and it's a bit of a steeper curve than the basic Weidu I've picked up (which is just COPY in various ways, and PATCH in various ways).

 

I'll take a look at the Branwen mod.

 

(The other issue is that I have almost zero free time these days; most of the time I can devote to modding is just planning stuff out in my head, and posting questions here. So I often can't review other mods, because I'm just sitting here on my phone, without access to a computer. I try to understand it all ahead of time, so that when I get in front of my computer I can jump right into implementing stuff.)

Link to comment

This won't work:

IF ~GlobalLT("D5_SKILLS","LOCALS",5)~ ~GlobalGT("D5_OTHER","LOCALS",0)~ THEN REPLY ~Stealth Bonus~ GOTO d5_rogue_1

This will:

IF ~GlobalLT("D5_SKILLS","LOCALS",5) GlobalGT("D5_OTHER","LOCALS",0)~ THEN REPLY ~Stealth Bonus~ GOTO d5_rogue_1

All of the trigger conditions between IF and THEN need to be in a single string. Spaces between them are understood to mean 'AND' (all must be true). If you want OR (at least 1 true), you write OR(#) and the following # of conditions will be considered part of the OR statement.

Ex:

IF ~GlobalLT("D5_SKILLS","LOCALS",5) GlobalGT("D5_OTHER","LOCALS",0) OR(2) Global("this","LOCALS",1) Global("that","LOCALS",1) Global("other","LOCALS",1)~ THEN REPLY ~Stealth Bonus~ GOTO d5_rogue_1

The part in green is the OR. Either "this" or "that" will suffice. The Global check after ("other") it isn't part of the OR, so it's considered 'AND' with the rest (must be true).

Link to comment

Archived

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

×
×
  • Create New...