Let’s see… in order to declare armors (among other things) and their variables in a single location, while using tables, and avoiding the bugs I describe here (which are probably resolved in the next version of Inform), here’s how I proceed on my end:
Chapter 1 - Armors, Head protections and Shields
Section 1 - Armors - General specifications - (UID 11-50)
An armor is a kind of thing.
An armor is wearable.
An armor has a number called ArmorLevel. [---F039---]
The ArmorLevel of an armor is usually 20.
An armor has a number called CombatSkillModifier. [---F039---]
The CombatSkillModifier of an armor is usually 10.
An armor has a SocialLevel.
The SocialLevel of an armor is usually prosperous.
A solid leather chest armor is a kind of armor.
The UID of a solid leather chest armor is 11.
solid-leather-chest-armor-description is a text that varies.
solid-leather-chest-armor-description is "This is a standard leather chest armor. [run paragraph on]".
A cushioned leather armor is a kind of armor.
The UID of a cushioned leather armor is 12.
cushioned-leather-armor-description is a text that varies.
cushioned-leather-armor-description is "This leather armor is lined with padded material, adding an extra layer of cushioning. While it increases comfort, it also enhances the armor's ability to absorb blows, making it suitable for extended wear in combat situations. [run paragraph on]".
[...]
Section 3 - Armors - Completion of kinds
To complete the settings for armor kinds:
repeat with LocalAsset running through armors:
let LocalUID be the UID of LocalAsset;
if (LocalUID < 10000):
choose a row with an UID of LocalUID in the Table of Assets-Armors;
now the ArmorLevel of LocalAsset is the ArmorLevel entry;
now the CombatSkillModifier of LocalAsset is the CombatSkillModifier entry;
now the printed plural name of LocalAsset is printed plural name entry;
now the material of LocalAsset is the material entry;
now the description of LocalAsset is the description entry;
now the SocialLevel of LocalAsset is the SocialLevel entry;
[...]
Section 4 - Table of armors
Table of Assets-Armors[---F039---][---F062---]
UID ArmorLevel CombatSkillModifier printed plural name material description SocialLevel
11 20 2 "solid leather chest armors" leather "[solid-leather-chest-armor-description]" prosperous
12 18 1 "cushioned leather armors" leather "[cushioned-leather-armor-description]" common
13 20 2 "dyed leather armors" leather "[dyed-leather-armor-description]" prosperous
and so on
This way, you can create items without cluttering the properties of your rooms (bug workaround) while still declaring variable values at only one place.
Note that this method is suitable for creating kinds of things, with the intention of later deriving duplicates. A solid leather chest armor is a kind of armor. can be replaced by A solid leather chest armor is an armor. if you want to create unique objects. (I use the 10,000 UID-Unique Identifier limit to distinguish between the two categories and therefore use 2 repeat loops.)
EDIT : of course, you have to invoke the phrase To complete the settings for armor (kinds or not): in a When play begins rule to set up items at the beginning of the game. I set up dozens in my WIP like this ![]()
EDIT 2 : and also, if a value like the cost of an armor must change, because for example the player is moving from a region to another one, or from a merchant to another one, you could set up several values in the table to reflect this price variation.