Best way to model complex (multi-dimensional) values?

I’d like to define some complex values – for example, a kind of value where a each instance the value contains multiple primitive values (a string, a number, etc).

Specifically, what I’d like to do is something like this:

A skill is a kind of complex value. [e.g. a non-physical object with multiple attributes]
Every skill has a text called name.
Every skill has a number called points.
Every person has a list of skills.

This way, I can build some general rules for skills (as well as specific ones for particular skill names) while leaving the different possible skills open.

A new kind of object would do the trick, but objects in Inform are intended for simulated-world physical objects, not values. The documentation says such use is frowned upon.

Defining tons of dedicated properties in groups on an object kind would simulate it, but that’s a horrible, non-scalable solution:

Every person has a number called ranks-in-juggling.
Every person has a number called ranks-in-basket-weaving.
Every person has a number called ranks-in-swahili-speaking.
[blah blah blah ... 100 zillion properties for every conceivable skill, 99.99% unused on any given person]

I guess I could resort to tables, but they seem so awkward. I’d have to dynamically maintain rows and values in the table, and key each row by a unique identifier for the object instance (e.g. a person’s printed name in the example of skills above). Writing rules to access the complex values for a given object instance would be very cumbersome.

Any ideas or recommendations? Is this pushing Inform 7 beyond what it was designed to do? Am I stuck using tables?

Objects (as opposed to “things”) are sometimes used for this. It was more prevalent in Inform 6, where they were used to represent intangible meta concepts like menu options.

Pff. Directions and scenes are kinds of object. Follow that noble example.

(Kinds of thing are intended for placement in the model world.)

You could have a stock of skill objects and a one-to-many relation of persons to skills.

But tables would be sensible too.

Hmm, I tried to make a new kind of object (not thing) as magic spells, but the game always acts like it doesn’t exist. Even testing commands (e.g. >SHOWME XYZZY) are giving me “There seems to be no such object anywhere in the model world,” even though SHOWME normally works with objects that normal commands can’t interact with. It looks like SHOWME works with rooms and directions and obviously things, but not scenes. Scenes are apparently a value, instead of an object.

If I switch spells to being a kind of backdrop and set each one to being everywhere, then it works. :confused: (I was able to make spells-are-a-kind-of-object everywhere, but that didn’t fix it.)

You will also probably want to formally declare the new kind as being publicly-named, as this is not the case by default. The privately-named default makes it impossible to refer to objects of the kind unless specific understand commands are given for individual objects.

There’s a brief mention of this in the documentation somewhere.