Jump to content
Fomar0153

How to make the most of custom formulae. Part #1

Recommended Posts

So for the first one, you are probably gonna need a script for that. Some 'skill cost manager'.

 

Second one is easy. a.mp += 10 # this won't work for the first one since formula effects are not factored in when skill cost is calculated

Share this post


Link to post
Share on other sites

I am new to custom formulas and I am having trouble understanding how to control an existing game variable in the damage formula box.

 

example:

when using the skill; I want the actor who is using it to be identified and their id added in a variable ex.\v[18]

a.id=$game_variables[18];if 1.25 * a.mat - b.def <= 0; 1; else; 1.25 * a.mat - b.def;end

 

I can not get it to work, sorry if it is a noob question, but I am a noob so...

Edited by rpgmaker22112

Share this post


Link to post
Share on other sites

example:

when using the skill; I want the actor who is using it to be identified and their id added in a variable ex.\v[18]

 

a.id=$game_variables[18];if 1.25 * a.mat - b.def <= 0; 1; else; 1.25 * a.mat - b.def;end

 

Well for one if you are setting any variable to something it's always in the order of var=value so what you should have done is $game_variables[18]=a.id

 

Note here's another neat tip: you can shorten that to \V[18]=a.id

Share this post


Link to post
Share on other sites

 

example:

when using the skill; I want the actor who is using it to be identified and their id added in a variable ex.\v[18]

 

a.id=$game_variables[18];if 1.25 * a.mat - b.def <= 0; 1; else; 1.25 * a.mat - b.def;end

Well for one if you are setting any variable to something it's always in the order of var=value so what you should have done is $game_variables[18]=a.id

 

Note here's another neat tip: you can shorten that to \V[18]=a.id

 

Great! It works excellent! :)

Although I couldn't get the short version to work. 

Share this post


Link to post
Share on other sites

I've done a lot with these custom formulas (in fact I really don't ever use the Quick Setup Area anymore).

 

Interesting, the part about the Gravity Magic damage that does a percentile damage, because I've done a lot of dabbling with this one.

 

I've also done a Critical Damage formula.

 

Looks like this.

 

b.mhp * 0.99

 

which deals damage equal to 99% of the target's total health. Of course, if the target has taken more than enough damage to where this would deal more, that's it, done. So I came up with this one.

 

mhp. * 0.99

 

which deals damage equal to 99% of the target's remaining health. A caveat with this is that the resulting damage is ALWAYS rounded up to the nearest whole number, so if this attack were used against a target with a low amount of health that ended in a certain digit, the 99% might just end up being rounded to 100%. This will happen every time if the health of the target is between 1 and 6.

 

b.hp / 4

 

Great, but this is more efficient:

 

b.hp * 0.25

 

The result is the same, however, multiplying by digits will net the desired results far more often, especially for more complicated mathematics such as 88%, which to get by dividing the b.hp would require a very long sequence that I'm not going to write out, saving utter confusion.

 

However...

 

b.hp * 0.88

 

Is going to net that 88% every time. :)

 

I've also done some other formulas, based off of other games and such, like Sonicboom from Pokémon.

 

40

 

Make sure that the attack is a Certain Hit, and turn off Critical Hit, then set Variance to 0 so that the damage always equals 40 or whatever you set up.

 

I've also made a formula that deals damage to the target based upon how much damage the user has taken.

 

1 + a.mhp - a.hp

 

Ah, how does this work?

 

Let us start out by saying you have 500 HP. It's not much, but work with me here.

 

Alright, you feel good about your next move, to use your Rage attack, only to find...

 

"WHAT!? IT ONLY DID ONE DAMAGE!?!?!? WHAT THE *******!?"

 

Calm down. Take a hit (and I don't mean off your bong), then try the attack again.

 

"Oh snap! I got the sumbitch in one blow! 200 damage, wow!"

 

So, here's the formula for how that happened.

 

if a.mhp is 500 and a.hp is 500... (500 - 500) == 0

 

but...

 

You just took damage, and a big hit at that. So now you have 300 HP.

 

if a.mhp is 500 and a.hp is 300... (500 - 300) == 200

 

Though, in the case of this formula, it would total out as 201.

 

I added the 1 so that there would be some damage done, and to avoid a potential error.

 

I've also coined a powerful attack formula in which it combines all the stats.

 

1 + a.hp + a.mp + a.atk + a.def + a.mat + a.mdf + a.agi + a.luk

 

if a.hp is 1,000 and a.mp is 300 and a.atk is 120 and a.def is 90 and a.mat is 55 and a.mdf is 60 and a.agi is 70 and a.luk is 80...

 

(1,000 + 300 + 120 + 90 + 55 + 60 + 70 + 80 = 1,725) <-- That's one powerful attack...

 

Here's an interesting one...

 

a.exp (this can go exponentially high because it all depends on how much experience the user has).

 

I've not tried the RGSS conditional formula, but worth a shot I'm sure.

  • Like 1

Share this post


Link to post
Share on other sites

Very interesting read, I've had tons of fun with the formula box, phoenix, and much of it was based on this one post that helped me get started.

And yeah using rggss statements in formulas is pretty powerful, though a little hard due to Ace's character limit.

  • Like 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