Skip to content

Commit

Permalink
Compliant Characters: fix turn count issue with reparsed commands
Browse files Browse the repository at this point in the history
  • Loading branch information
neroden committed Jan 14, 2024
1 parent 9af2086 commit f65df29
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Nathanael Nerode/Compliant Characters-v5.i7x
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 5.2.230729 of Compliant Characters by Nathanael Nerode begins here.
Version 5.3.240114 of Compliant Characters by Nathanael Nerode begins here.

"Report parsing errors to the player when ordering other characters to do things. Inform 7 normally redirects these errors to 'answer <topic>' so that the character can respond to arbitrary statements. But in an story with compliant characters who the player orders around routinely, that is frustrating to a player who has made a typo; this helps out the player. Requires version 5 of Neutral Standard Responses. Tested with Inform 10.1.0."

Expand Down Expand Up @@ -635,6 +635,13 @@ Section - Reparsing orders
The special reparse flag is a truth state that varies.
The revised command text is a text that varies.

[The reparse is actually done by moving on to the next cycle in the turn sequence. But we don't want to advance the turn count.]
[So this is injected just after the action, and before anything else happens.]
[This will terminate processing of the turn rulebook completely, in particular before time is advanced.]
The turn terminated for reparsing rule is listed before the early scene changing stage rule in the turn sequence rulebook.
This is the turn terminated for reparsing rule:
if the special reparse flag is true, rule succeeds.

[Replace the command reading routine with one which simply processes our prepackaged command.]
For reading a command when the special reparse flag is true (this is the parse revised command rule):
if the command debugging option is active:
Expand Down Expand Up @@ -675,8 +682,7 @@ Check an actor ordering something to (this is the block indirect ordering rule):
Check ordering something to (this is the reparse as command rule):
now the revised command text is the substituted form of "[the noun], [the quote-stripped topic understood]";
now the special reparse flag is true;
stop the action;
[TODO: Need to make sure turn count does not go up and time does not pass -- hard]
stop the action;

Section - Understand lines for tell, order, instruct

Expand Down Expand Up @@ -1008,6 +1014,7 @@ This version of this extension depends on Inform 10.2 for its support hooks and
Chapter - Changelog
5.2.240114 - Patch to prevent turn count from advancing when reparsing.
5.2.230729 - Change "CONSTANT" to "Constant" to compile under Inform 10.2.
5.2.230728 - Revert changes necessary due to bug in released version of Inform 10.1 but fixed for 10.2.
5.1.230727 - Large changes needed to work around bug in released version of Inform 10.1
Expand Down

0 comments on commit f65df29

Please sign in to comment.