Clementee

Villager
Member
Joined
Sep 24, 2016
Messages
24
Reaction score
2
First Language
Indonesia
Primarily Uses
hello i am a newbie, i'd like to ask if there is anybody who knows how to give formula towards a state that damage HP/MP. and if possible how to create "Chance" in the state

i am still on my first trial in the game and just finish watching tutorial. i was thinking that i'd like to create an "Electrocute" state when the state gives chance towards the bearer to get a damage and the bearer's turn are skipped. even if its boss. state's effect activate from the start until the state ends, i'd like the state to give "chance" towards the bearer to get the effect while the state is active.

for example lets say Monster A get the Electrocute state on turn 1, electrocute state last for 5 turns. turn 2 and turn 3 it may not get electrocuted however turn 4 it may get electrocuted and it's turn is skipped. also as the title mention, i want the electrocution's damage is not by "HP regeneration -%" but rather by formula damage.

I'd like to ask if anybody here who are obviously more senior than me knows a way to do it or any plugin that can do both or any of those. i was also thinking of creating a buff like "increase critical hit by #% and small chance of inflicting Death" which still needs the "Chance" in a state.

This is a remake of the post in game and mechanics design which got modded probably due to wrong sections. not sure where to post the thread tbh as i am seriously still new and i thought the question first game mechanic design. at least @Silverskingives me a really valuable answer which i can't thank him/her because the post got modded, still wondering if there are other answer
and if possible tell me which section should i post this to

thanks in advance for anybody whose willing to answer.
 
Last edited by a moderator:

Clementee

Villager
Member
Joined
Sep 24, 2016
Messages
24
Reaction score
2
First Language
Indonesia
Primarily Uses
yeah i download it already, was about to ask silverskin if the plugins answers the thread's question. before anybody misunderstand, i think the plugins really useful and i am happy someone told me this, but i am still wondering if my question has been answered or not. is it possible to input damage formula with that plugins?

once again thanks though
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,658
Reaction score
440
First Language
Portuguese
Primarily Uses
RMMV
Possible? Yes.


Give me a sec to make you an example one.
 

Silverskin

Villager
Member
Joined
Jun 21, 2016
Messages
27
Reaction score
12
First Language
English
Primarily Uses
Hey, if you decided to use Yanflys Plugin, I can give you the codes


// Gets Electrocute stat at turn #1

<Custom Apply Effect>


this._turns = 0; //See step 3


var dmg = (origin.mat * 3 - target.def * 2 + 25); //Origin means the one that inflicted the state to the other, target means the one having the state, you can use all damage formula elements, just convert a to origin and b to target


dmg = Math.floor(dmg); //You need to round the damage to an integer (1, 2, 32421, etc.), no fractions


target.gainHp(-dmg); //Caps-sensitive command!


target.startDamagePopup();


</Custom Apply Effect>

// Turn-specific damage

<Custom Turn End Effect> //You can also change End to Start


if (this._turns == 4) {


var dmg = (origin.mat * 3 - target.def * 2 + 25);


dmg = Math.floor(dmg);


target.gainHp(-dmg); 


target.startDamagePopup(); //See above


}


</Custom Turn End Effect>

//For the stun effect at turn 4

<Custom Action Start Effect>


this._turns += 1;


var chance = 0.33; //If you dont want your state to stun every time (it may be conscidered boring or broken)


if (Math.random() < chance && this._turns == 4) {


user.startAnimation(123); //Replace 123 with animation id or delete line if wanted


if (user.currentAction()) {


user.useItem(user.currentAction().item()); //Clear the action pool of inflicted target


this._stateTurns[stateId]--;


}


user.clearActions();


BattleManager.actionWaitForAnimation();


}



This code should work as I am using a similar state in my game Point Zero. Hope I could help you mate :)
 

Latest Threads

Latest Profile Posts

1653529725808.png
>Wake up in the night
>Can't sleep
>Draw little freak
>Come up with pancake based puns for attacks
>Back to bed
UHHHHH. What is this and how did someone find my game on here? 1653527395160.png
ScreenShot_5_25_2022_7_37_13.png

my game has distinct areas where travel through what are known as "battle stations" these are more or less areas to explore and fight. occasionally, you'll stumble across secret rooms with sidequests ready to be taken. this area is in the high school attic of all places... but how do ya get there is the question.
Redoing my intro scene for the 10 millionth time is pain
So this flat Earther named Mike Hughes build his own rocket to prove that the Earth was flat. But on liftoff he still had the ladder he climbed up to the rocket laying against it. Needless to say things didn't go as planned.

Forum statistics

Threads
122,125
Messages
1,146,703
Members
160,410
Latest member
huki
Top