New here at RGSS3 (Ace).

Bgillisp suggested me to post a new topic instead to derail.

Is that how we write this way? I mean to form the final formula with multiple totals from few previous formulas? Like this?

Base1 = form the formula of hero's attack power here

Base2 = form the formula of enemy's defense power here

Base3 = some formulas that could be useful of special effects (like, boosted damage if slime-type, for example)

Total = Base1 * Base3 - Base2

Right? if so, then it's alright to create some unexisted results (Base#) until hit the final result (Total)? I want to know it, so I don't have to form the whole in just one line (one whole formula with many parentheses that could make you lost the counts).

If there is any important tip for me to understand (like, do not input the certain sign in it ( +=, -=, =) or something), i would like to know this too. Thanks.

I could want to study RGSS3 but i just want to complete my big project here as quick as possible is all. I never had completed any single project I have made because I am too lazy, XD

Anyway... Is it possible for me to create the multiple formulas before the finalization damage to deal against the target?
Here's some code to get you started

You'll need to insert this into your scripts Below Materials but Above Main


class Game_Battler < Game_BattlerBase

#Time to define some custom damage

def custom_damage_boost_def(a,b,boost)
base1 = a.atk * 4
base2 = b.def * 2

damage = (base1 * boost) - base2

return damage
end

def custom_damage_boost(a,
base1 = a.atk * 4
base2 = b.def * 2
boost = a*luk * 3
damage = (base1 * boost) - base2

return damage
end

end 
Now in your skill formula you can now write "a.custom_damage_boost_def(a,b,num)"*

or "a.custom_damage_boost(a,b)" up to you!

*Num is whatever you want it to be, an integer or a stat

Another good reference that helped me a lot is here:  http://cobbtocs.co.uk/wp/?p=271

Good luck!
Yes, I see it. Thanks again!

*look through that link* Oh wow! Thanks a lot! 😀

Can I bother to ask you one tiny thing? What's the big difference between += and =? I did looked across some lunatic scripts Yanfly made and found += while you suggested = instead... So I am little confused to compare between those...
Yes, I see it. Thanks again!

*look through that link* Oh wow! Thanks a lot! 😀

Can I bother to ask you one tiny thing? What's the big difference between += and =? I did looked across some lunatic scripts Yanfly made and found += while you suggested = instead... So I am little confused to compare between those...
For example: damage += boost means this: damage = damage + boost 

I'm not sure, what =? means.
Yes, I see it. Thanks again!

*look through that link* Oh wow! Thanks a lot! 😀

Can I bother to ask you one tiny thing? What's the big difference between += and =? I did looked across some lunatic scripts Yanfly made and found += while you suggested = instead... So I am little confused to compare between those...
= is an assignment, while += is an assignment with an operation included.

Say x is initialized as 4.

x = 2 would return x as 2.

x += 2 would return x as 6, because before being assigned the value of 2 is added to x's value. Since 4+2=6, this returns 6.
Purple, i didn't mean this =?, hahaha. I mean = itself with a question mark as a signal of the end of my question. XD

Ah okay.

Diver, oh i see! Thanks!

So, I just saw one new as -=... since Diver gave the example, I would say that it will return as 2 instead 6, as to subtract / reduce instead to add / boost, right?

Come to thought, I did skipped this one... what does this one do? ==, a double =...? not "=?", lol
Purple, i didn't mean this =?, hahaha. I mean = itself with a question mark as a signal of the end of my question. XD

Ah okay.

Diver, oh i see! Thanks!

So, I just saw one new as -=... since Diver gave the example, I would say that it will return as 2 instead 6, as to subtract / reduce instead to add / boost, right?

Come to thought, I did skipped this one... what does this one do? ==, a double =...? not "=?", lol
== is used to compare instead of assign, usually in a conditional or loop.

I forget how ruby handles it exactly (if it brings up an error or goes ahead with the syntax) but "if x=3", for example, leads to a logical error because instead of comparing x to 3 the interpreter assigns 3 to the variable x.
so... single = will be used on non-loop / non-conditional either while double will be used instead?
Bump...

Am I correct... or incorrect? .__."
Hello!

Double equal sign (==) is always used to compare, while single equal sign (=) is always used to assign:

Code:
x = 2if x == 2  p 'x is 2'end
Oh I think I get you... single = is like... overwriting the variable while double = is to check and see if it's equal to the non-variable number or not, without overwriting it. If so, then yeah I get you! I already wrote that kind of coding in different language which is very often. XP

Original thread: https://forums.rpgmakerweb.com/threads/new-here-at-rgss3-ace.40323/