Salk Posted September 28, 2023 Share Posted September 28, 2023 Hello! I tried to look for a place that would list all of WeiDU's shorthand syntax for .d files but I couldn't find it. Any suggestions about where to look? Thanks! Quote Link to comment
argent77 Posted September 28, 2023 Share Posted September 28, 2023 The WeiDU docs don't appear to list all shorthand syntax that is supported by WeiDU. The best list I could find is in the WeiDU source itself: https://github.com/WeiDUorg/weidu/blob/master/src/dlexer.mll Quote Link to comment
Salk Posted September 28, 2023 Author Share Posted September 28, 2023 Thank, argent77. I'm afraid the source doesn't help me much. I know I have found the following: ++ @0 = IF ~~ THEN REPLY @0 + ~Trigger~ + @0 = IF ~Trigger~ THEN REPLY @0 but there must be plenty more. Cheers! Quote Link to comment
jastey Posted September 28, 2023 Share Posted September 28, 2023 The weidu readme explains this a little in the table for the d-file syntax: is IF transTriggerString [ THEN ] transFeature list transNext If the transTriggerString evaluates to true or is empty, this transition is viable. If it contains no replyText within its transFeature list, it is immediately taken. Otherwise, the replyText is presented as an option to the user. If the transition is taken, any actions in the transFeature list are performed and the dialogue flows to the point indicated by the transNext. transitions are evaluated in "reverse order". That is, the "bottom" or "last" response for a state is checked first. If its transTriggerString evaluates to true and it has no REPLY text, that transition is immediately taken. See SAREV25A state 1 for an example of a state with all kinds of transitions. or + [ transTriggerString ] + replyText transFeature list transNext This abbreviated syntax for transitions that would contain REPLY (which is by far the most common case) allows you to save yourself some time and typing. It behaves like the full form above. 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.