Measured Liquid by Emily Short

This topic is for discussions related to Measured Liquid by Emily Short

Hello! Thanks for writing this extension. It works great in release 6L38, which is currently the second-to-latest release, but I noticed that it doesn’t compile on what is currently the latest release, 6M62 (which seems to be available only on OS X, for some reason). It seems to fail with the following problem:

The following problem was also output:

Update: I think I found a fix for this! See this link for a full diff:

github.com/toolness/pancakes/is … -168309181

Your fix worked perfectly for me. Thanks!

Hi folks

I’m struggling to include V4 of Measured Liquid in 6M62.

I get the bug:

Here’s the problem code:

I’ve tried fixing this myself, but I’m a newbie getting back into Inform, and just end up completely crashing the thing with an error 11.

Can anyone lend a hand?
Cheers

I think the problem is that the flavor column has two different types of non-blank values in it: some text, which is the name of a kind, and “Refreshing!”, which is a text. All of the values in a column (other than the header which gives the name/type of the column) need to be of the same type or blank (–).

The current version of Measured Liquids is v6, and the code in question looks like this:

Table of Liquids
liquid	potable	flavor	description (text)
nonliquid	false	--	--
water	true	"Refreshing!"	--

So, my suggestion would be to upgrade from v4 to v6. You can do this by choosing the extensions panel in the IDE, clicking on the Public Library tab at the top right, following the menus to the desired extension (§9. Physics -> §9.1. Liquids -> Measured Liquid), and clicking on the install/update button next to its name.

Thanks Vince! Rookie mistake - I picked up the extension via Google and could only see the V4.

Found a bug in v6. Per the documentation, if cranberry juice + vodka = crantini, mixing more vodka into a crantini should just keep it as “crantini”; but in fact the extension changes it to pure “vodka”. The problem is here:A liquid-mixing rule (this is the keep the same recipe as before rule): [If we add more of an existing component to the mix, there is no change] repeat through the Table of Liquid Mixtures: if the liquid of the second noun is the result entry: let L be the mix-list entry; repeat with item running through L: if the liquid of the noun is the item: rule succeeds with result the liquid of the noun.The last line should be “rule succeeds with result the liquid of the second noun”.

I got in touch with Emily and she doesn’t have time to work on this right now, but she said it would be fine for someone else to file updates to them. So prevetenet, if you want to make this change and file it (which I think means e-mailing it to Mark Musante) that would be great!

Done; thanks!

im having trouble with emily short’s measured liquids ext.
i read the part that said the pitcher contain 8.8 fl oz of [i forget now]
so i did the same thing, i copied and pasted the table to the prompt,
and typed it but it just created another object, this is frustrating why did it create another object…

it wasnt even in the pitcher i created,
first, it triedl the pitcher is full of and it gave me an error then the contains 8.8 fl oz went through but it created another object,

i aint sure whats wrong.
i cant post snapshots, but heres the error for the full

Problem. The sentence ‘the pitcher is full of absinthe’ appears to say two things are the same - I am reading ‘pitcher’ and ‘full of absinthe’ as two different things, and therefore it makes no sense to say that one is the other: it would be like saying that ‘Antony is Cleopatra’. It would be all right if the second thing were the name of a kind, perhaps with properties: for instance ‘Alexandria is a lighted room’ says that something called Alexandria exists and that it is a ‘room’, which is a kind I know about, combined with a property called ‘lighted’ which I also know about.

the contains one the inventory has the pitcher and right below it has the absinthe with the 8.8 fl oz but it is not inside it, its empty… this is getting annoying… [i apologize if i sound off but it is]
but when i put just the pitcher contains absinthe with the fi oz it doesnt work

1 Like

I am also having trouble with this extension. I’m not sure whether the difficulty is in extending the Table of Liquids or initializing the contents of a fluid container. Water seems to work, but cola does not.

Here is some test code.

"Test" by Eric Conrad

Include Measured Liquid by Emily Short.  Include Modern Conveniences by Emily Short.

Start is a bathroom.   The flask is a graduated fluid container.

Table of Liquids (continued)
liquid	potable	flavor
cola	true	"Refreshing!"

The soda can is a graduated closed openable fluid container.   The soda can contains 12.0 fl oz of cola.

When play begins:
	let C be a random cabinet in Start;
	now the flask is in C;
	now the soda can is in C.

Test me with "open cabinet / take flask / switch tap / fill flask / drink from flask / open can / drink from can".

See lines 6 and 7 of the results that follow.:

>test me
(Testing.)
>[1] open cabinet
You open the bathroom cabinet, revealing a soda can and an empty flask.
>[2] take flask
Taken.
>[3] switch tap
You turn on the sink tap.
>[4] fill flask
You fill the flask up from the flowing water.
>[5] drink from flask
You take a sip of water. Refreshing!
>[6] open can
You open the soda can, which doesn't contain even a trace of liquid.
>[7] drink from can
(first taking the soda can)
The soda can is completely empty.

A bit more information. Apparently you cannot fill a fluid container at compile time. Is the only solution to have a stage manager character who fills the fluid container from a fluid source “when play begins”?

Minimal demonstration of the bug:

"Test" by Eric Conrad

Include Measured Liquid by Emily Short.

Start is a room.

The soda can is a graduated fluid container in Start.   The fluid capacity of the soda can is 12.0 fl oz.  The soda can contains 12.0 fl oz of water.

Test me with "drink from can".
Test
An Interactive Fiction by Eric Conrad
Release 1 / Serial number 200226 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Start
You can see an empty soda can (in which is 12.0 fl oz of water) here.

>test me
(Testing.)

>[1] drink from can
(first taking the soda can)
The soda can is completely empty.

When you say “the soda can contains 12.0 fl oz of water”, Inform makes the soda can a container, and puts an object inside it called “12.0 fl oz of water”.

Liquids don’t use the “contains” relationship directly: they’re stored in properties of the container instead of in the object tree. So you need to do something like this:

A soda can is a graduated fluid container.
The fluid content of the can is 12.0 fl oz.
The liquid of the can is water.

This sets the relevant properties directly.

1 Like

That solved the problem. Thank you.

I’m running into a problem with a specific rule that seems to prevent compiling in 6M62. The establish mixture rule:

Last setting action variables for pouring something into something when the mixed liquids option is active (this is the establish mixture rule):
	if the noun is not a fluid container:
		make no decision;
	if the second noun is not a fluid container:
		make no decision;
	if the liquid poured is not the liquid of the second noun: 
		if amount poured is greater than null volume and the second noun is non-empty:
			let L be the value produced by the liquid-mixing rules for the amount poured;
			now the resulting liquid is L.

is causing this response:

I recognised:

value = a description of values
liquid-mixing rules = a volumes based rulebook producing liquids
amount poured = a non-temporary variable, holding a volume
But I didn't recognise 'liquid-mixing rules for the amount poured'.

I’ve tried altering some of the wording and changing which phrases are being called, but nothing wants to compile.

I think it should be “the liquid produced by the liquid-mixing rules” instead of “the value”. It’s been a while since I worked with rulebooks like this though.

1 Like

I could have sworn I tried that already, but I just typed it in and it worked. Thanks!