Jump to content
JTK

How can I have an attack do random damage each attack.

Recommended Posts

I would like for a physical attack to do a apply a random damage from 1-999 each time he attacks. 

I'm new to RPG Maker and I tried messing around with formulas for an hour but nothing i did made sense or worked.

 

Share this post


Link to post
Share on other sites

i'm not at my rpg maker computer right now, but can't damage formulas have variables in them?

if they can, i'd say have a skill that does nothing but calls a common event that sets a variable between 1 and 999, then use a script like follow-up skills to start a skill that has the variable inside the formula.

Share this post


Link to post
Share on other sites
2 hours ago, CyrusJazzberry said:

i'm not at my rpg maker computer right now, but can't damage formulas have variables in them?

if they can, i'd say have a skill that does nothing but calls a common event that sets a variable between 1 and 999, then use a script like follow-up skills to start a skill that has the variable inside the formula.



I want it to look something like that image but the game crashes with that formula. (I dont understand formulas at all)

Atatck.png

Edited by JTK

Share this post


Link to post
Share on other sites
11 minutes ago, JTK said:



I want it to look something like that image but the game crashes with that formula. (I dont understand formulas at all)

--image snip--

 

looking at vxa's mouseover for damage formulas, variables can be used in the form of 'v[x]'. set up a common event that sets a variable between 1-999. replace that (1-100) with v[x], where x is the variable's database number. i'd recommend calling the common event before the battle so the game doesn't read an unset variable or a zero. i'd also recommend calling the common event with the skill so the variable is always changing

 

i've never really used variables in formulas before so i might be getting this all wrong, though

Share this post


Link to post
Share on other sites

You don't have to do any of that. Do "rand(100)"

I assume 1 - 100 is multiplied by 4. If so, atk * 4 * rand(100) - b.def * 2

 

Hope this helps

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted