Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sugarcube's replacelink macro set

I'm using Sugarcube 2.10 with Twine 1.4.

I have been using Leon's replace macro set successfully for some time, but apparently this set has issues when used with Sugarcube. I downloaded the replacelink set from the Sugarcube site this morning, but cannot get any more than rudimentary function from it. The replacelink macro set does not appear to be a one-for-one replacement for Leon's replace macro; the readme file that accompanies the replacelink macro set is slim on details.

This is the functionality that I am looking for using Leon's replace macro:
<<revision box1>>Here is some text. <<becomes>>And this is the replacement text.\
<<endrevision>>
<<revise box1 "Trigger">>\
<<revert box1 "Hide trigger">>

How would I replicate this with the Sugarcube <<replacelink>> macro set? Nothing I've tried has worked, so I'm clearly missing something.

Comments

  • edited October 2016
    rickrawson wrote: »
    The replacelink macro set does not appear to be a one-for-one replacement for Leon's replace macro; the readme file that accompanies the replacelink macro set is slim on details.
    It is a direct replacement, built from Leon's original code. The only differences, other than basic compatibility with SugarCube, are outlined within the README—mostly required name changes.

    That said, the version that you downloaded contained a bug related to the name changes for a few of the macros. I've fixed that issue and updated the download.

    Let me know if you come across any other issues.
  • Thank you!! Works perfectly!

    Follow-up question:

    I have used Leon's <<replace>> macro in about 140 files (these are not games; they are curricular materials). As far as I can tell, his <<replace>> set works fine, but I don't want problems to crop up if I change something that then manifests an incompatibility. With a little work, search & replace can change all these files, but I don't want to take the time if it's not necessary.

    How important is it for me to replace his macro set with the <<replacelink>> macro set in all those files?
  • The original macros are not compatible. While they may seem to work, they are not doing everything that they are supposed to be doing.
  • how would i put nested if statements in this?
Sign In or Register to comment.