7. Change settings and apply them to the game

Increase rewards and add a quest, then try the changes in the game.

With the basic game working, let’s change its content. Increase Forest exploration’s reward from 10 to 15 coins and add Cave exploration. Check how the settings affect the display and the rewards you receive.

Before you start

Clear any active quest and wait for purchases or other operations to finish before changing settings.

Changes to make

QuestStamina costNormal rewardFirst-clear reward
forest Forest exploration515 coinsNone
cave Cave exploration820 coinsNone

Steps

Edit the existing row and add a new one

Open Tables → Quest (Quest) and make these edits.

IDGroupdisplayNameStart costs consumeValueNormal clear reward count
forestmainForest exploration515
cavemainCave exploration820

Open the normal clear rewards for forest and set depositTransactions → DepositTransaction → count to 15.

Change Forest exploration’s reward by setting DepositTransaction count to 15

Add a row for cave. Configure one ConsumeStaminaByUserId starting-cost action and one DepositByUserId normal clear reward.

  • Start costs: namespaceName = Energy, staminaName = stamina, userId = #{userId}, consumeValue = 8.
  • Normal clear reward: namespaceName = Currency, userId = #{userId}, slot = 0. Add one depositTransactions item with price = 0, no value for currency, and count = 20.
  • Leave first-clear rewards and failure actions empty.

Save, then apply the changes to both GS2 and Unity.

Publish screen with server deployment and linked Unity project update panels

  1. Under Publish → Calculate server differences, review the Forest change and Cave addition, then deploy.
  2. Run Update the Unity project. This is needed because displayName is also exported to Unity assets.
  3. Stop and restart Play Mode, then log in.
  4. Check that both quests appear. The code calls Start() on each row, so no Cave-specific start code is needed.

Update the settings

Download the chapter 7 template. Open Deploy → adventure-game → Update stack and select it under Template data. This complete template includes the previous resources. Review and apply the changes, then wait for Update complete.

The template changes forest’s deposit to 15 and adds cave. Keep chapter 6’s code, stop and restart Play Mode, and log in. Forest and Cave are loaded from the main group. The code starts the selected quest by its Name, so the new Cave quest works too.

What you do

Clear any quest in progress and wait for purchases or other operations to finish. Then start the agent in your working folder and give it the following request. When the agent finishes, try the checks under “What to check” below yourself.

Request for the agent

In this folder, I am building a small adventure game with GS2 and Unity.
The GS2 project is adventure, the region is ap-northeast-1,
and I have already signed in.
This folder contains the GS2 Studio project Adventure
and the Unity project AdventureUnity.
So far, I have built login, the quest list (Forest exploration), starting and clearing
quests with a coin reward, stamina, and a shop where coins restore stamina.

This time, I want to change the game settings and add a new quest, as in this table.

| Quest | Stamina used | Reward for every clear | Reward for the first clear only |
| --- | --- | --- | --- |
| forest Forest exploration | 5 | 15 coins | None |
| cave Cave exploration | 8 | 20 coins | None |

- Change Forest exploration's reward from 10 to 15. Add Cave exploration as a new quest.
  Put both in the quest group main.
- Show Cave exploration in the list with as few changes to the Unity code as possible.
- Also tell me how a settings change reaches the game,
  and what to watch out for when I check that it has.
Keep everything built so far working.
Deploy to GS2 and update Unity, then enter Play Mode in Unity to check that it works.

When you are done, write the steps for me to check the result and a list of the numbers
you chose, without technical terms. If there is anything you did not try, list that too.

What to check

This chapter checks how long you need to wait after changing settings before the change takes effect.

  • After a change to a quest’s stamina or rewards is deployed to GS2, it can take up to five minutes to reach the game. During that time, you may see the old and new values switch back and forth.
  • A change to a quest’s display name appears when you restart Play Mode after the agent updates Unity. For a released app, you need to rebuild the app.
  • A quest in progress uses the settings from when it started. To check a change, start a new quest.

Check by playing: In addition to “Try the new quest” below, try the following.

  • With at least 5 but fewer than 8 stamina, you can start Forest exploration but not Cave exploration
  • If you restart Play Mode with Cave exploration in progress, Cave exploration is still in progress

Check that the numbers are what you intended

  • The quest list in the agent’s report matches the table in the request
  • After you clear Forest and Cave once each, your balance goes up by 15 and 20 from the values you noted

Check by asking the agent

  • “Which of these changes need a Unity update, and which do not?”
  • “In a released app, which changes reach players, and when?”
  • “What did you not try?”

Practice

Ask the agent to add a quest with a name, stamina cost, and reward that you choose yourself. Start it from the list, clear it, and check that your coins go up by the amount you chose. Also check what happens when stamina is too low and after you restart Play Mode.

If something goes wrong

  • Check Unity’s Console for red errors. If there are any, paste the message to the agent and ask it to fix the problem.
  • Check what the agent’s report lists as not tried.
  • If you have just changed the settings, wait five minutes, restart Play Mode, and start a new quest to check.

Try the new quest

Open the list and try both quests. After deployment, settings can take up to five minutes to take effect. If the old list or rewards remain, wait a little, restart Play Mode, and check with a new quest.

  • Both Forest and Cave appear in the list.
  • Starting and clearing a new Forest quest adds 15 coins.
  • Starting Cave spends 8 stamina; clearing it adds 20 coins.
  • Existing coins remain, with only the clear reward added.

An active quest retains its settings from when it started. Start a new quest to check changed settings. If Unity also stores display data, update it alongside the GS2 settings.

Practice: create another quest

Add a quest with your own name, stamina cost, and rewards. Start it from the list, clear it, and receive the rewards. Also check what happens with too little stamina and after restarting the app.

What to check
  1. Note the coin balance before selecting the new quest.
  2. Click Start, then Complete for that quest.
  3. Subtract the old balance from the balance after clearing. If the difference matches the configured reward, the new quest’s reward was received.

Next: Handle network errors and repeated clicks