Cannot attribute properties to items in a table?

I am returning to Inform after quite a hiatus, and I found myself getting hung up on something… I am attempting to build out the properties of some things via a table, but the game does not actually seem to be recognizing the properties assigned to those things. I thought I followed the instructions in section 16.16 of the documentation, but have I made a misstep that I am not noticing? Running the code in the spoiler, all the things possess the first item in the list of each kind of value - they are not affected by their entries in the table. Clear as mud? Can anybody give me a nudge? Thank you!

“Engineering Wizard”

The storeroom is a room.

Category is a kind of value. The categories are raw, encoded, and manufactured.

Subcategory is a kind of value. The subcategories are apple, orange, and pear.

A material is a kind of thing. Some materials in the storeroom are defined by the Table of Material Data.

The description of a material is “[noun][line break]Class: [category][line break]Subcategory: [subcategory][line break]Grade: [grade]”

Table of Material Data
material category subcategory grade
Girder manufactured apple 2
Databank encoded orange 4
Phosphorus raw pear 1

Inspecting is an action applying to one visible thing. Understand “inspect [anything]” as inspecting.

Carry out inspecting something (called the item) (this is the carry out inspecting rule):
say “[Item]:[line break]Class: [category of the item][line break]Subcategory: [subcategory of the item][line break]Grade: [grade of the item]”

test me with “examine databank / inspect databank / examine phosphorus / inspect phosphorus”.

2 Likes

I’m on mobile right now so can’t test, but I think the first line of your carry out statement should be:

choose row with a material of item in the Table of Material data;

Then instead of “category of the item” you can say “category entry”

1 Like

That fixed it. Thank you- it’s all coming back now, haha!

1 Like

Sounds great! Glad you’re making fun stuff, hope it turns out great. I’ve learned about three new things about inform this month that I wish I knew years ago.