3TAJIOH Posted January 28, 2019 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 73 Reputation: 1 Joined: 11/27/18 Last Seen: August 4, 2024 Share Posted January 28, 2019 Where can I edit stat bonuses? Need to add bonus to ATK from STR stats. Quote Link to comment Share on other sites More sharing options...
0 3TAJIOH Posted January 31, 2019 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 73 Reputation: 1 Joined: 11/27/18 Last Seen: August 4, 2024 Author Share Posted January 31, 2019 Solution https://github.com/rathena/rathena/commit/efd61daeea454b936943430ad8be308df0ca5ca9 Quote Link to comment Share on other sites More sharing options...
0 utofaery Posted January 28, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 228 Reputation: 19 Joined: 10/27/12 Last Seen: March 17, 2019 Share Posted January 28, 2019 db/pre-re/item_db.txt db/Re/item_db.txt Quote Link to comment Share on other sites More sharing options...
0 3TAJIOH Posted January 28, 2019 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 73 Reputation: 1 Joined: 11/27/18 Last Seen: August 4, 2024 Author Share Posted January 28, 2019 I need bonus from base STR. Quote Link to comment Share on other sites More sharing options...
0 lllaaazzz Posted January 29, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 154 Reputation: 6 Joined: 10/14/17 Last Seen: February 16, 2019 Share Posted January 29, 2019 (edited) Hey im just gonna answer you here I looked at these formulas for days and couldnt find anything specific for players, only things for homs and monsters... so that made me assume that were going off more "strict" values that are much harder to adjust. . . but i did this in status.c look for this void status_calc_misc(struct block_list *bl, struct status_data *st, int level) { nullpo_retv(bl); nullpo_retv(st); //Non players get the value set, players need to stack with previous bonuses. if ( bl->type != BL_PC ) st->batk = st->hit = st->flee = st->def2 = st->mdef2 = st->cri = st->flee2 = 0; (notice how bl->type != [does not equal to] BL_PC (PLAYER) ) is blank, that means mobs dont get atk bonus from str incase you wanted to add that all i did was add if ( bl->type == BL_PC ) st->batk = st->str * 150; right underneath so it looks like this now : void status_calc_misc(struct block_list *bl, struct status_data *st, int level) { nullpo_retv(bl); nullpo_retv(st); //Non players get the value set, players need to stack with previous bonuses. if ( bl->type != BL_PC ) st->batk = st->hit = st->flee = st->def2 = st->mdef2 = st->cri = st->flee2 = 0; if ( bl->type == BL_PC ) st->batk = st->str * 150; #ifdef RENEWAL // renewal formulas if ( bl->type == BL_HOM ) { And my ATK spiked like crazy, im willing to bet money that it wont hurt your game besides maybe a few skills that use str in the formulas like beast strafing Id love for someone to correct me though Edited January 29, 2019 by lllaaazzz Quote Link to comment Share on other sites More sharing options...
0 lllaaazzz Posted January 29, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 154 Reputation: 6 Joined: 10/14/17 Last Seen: February 16, 2019 Share Posted January 29, 2019 /*========================================== * Calculates the standard damage of a normal attack assuming it hits, * it calculates nothing extra fancy, is needed for magnum breaks WATK_ELEMENT bonus. [Skotlex] *------------------------------------------ * Pass damage2 as NULL to not calc it. * Flag values: // TODO: Check whether these values are correct (the flag parameter seems to be passed through to other functions), and replace them with an enum. * &1: Critical hit * &2: Arrow attack * &4: Skill is Magic Crasher * &8: Skip target size adjustment (Extremity Fist?) *&16: Arrow attack but BOW, REVOLVER, RIFLE, SHOTGUN, GATLING or GRENADE type weapon not equipped (i.e. shuriken, kunai and venom knives not affected by DEX) */ /* 'battle_calc_base_damage' is used on renewal, 'battle_calc_base_damage2' otherwise. */ // FIXME: Missing documentation for flag2 int64 battle_calc_base_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2) { int64 damage; struct status_data *st = status->get_status_data(src); struct status_change *sc = status->get_sc(src); const struct map_session_data *sd = NULL; nullpo_retr(0, src); sd = BL_CCAST(BL_PC, src); if ( !skill_id ) { s_ele = st->rhw.ele; s_ele_ = st->lhw.ele; if (sd != NULL) { if (sd->charm_type != CHARM_TYPE_NONE && sd->charm_count >= MAX_SPIRITCHARM) { s_ele = s_ele_ = sd->charm_type; } if (flag&2 && sd->bonus.arrow_ele != 0) s_ele = sd->bonus.arrow_ele; } } if (src->type == BL_PC) { int64 batk; // Property from mild wind bypasses it if (sc && sc->data[SC_TK_SEVENWIND]) batk = battle->calc_elefix(src, bl, skill_id, skill_lv, status->calc_batk(bl, sc, st->batk, false), nk, n_ele, s_ele, s_ele_, false, flag); else batk = battle->calc_elefix(src, bl, skill_id, skill_lv, status->calc_batk(bl, sc, st->batk, false), nk, n_ele, ELE_NEUTRAL, ELE_NEUTRAL, false, flag); if (type == EQI_HAND_L) damage = batk + 3 * battle->calc_weapon_damage(src, bl, skill_id, skill_lv, &st->lhw, nk, n_ele, s_ele, s_ele_, status_get_size(bl), type, flag, flag2) / 4; else damage = (batk << 1) + battle->calc_weapon_damage(src, bl, skill_id, skill_lv, &st->rhw, nk, n_ele, s_ele, s_ele_, status_get_size(bl), type, flag, flag2); } else { damage = (st->batk + 15) + battle->calc_weapon_damage(src, bl, skill_id, skill_lv, &st->rhw, nk, n_ele, s_ele, s_ele_, status_get_size(bl), type, flag, flag2); } return damage; } int64 battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag) { unsigned int atkmin=0, atkmax=0; short type = 0; int64 damage = 0; nullpo_retr(damage, st); nullpo_retr(damage, wa); if (!sd) { //Mobs/Pets if(flag&4) { atkmin = st->matk_min; atkmax = st->matk_max; } else { atkmin = wa->atk; atkmax = wa->atk2; } if (atkmin > atkmax) atkmin = atkmax; } else { //PCs atkmax = wa->atk; type = (wa == &st->lhw)?EQI_HAND_L:EQI_HAND_R; if (!(flag&1) || (flag&2)) { //Normal attacks atkmin = st->dex; if (sd->equip_index[type] >= 0 && sd->inventory_data[sd->equip_index[type]]) atkmin = atkmin*(80 + sd->inventory_data[sd->equip_index[type]]->wlv*20)/100; if (atkmin > atkmax) atkmin = atkmax; if(flag&2 && !(flag&16)) { //Bows atkmin = atkmin*atkmax/100; if (atkmin > atkmax) atkmax = atkmin; } } } if (sc && sc->data[SC_MAXIMIZEPOWER]) atkmin = atkmax; //Weapon Damage calculation if (!(flag&1)) damage = (atkmax>atkmin? rnd()%(atkmax-atkmin):0)+atkmin; else damage = atkmax; if (sd) { //rodatazone says the range is 0~arrow_atk-1 for non crit if (flag&2 && sd->bonus.arrow_atk) damage += ( (flag&1) ? sd->bonus.arrow_atk : rnd()%sd->bonus.arrow_atk ); //SizeFix only for players if (!(sd->special_state.no_sizefix || (flag&8))) damage = damage * ( type == EQI_HAND_L ? sd->left_weapon.atkmods[t_size] : sd->right_weapon.atkmods[t_size] ) / 100; } //Finally, add baseatk if(flag&4) damage += st->matk_min; else damage += st->batk; //rodatazone says that Overrefined bonuses are part of baseatk //Here we also apply the weapon_atk_rate bonus so it is correctly applied on left/right hands. if(sd) { if (type == EQI_HAND_L) { if(sd->left_weapon.overrefine) damage += rnd()%sd->left_weapon.overrefine+1; if (sd->weapon_atk_rate[sd->weapontype2]) damage += damage * sd->weapon_atk_rate[sd->weapontype2] / 100; } else { //Right hand if(sd->right_weapon.overrefine) damage += rnd()%sd->right_weapon.overrefine+1; if (sd->weapon_atk_rate[sd->weapontype1]) damage += damage * sd->weapon_atk_rate[sd->weapontype1] / 100; } } return damage; } int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int flag) { #ifdef RENEWAL int min = 0, max = 0; struct status_change *sc = status->get_sc(bl); nullpo_ret(bl); nullpo_ret(watk); if (bl->type == BL_PC && watk->atk) { float strdex_bonus, variance; int dstr; if (flag&2) dstr = status_get_dex(bl); else dstr = status_get_str(bl); variance = 5.0f * watk->atk * watk->wlv / 100.0f; strdex_bonus = watk->atk * dstr / 200.0f; min = (int)(watk->atk - variance + strdex_bonus) + watk->atk2; max = (int)(watk->atk + variance + strdex_bonus) + watk->atk2; } else if ((bl->type == BL_MOB || bl->type == BL_MER) && watk->atk) { min = watk->atk * 80 / 100; max = watk->atk * 120 / 100; } else if (bl->type == BL_HOM && watk->atk) { if (flag & 4) { max = min = status->get_matk(bl, 2); } else { min = watk->atk; max = watk->atk2; } } if (!(flag&1)) { if (max > min) max = min + rnd()%(max - min + 1); else max = min; } if ( bl->type == BL_PC && !(flag & 2) ) { const struct map_session_data *sd = BL_UCCAST(BL_PC, bl); short index = sd->equip_index[EQI_HAND_R], refine; if ( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON && (refine = sd->status.inventory[index].refine) < 16 && refine ) { int r = status->dbs->refine_info[watk->wlv].randombonus_max[refine + (4 - watk->wlv)] / 100; if ( r ) max += (rnd() % 100) % r + 1; } if (sd->charm_type == CHARM_TYPE_LAND && sd->charm_count > 0) max += 10 * max * sd->charm_count / 100; } max = status->calc_watk(bl, sc, max, false); return max; #else return 0; #endif } You can change the damage variance pretty easily but i cant see an easy tweak to ATK using STR but that may just be my lack of knowledge Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted January 30, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 30, 2019 - script ksfjskfd 1_F_MARIA,{ OnPCStatCalcEvent: if ( readparam(bStr) >= 100 ) bonus bAtk, 1000; end; } 1 1 Quote Link to comment Share on other sites More sharing options...
0 utofaery Posted January 30, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 228 Reputation: 19 Joined: 10/27/12 Last Seen: March 17, 2019 Share Posted January 30, 2019 lllaaazzz: Why do you need to dig so far and so deep to that far to the source when it all can be done in item bonus which is not even close to the source?? On 1/28/2019 at 11:57 PM, 3TAJIOH said: I need bonus from base STR. the only thing or command you will need is Id: 2589 AegisName: "Fallen_Angel_Wing" bonus bAtk,readparam(bStr)/20; Id: 4303 AegisName: "Whisper_Boss_Card" if(readparam(bStr)>=80) { bonus bBaseAtk,20; } Id: 4562 AegisName: "Champion_Card" bonus bAtkRate,7; Quote Link to comment Share on other sites More sharing options...
0 lllaaazzz Posted January 30, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 154 Reputation: 6 Joined: 10/14/17 Last Seen: February 16, 2019 Share Posted January 30, 2019 (edited) 14 minutes ago, utofaery said: lllaaazzz: Why do you need to dig so far and so deep to that far to the source when it all can be done in item bonus which is not even close to the source?? the only thing or command you will need is Id: 2589 AegisName: "Fallen_Angel_Wing" bonus bAtk,readparam(bStr)/20; Id: 4303 AegisName: "Whisper_Boss_Card" if(readparam(bStr)>=80) { bonus bBaseAtk,20; } Id: 4562 AegisName: "Champion_Card" bonus bAtkRate,7; maybe cause i dont understand what he wants and just providing what i know he asked me this in another thread : "Why I dont have ATK bonuses on my pre-renewal server?) Bonus to MATK works correctly." Why would i respond with such a simple thing i assumed was the basics . . . Edited January 30, 2019 by lllaaazzz Quote Link to comment Share on other sites More sharing options...
0 utofaery Posted January 30, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 228 Reputation: 19 Joined: 10/27/12 Last Seen: March 17, 2019 Share Posted January 30, 2019 4 hours ago, lllaaazzz said: maybe cause i dont understand what he wants and just providing what i know he asked me this in another thread : "Why I dont have ATK bonuses on my pre-renewal server?) Bonus to MATK works correctly." Why would i respond with such a simple thing i assumed was the basics . . . So what he wanted is a Pre-RE mechanics? and the bonuses from Pre-RE mechanics? is not what he wanted and he wanted to change it? or he wanted to change equipment bonuses ? or player bonuses?? He is not clear on this... Quote Link to comment Share on other sites More sharing options...
0 molecules Posted December 16, 2020 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 4 Reputation: 0 Joined: 12/04/20 Last Seen: September 3, 2022 Share Posted December 16, 2020 On 1/30/2019 at 6:11 AM, utofaery said: lllaaazzz: Why do you need to dig so far and so deep to that far to the source when it all can be done in item bonus which is not even close to the source?? the only thing or command you will need is Id: 2589 AegisName: "Fallen_Angel_Wing" bonus bAtk,readparam(bStr)/20; Id: 4303 AegisName: "Whisper_Boss_Card" if(readparam(bStr)>=80) { bonus bBaseAtk,20; } Id: 4562 AegisName: "Champion_Card" bonus bAtkRate,7; Hi, Totally out of the topic question, do you know how to edit src where to the bonus bAtkrate,7; would show on the ( alt+a ) atk stat Quote Link to comment Share on other sites More sharing options...
Question
3TAJIOH
Where can I edit stat bonuses? Need to add bonus to ATK from STR stats.
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.