Characters

개요

Recruit any of four characters (knight, mage, archer, healer) for free, then train them to gain experience and levels. Every recruit uses one slot of your roster and appears as its own row under Train a character. Each character keeps its own experience and level, with a level cap of 10.

체험 방법

  1. Under Recruit a character, press Recruit next to Recruit knight (or another character) to get one of that character.
  2. Slots under Your characters goes up, for example to 1 of 20 used. Recruiting the same character again adds a separate copy.
  3. A row for the new character appears under Train a character, with its name in Id and its level and cap in Level, such as 1/10.
  4. Press Train on a row to give that character alone 40 experience; the gauge fills, and the level goes up each time a threshold is passed.
  5. Keep training and the level stops at the cap of 10.

사용하는 GS2 서비스

  • GS2-Inventory: GS2-Inventory’s Character inventory defines the roster (20 slots to start, 100 at most) and an item model per character, and holds the characters the player owns. Each stack holds one character and multiple stacks are allowed, so two knights are two rows.
  • GS2-Experience: GS2-Experience’s experience model defines each character’s experience, level, level cap (10 by default, 30 at most) and the experience thresholds. Experience is tracked per character item set.
  • GS2-Exchange: GS2-Exchange rate models define the buttons: Recruit acquires a character (Gs2Inventory:AcquireItemSetByUserId) and Train adds experience to the pressed character (Gs2Experience:AddExperienceByUserId), each run server-side as a free transaction.

GS2 Studio에서 사용하기

GS2 Studio의 Simple 모드에서 Add features 를 열고 Characters 의 Add 를 누르면 이 기능을 자신의 프로젝트에 가져올 수 있습니다. 패키지를 직접 지정하려면 Add from GitHub 를 선택하고 아래 패키지를 입력합니다.

https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-character/packages/foundation-economy-character
  • Owner: gs2io
  • Repository: gs2-studio-package
  • Subdirectory: foundation-economy-character/packages/foundation-economy-character

소스 코드