"Hedge Risk" variation (Bravely Default) [SOLVED]

miyanke

Veteran
Veteran
Joined
Dec 2, 2015
Messages
73
Reaction score
12
First Language
Spanish
Primarily Uses
RMMZ
Hi everyone,
I'm here again asking for help to implement an idea.
The original power was something like "Hedge Risk" from Bravely Default:
Effects: The damage taken is halved for five turns. However, when you do take damage under this effect, you lose pg equal to the damage taken (or prevented - since it's halved, it goes both ways).

I thought using a state that last for five turns, but it should "react" to the damage, maybe add it to a variable and subtract to the party gold. I'm not sure about the "reacting" part, so I thought changing the power:
A power that heals half of the damage suffered for an ally [(b.mhp-b.hp)/2] and with that cost for gold.

Formula:
Code:
v[1]=(b.mhp-b.hp)/2; v[1]

Notetags (using VS Core Battle) [to show a message]:
Code:
<JS Post-Apply>
$gameParty.loseGold($gameVariables(1));
$gameMessage.setPositionType(1);
$gameMessage.setBackground(1);
$gameMessage.add("<Center>Ganaste /V[1]/G.")
</JS Post-Apply>

But it's not working. It heals half the damage but doesn't lose the gold or show the message.

Can you see why?
Do you have any idea to create something more similar to the original concept of the power?

Thank you in advance.
 

Lostboy

Villager
Member
Joined
Aug 25, 2018
Messages
23
Reaction score
15
First Language
English
Primarily Uses
VNM
Hi, I think you have to use $gameVariables.value(1), as for showing a message, I'm not sure but you could use $gameTemp.reserveCommonEvent(index) to call a common event and have the message show from there?
 

miyanke

Veteran
Veteran
Joined
Dec 2, 2015
Messages
73
Reaction score
12
First Language
Spanish
Primarily Uses
RMMZ
Hi, I think you have to use $gameVariables.value(1), as for showing a message, I'm not sure but you could use $gameTemp.reserveCommonEvent(index) to call a common event and have the message show from there?
Yeah! That works.
Code:
<Custom Cost Text>
\FS[20]\C[17]Daño curado \G.
</Custom Cost Text>
<JS Post-Apply>
$gameParty.loseGold($gameVariables.value(1));
$gameMessage.setPositionType(1);
$gameMessage.setBackground(1);
$gameTemp.reserveCommonEvent(3)
</JS Post-Apply>

The only problem is that the skill can heal more than what it can pay. Any idea of how to check the quantity of gold before the healing?
 

Lostboy

Villager
Member
Joined
Aug 25, 2018
Messages
23
Reaction score
15
First Language
English
Primarily Uses
VNM
Code:
<Custom Cost Text>
\FS[20]\C[17]Daño curado \G.
</Custom Cost Text>
<JS Post-Apply>
if ($gameVariables.value(1) >= $gameParty.gold()) {
         $gameVariables.setValue(1, $gameParty.gold());
};
$gameParty.loseGold($gameVariables.value(1));
$gameMessage.setPositionType(1);
$gameMessage.setBackground(1);
$gameTemp.reserveCommonEvent(3);
</JS Post-Apply>

This should set the value of healing equal to the amount of gold held if it exceeds gold on hand.

Maybe try <JS Pre-Apply> or <JS Pre-Damage> to check before healling is applied?

Something like this...

Code:
<Custom Cost Text>
\FS[20]\C[17]Daño curado \G.
</Custom Cost Text>
<JS Pre-Damage>
if ($gameVariables.value(1) >= $gameParty.gold()) {
         $gameVariables.setValue(1, $gameParty.gold());
};
</JS Pre-Damage>

<JS Post-Apply>
$gameParty.loseGold($gameVariables.value(1));
$gameMessage.setPositionType(1);
$gameMessage.setBackground(1);
$gameTemp.reserveCommonEvent(3);
</JS Post-Apply>
 
Last edited:

miyanke

Veteran
Veteran
Joined
Dec 2, 2015
Messages
73
Reaction score
12
First Language
Spanish
Primarily Uses
RMMZ
Hi Lostboy,
I tried the Pre-Damage but I needed to configure the damage in the pre-damage and I'm not as good as this.

My final solution has been:
Formula:
Code:
$gameParty.gold()>=(b.mhp-b.hp)/2?v[1]=(b.mhp-b.hp)/2:v[1]=$gameParty.gold(); v[1]

Notetags:
Code:
<Custom Cost Text>
\FS[20]\C[17]Daño curado \G.
</Custom Cost Text>


<JS Post-Apply>
$gameParty.loseGold($gameVariables.value(1));
$gameTemp.reserveCommonEvent(3);
</JS Post-Apply>

Common Event (Now it checks if you still have money, if doesn't it alerts you about it):
1602594909708.png

Maybe this is not the cleanest solution, but it works. Thank you so much!
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I ended up needing to do a chapter 1 map remake. Pesky limited rights on the other images meant I couldn't use them in my randomizer. So I made the map more like the randomized areas instead. Still a WIP, animated version to come later. ;)
Stream will be live shortly! I will be beginning a play-through of Resident Evil 4! Feel free to drop by!

1st iteration on castle interior in Tiled.
I've started up Pillars of Eternity. It's interesting how the game does a "select choice" cutscene using still image art for dramatic flair. I wonder if that might work for my RPGMaker project.
The self-righteous indignation of family when you expect them to pay back money you've leant to them never ceases to amaze me.

Forum statistics

Threads
107,744
Messages
1,031,812
Members
139,883
Latest member
DeAngelis
Top