MV-equivalent of VX formula

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
1,770
Reaction score
729
First Language
French
In VX you could use the following line in the damage formula of a skill to apply a buff on a character:
a.add_buff(2,3); a.mat*1.5-b.mdf*1
(just an example)

This doesn't seem to work anymore in the damage field of MV. Is there any equivalent for it?


Same question about the rand()
[a.atk*1-b.def*1, 1+rand(2)].max
(again, just an example)

This was working on Ace but no longer is on MV. Any equivalent?


And finally (sorry for the many questions) what is the way (if any) to use a variable and to test a condition (for instance if a switch is on) through the damage formula?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,388
Reaction score
868
First Language
EN
Primarily Uses
RMMV
You may find this thread helpful: https://forums.rpgmakerweb.com/index.php?threads/damage-formulas-101.81905/
(Original - rpgmakercentral)

Give the skill user a 3-turn buff to param 2 (atk):
Code:
a.addBuff(2, 3);
In your context:
Code:
a.addBuff(2,3); a.mat*1.5-b.mdf*1

Get a random number from 0~1:
Code:
Math.randomInt(2)
In your context:
Code:
Math.max(a.atk - b.def, 1 + Math.randomInt(2))

Get the value of game variable 15 (these two lines are equivalent, first one is a shortcut for the damage formula box):
Code:
v[15]
Code:
$gameVariables.value(15)
Get the value of game switch 8:
Code:
$gameSwitches.value(8)
Return 100 if switch 8 is on, else return 10:
Code:
$gameSwitches.value(8) ? 100 : 10
Or you can use an "if" statement, e.g. do the addBuff thing above only if the value of variable 15 is more than 20:
Code:
if (v[15] > 20) { a.addBuff(2, 3); }; a.mat * 1.5 - b.mdf
 
Last edited:

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

Latest Threads

Latest Profile Posts

Please support my Lego Ideas Untitled Goose Game set, thanks in advance :) https://ideas.lego.com/projects/2bcb743a-1071-4f44-89f4-97ad6ec27b5d
Here we are....REMIND is out and what am I doing?
Still Playing Kingdom Hearts 3.....
Escort quest is one of the worst quest ever because the AI tend to be suck and suicidal.
New update/finish/fix/upload TODO list:
AddCancelCommand, AutoshadowEx, BgImageScreenShot, BindEvents, ChangeEventGraphic, DroppingGame, EscapeCodesEx, EventTriggersEx, FortuneCookie, GameoverEx, InputEx, InsertValues, LastCalledEvent, LevelUpEx, MapData, MemoryGame, MessageSetSwitch, MogCharPosesEx, MonstersCaught, MovementEx, ...
... continued below...

Forum statistics

Threads
93,582
Messages
913,684
Members
123,121
Latest member
szymek25
Top