I see you're mainly working in Lua, which is nice, but my memory of how it deals with these things is a little hazy, sorry! But in pseudo-code, what I'd do is have (in this case) three dummy Fungus variables in a flowchart (which might contain nothing but these dummy variables) into which you load the relevant information prior to querying it. So in pseudocode: bool questStarted = myCustomCommandThing.IsQuestStarted("quest_tag") int questStep = muCustomCommandThing.QuestSteps("quest_tag" if (questStarted or questStep > 0) yada yada This is the way I deal with most Fungus-external variables that need to be dynamic: the actual Fungus variable doesn't store any info, it's just a temporary container. When you want to save the new state of the quest, you'll just run your custom command again and save it into the external component, from where it can be queried again at will. Having 'work horse' variables like this in Fungus can be quite useful in a variety of situat ions, like for example when doing more complex math inside a Flowchart, or when collecting return variables from event handlers or the like.
I wouldn't recommend modifying the fungus if statement. I look at either lua as wolfrug suggests or creating custom command(s) to query your quest system that put its result into a fungus boolean, which can then use the existing fungus if on.
Steve: I think I'm going to do the latter. It seems error prone to write the same Lua code over and over again with different parameters passed in.