Relating Actions to Values

Hi, I’m trying to create relations between actions and values, in this case I want actions associated with certain needs to help with NPC planning. However I’m unsure what the right syntax is, or if this is possible. The code I currently have works syntactically if I replace the part about actions and needs with people (and then create people to have the relation) so is there something I’m missing that is specific to relationships including actions or values?

Lab is a room.

A need is a kind of value. The needs are Hunger and Hygiene.

Satisfying relates various actions to one need.

The verb to satisfy means the satisfying relation.

Eating satisfies Hunger.
1 Like

There are other ways to do this, but this works:

A need is a kind of value. The needs are Hunger and Hygiene.

Satisfying relates various action names to one need.

The verb to satisfy means the satisfying relation.

The eating action satisfies hunger.
The inserting it into action satisfies hygiene.

The difference between “action” and “action name” is that actions are specific – they have nouns and so on attached. “Eating the chicken” is an action. “The eating action”, as a generic concept, is an action name.

1 Like

Thanks! Is this described in the documentation anywhere? I’ve mainly just been scouring the relations section so I’m not sure if this is discussed in the actions (or advanced actions) section.

Chapter 12.20.

I’ll throw in an example of using this, since it’s not necessarily obvious:

Before doing something:
	let A be the action name part of the current action;
	if A satisfies a need (called N):
		say "([A] satisfies [N].)";
	continue the action;
1 Like

Gwen, in the 20s is really needed an hunger daemon ?

only wondering…

Best regards from Italy,
dott. Piergiorgio.

From your description, I wasn’t sure if you needed an easy way to map in both directions. If you just want need → action name, kinds of values can have properties:

A need is a kind of value.
The needs are hunger and thirst.
A need has an action name called the satiating action.
The satiating action of hunger is the eating action.
The satiating action of thirst is the drinking action.
1 Like