Jump to content

Noted some things with IWD2 script triggers (when used with party AI)

Recommended Posts

These are just some minor things I noticed recently while working on an ai script for IWD2. Note that I'm not sure whether these behave differently outside of party ai scripts.

1. Single class identifiers (FIGHTER, WIZARD, etc.), when used with the "Class" script trigger, seem to apply as long as the character has any levels in the class, including multiclassing. So either the identifiers, themselves, apply to any combination with the class, or it's the Class script trigger applying them to anything.

Basically, I'm mentioning this because you don't need to use the multiclass identifiers or the ClassEx trigger to script for multiclasses, but that isn't clear when reading the pages on IESDP.

2. I wasn't able to get the "Range" script trigger to function (WeiDU also enforces 2 values after the Object, not just the one mentioned on the IESDP page). The LOS trigger, however, works perfectly, as described on the script trigger page, and does the same thing as what I wanted to use Range for.
3. CheckStat/CheckStatGT/CheckStatLT
 - I wasn't able to get these to work right. When used with an auto-attack block, they either do nothing, or they break auto-attacking, as in the character won't auto-attack at all. Maybe only specific stats work or something. I originally was trying to use these because the IWD Pregen script (from IWDEE, which I was building off of) uses CheckStatLT to check for Sanctuary. In the end, I got the check working using CheckSpellState instead.



After further testing, CheckStat does work, but not with Sanctuary (and possibly others in stats.ids). Tried it with a polymorph check and CheckStat(Myself,1,POLYMORPHED) works for checking druid shapeshifts. It's probably the Sanctuary spell that behaves differently than in the other games, even though it still appears in stats.ids. For Sanctuary, what you'd want to use is CheckSpellState(Myself,SANCTUARY), or !CheckSpellState(Myself,SANCTUARY) to check for not having it.

Edited by Dan_P
Link to comment

2. Range in IWD2 differs from BG. The second parameter can take the following values:
It seems so, if I'm not mistaken.
I don't remember their IDs numbers.

Link to comment

Just tested and Range works as you described. Specifically, for anyone confused, the trigger is Range(a,b,c)
a = Object
b = distance in feet

Compared to the LOS trigger, Range seems mostly useful for the GREATER_THAN parameter.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...