RMMV Help, I need to set the minimum damage to 1

STARFALL

STARFALL
Veteran
Joined
Jul 6, 2020
Messages
53
Reaction score
7
First Language
spanish
Primarily Uses
RMMV
How could I make the minimum damage of all skils of my game to be 1.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
509
Reaction score
196
First Language
english
Primarily Uses
RMMV
you could make every skill do an "if" check to see if would do damage or not.
MV formulas dont have a limit on the size so easy to do. (unlike VX which has a limit to formula size)
formulaA > 1 ? formulaA : 1
 

STARFALL

STARFALL
Veteran
Joined
Jul 6, 2020
Messages
53
Reaction score
7
First Language
spanish
Primarily Uses
RMMV
you could make every skill do an "if" check to see if would do damage or not.
MV formulas dont have a limit on the size so easy to do. (unlike VX which has a limit to formula size)
formulaA > 1 ? formulaA : 1
I'll be honest with you, I don't know how to implement that, if you could give me an example, I'd appreciate it,
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
239
Reaction score
71
First Language
Chinese
Primarily Uses
RMMV
+1 at the end of the damage formula
 

STARFALL

STARFALL
Veteran
Joined
Jul 6, 2020
Messages
53
Reaction score
7
First Language
spanish
Primarily Uses
RMMV
value = Math.floor(ArcanePotencial) +1;

do you think that's okay?
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
239
Reaction score
71
First Language
Chinese
Primarily Uses
RMMV
Don't know, i won't be that complicated
I just changed the damage formula to (a.atk * 4-b.def * 2) + 1
This format
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,536
Reaction score
4,991
First Language
English
Primarily Uses
RMVXA
All of these will work but only if you want the minimum damage to be 1 before things like elemental weaknesses/resistances, physical/magical damage rates, critical hit multipliers, etc. are applied.

If you want it applied afterwards, you'd need a plugin or at least a little "scriptlet". You'd probably want to apply it after damage is calculated but right before damage is actually applied to a battler's HP.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
509
Reaction score
196
First Language
english
Primarily Uses
RMMV
1 note for all of these suggestions (including my own) and only realize this after reading wave's comment.
these will completely negate any kind of damage changed into healing.
like when using <absorb element: fire> from plugins

edit: almost all
+1 at the end of the damage formula
this 1 would still work with absorb element plugins
 

STARFALL

STARFALL
Veteran
Joined
Jul 6, 2020
Messages
53
Reaction score
7
First Language
spanish
Primarily Uses
RMMV
Alright guys, I already found a solution using '' if '' as suggested by @Tiamat-86 and it worked.
This was my solution
var ArcanePotencial = ( user._criticalCount * 0.5) * ( user.mat * 3) - ( target.mdf * 2); if (ArcanePotencial < 1){ var ArcanePotencial = 1; } "

I'm not very knowledgeable about Js, mine was always the visual part of the games and this is the first time that I am making a game by myself, so I appreciate all your opinions and advice.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.
Finally finished my menu redesign after like a month of coding! I hate designing menus... Good news though - I thought of a complete redesign for it now, so yay...
Still no scam calls all day... also I got a quick gig designing a mascot drawing for a small business, so I might actually make some green of my own after all. That would be a perfect job for me, since I love art and digital design.

Forum statistics

Threads
104,388
Messages
1,006,029
Members
135,917
Latest member
kingrifer
Top