Author Topic: Wish List  (Read 6285 times)

Offline Qwinn

  • Planewalker
  • *****
  • Posts: 111
Re: Wish List
« Reply #25 on: May 17, 2008, 02:13:04 PM »
Nythrun:  In the end, I went with your APPEND_FILE_EVALUATE solution, which allowed me to add the quests with no line feed issues.  Thanks for that solution :)

Qwinn

P.S.  The inline bit, while I would -love- to use it, isn't working.  I had to make the added two quests an actual separate file.  When trying the inline bit, even if I pull up my .tph in notepad, delete all the carriage returns in the inlined portion and add them back in, when I rerun the append_file_evaluate on the inline part it will still screw them up.  Gah.  No idea why.

« Last Edit: May 17, 2008, 02:36:41 PM by Qwinn »

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: Wish List
« Reply #26 on: August 17, 2008, 12:46:47 AM »
Quote
actually, REPLACE_TRIGGER_TEXT should already do what you want (regexp substitution) on both Trans and State triggers. Is this enough, or is your regexp also matched by a State Trigger where it shouldn't?

The problem with REPLACE_TRIGGER_TEXT is that you can't make it work for the triggers of a specific state, it's every trigger in the file or nothing.  The text I'm replacing may be perfectly valid in many, even most states, and I may just want to change it in a specific one.  That's why a syntax and functionality like REPLACE_TRANS_ACTION, where you can specific BEGIN [statelist] END BEGIN [transition] END ~TextToBeReplaced~ ~NewText~ would rock.

Another way to look at it is, whatever possessed someone to create REPLACE_TRANS_ACTION when REPLACE_ACTION_TEXT was already available, same reasoning here :)
[/quote]

Hey - is this applied in v20800? I don't see mention of it, and really could use it -

http://forums.gibberlings3.net/index.php?s=&showtopic=14602&view=findpost&p=130684

instead of combing through and messsing with everyone's triggers,

REPLACE_TRIGGER_TEXT %CORAN_JOINED% ~!Dead("Wyvern")~  ~!Dead("X#CoranWyvern")~

which it looks like allows regexp so I could look for both !Dead("Wyvern") and Dead("Wyvern") (or perhaps even just change the "Wyvern" if it isn't case sensitive) but scares me on regexp searches of the folks who have big lists of mods and little patience for research just want to toss them on, do you actually have a variant on

REPLACE_TRIGGER_ACTION %CORAN_JOINED%  BEGIN  END BEGIN 0 END ~Dead("wyvern")~ ~Dead("X#CoranWyvern")~
I know I can completely replace the trigger using

ALTER_TRANS DOGHMA // file name
BEGIN 9 END // state number (can be more than one)
BEGIN 3 END // transition number (can be more than one)
BEGIN // list of changes, see below for flags
  "TRIGGER" ~Global("RevealUmar","GLOBAL",1)
           OR(4)
             PartyHasItem("miscbl")
             PartyHasItem("miscbm")
             PartyHasItem("miscbn")
             PartyHasItem("miscbo")~
END

There are eight flags you can use in the list of changes. If you do not use a particular flag, the previous value of the transition will be retained (i.e. not specifying an ACTION flag will preserve the current action of the transition).

    * 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" ~#57922~
    * JOURNAL: Can add or change the journal entry. i.e. "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.


ALTER_TRANS %CORAN_JOINED% BEGIN 0 END BEGIN 0 END BEGIN "TRIGGER" ~Dead("X#CoranWyvern")~ END

but I believe this blows away the existing trigger, right... which is not what I want to do.

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Wish List
« Reply #27 on: August 17, 2008, 09:03:01 AM »
Ehh, I'm not getting what you want to do.
ALTER_TRANS will not help if you want to modify the state trigger.
REPLACE_TRANS_TRIGGER with regexp if you want to replace something inside a specific transition trigger.

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: Wish List
« Reply #28 on: August 17, 2008, 11:34:30 AM »
Serves me right for posting when half asleep.

I was looking to see if there was an equivalent to ALTER_TRANS that dealt with state triggers in a non-destructive way - and there is,

REPLACE_TRANS_TRIGGER filename BEGIN stateNumber  list END BEGIN transNumber  list END oldText newText (with regexp.)


Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: Wish List
« Reply #29 on: August 17, 2008, 12:36:05 PM »
But this only deals with transition triggers, not the state trigger. (Or am I missing something here?)

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: Wish List
« Reply #30 on: August 17, 2008, 01:01:21 PM »
Yeah, sorry, still asleep. I should delete those posts for stupidity alone.

REPLACE_STATE_TRIGGER.

I guess what I should have been asking is there something akin to

REPLACE_STATE_TRIGGER_REGEXP

where instead of reading all of the state triggers i could just read one, look for a specific text string (like "wyvern") and replace it, so that we are back to the original request -

Quote
The problem with REPLACE_TRIGGER_TEXT is that you can't make it work for the triggers of a specific state, it's every trigger in the file or nothing.  The text I'm replacing may be perfectly valid in many, even most states, and I may just want to change it in a specific one.  That's why a syntax and functionality like REPLACE_TRANS_ACTION, where you can specific BEGIN [statelist] END BEGIN [transition] END ~TextToBeReplaced~ ~NewText~ would rock.

and it looked like the bigg said yes -

Quote
1. OK then. The various REPLACE_* actions all behave differently now anyway (all the file vs. state/trans list, regex vs. destructive replace), so having more inconsistencies won't harm.

but I have not seen it in the logs, and have not seen what the command would be -

if it isn't possible, there is no problem.
« Last Edit: August 17, 2008, 01:03:38 PM by cmorgan »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: