Skip to content

Releases: johanberntsson/PunyInform

v6.4.1

08 Mar 09:47

Choose a tag to compare

Important to note when upgrading:

  • Until now, parse_name routines were not called if the first input word wasn't in the dictionary (i.e. the word value was 0). Now parse_name is called in these instances. Make sure you don't have parse_name routines which accept 0 as a synonym. E.g. it could look in an array of synonyms, and the array may contain the value 0 at times, to make room for synonyms that will be put there at a certain point in the game.

Bugfixes:

  • Statusline code couldn't compile with certain combinations of constants defined.
  • If an input word wasn't recognized, _ParseNounPhrase would still check if it had the noun flag, i.e. it would look at adress 6 in the header, and accept it as a noun if bit 7 was set. One effect of this was that an unknown word in player input would be recognized as the direction "in" if routines started at or above address $8000.
  • The parse_name routine of the Directions object would look for an unrecognized word in user input in its arrays of direction words. This would match empty entries, e.g. the short form of 'in' (which doesn't exist, so it's set to 0).
  • If an input word was recognized, and it didn't have the noun flag, _ParseNounPhrase would conclude it can't be the name of an object. This was a mistake - a parse_name routine may still want to recognize the word as a synonym for the object. E.g. if the player names a cube "drop", the player should then be able to do "get drop". (example from Balances.inf, available at if-archive).
  • If an input word wasn't recognized, an object's name array would still be scanned for the word (which would then be 0).

v6.4

03 Mar 16:12

Choose a tag to compare

Important to note when upgrading:

  • Nothing

New/changed features:

  • Changed score/moves statusline to use ":" as a separator instead of "/", and for screens ~40 characters wide, print "Sc:0 Mv:0" rather than "Score: 0/0".
  • Changed score/moves statusline to print score + moves information as far to the right as possible, on narrow screens ( less than 67 characters wide, for a score+moves statusline).
  • Changed the threshold values for screen width when DrawStatusLine switches between different layouts, to adhere to a simple principle: Regardless of screen size, make sure room names up to 21 characters in length can always be printed on the statusline without score, moves, or time overwriting any part of the room name.

Bugfixes:

  • Fixed a time statusline display bug - if hour was between 1 and 9, the rightmost character in the statusline could show a character that was part of the room name.

v6.3.1

26 Dec 23:35

Choose a tag to compare

Important to note when upgrading:

  • If you replace the message MSG_PARSER_DONT_UNDERSTAND_WORD, you should take a look at this message in messages.h now, and update your definition accordingly. (If oops_unfixed is non-zero, you may not call _PrintUnknownWord, but must provide a generic message, not mentioning the word that wasn't understood. This only happens if the player has typed "oops ", so the player will know which word it's about anyway.)

New/changed functionality:

  • Message MSG_PARSER_DONT_UNDERSTAND_WORD has been altered, as part of a fix for the issue that when the player types "oops xxx" and 'xxx' is another unrecognized word, the parser would repeat that the original non-recognized word wasn't understood. (Issue #151)

Optimizations:

  • Made automatic assignment of reactive attribute faster, for games that don't use custom common properties for a lot of objects.
  • Optimized _ParseNounPhrase and _IsSentenceDivider routines a little.

Bugfixes:

  • Fixed so a full stop and 'then' always separate commands (unlike comma and 'and' which can be used to separate commands OR objects in a list). (Issue #157)
  • Fixed: Debug verb 'routines' didn't print anything in z5 when calling GamePreRoutine and GamePostRoutine.
  • Updated tests/runtests.rb to accept Frotz not always appending ".qzl" to save file names.
  • Changed format of routine names printed by debug verb 'routines' to match Inform 6 output (which is used for methods being called in z5 in PunyInform as well), e.g. from (small rock).before() to [ "small rock".before() ].

v6.3

05 Dec 10:45

Choose a tag to compare

Important to note when upgrading:

  • If you're defining OPTIONAL_EXTENDED_METAVERBS and not NO_PLACES, test that 'places' and 'objects' show the expected results and if not, define entry point routine IsARoom to fix it. The objects it can easily fail for are objects which aren't rooms, but sometimes lack a parent in the object tree. If they never get the attribute moved or visited (these are the same attribute, through aliasing), they won't be shown in either list.

New/changed functionality:

  • Extended meta-verb 'places' now lists one location per line, as this is faster, smaller, and more similar to the meta-verb 'objects'
  • Extended meta-verb 'objects' will now also list objects that have been removed from the game (i.e. have no parent), if they seem to be regular objects, not rooms.
  • Extended meta-verb 'objects' now relies on the entry point routine IsARoom (if provided) to decide whether a certain object is a room or not.
  • "GET ALL" won't try to take objects in a closed container.
  • "GET X FROM Y", where Y is a closed (transparent) container, now fires the action, unless X is "ALL", so before-routines can react. Unless a before-routine blocks the action, the action routine will block it. "GET ALL FROM Y" is still blocked by the parser, so the player doesn't get one message per item in the container. (Issue #147)

Optimizations:

  • Optimized WordAddress() and WordLength(), for z5.

v6.2

26 Nov 21:38

Choose a tag to compare

Important to note when upgrading:

  • If you have a DebugIsARoom entry point routine, change its name to IsARoom. If you support the 'places' verb (part of the extended meta-verbs), you want to define IsARoom regardless of whether the game is compiled in DEBUG mode, as this routine is also used by 'places'.

New/changed functionalty:

  • Entry point routine DebugIsARoom has changed name to IsARoom, and is used for debug verbs 'rooms' and 'goto' and for extended meta-verb 'places'.
  • Routine _RoomLike (Used by verbs 'goto', 'rooms' and 'places') now requires an object to provide the description property, to be seen as a possible room.
  • New script tests/compile_all.rb to check that all .inf files in the distribution compile without errors or warnings.

Bug fixes:

  • Verb 'places' (part of the extended meta-verbs) now performs a more thorough check to decide if an object is a room, and game author can control the process using an IsARoom entry point routine.
  • Updated howto/statusline_teleport.inf to work in z3 format as well.

v6.1.1

13 Nov 16:52

Choose a tag to compare

Important to note when upgrading:

  • Nothing

Optimizations:

  • Optimized 'goto' and 'rooms' debug verbs for speed.

Bug fixes:

  • Removed possible warning for unused local variable _return_code in _RoomLike routine in grammar.h

v6.1

12 Nov 22:10

Choose a tag to compare

Important to note when upgrading:

  • Nothing

New/changed functionality:

  • Debug verb 'rooms' now takes an optional substring to search for in room names, e.g. "rooms way" will show rooms like "Hallway Junction"
  • Changed debug verb 'goto' to perform matching exactly like 'rooms', ignoring any asterisks at start or end of string, e.g. "goto way" moves the player to the first room that has "way" anywhere in its name.
  • Added entry point for DEBUG mode only: DebugIsARoom(obj, verdict). Library will call it when the player uses debug verbs 'goto' or 'rooms', to decide if an object is a room. The verdict parameter is 0 if the library thinks it's not a room, 1 if it thinks it's a room. Return: 0 to accept the library's decision, 1 to say it's a room, 2 to say it's not a room.

Optimizations:

  • Optimized grammar for 'consult' verb.
  • Optimized MoveFloatingObjects

Bug fixes:

  • Fixed parser bug, where "e.n" could be parsed as "n.n"

v6.0.2

13 Sep 20:48

Choose a tag to compare

Important to note when upgrading:

  • Requires Inform compiler version 6.44

New/changed functionality:

  • Added Mini-Cluedo demonstration game as statusline_teleport.inf to howto folder.

Optimizations:

  • Optimized scope routines. (Issue #155)

Bug fixes:

  • Updated Testbench, Microphone object, to reflect that ##AskFor action is transformed to an order to ##Give by the parser.

v6.0.1

28 Aug 16:49

Choose a tag to compare

Important to note when upgrading:

  • Nothing

Optimizations:

  • Made WordValue routine faster.

Bug fixes:

  • Bugfix: Set scope_routine=0 in parser before performing action, or scope can get messed up
  • If the ##Restart action was performed, while a transcript was being output, the library forgot that it had an active transcript, and would print a warning if the player tried to enter a comment with '*'.
  • Fixed minor problems and cleaned up howto/talk_menu.inf

v6.0

08 Aug 13:37

Choose a tag to compare

Important to note when upgrading:

  • PunyInform now uses Grammar Version 3, which requires Inform 6.43. If you're using an older compiler version, you have to upgrade now.
  • If you invoke an action in Initalise, e.g. <Take Ball>; and real_location hasn't been set yet, before- and after-routines are now skipped. If you relied on any such routines getting run in this scenario, you can place the player first using PlayerTo, but then you'll also need to call Banner and <Look> manually before exiting Initialise with return code 2.
  • From now on, the (usually empty) message MSG_LOOK_BEFORE_ROOMNAME is only called if the player typed LOOK, or they moved into the location using a go command (e.g. "GO NORTH" or "W"), or entered a door, which gets translated into a go-command. If you use this message to print an extra newline before room descriptions, and you use PlayerTo to move the player, or you issue a <Look> action in your code, you'll now need to print a newline manually, or print the message explicitly, before the Look happens.
  • If you had a custom message for MSG_REMOVE_CLOSED, you can drop it, as this message doesn't exist anymore.

New/changed functionality:

  • PunyInform now handles setting the meta-flag on individual actions (requires Inform v6.43). (Issue #133)
  • New print rule: ObjIs, prints e.g. "the ball is" or "the barrels are".
  • Changed RemoveSub, so "get me from [obj]" is transformed to <<Exit [obj]>>
  • Added new optional feature OPTIONAL_GUESS_KEY which, if OPTIONAL_GUESS_MISSING_NOUN is defined, lets the parser automatically pick out the right key for a lock. (Issue #149)
  • Updated Game Author's Guide, fixing some advice that hadn't aged well, and adding more tips on optimizing for size.
  • New feature: The short_name routine of an object can decide how to print the name based on if the name printing is done in the context of a (The) print rule. The short_name routine does this by checking if caps_mode == true.
  • The default player object is now printed as "You" when printed with a (The) print rule. (Issues #139, #145)
  • Changed so MSG_LOOK_BEFORE_ROOMNAME (doesn't normally print anything, typically used to print a newline for authors who want that) is only printed in two scenarios: (A) when the player typed something that was translated to a ##Look action, and (B) when the player moved using the ##Go action (Entering a door is transformed into a ##Go action). From now on, calls to in code don't cause this message to be printed.
  • New function: OzmooColoursAvailable(), returns true if Ozmoo's eight extra colours are available.
  • Added constants for the eight extra colours supported by Ozmoo: CLR_OZMOO_ORANGE, CLR_OZMOO_BROWN, CLR_OZMOO_LIGHT_RED, CLR_OZMOO_DARK_GREY, CLR_OZMOO_MEDIUM_GREY, CLR_OZMOO_LIGHT_GREEN, CLR_OZMOO_LIGHT_BLUE, CLR_OZMOO_LIGHT_GREY.
  • Added a global clr_talk_menu to ext_talk_menu.h, to let game programmer set the menu colour.
  • Updated howto/colours.inf and howto/talk_menu.inf, to use Ozmoo colours if available, and to avoid a bug in some interpreters, where default background colour is not restored on restart.
  • Debug verb GOTO will now only consider target objects which seem to be rooms, i.e. don't have attributes or properties which aren't meaningful for rooms.
  • Debug verb GOTO will now accept an '' character at the end as a wildcard, e.g. "GOTO HALL" can be used to go to the first room that starts with "HALL"
  • Fixed: If you invoke an action in Initalise, and compile with Strict mode, you would get a message for a programming error, since real_location wasn't set, and BeforeRoutines() and AfterRoutines() would try to access properties of this object. Now these routines will be skipped if real_location isn't set.
  • Changed _UpdateDarkness so a newline is printed before is called, when a lamp is switched on. (Issue #148)
  • When listing objects with PrintContents, extend the rule that we don't show a container/supporter which the player is in, to we don't show a container/supporter which indirectly contains the player.
  • Changed so actions Empty/EmptyT don't abort the processing if one object can't be removed from the source container, or it can't be put in the target.
  • Removed message MSG_REMOVE_CLOSED and the code in RemoveSub that called it, since the check was superfluous. (Issue #147)

Optimizations:

  • Changed to use Grammar Version 3, a more compact way of storing grammar (requires Inform v6.43). (Issue #132)
  • Dropped global newline_flag and made Look routine shorter, simpler and faster.
  • Moved arrays _InsertMessages and _PutOnMessages to static memory, to reduce dynamic memory.
  • Made code to print the banner shorter.
  • Micro-optimization for speed in MoveFloatingObjects for z5.
  • Optimized _ParseAndPerformAction, putting multiple_objects-->0 in a local.

Bug fixes:

  • Messages MSG_SHOW_DEFAULT, MSG_GIVE_DEFAULT (e.g. "John doesn't seem interested.") has been adapted to actors having pluralname.
  • Messages MSG_ASKFOR_DEFAULT, MSG_ASKTO_DEFAULT, MSG_ORDERS_WONT (e.g. "John has better things to do.") have been adapted to actors having pluralname.
  • Messages MSG_LOCK_KEY_DOESNT_FIT, MSG_UNLOCK_KEY_DOESNT_FIT (e.g. "The silver key doesn't seem to fit the lock.") has been adapted to handle attempted keys having pluralname.
  • Message MSG_REMOVE_NOT_HERE (e.g. "But the fork isn't there now.") has been adapted to handle objects having pluralname.
  • Fixed too long statusline when screen width was 55+ and OPTIONAL_SL_NO_MOVES was defined (Issue #144).
  • Fixed: If inside a closed container, with no inside_description, we lacked a newline before listing the contents. (Issue #150).
  • Fixed: If the player asks to empty the SACK_OBJECT, and the player is at max capacity, an object is placed in the sack object, and is subsequently removed along with everything else. (Issue #146)
  • Changed the way talk_menu detects if it's used with PunyInform or the standard library, as old way broke if flags extensions was also used.
  • Fixed incorrect usage of @get_char in ext_talk_menu and ext_quote_box, which made them fail on Infocom's Apple II v5 interpreter. (Issue #152)
  • Fixed bug in cheap_scenery: If the cheap scenery object was addressed by an action without first having been matched by any words (should not normally happen, but there are ways), the before routine would typically crash. (Issue #153)
  • Fixed: The cheap scenery object didn't have the reactive attribute in games with OPTIONAL_MANUAL_REACTIVE, which made it not reset itobj and themobj when the player changed rooms.