Skip to content

More about Wiedu

chimericchimeric Member Posts: 1,163
I've received a basic introduction to Weidu from, I think, @subtledoctor - thanks for that, it has been invaluable - but now I have trouble getting custom strings in the mod's installation. Apparently that's done through RESOLVE_STR_REF. Can I have an example of how that would be used in a string to be used in a dialogue, in DisplayStringHead?

Comments

  • The user and all related content has been deleted.
  • ArdanisArdanis Member Posts: 1,736
    edited August 2016
    IF you only need to display it in game, then it's simple.
    IF
      True()
    THEN
      RESPONSE #100
        DisplayStringHead(Myself,~New text that WeiDU will automatically resolve and replace with a strref number.~)
    END
    If you have put your mod's text into TRA files, then
    IF
      True()
    THEN
      RESPONSE #100
        DisplayStringHead(Myself,@123)
    END
    Where @ 123 is set to the abovementioned text in a TRA.
    Same for dialogue files.

    PS Um, I think I accidentally tagged someone... Sorry :)
  • smeagolheartsmeagolheart Member Posts: 7,963
    Dialogue is covered in this tutorial

    http://forums.pocketplane.net/index.php?topic=55.0
  • chimericchimeric Member Posts: 1,163
    So, @Ardanis , is the first option going to compile when I put it in the d file and make a dlg out of it? Also, am I right in thinking that I can only append my own dialogue to existing dialogue starting from states, i.e. if I want there to be a new reply option to Taerom the smith's usual greeting, I can't put it there directly but have to copy that whole state with the greeting, only put my own trigger in front of it?

    Hello, welcome to my...
    - Want new REPLY here

    Have to make my own
    TRIGGERS Hello, welcome to my...
    - New reply

    ?
  • ArdanisArdanis Member Posts: 1,736
    is the first option going to compile when I put it in the d file and make a dlg out of it?

    Yes, but you'll have to use %s to wrap it instead of ~s, since it'll be a text string within dialog script string, and WeiDU wouldn't know otherwise whether it's the end of script or beginning of text. Otherwise, you can traify the file and use @ 123 (whatever value it's assigned to, without space) for DisplayString() argument.
    More about string enclosing http://weidu.org/WeiDU/README-WeiDU.html#String

    Also, am I right in thinking that I can only append my own dialogue to existing dialogue starting from states, i.e. if I want there to be a new reply option to Taerom the smith's usual greeting, I can't put it there directly but have to copy that whole state with the greeting, only put my own trigger in front of it?

    No, you can extend existing states with new transitions (i.e. player responses) just fine.
    EXTEND_TOP taerom 14 
    IF ~~ THEN REPLY ~Hey, I've got a new line to say!~ GOTO heynewline
    END
    
    APPEND taerom
    
    IF ~~ THEN BEGIN heynewline
      SAY ~Don't think you're the first one to try it.~ 
      IF ~~ THEN DO ~DisplayStringHead("Taerom",%Damn modders, never letting old man to his work...%)~ EXIT
    END
    
    END
    http://weidu.org/WeiDU/README-WeiDU.html#EXTEND_TOP



  • chimericchimeric Member Posts: 1,163
    Thank you, @Ardanis . Weidu gets the award for the Least Helpful Documentation, but, I suppose, I'll figure out how that's actually done from some examples. Do you know any mods or files that do this extending and appending so I can open them up? I know the tutorial @smeagolheart put a link to, I can write dialogues on that level easily now, but appending-extending catches me off-guard.
  • ArdanisArdanis Member Posts: 1,736
    Not offhands, I haven't really been following the scene in the last couple years... I guess, you could try Questpack or Unfinished Business at Pocketplane, although those are pretty old.
  • GrimLefourbeGrimLefourbe Member Posts: 637
    edited August 2016
    Do crafting mods like item upgrade and thalantyr item upgrade do what you're looking for? Massively adding options to a dialog, beginning, end and middle.
  • chimericchimeric Member Posts: 1,163
    I'll check them out, thanks.
Sign In or Register to comment.