Pocket Plane Group

Friends and Neighbors => Weimer Republic (WeiDU.org) => WeiDU => Topic started by: Nythrun on May 19, 2008, 04:53:43 PM

Title: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: Nythrun on May 19, 2008, 04:53:43 PM
Before someone releases a mod using it, and there's back-compatibility to fret over?

/edit

Debug info is swapping these around for STRING_SET also, maybe other places - if anyone cares :)
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: the bigg on May 19, 2008, 05:42:35 PM
Fixed for ALTER_TRANS. Can you give an example for STRING_SET?
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: Nythrun on May 20, 2008, 03:25:46 PM
I can't even find what I was doing anymore (a stupid trick with COPY - some_macro some_maco EVALUATE_BUFFER REINCLUDE some_macro).

STRING_SET doesn't accept #strrefs anyway so it can't possibly matter, I'd just wondered if it might have been related.

No worries.
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: Taimon on May 21, 2008, 03:48:09 AM
How do you solve the backwards compatibility issues?
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: the bigg on May 21, 2008, 07:01:34 AM
In this case (as I'm clearly fixing a bug, and the relevant feature is only a couple of versions old), I just ignore them, rather than adding a ALTER_TRANS_NOT_SWAP_AT_HASH_SIGNS.

Obviously, I'm the only developer who will get yelled at for breaking backwards compatibility and is expected to introduce PLEASE_FIX_THIS_BUG keywords (all other language developers will just point you to the New Way Of Writing Your Code).
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: Taimon on May 21, 2008, 11:39:48 AM
No offense, I was just curious. (Since WeiDU really seems to care about backwards compatability [IF_EVAL].)
I forgot that ALTER_TRANS is a very recent addition.
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: cmorgan on May 21, 2008, 11:52:36 AM
Not much out there using it - I was still working with

REPLACE_SAY ~%CORAN_JOINED%~ %BGTCORANJState4% @0

and have only one line in bg1npc that uses ALTER_TRANS, with no .tra necessary:

REPLACE_SAY ~%tutu_var%BRIELB~ 14 @1
ALTER_TRANS ~%tutu_var%BRIELB~ BEGIN 14 END BEGIN 0 END BEGIN ACTION ~SetGlobal("P#Briel_Stay","GLOBAL",1) RealSetGlobalTimer("X#BriLostPatience","GLOBAL",1800)~ END

so this fix would let me do both at once, right?


Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: the bigg on May 21, 2008, 12:20:49 PM
Stuff that uses REPLACE_SAY can't be edited by ALTER_TRANS (since it's a state thing, not a transition thing).
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: Qwinn on May 21, 2008, 03:19:00 PM
I've used ALTER_TRANS tons in my PS:T Fixpack/UB/Tweak mods (not released yet, but soon).  I certainly don't mind fixing the code, though, when 207 is released.

Seriously, ALTER_TRANS is such an immensely useful command, I dunno how you've all done so much without it.  I mean that literally - I don't know how you've done a whole mess of things, cause I can't find any alternate way to do them (like adding/replacing journal entries, transition replies, changing a response trigger when you can't use REPLACE_TRIGGER_TEXT because the trigger is fine elsewhere, etc. etc. etc.

Don't read that as a request to be told how to do it otherwise, heh.  I'm quite happy with ALTER_TRANS.  :)

Qwinn
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: cmorgan on May 21, 2008, 06:41:13 PM
 8) Brain-blowout. Sorry. An ALTER_TRANS that could do that is called REPLACE... should have reread the docs.

TRIGGER: The trigger condition for the transition. i.e "TRIGGER" ~Global("foo","GLOBAL",0)~
ACTION: The action performed if the transition is selected. i.e. "ACTION" ~SetGlobal("foo","GLOBAL",1)~
REPLY: The player’s reply, if any. i.e. "REPLY" ~REPLY #57922~
JOURNAL: Can add or change the journal entry. i.e. "JOURNAL" ~JOURNAL @100~
SOLVED_JOURNAL: Same as JOURNAL, except for entries into the solved section of the journal.
UNSOLVED_JOURNAL: Same as JOURNAL, except for entries into the unsolved section of the journal.
EPILOGUE: Specifies where the transition leads to (GOTO, EXTERN, or EXIT) i.e. EPILOGUE" ~EXTERN BVICONI 0~
FLAGS: Used to set transition flags manually, though I can’t imagine why one would do this.
Title: Re: Can ALTER_TRANS not swap the meanings of # and @ in 207?
Post by: Qwinn on May 21, 2008, 11:36:35 PM
Quote
REPLY: The player’s reply, if any. i.e. "REPLY" ~REPLY #57922~
JOURNAL: Can add or change the journal entry. i.e. "JOURNAL" ~JOURNAL @100~

Be aware that those are incorrect in the tutorial.  Do not repeat the words "REPLY" and "JOURNAL" between the tildes.  Proper usage is:

ALTER_TRANS dialogfile BEGIN ... END BEGIN ... END BEGIN "REPLY" ~#57922~ END
ALTER_TRANS dialogfile BEGIN ... END BEGIN ... END BEGIN "JOURNAL" ~@100~ END

Qwinn