Skip to content

UltraDialogue 1.1

Choose a tag to compare

@GupeLegend GupeLegend released this 26 Sep 03:57
· 5 commits to main since this release
10dff64

UltraDialogue 1.1 — Affinity

NPCs can now get to know your players. The more — and the better — someone talks to a
character, the more that character opens up: new greetings, new questions, secrets, gifts.
No AI involved: everything is written by you, in YAML, and nothing is said that you didn't write.


Affinity

Every player has a hidden friendship level with every character, starting at 0.

  • Kind answers raise it, rude ones lower it. You decide how much each answer is worth.
  • As it grows, the conversation changes. Different greetings, questions that only appear once
    you're friends, secrets, a one-time gift — whatever you write.
  • Players are never told. No message, no number on screen: they just notice the NPC treats them
    differently. Staff can check it with /ud affinity <player> <character>.
start:
  - if: 'affinity >= 25'      # friends get a warmer welcome
    node: friend
  - node: stranger

nodes:
  stranger:
    text: "I don't usually talk to strangers."
    answers:
      - text: '&7Hello. Who are you?'
        actions: ['affinity: +2']   # kind: +2
        goto: who
      - text: '&8Out of my way.'
        actions: ['affinity: -3']   # rude: -3
        goto: end
  friend:
    text: 'My old friend! Sit down.'
    answers:
      - text: '&6Will you tell me your secret?'
        if: 'affinity >= 50'        # only for close friends
        goto: secret

It can't be farmed. A character only gives affinity once every 30 minutes per player, and
at most 3 points per conversation. Losing affinity has no limit — one rude answer always counts.
Both limits are configurable in config.yml, or per character with an affinity: section.

It only exists where you use it. NPCs that open a shop or a menu keep working exactly as before;
affinity only lives in the dialogues that mention it.


Conversations that don't repeat

  • variants: — write several versions of a line. A different one appears each time, never the
    same twice in a row. Each variant can have its own condition, so the greeting can also depend on
    affinity.
  • show: 2 — a character can have many questions but only show a few, picked at random each
    time. always: true keeps an answer like "Goodbye" on screen.
hello:
  variants:
    - 'Ah, you again.'
    - "I thought you'd left the region."
    - text: 'My favourite traveller!'
      if: 'affinity >= 25'
  show: 2
  answers:
    - text: "What's out in the desert?"
    - text: 'Any advice?'
    - text: 'Why do you travel alone?'
    - text: 'Goodbye.'
      always: true

New example: Kadir

dialogues/kadir.yml is a traveller with four friendship levels — wary stranger, acquaintance,
friend and close friend — varying greetings, rotating questions and a one-time gift. Copy it as a
template for your own characters.

New command

Command
/ud affinity <player> Every affinity that player has
/ud affinity <player> <id> Affinity with one character
/ud affinity <player> <id> set|add|reset [n] Change it to test your dialogues (add skips the anti-farming limits)

Also

  • Every new key also works in Spanish: afinidad, variantes, mostrar, siempre,
    cooldown-minutos, max-por-charla.
  • Existing dialogues need no changes.

Requires Paper 26.1.2+ and Java 25.