Please help to use YEP's Dagme core.

Dehsalp

Veteran
Veteran
Joined
Oct 9, 2019
Messages
249
Reaction score
27
First Language
korean
Primarily Uses
RMMV
I would like to create a new damage formula using the damage core.
<damage formula>
</damage formula>
Using this.

This skill is designed to do quite random damage.
When using a skill, it sets the variable from 0 to 500.

<Before Eval>
$gameVariables.setValue(298,Math.floor(Math.random() * 500));
</Before Eval>

I use the skill core plugin here.

At this time, if the variable is 0~50, a.luk * 1 will be used.
51 to 120, a.luk * 3, 121 to 220, a.luk * 7...
I want to use it like this.

What can I do?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
What have you already tried to achieve your aim, and what is/isn't working about your approach?
 

Dehsalp

Veteran
Veteran
Joined
Oct 9, 2019
Messages
249
Reaction score
27
First Language
korean
Primarily Uses
RMMV
What have you already tried to achieve your aim, and what is/isn't working about your approach?
When the variable is 0~50 or 51~120, etc.
I don't know how to make multiple checks like this.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Ahh. You'd just use if statements.

Code:
var randomValue = $gameVariables.value(298);
if (randomValue >= 0 && randomValue <= 50) { // code for 0-50 here }
else if (randomValue >= 51 && randomValue <= 120) { // code for 51-120 here }
else if (randomValue >= 121 && randomValue <= 220) { // code for 121-2220 here }
And so on and so forth.
 

Dehsalp

Veteran
Veteran
Joined
Oct 9, 2019
Messages
249
Reaction score
27
First Language
korean
Primarily Uses
RMMV
Ahh. You'd just use if statements.

Code:
var randomValue = $gameVariables.value(298);
if (randomValue >= 0 && randomValue <= 50) { // code for 0-50 here }
else if (randomValue >= 51 && randomValue <= 120) { // code for 51-120 here }
else if (randomValue >= 121 && randomValue <= 220) { // code for 121-2220 here }
And so on and so forth.
So... like this?

<damage formula>
var randomValue = $gameVariables.value(298);
if (randomValue >= 0 && randomValue <= 50) { a.luk * 1 - b.def * 2}
else if (randomValue >= 51 && randomValue <= 180) { a.luk * 3 - b.def * 2 }
else if (randomValue >= 181 && randomValue <= 400) { a.luk * 5 - b.def * 2 }
else if (randomValue >= 401 && randomValue <= 460) { a.luk * 8 - b.def * 2 }
else if (randomValue >= 461 && randomValue <= 500) { a.luk * 13 - b.def * 2 }
</damage formula>


edit +)
Oh, it doesn't work.
value = 500;
I think the value should come out like this.
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Code:
<damage formula>
var randomValue = $gameVariables.value(298);
if (randomValue >= 0 && randomValue <= 50) { value = user.luk - target.def * 2}
else if (randomValue >= 51 && randomValue <= 180) { value = user.luk * 3 - target.def * 2 }
else if (randomValue >= 181 && randomValue <= 400) { value = user.luk * 5 - target.def * 2 }
else if (randomValue >= 401 && randomValue <= 460) { value = user.luk * 8 - target.def * 2 }
else if (randomValue >= 461 && randomValue <= 500) { value = user.luk * 13 - target.def * 2 }
</damage formula>
 

Dehsalp

Veteran
Veteran
Joined
Oct 9, 2019
Messages
249
Reaction score
27
First Language
korean
Primarily Uses
RMMV
Code:
<damage formula>
var randomValue = $gameVariables.value(298);
if (randomValue >= 0 && randomValue <= 50) { value = user.luk - target.def * 2}
else if (randomValue >= 51 && randomValue <= 180) { value = user.luk * 3 - target.def * 2 }
else if (randomValue >= 181 && randomValue <= 400) { value = user.luk * 5 - target.def * 2 }
else if (randomValue >= 401 && randomValue <= 460) { value = user.luk * 8 - target.def * 2 }
else if (randomValue >= 461 && randomValue <= 500) { value = user.luk * 13 - target.def * 2 }
</damage formula>
Oh, thank you! it working!
Additionally, I was stupidly set to 'none' rather than 'decrease HP' in skill settings.

Just one more thing, please.
I want to display it using BattleManager.addText using the Message Core plugin, but what should I do at this time?

if (randomValue >= 0 && randomValue <= 50) { value = user.luk - target.def * 2}
var text = ' TEXT'
var wait = 60;
BattleManager.addText(text, wait);
else if (randomValue >= 51 && randomValue <= 180) { value = user.luk * 3 - target.def * 2 }
var text = ' TEXT'
var wait = 60;
BattleManager.addText(text, wait);
else if (randomValue >= 181 && randomValue <= 400) { value = user.luk * 5 - target.def * 2 }
var text = ' TEXT'
var wait = 60;
BattleManager.addText(text, wait);
else if (randomValue >= 401 && randomValue <= 460) { value = user.luk * 8 - target.def * 2 }
var text = ' TEXT'
var wait = 60;
BattleManager.addText(text, wait);
else if (randomValue >= 461 && randomValue <= 500) { value = user.luk * 13 - target.def * 2 }
var text = ' TEXT'
var wait = 60;
BattleManager.addText(text, wait);

Can I set it up like this?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
What do you want to display exactly?
 

Dehsalp

Veteran
Veteran
Joined
Oct 9, 2019
Messages
249
Reaction score
27
First Language
korean
Primarily Uses
RMMV
What do you want to display exactly?
When the variable is 0~50, it displays a message of '흉길' and wishes the damage of the skill to be applied.
Similarly, in the case of 51~180, '소길'
In the case of 181~400, '중길' ......
Like this...
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
You need to put the BattleManager.addText call and the text/wait variables inside the curly braces of each if statement. Right now they're not part of it. Hang on.

Code:
if (randomValue >= 0 && randomValue <= 50) {
  var text = ' TEXT'
  var wait = 60;
  BattleManager.addText(text, wait);
  value = user.luk - target.def * 2;
}
Like that.
 
Last edited:

Dehsalp

Veteran
Veteran
Joined
Oct 9, 2019
Messages
249
Reaction score
27
First Language
korean
Primarily Uses
RMMV
You need to put the BattleManager.addText call and the text/wait variables inside the curly braces of each if statement. Right now they're not part of it. Hang on.

Code:
if (randomValue >= 0 && randomValue <= 50) {
  var text = ' TEXT'
  var wait = 60;
  BattleManager.addText(text, wait);
  value = user.luk - target.def * 2;
}
Like that.
Oh, sorry, I said it was a message core because I didn't know exactly what plugin it was.
It seems to be in Battle engine core and Buff&state core.
There was a script that helped me in the past, and I needed these two for that.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
It's cool, I found it and figured out what you need to make it work. :)
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top