subtledoctor Posted November 16, 2018 Share Posted November 16, 2018 (edited) 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 November 16, 2018 by subtledoctor Quote Link to comment
DavidW Posted November 16, 2018 Share Posted November 16, 2018 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. Quote Link to comment
Ardanis Posted November 16, 2018 Share Posted November 16, 2018 Make sure to test that 0 in script triggers doesn't also return true for "any" kit, like iirc crushing damage type does. Quote Link to comment
subtledoctor Posted November 16, 2018 Author Share Posted November 16, 2018 Sounds safest to append 0 to the table then. Easy enough. Honestly not even sure if this is the problem with Imoen - don't have access to check the .CRE file at the moment - but a lot of creatures do have their kit set to 0 so it's good to know anyway. Quote Link to comment
DavidW Posted November 16, 2018 Share Posted November 16, 2018 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). Quote Link to comment
subtledoctor Posted November 20, 2018 Author Share Posted November 20, 2018 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, Yeah on reflection, this is the best course. Quote Link to comment
Recommended Posts
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.