[I7] Trying to define location of something within a table

Hello, Im fairly new to developing with Inform 7 so please forgive me if this is listed somewhere in the docs, I havent been able to find it. Essentially I have a kind of backdrop, where some are defined with a table. I cant get the table to define where any of these would be located, I cant just use a column as location by itself and when I try to do something like “Place (location)”, the compiler doesnt want to agree with me. Is there a way to set the location in the table so inform understands it as the location, or am I going to need to define each entries location separately?

I think with a table you can only define a thing’s properties, and the location of a thing is not a property (technically it’s a relation).

However, you could create a column called “starting room”, which would give each item in your table a property called “starting room”, and populate it with the room where each item starts. Then write a separate rule that moves each item to its starting room property. Here’s an example, adapted from the example in the documentation:

[code]“Tour des Maillots”

The Staging Area is a room. A jersey is a kind of thing. A jersey is wearable. Some jerseys in the Staging Area are defined by the Table of Honorary Jerseys. The description of a jersey is “Since [year established], the Tour de France has awarded this jersey to the [citation].”

Table of Honorary Jerseys
jersey year established citation initial location
a yellow jersey 1919 “race leader” Trophy Room
a polkadot jersey 1933 “King of the Mountains” Mountain Path
a green jersey 1953 “highest point scorer on sprints” Top of Pyramid
a white jersey 1975 “best cyclist aged 25 or less” Retirement Home

The Trophy Room is north of the Staging Area. The Mountain Path is west of the Staging Area. Top of Pyramid is south of the Staging Area. Retirement Home is east of the Staging Area.

When play begins:
repeat with J running through jerseys:
now J is in the initial location of J.

1 Like

Ah okay, I see what you are saying. That solution is good though, Ill probably do something like that, thanks!