Stats increase as certain attacks are successful

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
you can do like I believe:

a.actor? a.add_param(2, 1) :  nil ; a.atk * 4 - b.def * 2
 
Last edited by a moderator:

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
you can do like I believe:

a.actor? a.add_param(2, 1) :  nil ; a.atk * 4 - b.def * 2
Edit: im stupid  :| i didnt copy/paste i just wrote the first part

Edit (again): The game crashes with an unknown value error (i think) because slimes are not actors I'd have to set up another attack for enemies themselves to use it to where the don't get a bonus. Finally, I thought for MYSELF and it makes sense but... the stats i'm looking for increase is all not just attack and guard can be edited but not an evade, it's random, so a script is needed... unless you can check for a successful evade but i'm assuming it's impossible or extremely difficult
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
evade is also a stat so you can modify that too...

anyway, it should work because the first thing it does is check if it's an actor, if not it goes directly to the damage part...

or maybe the formula bar just doesn't accept the condition? true: false thing...

btw, try adding another ? and see if it works
 

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
evade is also a stat so you can modify that too...

anyway, it should work because the first thing it does is check if it's an actor, if not it goes directly to the damage part...

or maybe the formula bar just doesn't accept the condition? true: false thing...

btw, try adding another ? and see if it works
Maybe later busy ATM but if it works ill edit this comment
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
if it doesn't work, then maybe you can just do this... create a new script and put

class Game_Battler < Game_BattlerBase

    def customattack(user,target)

        if user.actor?

            user.add_param(2, 1) 

        end

        return user.atk * 4 - target.def * 2

    end

end

then in your damage formula, just put

customattack(a, B)
 
Last edited by a moderator:

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
ok it works but im still gonna wait for a full script because it only does the normal attack im looking to customize it for all skills and im looking for evade gaurd and such
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Not only does it work its amazing but, enemies use the bonus too this is why i'm looking for a script and the attack is a bit OP so my characters will have to start at one but level it up as time goes on
Have a separate attack skill for your enemies that of course doesn't give the param growth. Make sure you set that new enemy attack to their attack patterns,
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You can use it for any skill actually... just a small modification so that you can specify which stat to grow and how much right on the formula bar

class Game_Battler < Game_BattlerBase

    def addstat(user,paramid,bonus)

        if user.actor?

            user.add_param(paramid, bonus) 

        end

    end

end

then to use it (the caster gains bonus):

addstat(a,2,1); damage formula here if you need damage

then if you want the target to gain the bonus:

addstat(b,2,1); damage formula here if you need damage
 
Last edited by a moderator:

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
You can use it for any skill actually... just a small modification so that you can specify which stat to grow and how much right on the formula bar

class Game_Battler < Game_BattlerBase

    def addstat(user,paramid,bonus)

        if user.actor?

            user.add_param(paramid, bonus) 

        end

    end

end

then to use it (the caster gains bonus):

addstat(a,2,1); damage formula here if you need damage

then if you want the target to gain the bonus:

addstat(b,2,1); damage formula here if you need damage
Don't forget that im looking for ranks for enemies/allies so it determines how often the stat increase does what it does to the certain attacks read back through the script request and you'll find out what i mean but nice work on this it's great but im looking for special things that a full script would need to be worked out instead of a sort of 'snip-it' script code
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You can just edit the formula I gave you to use the ranks... Just play with it and you can easily do whatever you want with it...

as for making ranks, if you haven't done anything yet:

For enemies: Just make a new hash or array, then for each enemy id, set a corresponding rank then you can retrieve that for the formula

for the users, it's more complicated as you can change ranks in-game right?

class Game_Battler < Game_BattlerBase

 EN_RANKS = {1 => 0,

                        2 => 0,

                        3 => 4,

                        and so on for all enemies



    def addstat(user,target,paramid,bonus)

        if user.actor?

                if target.enemy?

                    if target.EN_RANKS[target.enemy.id] == something  => not sure if it's the right one

                        user.add_param(paramid, bonus) 

                    end

                end

        end

    end

end

Note that this is just to give you the idea of how you can edit it to make what you want... it's not guaranteed to work... You see, I'm more of a fan of give you the base, then teach you how you can modify it to your liking...
 
Last edited by a moderator:

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
You can just edit the formula I gave you to use the ranks... Just play with it and you can easily do whatever you want with it...

as for making ranks, if you haven't done anything yet:

For enemies: Just make a new hash or array, then for each enemy id, set a corresponding rank then you can retrieve that for the formula

for the users, it's more complicated as you can change ranks in-game right?

class Game_Battler < Game_BattlerBase

 EN_RANKS = {1 => 0,

                        2 => 0,

                        3 => 4,

                        and so on for all enemies



    def addstat(user,target,paramid,bonus)

        if user.actor?

                if target.enemy?

                    if target.EN_RANKS[target.enemy.id] == something  => not sure if it's the right one

                        user.add_param(paramid, bonus) 

                    end

                end

        end

    end

end

Note that this is just to give you the idea of how you can edit it to make what you want... it's not guaranteed to work... You see, I'm more of a fan of give you the base, then teach you how you can modify it to your liking...
Nice this is kinda great obviously doesn't solve my whole request but is cool to know someone is actually trying to work on something for this!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
it's not really a hard thing to do once you learn a bit of how the game flows... especially adding things to skill effects...

btw, how do you plan for the character ranks? do they change throughout the game?
 

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
it's not really a hard thing to do once you learn a bit of how the game flows... especially adding things to skill effects...

btw, how do you plan for the character ranks? do they change throughout the game?
yes the character ranks do change throughout the game (every time you beat a boss actually) and then it takes your rank and the enemy rank and if both the same 75% chance of stat increase if the enemy is higher it increases by 5% for every rank higher and for every rank below the enemy is a 10% decrease to the chance classes are labeld from what i think was E to S (S being you beat the game, E being you've just started and haven't defeated anything) and through simple event script calling it can increase or decrease a rank with almost no problems (depends on how the script is made)
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
So the rank is general for the party and not just per player right? then it's easier to do...
 

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
So the rank is general for the party and not just per player right? then it's easier to do...
Yes the rank is general to the party NOT the separate members (probably should have took that into consideration when i wrote the script request)

WARNING: Making an edit to the request to add this into the info (sorry to all that started making the script hope it isn't too much trouble for you guys) 
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
then you just need to add a new variable (a global one, $rank maybe), and add that to the checking part... then when you need to increase ranks just do

$rank = value

EN_RANKS = {1 => 0,

                        2 => 0,

                        3 => 4,

                        and so on for all enemies



$rank = 0

    def addstat(user,target,paramid,bonus)

        if user.actor?

                if target.enemy?

                   chance = 75

                   gap = $rank - target.EN_RANKS[target.enemy.id]

                    if gap > 0 

                        chance += 5*gap

                    else

                        chance -= 10*gap

                    end

                    if rand(100) <= chance 

                        user.add_param(paramid, bonus) 

                    end

                end

        end

    end

end
 
Last edited by a moderator:

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
then you just need to add a new variable (a global one, $rank maybe), and add that to the checking part... then when you need to increase ranks just do

$rank = value

EN_RANKS = {1 => 0,

                        2 => 0,

                        3 => 4,

                        and so on for all enemies



$rank = 0

    def addstat(user,target,paramid,bonus)

        if user.actor?

                if target.enemy?

                   chance = 75

                   gap = $rank - target.EN_RANKS[target.enemy.id]

                    if gap > 0 

                        chance += 5*gap

                    else

                        chance -= 10*gap

                    end

                    if rand(100) <= chance 

                        user.add_param(paramid, bonus) 

                    end

                end

        end

    end

end
0 being E correct? so i'd do something like this

{ 0 => 0, 0 => 1,  0 =>2 until i reach the S rank (4) and i'd do this 2 => 0, etc. Correct?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
the hash is for enemies

EN_RANK {

 1 => 0,

}

this means that enemy 1 (enemy number 1 in enemies tab of the database) is rank 0 (E), then you do that for all enemies

for the party, just use the $rank variable... 

when you want to level them up to rank 1, then you'd do a script call

$rank = 1

NOTE: I'm not sure if the target.enemy.id works, it might not be the correct call... XD
 
Last edited by a moderator:

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
the hash if for enemies

EN_RANK {

 1 => 0,

}

this means that enemy 1 is rank 0 (E), then you do that for all enemies

for the party, just use the $rank variable... 

when you want to level them up to rank 1, then you'd do a script call

$rank = 1
Oh o.k. I Understand ALOT better now, so if i were to do this for the demon god (a final boss in some games) I would do 30 => 4 to represent the demon god as being rank S?

Edit: I used it but when i started the game first it said error on line 25 (the last end for me) so i removed it and i added the things in the parentheses User target parmeter and bonus but it poped up with this error

Problem 3 pt 1.png

Heres the script (dont mid the extra edit in the bottom its just so my image editing software doesnt have to do much)

Problem 3 pt 2.png

And finally line 25 is the first part 

26 the second 

27 third

and 28 the fourth
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
wouldn't it be 5?

0 = E

1 = D

2 = C

3 = B

4 = A

5 = S
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top