Spielerando

Relationship Meters

A relationship meter tracks how much one character likes the player, from minus 100 to 100. Kind deeds raise it and unkind ones lower it. Gains are capped per day, a mood is entered at one line and left at another so it does not flicker, and neglect fades the meter slowly toward neutral.

Also called: Affinity, Friendship meter, Companion bond, Like meter.

A stout badger innkeeper hands a glazed bun to a young hedgehog traveller. Above them a heart-shaped glass jar of glowing liquid rises just past a line marked across it.
Hollowbrook Hospitality, an invented cosy village game. Invented game, image generated with AI.

Paste this to your AI

Copy it into Claude, Cursor or ChatGPT. It already has good values and the usual mistakes in it.

Add "Relationship Meters" to my game.

What it should do: A meter for how much a character likes the player turns many small deeds into one feeling the whole game can react to: a warmer shop, a closed door, a friend who shows up when it counts.

Build it exactly as this state machine. First check that it fits my game, then build it like this:

```mermaid
stateDiagram-v2
  [*] --> neutral
  neutral: Neutral
  friendly: Friendly
  unfriendly: Unfriendly
  neutral --> neutral: stays in the middle
  neutral --> friendly: rises to friendly
  neutral --> unfriendly: falls to unfriendly
  friendly --> friendly: stays friendly
  friendly --> neutral: falls back to neutral
  friendly --> unfriendly: falls all the way
  unfriendly --> unfriendly: stays unfriendly
  unfriendly --> neutral: recovers to neutral
  unfriendly --> friendly: jumps all the way up
```

Use these starting values:
- enterAt: 30 units
- tierGap: 10 units
- dailyGainLimit: 15 units
- decayPerDay: 2 units

Watch out for these common mistakes:
- One gift buys a friend: Tell your AI: limit how much the meter can gain in one day, and do not limit losses.
- The mood flickers at the line: Tell your AI: enter a level at one line and leave it at a line a little closer to zero.
- The fade overshoots zero: Tell your AI: move the value toward zero and stop at zero, never past it.
- A refused gift is treated as no contact: Tell your AI: any real attempt counts as contact for the day, even when the amount is cut to nothing.
- The player is away for a week: Tell your AI: when days pass, say how many, pause the fade for the one day of contact only, and fade the rest.

Do not change anything else in the game. Do not claim anything without proof: model what it takes, and show me what your solution rests on and how I can see that it works. If you cannot show something, say you do not know. When you are done, tell me in plain words how to try it.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

What it does

A meter for how much a character likes the player turns many small deeds into one feeling the whole game can react to: a warmer shop, a closed door, a friend who shows up when it counts.

How it runs, as a diagram

Everything it can be in, and what moves it on. Your AI builds from exactly this.

stays in the middlerises to friendlyfalls to unfriendlystays friendlyfalls back to neutralfalls all the waystays unfriendlyrecovers to neutraljumps all the way upNeutralFriendlyUnfriendly
How it runs, as a diagram
  • Neutral → Neutral: stays in the middle
  • Neutral → Friendly: rises to friendly
  • Neutral → Unfriendly: falls to unfriendly
  • Friendly → Friendly: stays friendly
  • Friendly → Neutral: falls back to neutral
  • Friendly → Unfriendly: falls all the way
  • Unfriendly → Unfriendly: stays unfriendly
  • Unfriendly → Neutral: recovers to neutral
  • Unfriendly → Friendly: jumps all the way up

Good starting values

ValueStart withWhat it changes
enterAt30 unitsHow far from zero the meter must be to reach the friendly or unfriendly level. A higher line makes friendship harder to earn.
tierGap10 unitsHow far inside that line the meter may fall before the level is lost. Without a gap, a value hovering at the line flips the character's mood on every small deed.
dailyGainLimit15 unitsThe most the meter can gain in one day. It stops one gift from being handed over again and again. Losses are never limited.
decayPerDay2 unitsHow far an ignored relationship drifts back toward zero each day. Zero means the feeling lasts forever.

What usually goes wrong

One gift buys a friend

The player finds a flower that every character loves and hands one to the same person a hundred times. The meter hits the top in a minute.

Fix: Tell your AI: limit how much the meter can gain in one day, and do not limit losses.

The mood flickers at the line

The meter sits at 30, the friendly line. One small favour makes the character friendly and the next small insult makes her neutral, and her greeting changes back and forth.

Fix: Tell your AI: enter a level at one line and leave it at a line a little closer to zero.

The fade overshoots zero

A value of 1 loses 2 points overnight and ends at -1, so a forgotten friend turns into a mild enemy.

Fix: Tell your AI: move the value toward zero and stop at zero, never past it.

A refused gift is treated as no contact

The player has used up today's allowance and offers another gift. Nothing changes, the game counts the day as ignored, and the relationship fades anyway.

Fix: Tell your AI: any real attempt counts as contact for the day, even when the amount is cut to nothing.

The player is away for a week

The game loops over seven days by hand and forgets that yesterday's visit should pause the fade only once, or it applies seven fades to a character the player saw this morning.

Fix: Tell your AI: when days pass, say how many, pause the fade for the one day of contact only, and fade the rest.

How to check it works

Works well with

Common questions

how do relationship meters work in games

Each character has a number for how much they like the player. Deeds move it up or down, and the game reads a few levels such as unfriendly, neutral and friendly instead of the raw number.

how do i stop players from farming gifts

Limit how much the meter can gain per day, and leave losses unlimited. A good starting point is a daily gain of about 15 on a scale of 100, so a friendship takes at least a few days.

what do i tell my ai to add a relationship meter

Paste this: Add a relationship meter from -100 to 100 per character. Cap gains at 15 per day but not losses, enter the friendly level at 30 and leave it at 20, drift ignored relationships toward zero by 2 a day without crossing zero, and let any contact pause the drift for that day.

should relationships fade over time

A slow fade keeps the world alive and rewards players who come back, but a fast one feels like a chore. Two points a day is a gentle start. Let the player turn it off if it frustrates them.

Where it comes from

We could not find a reliable origin for this one yet.

Where this mechanic comes from has not been researched yet.

Games are named only as references. Names and marks belong to their owners, and nothing here is endorsed by them.

What was checked

This is what separates the blueprint from a catalogue entry: the values on this page come from code that runs.

Your AI gets the code

Tested example code comes through the Spielerando connection, so your AI can use it right away. How to connect it