summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLOuroboros <lunosouroboros@gmail.com>2021-03-06 07:35:26 -0300
committerLOuroboros <lunosouroboros@gmail.com>2021-03-06 07:35:26 -0300
commit957f598e29c50d8ec24f4aadd11bbe063bb7c3b9 (patch)
tree118e961b5cf11f04a42f4fcdfb0144ae9c4e88d6
parentf6dd54feecd4ca778913a95e60fb70a9e96ec9b5 (diff)
Corrected the Step 2 of this tutorial
-rw-r--r--Better-White-Out-Money-Calculation.md16
1 files changed, 13 insertions, 3 deletions
diff --git a/Better-White-Out-Money-Calculation.md b/Better-White-Out-Money-Calculation.md
index b58be20..83976a7 100644
--- a/Better-White-Out-Money-Calculation.md
+++ b/Better-White-Out-Money-Calculation.md
@@ -43,6 +43,7 @@ Let's put these new battle strings to use, shall we? To do that, we'll do some q
```diff
BattleScript_LocalBattleLostPrintWhiteOut::
++ jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_LocalBattleLostEnd
printstring STRINGID_PLAYERWHITEOUT
waitmessage 0x40
+ getmoneyreward
@@ -58,11 +59,20 @@ BattleScript_LocalBattleLostEnd::
end2
```
-Here we're setting up the BattleScript so the `Cmd_getmoneyreward` function will be triggered if the Player loses a battle, and we're also putting our new text strings to use.
+Now we'll tweak the text string linked to the constant `STRINGID_PLAYERWHITEOUT2` in order to inform the Player about the amount of money they're losing.
-Now, normally, `Cmd_getmoneyreward` is in charge of calculating the money you receive as a reward for winning and that alone.
+```diff
+-static const u8 sText_PlayerWhiteout2[] = _("{B_PLAYER_NAME} whited out!{PAUSE_UNTIL_PRESS}");
++static const u8 sText_PlayerWhiteout2[] = _("{B_PLAYER_NAME} panicked and lost ¥{B_BUFF1}…\p… … … …\p{B_PLAYER_NAME} whited out!{PAUSE_UNTIL_PRESS}");
+```
+
+So, what are we doing here? Here we're telling the game to run the `BattleScript_LocalBattleLostEnd` if the Player has lost a trainer battle, in order to make use of the new text strings we inserted earlier. If the current battle type is not a trainerbattle though *(which outside of special battle facilities means we're losing a wildbattle)*, then the game will run `BattleScript_LocalBattleLostPrintWhiteOut` normally.
+
+Lastly, we're setting things up so the `Cmd_getmoneyreward` function will be triggered when the Player loses a battle.
+
+Now, you may be wondering; why are we doing that? Normally, `Cmd_getmoneyreward` is in charge of calculating the money you receive as a reward for winning and that alone after all.
-You can guess what are we going to modify next, can't you?
+You can guess what are we going to change next, can't you?
## 3. Modifying the `Cmd_getmoneyreward` function