Using *if in a text body

I’m trying to cut down the number of repeat texts in the WIP I’m writing.

I’ve found that general consensus among other writers is that multireplace is useful for small sections of text rather than paragraphs. From what I know using an *if statement in a text body is possible but every time I’ve tried to do it I get an error.

Basically, I’ve a small number of paragraphs (the body of the text is let’s say 7 paragraphs, we need to replace 3 based on a variable that already exists) that would need to be replaced based on a numerical value of an already established variable.

Problem is, replacing one or two words doesn’t work here. The scene in question is a funeral which changes drastically based on the faith of the individual. Jews do not bury their dead the same way Christians do nor do people that are Islamic nor other religions. So in short? For religious accuracy I’d need to replace those paragraphs and there’s not really a way around it.

I’m basically trying to avoid writing 6 scenes with 4 of the same paragraphs in each scene since the variations are slight but enough that it needs to be changed.


An *if gate that leads to different scenes can work here but again; I’m trying to avoid repeating text. Otherwise the easiest solution is to copy/paste what I’m doing and edit the paragraphs manually.

it’s a matter of indentation, I assume that’s the error?

it’s pretty much like this (+ indicates indents/space)

You foundly remember the+
*if (food ="soup")
+++It was a rich asparagus cream, with fresh herbs and you'd swear a dash of brandy.
*if (food ="roast")
+++Goose, with potato dumplings, pickled rich cabbage and a red wine sauce.
Yes, that was a good dinner.

Otherwise the same rules as for *fake_choice text applies


And this would display as such:

You fondly remember the soup.

It was a rich asparagus cream with fresh herbs and you’d swear a dash of brandy.

For the first food option?

Just to make sure we’re on the same page; this isn’t for a *choice or *fake choice but in the body of the text itself. I’m not sure if I was clear on that.

yep it would

I’ll give it another try. Standby.

Appreciate it. I think it was a spacing issue when I tried your method initially.

1 Like

you can also use *goto and *gosubs etc in these if you want certain bits continue elsewhere/have longer bits that are similar

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.