I have a lot of instead of rules and sometimes the wrong stuff fires when the action should actually be doing something else. I could of course, put all the relevant checks in one, big routine but that would mean I’d have to edit in an external editor since Inform doesn’t allow me to collapse if- repeat- etc. hierarchies (unless, of course, I missed that feature somehow).
So - apart from making stuff harder to edit - it’d always be checked since it would not be tied to any prechecked condition(s). Like: instead of looking at the lingerie clad lady when her husband is in the same room ^^
It’s a bit hard for me to come up with a fitting example but let’s assume the following:
The player cannot go from room A to room B without having shown an invitation to someone.
The player cannot go from room A to room B if he is carrying a weapon.
The player cannot go from room A to room B when he is being menaced by goons with guns
The player cannot go from room A to room B (or rather doesn’t want to) if the lingerie clad lady is in room A
The player cannot go from room A to room B unless he managed to get rid off the handcuffs the lingerie clad lady might have slapped on him
So - we have a lot of circumstances where the player cannot go from room A to room B. Time restrictions and Scenes might also get in the way.
Now - I haven’t found a good way to priorize actions other than using check, before, instead of and after. Most of my stuff has been done so far with before or instead.
What would be the best approach to this? The one big “instead of” rule that handles it all but will be a nightmare to manage or smaller rules. And if smaller ones - any recommendation on what to use when?