Daxter 1 Report post Posted July 27, 2023 Hi, I've found the stat growth tables in AttrCalculate.lua, like this: --Attributes Growth Rate of Newbie Class Mxhp_con_rad1[JOB_TYPE_XINSHOU], Mxhp_con_rad2[JOB_TYPE_XINSHOU], Mxhp_lv_rad[JOB_TYPE_XINSHOU] = 3, 2, 15 --Max Hp Mxsp_sta_rad1[JOB_TYPE_XINSHOU], Mxsp_sta_rad2[JOB_TYPE_XINSHOU], Mxsp_lv_rad[JOB_TYPE_XINSHOU] = 1, 0, 3 --Max Sp Mnatk_str_rad1[JOB_TYPE_XINSHOU], Mnatk_str_rad2[JOB_TYPE_XINSHOU], Mnatk_dex_rad1[JOB_TYPE_XINSHOU], Mnatk_dex_rad2[JOB_TYPE_XINSHOU] = 1.5, 0.4, 0, 0 --Minimum Attack Mxatk_str_rad1[JOB_TYPE_XINSHOU], Mxatk_str_rad2[JOB_TYPE_XINSHOU], Mxatk_dex_rad1[JOB_TYPE_XINSHOU], Mxatk_dex_rad2[JOB_TYPE_XINSHOU] = 1.5, 0.4, 0, 0 --Maximum Attack Def_con_rad1[JOB_TYPE_XINSHOU], Def_con_rad2[JOB_TYPE_XINSHOU] = 0.1, 0.1 --Defense Hit_dex_rad1[JOB_TYPE_XINSHOU], Hit_dex_rad2[JOB_TYPE_XINSHOU] = 0.6, 0 --Hit-Rate Flee_agi_rad1[JOB_TYPE_XINSHOU], Flee_agi_rad2[JOB_TYPE_XINSHOU] = 0.6, 0 --Dodge Rate Mf_luk_rad[JOB_TYPE_XINSHOU] = 0.39 --Luck Crt_luk_rad[JOB_TYPE_XINSHOU] = 0.31 --Crit Hrec_bsmxhp_rad[JOB_TYPE_XINSHOU], Hrec_con_rad[JOB_TYPE_XINSHOU] = 1/200, 1/8 --Hp Recovery Srec_bsmxsp_rad[JOB_TYPE_XINSHOU], Srec_sta_rad[JOB_TYPE_XINSHOU] = 1/100, 1/12 --Sp Recovery Aspd_agi_rad[JOB_TYPE_XINSHOU] = 1.1 --Attack Speed Str_updata[JOB_TYPE_XINSHOU] = 0.2 Dex_updata[JOB_TYPE_XINSHOU] = 0.1 Con_updata[JOB_TYPE_XINSHOU] = 0.6 Agi_updata[JOB_TYPE_XINSHOU] = 0.1 Sta_updata[JOB_TYPE_XINSHOU] = 0.1 Luk_updata[JOB_TYPE_XINSHOU] = 0.1 My questions are: Is there a generic/default table for classes that do not have these attributes defined as above? How can I define base Movement Speed values? And, out of curiosity, can they change per class? Is there a similar way to edit stats on boats, or are those defined by items/per boat? And if so, can boat movement speed be edited as well? Thank you, Quote Share this post Link to post Share on other sites
Daxter 1 Report post Posted July 29, 2023 I've managed to find this regarding boats: However, I'm still at a loss for the remaining questions, so any help is welcome Quote Share this post Link to post Share on other sites
Mdrst 38 Report post Posted July 30, 2023 @Daxter - Is there a generic/default table for classes that do not have these attributes defined as above? If SetCharaAttr() is not called, I believe the default value for attributes is the one defined for that entity inside Characterinfo.txt. - How can I define base Movement Speed values? The movement speed attribute has an alias of ATTR_MSPD. It is calculated from base movement speed (ATTR_BMSPD) and items/status effects: function Mspd_final(a) local mspd_final=math.max ( BSMspd(a) * 0.3 , ( (BSMspd(a) * MspdIa(a) + MspdIb(a) ) * math.max ( 0.3 , MspdSa(a)) + MspdSb(a) ) ) --[[取当时实际mspd]]-- return mspd_final end From what I can see, originally ATTR_BMSPD is simply the base movement speed of that unit, which is defined in CharacterInfo.txt. You can change it there if you want to change a character's speed. If you want to tweak it based on class, first add a list to store the values: Mspd_mod = {} Then, you must add one entry per class following this syntax: --Attributes Growth Rate of Newbie Class ... ... Mspd_mod[JOB_TYPE_XINSHOU] = 1.1 -- Pick an arbitrary modifier here to be used later at ExAttrCheck() At function ExAttrCheck(role), you will define what the final base movement speed will be: -- The function can be anything you want, e.g. based on the modifier list or it could be based on players attributes: -- Just don't forget that the basic movement speed is the one from CharacterInfo!! local basic_mspd = 400 -- Taken from CharacterInfo local mspd = basic_mspd + math.floor(mspd_mod[job] * 10 * Agi(role) ) SetCharaAttr(mspd, role, ATTR_BMSPD) There could be side effects to changing the base movement speed, so an alternative would be to edit function BSMspd(a) at functions.lua. 1 Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
Daxter 1 Report post Posted July 31, 2023 Thank you so much! Quote Share this post Link to post Share on other sites