Thimblerig Posted November 2, 2013 Posted November 2, 2013 Is it possible to call more than one tra string in a SAY command? As a hypothetical: CHAIN IF ~True(0)~ THEN xxBOOK titlepage @0 // ~Title of Book~ == xxBOOK IF ~ContingencyAAlpha~ THEN @1 @2 // paragraph A, continues to paragraph Alpha == xxBOOK IF ~ContingencyABeta~ THEN @1 @3 // paragraph A, continues to paragraph Beta == xxBOOK IF ~ContingencyBAlpha~ THEN @4 @2 // paragraph B, continues to paragraph Alpha == xxBOOK IF ~ContingencyBBeta~ THEN @4 @3 // etc. == xxBOOK @5 // ~The End~ EXIT I am making a conversable book item which I want to hold visible content that responds to choices made earlier by the PC. While I think I can get it working using lots of IF state transitions, it would still save some headaches and duplicated text if I can run the occasional strings together. Is that a thing I could do? Thank you for your consideration, Thimblerig
Wisp Posted November 2, 2013 Posted November 2, 2013 I don't think so, no. It looks like string concatenation is only available for string literals, not trarefs.
Thimblerig Posted November 2, 2013 Author Posted November 2, 2013 Thanks, Wisp - you saved me going up a blind alley.
jastey Posted November 2, 2013 Posted November 2, 2013 Would it be possible to use OUTER_SPRINTs for this? If you define e.g. OUTER_SPRINT ~Text_1~ ~First text string~ OUTER_SPRINT ~Text_2~ ~then second~ OUTER_SPRINT ~Text_3~ ~then third~ It should be possible to compile this to: CHAIN IF ~True(0)~ THEN xxBOOK titlepage @0 // ~Title of Book~ == xxBOOK IF ~ContingencyAAlpha~ THEN ~%Text_1%%Text_2%~ == xxBOOK IF ~ContingencyABeta~ THEN ~%Text_1%%Text_3%~ == xxBOOK @5 // ~The End~ EXIT But I have no idea whether this would actually work. Alternatively, you could add the texts as several strings like this: (This way the player has to click "continue" but it's not a problem I think): CHAIN IF ~True(0)~ THEN xxBOOK titlepage @0 // ~Title of Book~ == xxBOOK IF ~ContingencyAAlpha~ THEN @1 // paragraph A, continues to paragraph Alpha == xxBOOK IF ~ContingencyAAlpha~ THEN @2 // == xxBOOK IF ~ContingencyABeta~ THEN @1 // paragraph A, continues to paragraph Beta == xxBOOK IF ~ContingencyABeta~ THEN @3 // == xxBOOK IF ~ContingencyBAlpha~ THEN @4 // paragraph B, continues to paragraph Alpha == xxBOOK IF ~ContingencyBAlpha~ THEN @2 // == xxBOOK IF ~ContingencyBBeta~ THEN @4 // etc. == xxBOOK IF ~ContingencyBBeta~ THEN @3 // etc. == xxBOOK @5 // ~The End~ EXIT
Jarno Mikkola Posted November 2, 2013 Posted November 2, 2013 What's the purpose of this all ? Why not use the jastey's second suggestion, but without the THEN -command like so: CHAIN IF ~blad~ THEN bladbladblad ... == IJ#esirB ~Ah, not again! Just take the darn scroll already.~ == naliaJ ~What?~ == IJ#esirB ~One of your highly irritant speeches about to poor and so forth... all the while you are trying to steal the peoples magic scrolls from them.~ == naliaJ ~Wha- What are you talking about?~ == IJ#esirB ~Just these, or where else would you get them...~ == naliaJ ~Ah-~ ... EXIT END Yes, that's two persons speaking in a non translated talks, but you can have it be the same person as well.. and you just replace the ~blah~ with @x's. Yes, this is why you have the CHAIN in it, the == ~blah~ -commands follows one another...
jastey Posted November 2, 2013 Posted November 2, 2013 Jarno: ? ? ? Using CHAIN without any THEN conditions makes no sense at all, since the shown text depends on what was chosen beforehand. In your suggestion, all text is shown to everyone, which was not the point. Or I don't understand your suggestion.
Jarno Mikkola Posted November 2, 2013 Posted November 2, 2013 Well dah... isn't that what the original idea was... say you wish to have this: CHAINIF ~True(0)~ THEN xxBOOK titlepage @0 // ~Title of Book~ == xxBOOK IF ~ContingencyAAlpha~ THEN @1 @2 // paragraph A, continues to paragraph Alpha == xxBOOK IF ~ContingencyABeta~ THEN @1 @3 // paragraph A, continues to paragraph Beta == xxBOOK IF ~ContingencyBAlpha~ THEN @4 @2 // paragraph B, continues to paragraph Alpha == xxBOOK IF ~ContingencyBBeta~ THEN @4 @3 // etc. == xxBOOK @5 // ~The End~ EXIT Failure. You ACTUALLY do it like this: CHAIN IF ~True(0)~ THEN xxBOOK titlepage @0 // ~Title of Book~ == xxBOOK IF ~ContingencyAAlpha~ THEN @1 = @2 // paragraph A, continues to paragraph Alpha == xxBOOK IF ~ContingencyABeta~ THEN @1 = @3 // paragraph A, continues to paragraph Beta == xxBOOK IF ~ContingencyBAlpha~ THEN @4 = @2 // paragraph B, continues to paragraph Alpha == xxBOOK IF ~ContingencyBBeta~ THEN @4 = @3 // etc. ... == xxBOOK @5 // ~The End~ EXIT END ... whatever.... as in you continue without the THEN between the two lines, not interrupting it. Edit to clean up, as I forgot half of this stuff ... And then the == <speaker identifier> works if the speaker is changed.
jastey Posted November 2, 2013 Posted November 2, 2013 Yes, the second one works, if the conditions are the same, the "=" without any variables or dlg-name means it's the same conditions. I didn't get this from your former post.
Thimblerig Posted November 3, 2013 Author Posted November 3, 2013 It's for a couple of characters who want to write a lurid adventure novel based on Charname's exploits. In the original conversation where they're interviewing Charname I ended up with all sorts of choices that the player could make - what kind of personality Charname wants to be known for, details of a romance plot if any, exploits achieved... after all that it seemed a shame to just pawn off the player with something bland and one-fits-all. On the other hand, writing out all the possible permutations quickly becomes prohibitive in memory and organisation. The possible romance has at least three variables to juggle... MADNESS!! What was I THINKING?? At the moment I'm planning a modular structure - Opening - based on player's alignment choices Mid-game romance scene - based on romance choices Late-game excitement - what does the player consider their main plot ** I'm kind of... working out what tools I have on the bench, right now. There's this juggling act between mouse-clicks required of the player, writing, duplicated content + memory, and the last fractured nerves of, well, me. ... The sparks scattered higher as <CHARNAME> poked irritably at the coals with a splintered stick. The scent of pine resin and the first harsh nip of frost hung in the air. Across the campfire <Designated Love Interest>'s eyes ((seemed puzzled - <CHARNAME>'s old friend had been unsettled of late//were golden orbs heavy-lidded with desire//glared through <CHARNAME> as if, by vision alone, the young adventurer's very soul could be laid bare)). "Where will you go now?" <DLI>'s voice, ((reliable as ever,//mellow and strong as old brandy,//gruff,)) was carefully non-committal... I think, on balance, it will be easiest to write out each romance paragraph long-hand and string them to the others. But, this is turning into an interesting technical exercise, so thank you Jastey, Mikkola, and Wisp. OUTER_SPRINT ~Text_1~ ~First text string~ OUTER_SPRINT has definite possibilities.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.