Jump to content

how to specify no kit in scripts


subtledoctor

Recommended Posts

I have a few scripted things that trigger different dialogues depending on the speaker's kit. For the default, I use

Class(LastSummonerOf(Myself),THIEF)
Kit(LastSummonerOf(Myself),TRUECLASS)

But it looks like some "trueclass" .CRE files actually have their kit set to 0, rather than 0x4000. In that case the above check returns false, even though the character is a trueclass thief. (I think that is why Imoen2.cre doesn't work with my feats mod.) Can I specify that in a script? Something like

Class(LastSummonerOf(Myself),THIEF)
Kit(LastSummonerOf(Myself),NONE)

?

Edited by subtledoctor
Link to comment

Actually this relates to the stats.ids conversation on the other thread. As far as the BCS format is concerned, TRUECLASS is just a lookup in kit.ids. It gets replaced by 0x4000 when the script is compiled, because that's the entry next to TRUECLASS in the ids file.

 

To check for either kit=0x4000 or kit=0, you need

 

OR(2)
  Kit(LastSummonerOf(Myself),TRUECLASS)
  Kit(LastSummonerOf(Myself),0)
You can add

0 TRUECLASS2
to kit.ids if you like, and if you do it'll let you do

OR(2)
  Kit(LastSummonerOf(Myself),TRUECLASS)
  Kit(LastSummonerOf(Myself),TRUECLASS2)
but as far as the engine is concerned you can use the bare number just as well.
Link to comment

Whether or not 0 is appended won't make any difference to whether it works. Like I say, these ids files are just for human readability.

 

Ardanis is right, you need to check whether Kit(…,0) just returns true whatever. That happens for some triggers. If it does, you'll need to find a workaround (patching kit-0 creatures to kit-0x4000 is the most straightforward, but depending on your goal, there may be a subtler way).

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.

Guest
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...