Lauriel Posted April 3, 2021 Share Posted April 3, 2021 This is more of a WeiDU bug, but I'm putting it here in case it's desired to put a warning into the documentation for NextTriggerObject(). WeiDU doesn't play nice with Player1. Example: TriggerOverride(Player1,SomeCheck()) gets put into the dialogue file exactly like that. It doesn't break it out into NextTriggerObject(Player1) SomeCheck(). The result is it doesn't work. It gives no warning, it just doesn't work. Also, ~NextTriggerObject(Player1) SomeCheck()~ will be interpreted the same way and TriggerOverride(Player1,SomeCheck()) will be put into the dialogue file and will not work as expected. The only way I've found to get around this is to use the negative of SomeCheck() like, ~NextTriggerObject(Player1) !NotSomeCheck()~. WeiDU will leave this alone and it'll work as expected. Quote Link to comment
kjeron Posted April 4, 2021 Share Posted April 4, 2021 It does that if you have an unidentifiable IDS label in the script block. ~TriggerOverride(Player1,True())~ ends up in the dialog file as: NextTriggerObject(Player1) True() ~TriggerOverride(Player0,True())~ ends up in the dialog file as: TriggerOverride(Player0,True()) Because 'Player0' is not a defined object label by default. It's expecting you to define "Player0" later on, because with dialog files, you can. It does however spit out a warning during the install. There are also situations where it doesn't do that when it should, such as converting "StateCheck([PC.2.ELF.101],0)" into: StateCheck([PC.ANIMAL.ELF.ANKHEG],STATE_NORMAL) Instead of leaving it as "[PC.2.ELF.101],0" The value of those labels (ANIMAL, ANKHEG, STATE_NORMAL) may change, and that is NOT what was specified. Quote Link to comment
Lauriel Posted April 4, 2021 Author Share Posted April 4, 2021 (edited) 13 minutes ago, kjeron said: It does that if you have an unidentifiable IDS label in the script block. ~TriggerOverride(Player1,True())~ ends up in the dialog file as: NextTriggerObject(Player1) True() Unfortunately, I've tested this multiple times and it doesn't work. EDIT: It may have to do with the method used to put the code in. I use variables sometimes to hold code blocks depending upon which mods are installed, etc. So in the mymod.d file it looks like %DIALOGUES_CHANGES_FOR_THIS_NPC% Where DIALOGUES_CHANGES_FOR_THIS_NPC has been set to ~TriggerOverride(Player1,True())~. This will fail 100% of the time. If I have DIALOGUES_CHANGES_FOR_THIS_NPC set to ~NextTriggerObject(Player1) True()~, it will fail 100% of the time. If I have DIALOGUES_CHANGES_FOR_THIS_NPC set to ~NextTriggerObject(Player1) !False()~ it will work as expected. Edited April 4, 2021 by Lauriel 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.