Capping Aspd, possible to increase through quest.

wallaby

New member
Messages
78
Points
0
Dear all,

Is it possible to cap ASPD to 193 for example as in attainable normally via leveling but if there's a quest completed player's aspd can be made 194-196? Thanks for your time.

 
It is, with some source mod.

 
Urm, thanks for the reply. Anyone has a lead on how to go with the source mod? Thanks again...

 
the easiest is probably setting the aspd cap to the highest aspd you want in the game and adding a check at the end of your calculation of a character's aspd to automatically set the aspd to 193 or its amotion equivalent(if it's higher than that) unless a variable on the character which the quest will assign is not null, in which case capping at 194, 195, 196 etc. depending on the variable's value

there is an infinite amount of ways to go about it though, someone might have a better strategy than me

edit: the guy right below me has your answer

 
Last edited by a moderator:
In src/map/status.c

Find:

st->amotion = cap_value(amotion, ((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd), 2000);

And replace for:

st->amotion = cap_value(amotion, ((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd - ( pc_readglobalreg(sd,script->add_str("Quest_ASPD"))*10) : battle_config.max_aspd - ( pc_readglobalreg(sd,script->add_str("Quest_ASPD"))*10) ), 2000);

Then now the variable "Quest_ASPD" will give a ASPD point to character.

Depending on the number you give, eg: If "Quest_ASPD" is 5, the limit of ASPD for the character will increase to 195 (if max_aspd = 190).

I use this little modification for my personal project.

Regards~

EDIT:

To get this bonus you need relog with the character, or do some function that make a recalculation, for eg. Change Job.

 
Last edited by a moderator:
Wow this is pretty cool Easycore. I'm assuming we could also read from the global registry another value? Lets say they need to complete certain instance or of the such. I just change "Quest_ASPD" to something like "Inst_ASPD"? (Could this possibly be made to read from maybe an array of variables and if such variables equals x they get y ASPD bonus. If Quest_ASPD is 5 and Inst_ASPD is 10 it would grant me x ASPD (like 2). Possible?

 
Last edited by a moderator:
Wow this is pretty cool Easycore. I'm assuming we could also read from the global registry another value? Lets say they need to complete certain instance or of the such. I just change "Quest_ASPD" to something like "Inst_ASPD"? (Could this possibly be made to read from maybe an array of variables and if such variables equals x they get y ASPD bonus. If Quest_ASPD is 5 and Inst_ASPD is 10 it would grant me x ASPD (like 2). Possible?
I'm not very familiar with Arrays, I think that It can be do by scripts, you just need modify the variable.

For eg. some variable that multiplies "Quest_ASPD", or if you wish you can change this:

(pc_readglobalreg(sd,script->add_str("Quest_ASPD"))*10)


For:

(pc_readglobalreg(sd,script->add_str("Quest_ASPD")) ) 
So you will need to multiply "Quest_ASPD" variable by 10.

Every 10 points that you subtract or sumes, ASPD will modify by 1.

 
Thanks so much EasyCore and sorry for the late reply. Forgive me for my "noobness", how do I go about in my script to utilize the Quest_ASPD? Do I go about: set Quest_ASPD,5;? Can I change the Quest_ASPD to something else? Thanks again!

 
Last edited by a moderator:
Back
Top