Dekita - Perfect Stat Point Distribution system

i've been playing around with damage formulas to make the mag str vit and dex stat take effect in them, but the formulas either dont work right (using mag stat instead of counter) or dont work at all

this is the only formula that seems to work

((A.ATK*2+A.AGI*3+A.DEX*1.5)-(D.DEF*1.5+D.AGI*2))/#hit
they should work perfectly fine, i also use them in skill formula's as im slowly writing a skill system to go along with my project, heres a few basic examples of mine

((a.vit * 2) + (a.mhp)) - ((b.vit * 2.5) + (b.def + b.str))

((a.vit + a.mag + a.str + a.dex * 1.2) - (b.vit + b.mag + b.str + b.dex * 0.8))

if your still having problems let me know (also make sure your on v1.7)
not sure about being on v1.7 i might update it and check

but the only problem i'm having is the magic counter stat and the actual magic stat it doesnt even work when i change the terms for either
do you mean the magic counter stat that comes as a default in rpg vx ace AND the magic stat that i have created?

and is your problem that they arent calculating the value during the damage formula ? or its miscalculating it ?
correct and they seem to either miss calculate or the game crashes when used
ok, so i released v1.8 today 1.8 adds the ability to give each actor a different maximum vit/str/dex and mag , you can set the default value in the script and change each actors max value via script calls, also added the ability to customise the notetags used for the script, i also dramatically increased efficiency

i was also told that i was'nt selling the script enough, meaning its much better than i make it out to be, so i updated the script information and such like things as well
happy.png


also @ Xaigoth il look into that a little more for you, it would really help if you could post the formulas that are causing your game to crash as i havent had any problems with the formulas at all ( i double checked last night and all stats do work in formulas ) however i did notice if you do something like (a.vit * 10) it doesnt return a full x10 value of vit, im not the most experienced person when it comes to formulas though, however, i did not crash my game once, and i tryed quite a few various formulas

also, for anyone wanting to "remove" levels from their game can simply put (in its own script page)



Code:
module LilSnippet
HIDE_LEVELS = false
end # module
############################
class Window_Base < Window #
if LilSnippet::HIDE_LEVELS ##########
def draw_actor_level(actor, x, y) #
end # Overwrite Method ############
end # if ############################
end# end class#######################
#####################################
#####################

and it will remove levels from all? menu's then simply dont let monsters drop any exp ^_^ simples
well the only formulas the crash the game are

A.mag*4+A.int(the new stat you added i jut changed it so i can use it in formula)*15

before changing it to int the formula would switch between which of the two stats was being used in the equation, after it was used i keep getting error ##### (need to copy this down) and such ansd such script call not found and the game crashes
what was int before your "changed" it, whatever it was change it back because int isnt a visable stat that actors have , in the formula box it HAS to be either vit, str, dex, or mag. even if you change the name of your stat it wont change the name of the acctuall stat, just the name you see on screen, behind the screen it has to be what i origionally name them

@ everyone also fixed a small bug today, re-update to v1.9
i switched it to int in the script and it was mag originaly but the there is already a stat called mag, which is why i changed it in the, it would only register one of the two mag stats when in a damage formula i switched it back and thats what happens
there is no default "mag" stat there is "mat" which is magic attack and there is "mdf" which is magic defence , and you can trust me there considering my script modifys/shows all of the default stats 😛
then why does it only use either the mag or mat stat?
Hey Dekita!

Is it possible to tweak your script in a way that, for different actors, the stats will add different bonuses?

I'm creating a game that relies heavily on summons. So, as an example, for normal actors STR would add 0.5 ATK per point, but for actors designated as summons, STR would add 0.3 ATK per point.

I hope it wouldn't be too much of recoding to make that possible, it'd be really nice if you could look into that.
lol, i was dreading someone asking me to do that... i could maybe set up script calls to change each actors gains but it would be a HUGE amount of script calls ( 3 for each stat ) then on top of that i would need to do all four options, wouldnt it be just as effective and alot less time consuming for me if you done something along the lines of this...

in the database, set your summoners parameters to a certain %-age, e.g atk 70%, lets say you done that, if atk for option one increased atk stat by 10, for that character they would only receive 7, it would pretty much work the way your asking for wish much less scripting for me involved lol 😛

if i didnt make sense let me know and il provide some sceenshots of what imean
lol, i was dreading someone asking me to do that... i could maybe set up script calls to change each actors gains but it would be a HUGE amount of script calls ( 3 for each stat ) then on top of that i would need to do all four options, wouldnt it be just as effective and alot less time consuming for me if you done something along the lines of this...

in the database, set your summoners parameters to a certain %-age, e.g atk 70%, lets say you done that, if atk for option one increased atk stat by 10, for that character they would only receive 7, it would pretty much work the way your asking for wish much less scripting for me involved lol 😛

if i didnt make sense let me know and il provide some sceenshots of what imean
The problem with that is, I am mainly looking at the MP Reg stat.

So, some of my actors have a negative MP Reg paramater (they lose 1/6 of their MP each turn), and if they put points into their Mag/Int whatever it's called stat, it would give me positive MP Reg. That mean, the more Int they have, the less MP they will lose per turn.

I can't implement it the way you just said, since that'd mean I'd have to give my other actors a negative MP Reg too. If I don't do that, they will gain a positive MP Reg when putting points into Int, I don't want that either.

Like, your approach sounds a little complicated. Is it not possible to modify the script in a way that, for example, you can designate certain actor ID's that won't recieve certain modifyers? For example, actor 2 won't be affected by bonuses to the MP Reg parameter when putting points into Int.
i thought you wanted for different actors to receive different amounts of increase/decrease e.g actor 1 gets 5 magic attack but actor two only gets 3 magic attack ?

i guess i could implement it so that certain actors simply dont gain any of a certain stat, if thats what you want ?
i thought you wanted for different actors to receive different amounts of increase/decrease e.g actor 1 gets 5 magic attack but actor two only gets 3 magic attack ?

i guess i could implement it so that certain actors simply dont gain any of a certain stat, if thats what you want ?
Well yeah, that would suffice. I really want it primarely for the MRG (MP regen) ex-parameter. So I'd be happy if I could simply remove that for certain actors.

If I want to tweak regular parameters I could simply do it like you already said, through the database.
ummm il have a quick look through the script and see what i can think of, so its only the mp regen stat that you want to be able to stop ?

is it only one actor that can summon or is there more than one ?

also, how many optioins can increase the mp regen ? is it only the one option or have you modified the script customisation to allow for two or more options to increase mp regen ?

if so then i can tell you how to impliment it right now ^^ (for all actors)
ummm il have a quick look through the script and see what i can think of, so its only the mp regen stat that you want to be able to stop ?

is it only one actor that can summon or is there more than one ?

also, how many optioins can increase the mp regen ? is it only the one option or have you modified the script customisation to allow for two or more options to increase mp regen ?

if so then i can tell you how to impliment it right now ^^ (for all actors)
Yes, I want to stop MRG from increasing for Actors 1 and 2. Those are the only 2 actors able to summon. All other actors are Summons.

MRG can only be increased through Mag.
ok, heres what to do,

step 1 - make sure you have version 1.9 of the script, if not you can get it from my blog (link is in my spoiler)

step 2 - go to class Game_Actor < Game_Battler around line 1660

step 3 - put the following peice of code under other attr_reader methods



Code:
attr_reader :gain_mp_reg
step 4 - below the attr_reader methods you should see a method called initialize, replace the method with this



Code:
alias old_initialize initialize
def initialize(actor_id)
old_initialize(actor_id)
@level_up_pts = 0
@atti_ptz = 0
@MAX_VIT = DPB::PSPDS::DEFAULT_MAX_VIT
@MAX_STR = DPB::PSPDS::DEFAULT_MAX_STR
@MAX_DEX = DPB::PSPDS::DEFAULT_MAX_DEX
@MAX_MAG = DPB::PSPDS::DEFAULT_MAX_MAG
@gain_mp_reg = true
end


def stop_mp_reg
@gain_mp_reg = false
end
step 5 - go to the very bottom of the script and you should find a method called "mag_option_stat_mods", within that method you should see



Code:
@actor.add_xparam(8, DPB::PSPDS::OPTION_4_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MRG_RAND_MIN, DPB::PSPDS::OP_4_MRG_RAND_MAX))
simply highlight that and replace it with



Code:
if @actor.gain_mp_reg
@actor.add_xparam(8, DPB::PSPDS::OPTION_4_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MRG_RAND_MIN, DPB::PSPDS::OP_4_MRG_RAND_MAX))
end
step 6 - you can now use a script call like this (replace X with an actors id )



Code:
$game_actors[X].stop_mp_reg
that will stop it for you, however i will update the whole script tonight to include this script call and "stopping" mp regen function for everything, e.g when you give a weapon mag it would still increase the mp regen

is there any other stats that you are wanting to stop ? if so let me know and il try include them, but for now imust leave, good luck with implimenting this in your game and if you cannotdo it i will upload the changes in an update tomorow 🙂
the only problem with the database changes is that you lower or raise the base stats which i dont want to change, though i guess i can do the some math and set the base stats so that they match, now f you could make it to where only certain characters get this growth rate? cause i want the certain characters to only gain stats thru events and certain ones thru lvling and certain ones thru a skill system i'm implementing

Original thread: https://forums.rpgmakerweb.com/threads/dekita-perfect-stat-point-distribution-system.4016/