PunyInform v4.3 released

PunyInform v4.0 is out!

There are a few breaking changes this time, but they are well documented in the release notes, and it’s easy to adjust your code.

Some news in v4.0:

  • When using the cheap scenery extension, you can now use a reaction routine to react to any action the player tries to apply to the object. Reaction routines replace description routines. (Thanks @heasm66 for the inspiration!)
  • You can set no_implicit_actions = true; and the library won’t issue any implicit actions.
  • Parser won’t try to auto-take objects which can’t be taken anyway (Static, scenery and animate). (Thanks @Warrigal and @KrocCamen for the suggestion!)

Read the full release notes and get the new version at Releases · johanberntsson/PunyInform · GitHub

17 Likes

The Inform6 package for Unix now has this and is updated to 6.36 Release 4.

8 Likes

Thanks !

Dott. Piergiorgio.

2 Likes
  1. PunyInform v4.1 has been released!

What’s new:

  • Parser now gives priority to regular objects over directions. This means if you put a floor object in a room, or an object called west statue, “examine floor” and “turn west” will be interpreted as refering to these objects rather than the directions.

  • The list_together property is now supported. Define OPTIONAL_LIST_TOGETHER to use it. Just as in the standard library, you can use it to list similar objects together. Unlike the standard library, you can’t use it to group identical objects together, since PunyInfom still doesn’t support indistinguishable objects.

  • Define OPTIONAL_LANGUAGE_NUMBER to make the routine LanguageNumber available. Use it to print numbers using words, e.g. LanguageNumber(25) prints “twenty-five”.

  • If you define both OPTIONAL_LIST_TOGETHER and OPTIONAL_LANGUAGE_NUMBER, list_together will print numbers as words, e.g. “You are carrying a hammer and two books (Grapes of Wrath and Eon).”

  • There is a programming example for list_together: howto/list_together.inf

  • Optimizations and bugfixes. Have fun!

10 Likes

I get this when building:

/blah/inform6unix/inform-6.41 -v3 +punyinform/lib punyinform/tests/test-parser.inf punyinform/tests/test-parser.z3
Inform 6.41 for Unix (22nd July 2022)
line 4: Warning:  Obsolete usage: the Switches directive is deprecated and may produce incorrect results. Use command-line arguments or header comments.
> Switches e
line 445: Warning:  This statement can never be reached
>     rtrue;

Then in thirdnoun.inf, the intialize text reads

If you drop the ball in the dark room it will still be in scope.

But there is no ball in that test game.

Other than that, it looks good from this end. I’ll report back when the update to inform6unix is done and uploaded.

1 Like

Inform6 for Unix is has been updated with PunyInform 4.1. It’s available now at 661.org and soon at the IF Archive.

3 Likes

Thanks for the heads-up on these issues! We’ll fix them for v4.2, but it may take a while until that comes out.

1 Like

Is there any chance of supporting this one of these days? I have a couple of games that I want to port to Puny, but lack of support for multiple identical objects prevents me doing so. For example, I have three darts on a dartboard that are described as (from memory) a dart, a dart and a dart. If I try to GET DART, I’m asked which one, the dart, the dart or the dart.

Alternatively, can you think of any workarounds? I haven’t given this a lot of thought myself, but there must be a way of doing it, as the standard library does it.

2 Likes

It may happen. Then again it may not. PunyInform wasn’t meant to replace the full library, and I’m sure it never will.

Well no, the standard library doesn’t have a workaround to support identical objects. It’s built into the core of the library. It affects the printing of objects and the parser. While it’s now pretty easy to support the printing of identical objects in PunyInforn, the changes required for the parser are quite extensive.

I have an idea for a workaround for PunyInform, but it turns out to be quite hard (no surprise really). If I manage to put something useful together, I’ll make it part of the howto folder in PunyInform and/or post it in this forum. I won’t post it in this thread though, as this is the release thread for PunyInform, and it has nothing to do with PunyInform releases.

4 Likes

PunyInform v4.2 is out!

PunyInform v4.2 has a new entry point routine called ChooseObjectsFinal, which lets the game intervene just before the parser has to ask the player which object they mean.

Incidentially (not really!), this makes it possible, in a slightly hacky way, to handle indistinguishable objects in a game. We hope this will prove useful for some games, and we created a demo called howto/indistinguishable.inf. There are limitations though:

  • Expect it to make parsing a bit slower whenever player input matches several different objects, and more so if you have a lot of indistinguishable objects in scope.
  • You can’t specify a number of objects in input, e.g. “get 5 coins”, but you can say “get a coin” or “get the coins”
  • When you take or drop several indistinguishable objects, they are treated one by one, i.e. you get “Coin: Taken, Coin: Taken, Coin: Taken”

PunyInform v4.2 also includes important bug fixes, better parsing, and corrected weight of ChooseObjects score (it now always trumps the parser’s own score for the objects when picking the best object).

11 Likes

PunyInform v4.3 has been released.

  • Several library messages now adapt to plural names (see screenshot)
  • There’s a new runtime error message, if you enter a door which lacks a necessary property for a door
  • The runtime error message which points out that a timer/daemon object lacks the necessary time_out property now prints the offending object
  • The routine RunTimeError was renamed _RunTimeError, to reflect that we don’t expect it to be of any use to game authors
  • We read through the entire manual and fixed several errors and omissions, and added some clarifications
  • Bugfixes

See link to Releases page in previous posts.

9 Likes

Just in time for PunyJam #3.

2 Likes