How to make a weapon that becomes more powerful based on battles escaped from/won?

KrimsonKatt

Pyromancer
Veteran
Joined
Nov 12, 2016
Messages
172
Reaction score
73
First Language
English
Primarily Uses
RMMV
Hello. In my game I am trying to make a set of two weapons: the "Brave Knife" and the "Chicken Knife." The Brave Knife becomes more powerful the more battles you win, and the Chicken Knife becomes more powerful the more battles you run from. I've found a video on how to create a chicken knife using Yanfly's Equip Core, but I have no clue on how to create a "Brave Knife" weapon. Here is the video.


In the video, it explains that all you need to do to make a chicken knife is to put this code into the notebox of the weapon you want to be the chicken knife and make that weapon's attack be 0.

Code:
<Custom Parameters>
atk = $gameSystem.escapeCount();
</Custom Parameters>
However, what if I want to make it so the parameter is based on battles won instead of battles escaped from? Of course, the Brave Knife would be far superior to the Chicken Knife due to the fact that people tend to fight, and therefore win, more battles then battles that they run away from, so to counter that I'll just chance a few things in the code.

Code:
<Custom Parameters>
atk = ((battles won code) / 5);
</Custom Parameters>
Can someone please help me with this? Thanks.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,675
Reaction score
1,085
First Language
Portuguese - Br
Primarily Uses
RMMV
Hi!
I believe it is $gameSystem.battleCount() - This will return all the times you have battled. But don't know if it still counts if you escape or lose.
So I think it's best if you use a variable. Every time you win a fight, you add + 1 to this variable.
 

KrimsonKatt

Pyromancer
Veteran
Joined
Nov 12, 2016
Messages
172
Reaction score
73
First Language
English
Primarily Uses
RMMV
Ok, great, but how do I set up a variable for when you win? 99% of my battles in my game are random, so how exactly do I set that up? I know I can make every enemy immortal in the beginning and then do some stuff when they get to 0 HP before killing them by removing the immortal status, but that only counts for enemies killed, not overall battles won. How do I do this? Thanks.

Edit: Ok I figured it out. "Win Count" is one of the things you can set for variables when calculating for them. Thanks for the help!

Edit 2: Ok, so how do I do custom parameters using a variable? What is the code needed? Thanks.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

A friend requested me to do a pfp for his twitch channel, so far he approved one of my sketches, so going to digital now. The style he's looking for is quite different from my usual, hopefully I can get it right... :kaoback:
I am so hyped! A new post update and im anxious to see reactions..eeeeeeee
When a youtuber plays your project or game made by you using MAKERs, you will just be awe struck
Ok... so working on the official game guide for my game and its more than 150 pages...... wow. Well, I hope it will help a few players out.

Forum statistics

Threads
105,478
Messages
1,013,994
Members
137,115
Latest member
ArchaicStone565
Top