# Topic 5: Value Based Game & Goal System

When a multi-chapter game is played by a player, **it needs to be proceed to the next chapter when a Goal is completed** which means that if there is no goal in a chapter, the chapter can be played forever as well.

### :trophy: SUCCESS - TRIGGER CONGRATULATIONS ON GAME or TO THE NEXT CHAPTER

**There are three fields to tell when the game can pass:**&#x20;

1. **Goal & condition** for writing the sentence.&#x20;
2. & 3. **Task list** If the goal is split into two steps for accomplishment.

> Set the objectives and victory condition in this format, the system will check the goal: \[who] \[do] \[what] will complete the game, \[if X] Examples
>
> * One of the characters admits to date with the player
> * The player points out the culprit. The answer is: John.
> * The player gets the Line ID from one of the character.
> * Miyu's happiness reaches 100%.
> * No goal for this game.

### :skull: FAIL - TRIGGER GAME OVER

**Failed When** represents the case you want the player to lose the game. You can turn this into *<mark style="color:blue;">**2 value-based conditions**</mark>*. Game Fail Condition can be assigned to *<mark style="color:blue;">Game, Player, a Single Character or All Character(including player)</mark>*.&#x20;

The value system is directly tied to failure conditions, allowing you to specify up to two distinct attribute values for different endings. These conditions can be set at different levels:

1. Game Level: Affects the entire game state
   1. Example: You can put down the total round as the restriction for Game, and the spaces can be written as: **`Game, Round = 0; Initial Value = 10 for a 10 round game`**
2. Player Level: Targets player status
   1. Example: For restriction on HP: **`Player, HP = 0, Initial Value = 10`**
3. Character Level: Applies to individual characters or all characters
   1. Example: For gain on one character's Trust: **`[Character Name], Trust = 10, Initial Value = 0`**
   2. Example: For all characters' Mana: **`All Character, Mana = 0, Initial Value = 100`**&#x59;ou can efficiently set universal attributes for all characters at once, and these will be displayed on the gameplay page.

If you want to trigger both conditions to fail, check mark *<mark style="color:blue;">Does both of them need to be triggered for Fail</mark>*.

<figure><img src="/files/vMaEE3NjE93f8SirnApe" alt=""><figcaption></figcaption></figure>

### No GOAL

If you want to turn off the Goal, Check mark `No Goal in this Chapter`

<figure><img src="/files/JQYFVuOaWOoxDcxtLGJb" alt=""><figcaption><p>This is in 4. Chapter Tab</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.rpggo.ai/rpggo-creator-tutorial/creator-tutorial/build-game/topic-5-value-based-game-and-goal-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
