Skip to content

Game Card V1 Schema Change#5

Open
IJiaPu wants to merge 4 commits into
mainfrom
for_zagii
Open

Game Card V1 Schema Change#5
IJiaPu wants to merge 4 commits into
mainfrom
for_zagii

Conversation

@IJiaPu

@IJiaPu IJiaPu commented Feb 11, 2025

Copy link
Copy Markdown
Contributor

Game Card V1 Schema Change Details:

Note: The following field names, whether in PascalCase or camelCase, are equivalent. For example, CharacterName = character_name.

  1. [Merged into Main branch on February 10] A creator_id field is added to the Game layer. If it exists, it will be used directly; otherwise, it will be parsed from the token to facilitate the use of Zagii's conversational creation.
    The goal is to account for the fact that Zagii cannot retrieve the user token during the conversation, and when making HTTP requests, the token placed in the request header is Zagii's own token.

  2. [Merged into Main branch on February 10] The Characters field is moved from the Chapters layer to the Game layer, to represent all characters (Solo-Character) involved in the game.

    Reason for Change:
    A. All characters attached to a game (including new characters that need to be created for the game) need a centralized place for easy understanding and definition by the user. This also allows the backend to create characters by simply traversing one location.
    B. If characters were in the chapters, finding all characters in the game would require searching through all chapters and then through all characters within those chapters.
    C. Also, if a character is defined in Chapter A, users may wonder if the same character in Chapter B needs to be redefined.

    Example Before the Change:

    {
      "game_id": "xxx",
      ...
      "chapters": {
        ...
        "characters": {}
      }
    }

    After the Change:

    {
      "game_id": "xxx",
      ...
      "chapters": {
        ...
      },
      "characters": {
        ...
      }
    }
  3. In the InitDialogue, Lore, and CharacterInfo fields, the unique identifier for the character (which refers to the character and adds attributes for the character in this chapter) is changed from CharacterID to CharacterName (for these three fields, remove CharacterID if present, and add CharacterName if not already included).

    Reason for Change:
    A. Since the ID is issued by the backend, users specifying IDs may cause risks. Using CharacterName as the unique identifier makes it easier for users and Zagii to use.
    B. character_id is issued by the backend, so if character_id is missing, the backend can match the character based on the specified character_name.
    C. By using character_name, the backend only needs to find the corresponding character_id in the characters section (which is issued by the backend). Otherwise, the backend needs to handle both character_name and character_id replacement operations.
    D. Reducing or preventing non-standard user operations.

  4. The game_tags field in the Game layer is updated to include optional enumerated values that are string types, used to label the game. The available enum types will remain consistent with the options in the CreatorTool game editing page.

…d发放,用户指定ID存在风险,使用Name作为唯一区分便于用户&Zagii使用
 Game tabs are optional
@IJiaPu IJiaPu changed the title Game Card V1 Schema中标识角色唯一的字段由characterID修改为CharacterName Game Card V1 Schema Change Feb 17, 2025
@IJiaPu IJiaPu requested a review from codingtmd February 17, 2025 10:10
Remove the name field from InitDialogue, and only retain character_name.
Note、The Mechanics enum should ignore case sensitivity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant