Stats increase as certain attacks are successful

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
wouldn't it be 5?

0 = E

1 = D

2 = C

3 = B

4 = A

5 = S
yes it would (read comment above the one i quoted, important info [took me forever to type])
 
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
You don't put the 1121 there... copy paste my code directly and don't edit the def addstat(user,target,paramid,bonus) line... 

You put the values only when you're calling the method...

Like, on the damage formula:

addstat(a,b,2,1)

Also, I forgot to write it down but the whole code should be inside Class_GameBattler

so the custom code should look like this

class Game_Battler < Game_BattlerBase

   Paste code here

end

btw, you should probably get yanfly's anti-fail script so that when you use skills that deal no damage but uses the formula bar, it won't show a fail message
 
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 don't put the 1121 there... copy paste my code directly and don't edit the def addstat(user,target,paramid,bonus) line... 

You put the values only when you're calling the method...

Like, on the damage formula:

addstat(a,b,2,1)

Also, I forgot to write it down but the whole code should be inside Class_GameBattler

so the custom code should look like this

class Game_Battler < Game_BattlerBase

   Paste code here

end

btw, you should probably get yanfly's anti-fail script so that when you use skills that deal no damage but uses the formula bar, it won't show a fail message
Okay ill be sure to get the yanfly script (later today or tonight or tomorrow), also i'm probably being an idiot right now but where Exactly do i put it (iv'e put it at the start and end, the end is what most concerns me it gives an error saying...\

Problem 3 pt 3.png

Sorry if you cant see the image too well i had to save a bit of space 
 
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
You forgot a comma at the last line inside the hash, it should be 3 => 0,}

when working with hashes, always put a comma at the last line, else it will error

and you don't really need to put it inside the default Game_Battler script you know...

you could, and I suggest that you do create a new script then put this:

class Game_Battler < Game_BattlerBase

then paste your code

then type 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
You forgot a comma at the last line inside the hash, it should be 3 => 0,}

when working with hashes, always put a comma at the last line, else it will error

and you don't really need to put it inside the default Game_Battler script you know...

you could, and I suggest that you do create a new script then put this:

class Game_Battler < Game_BattlerBase

then paste your code

then type end
i thought you meant put it in the game_battler script (shows you my knoledge in a nutshelll)
 

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 fine to do it, but it's better to just do it in another script... XD...
 

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
it's fine to do it, but it's better to just do it in another script... XD...
well it works, or well runs without popping an error at my face every 5 seconds (welcome to errorville, population: me)

and i had an error with the end thing i had to type 4 to get it to stop but now i put in the dammage formula 'customattack (a, b, 2, 1)' correct? and if so the script will function or was that a different script?
 
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
you put:

addstat(a,b,2,1)
 

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
ok so id put addstat(a,b,2,1); a.atk * 4 - b.def * 2 or is the add stat thing why you wanted me to get the anti-fail script in the first place?
 

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
Ah... You only need the anti-fail script if you have a skill that would use the addstat but has no damage... if it deals damage, then you don't need it...
 
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
Ah... You only need the anti-fail script if you have a skill that would use the addstat but has no damage... if it deals damage, then you don't need it...
Umm using either the add stat alone or the formula i wrote addstat(a, b, 2, 1); a.atk * 4 - b.def * 2  dont deal dammage to either party (party being anyone/anything in battle)

Edit: dont get confused i mean it doesnt deal dammage but uses the addstat for some random reason so it sais slime took no dammage instead of 

slime took 217 dammage (yes slimes are weak, problem?)
 
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
but it doesn't give an error? hmmmm...

I can't really test it now, but I can test when I get home this evening and try to find a fix and get back to you tomorrow...
 
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
but it doesn't give an error? hmmmm...

I can't really test it now, but I can test when I get home this evening and try to find a fix and get back to you tomorrow...
One quick note for when you get back: a new error has arisen, i replaced this with this and it brings up this with any successful attack 

Problem 3 pt 4.png

im assuming its asking for the replacement of ':' with 'end'
 

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
: is used for the ? conditionals... 

try this

 def addstat(user,target,paramid,bonus,dam="0")

        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

               eval(dam)

        end

    end

then on the formula bar:

addstat(a,b,2,1,"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
: is used for the ? conditionals... 

try this

 def addstat(user,target,paramid,bonus,dam="0")

        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

               eval(dam)

        end

    end

then on the formula bar:

addstat(a,b,2,1,"a.atk*4 - b.def-2")
Drum roll please, http://www.youtube.com/watch?v=t925JwYXhVA It DOESNT do dammage  ;_; i copy/pasted the script (the part  knew i was gonna replace i deleted ) and replaced it and the did the same for the formula (just my average sunday my modays are better) also you need a third end there bud otherwise you will get errors. (am i just prone to finding bugs can someone else please test this to confirm my supisions as correct? i might just be [or am] a complete idiot)  :headshake:
 

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
oh wait, I placed the eval part on the wrong spot... also, the end number is right, unless you deleted the end for Game_Battler too when you deleted the def...

                   end

               eval(dam)

        end

    end

 

this should be

 

                   end

        end

        eval(dam)

    end

 

if it still won't do damage, then I need to test it first myself later... so we cannot continue until tomorrow...
 
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
There should be 4 ends correct? I cant seem to put 4 and if 5 no matter where i put the eval(dam) part no damage is dealt and an interesting location for it is here 

Problem 3 pt 5.png because it pops up with this Problem 3 pt 6.png
 

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
yes 4 for the def, but I didn't add the first one since it's already above the line that you need to edit anyway... there will be 5 in total though because of the "end" for the class itself

the eval part should be between end 3 and end 4, because end 4 is the end keyword for the method (def), so since you placed eval after that, the eval was already outside of the method

the script should look like

class Game_Battler < Game_BattlerBase

#the rank hash and variable here

def addstat(user,target,paramid,bonus,dam="0")

        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

        eval(dam)

    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
yes 4 for the def, but I didn't add the first one since it's already above the line that you need to edit anyway... there will be 5 in total though because of the "end" for the class itself

the eval part should be between end 3 and end 4, because end 4 is the end keyword for the method (def), so since you placed eval after that, the eval was already outside of the method

the script should look like

class Game_Battler < Game_BattlerBase

#the rank hash and variable here

def addstat(user,target,paramid,bonus,dam="0")

        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

        eval(dam)

    end

end
I think i see the problem because of my flaming eye, the damage value (dam) has ="0" which sets all damage dealt to 0 correct? and because of this said reason it always does NO damage to enemies or characters or do the quotations cancel that out (i don't know i'm not a scripter i'm just sometimes good at pointing out peoples mistakes) but i'm pretty sure you've tested this at least once with this and got damage but i get none:

here's proof im not yanking your chain: 

Problem 3 pt 7.png

I currently have 7 images of this problem specifically saved
 

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
nope, it only sets it to zero if you don't put a value for it in the call

if you do addstat(a,b,2,1), then it sets dam to 0

but if you do addstat(a,b,2,1,"100"), then it sets dam to 100

if I only did it like

def addstat(a,b,2,1,dam)

#things here

end 

then doing addstat(a,b,2,1) in the formula bar will throw you an argument count error saying you only sent 4 parameters instead of 5...

so if the new code still returns no damage, then it might mean that the argument you sent isn't evaluated...

you can also try using

addstat(a,b,2,1,"user.atk*4-target.def*2")

instead of 

addstat(a,b,2,1,"a.atk*4-b.def*2")
 
Last edited by a moderator:

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