Gouki Posted September 1 Group: Members Topic Count: 83 Topics Per Day: 0.06 Content Count: 245 Reputation: 12 Joined: 08/12/20 Last Seen: 10 hours ago Share Posted September 1 Hi All, I'm trying to increase the max def and max magic def in pre-renewal, does anyone know where I can find this in SRC? Quote Link to comment Share on other sites More sharing options...
1 Playtester Posted September 2 Group: Developer Topic Count: 35 Topics Per Day: 0.01 Content Count: 839 Reputation: 239 Joined: 01/30/13 Last Seen: 16 hours ago Share Posted September 2 There's no point to give a monster more than 100 DEF in pre-renewal because 100 DEF means 100% damage reduction, so damage is already 0. What are you trying to do? Quote Link to comment Share on other sites More sharing options...
0 Gouki Posted September 2 Group: Members Topic Count: 83 Topics Per Day: 0.06 Content Count: 245 Reputation: 12 Joined: 08/12/20 Last Seen: 10 hours ago Author Share Posted September 2 well, I just migrated re mobs to be activated on pre but i understand that I wont be using them all, so instead of manually editing def and magic def 1 by 1 to make it in pre renewal calc, I plan to increase the max def and max magic def so it wont recognize it as error. Quote Link to comment Share on other sites More sharing options...
0 Playtester Posted September 3 Group: Developer Topic Count: 35 Topics Per Day: 0.01 Content Count: 839 Reputation: 239 Joined: 01/30/13 Last Seen: 16 hours ago Share Posted September 3 What you actually need to do it detect which mobs are renewal mobs by their ID and then when you read in the data, you recalculate their stats from renewal to pre-renewal. I'm not at home right now, but I'll try to remember to post a sample solution later. Quote Link to comment Share on other sites More sharing options...
0 Playtester Posted September 3 Group: Developer Topic Count: 35 Topics Per Day: 0.01 Content Count: 839 Reputation: 239 Joined: 01/30/13 Last Seen: 16 hours ago Share Posted September 3 Attached you can find a patch file that shows how to do it. The patch file contains a few more things and is not up-to-date to latest rAthena (it's from May 2024). What is in the patch: - Replace all unknown drops with Apple and all unknown MVP drops with Elunium - Remove random option feature (doesn't work in pre-re) - Recalculate renewal DEF to pre-renewal DEF if monster ID is 2083 or higher - Recalculate renewal MDEF to pre-renewal MDEF if monster ID is 2083 or higher - Recalculate renewal ATK/ATK2 to pre-renewal ATK/ATK2 - Replace all unknown monster skills with NPC_EMOTION If you are only interested in the DEF/MDEF part, you can only take over those changes: @@ -4561,6 +4570,12 @@ uint64 MobDatabase::parseBodyNode(const ryml::NodeRef& node) { if (!this->asUInt16(node, "Defense", def)) return 0; +#ifndef RENEWAL + // Renewal to pre-re conversion + if (mob_id >= 2083) + def = static_cast<uint16>(100.0 - ((4000.0 + def) / (4000.0 + def * 10.0) * 100.0)); +#endif + if (def < DEFTYPE_MIN || def > DEFTYPE_MAX) { this->invalidWarning(node["Defense"], "Invalid monster defense %d, capping...\n", def); def = cap_value(def, DEFTYPE_MIN, DEFTYPE_MAX); @@ -4575,6 +4590,12 @@ uint64 MobDatabase::parseBodyNode(const ryml::NodeRef& node) { if (!this->asUInt16(node, "MagicDefense", def)) return 0; +#ifndef RENEWAL + // Renewal to pre-re conversion + if (mob_id >= 2083) + def = static_cast<uint16>(100.0 - ((1000.0 + def) / (1000.0 + def * 10.0) * 100.0)); +#endif + if (def < DEFTYPE_MIN || def > DEFTYPE_MAX) { this->invalidWarning(node["MagicDefense"], "Invalid monster magic defense %d, capping...\n", def); def = cap_value(def, DEFTYPE_MIN, DEFTYPE_MAX); Hope this helps! I mainly wrote this patch so I can use all renewal monsters directly in pre-re by copying them over without having to worry about unsupported features and changes of functionality of stats. load_re_mobs_in_prere.patch Quote Link to comment Share on other sites More sharing options...
0 Gouki Posted September 5 Group: Members Topic Count: 83 Topics Per Day: 0.06 Content Count: 245 Reputation: 12 Joined: 08/12/20 Last Seen: 10 hours ago Author Share Posted September 5 On 9/3/2024 at 8:02 PM, Playtester said: Attached you can find a patch file that shows how to do it. The patch file contains a few more things and is not up-to-date to latest rAthena (it's from May 2024). What is in the patch: - Replace all unknown drops with Apple and all unknown MVP drops with Elunium - Remove random option feature (doesn't work in pre-re) - Recalculate renewal DEF to pre-renewal DEF if monster ID is 2083 or higher - Recalculate renewal MDEF to pre-renewal MDEF if monster ID is 2083 or higher - Recalculate renewal ATK/ATK2 to pre-renewal ATK/ATK2 - Replace all unknown monster skills with NPC_EMOTION If you are only interested in the DEF/MDEF part, you can only take over those changes: @@ -4561,6 +4570,12 @@ uint64 MobDatabase::parseBodyNode(const ryml::NodeRef& node) { if (!this->asUInt16(node, "Defense", def)) return 0; +#ifndef RENEWAL + // Renewal to pre-re conversion + if (mob_id >= 2083) + def = static_cast<uint16>(100.0 - ((4000.0 + def) / (4000.0 + def * 10.0) * 100.0)); +#endif + if (def < DEFTYPE_MIN || def > DEFTYPE_MAX) { this->invalidWarning(node["Defense"], "Invalid monster defense %d, capping...\n", def); def = cap_value(def, DEFTYPE_MIN, DEFTYPE_MAX); @@ -4575,6 +4590,12 @@ uint64 MobDatabase::parseBodyNode(const ryml::NodeRef& node) { if (!this->asUInt16(node, "MagicDefense", def)) return 0; +#ifndef RENEWAL + // Renewal to pre-re conversion + if (mob_id >= 2083) + def = static_cast<uint16>(100.0 - ((1000.0 + def) / (1000.0 + def * 10.0) * 100.0)); +#endif + if (def < DEFTYPE_MIN || def > DEFTYPE_MAX) { this->invalidWarning(node["MagicDefense"], "Invalid monster magic defense %d, capping...\n", def); def = cap_value(def, DEFTYPE_MIN, DEFTYPE_MAX); Hope this helps! I mainly wrote this patch so I can use all renewal monsters directly in pre-re by copying them over without having to worry about unsupported features and changes of functionality of stats. load_re_mobs_in_prere.patch 3.38 kB · 0 downloads Hi @Playtester, I think you understood what I wanted to imply. Currently what I did was my Pre-RE mob DB are all RE mobs and added the pre-re mob db to import. will have a test at it and give feedback after. Quote Link to comment Share on other sites More sharing options...
Question
Gouki
Hi All,
I'm trying to increase the max def and max magic def in pre-renewal, does anyone know where I can find this in SRC?
Link to comment
Share on other sites
5 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.