I’m coming to this late, but I realize there is so much I didn’t know, and I had blind spots about it, and it was okay. But then I find it and don’t know how I lived without it. Or I said “oh, I couldn’t ask for THAT feature, it’d be too much.”
I was glad I found the testing commands early. @DeusIrae mentioning RULES and ACTIONS is a big one. You don’t need to be a debugging whiz to debug. I’d say PRONOUNS is good to know–I wrote a simple testing extension to check the pronouns every move, and it was neat. TEST X WITH “this/that/the other” is good too. PURLOIN and ABSTRACT and GONEAR and SHOWME save so much time if something is broken at the end of your game and you don’t want to run a whole long test script to get there.
I wish there was BANISH in the test suite proper (move something off-stage) but that’s easy enough to implement on your own.
One thing that still trips me up is after/report rules. I might have
after looking in the hub room: say "Wow! The hub room has a lot of places to go!"
after looking: (check stuff)
The 2nd rule doesn’t fire because the 1st and more specific doesn’t continue the action.
I also knew how rules worked roughly but it took a while to put them in order e.g.
the Andrew's less generic default rule is listead instead of the can't wear what's not clothing rule in the check wearing rulebook.
I also always used to keep falling into this:
[the block smelling rule is not listed in any rulebook.]
check smelling: say "Smelling may offer occasional clues, but nothing here." instead;
Without the one line commented, my check smelling rule doesn’t fire.
I’d also echo looking at “rules” in the tabs on the IDE. They tell what order the rules fire in, which can clear up a lot of confusion.
One other thing that really streamlined things was when I realized you could just do this en masse so you didn’t have to worry about all the verbs.
understand the command "jump" as something new
Also I enjoyed reading the standard rules to see what the default verbs were. I learned so much! And at some point I felt more than okay just un-defining some standard verbs.
I’d also like to share some coding I did early this morning. At first I only used “check” rules to block the parser from doing something and never used “after” and I think the before/after of my code when I split something into more readable parts.
So I had one item that had a big lump of code with a bunch of if-then commands inside it for a big description. (the “to say” syntax seemed wrong, because tracking line breaks was tricky.) You will be more likely to see the bug from the “after” code that there’s a bug that got lost in the lumpy code, which I’m not sharing. (I cut out some text.)
But the thing is, I never thought to use “after examining” because this was what you should see while examining! So I had that logic error. Another big one I remember is someone new to Inform creating a dead person as an actual person instead of scenery. The first makes sense logically, but the second is easier to implement given how Inform (quite sensibly) gives people properties.
messy code vs clean code
after examining megaton magneto montage:
say "CLOSED TODAY: (list).";
if store b is not figured-out, say "Free samples in store b.";
if store c is not examined, say "(store c stuff)";
say "Store H is the bonus area after the initial quest.";
say "Stores F, I M and R were last game.";
if store k is in strip or store k is in strip, say "Condemned: stores K and N.";
say "(stores you can change and enter): P, U, V, W, Y.";
if store t is in Strip of Profits, say "(text how store t is the final one).";
say "[line break][engrav-note].";
if montage-change-warn is false:
if number of solved regions + number of bypassed regions > 1:
say "[line break]It's kind of out of date since you already got solving stuff, but it'll be good enough reference in the future.";
now montage-change-warn is true;
continue the action;
So often I was just so glad Inform could do stuff, I wrote code and didn’t really look into it! It’s okay to do that at first, but Inform can let you write better looking code, so you should try to when you can. Don’t force it, though.
I think this is the sort of question that needs to be asked more often than it is on this boards. My answer always seems to change.
For whatever reason, I really dug into the parser error rules first. It was neat you could do things! Other people seem to avoid them, but I’d advise giving them a look, as they can clue the player quite nicely too.