Jump to content
  • 0

Where is Max Mob Def/Magic Def located?


Gouki

Question


  • Group:  Members
  • Topic Count:  88
  • Topics Per Day:  0.05
  • Content Count:  261
  • Reputation:   13
  • Joined:  08/12/20
  • Last Seen:  

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?

image.png.594f9db473fa244dc512fd3089522506.png

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  897
  • Reputation:   248
  • Joined:  01/30/13
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  88
  • Topics Per Day:  0.05
  • Content Count:  261
  • Reputation:   13
  • Joined:  08/12/20
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  897
  • Reputation:   248
  • Joined:  01/30/13
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  897
  • Reputation:   248
  • Joined:  01/30/13
  • Last Seen:  

  

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

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  88
  • Topics Per Day:  0.05
  • Content Count:  261
  • Reputation:   13
  • Joined:  08/12/20
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  88
  • Topics Per Day:  0.05
  • Content Count:  261
  • Reputation:   13
  • Joined:  08/12/20
  • Last Seen:  

@Playtester Hi this works wonders, thank you so much!  I have a concern now with regards item defenses.  I'll drop you a message instead to avoid leading this topic to a different discussion. thanks!

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  897
  • Reputation:   248
  • Joined:  01/30/13
  • Last Seen:  

@Gouki That was not just a concern you sent me in the private message, but a support question, please stick to forum posts, then everyone can benefit from the information.

 

As for the question how to convert equip DEF:

 

You can't easily convert armor DEF values as the renewal formula applies to your total DEF and not the DEF of an individual item.

It's better to look at comparable gear in pre-re and make sure the renewal items don't exceed the pre-re items in power.

 

If you still want to convert the values you could also use the attached tool for it.

However if you want an accurate value for equip, consider this: You can equip up to 9 pieces of armor (3 headgears, armor, shield, garment, shoes, 2 accessoires). The value you want to convert is the total DEF, not the DEF of one armor. So you need to multiply the DEF value by 9, then convert it and then divide it by 9 again.

 

For example take this random renewal armor I picked from Divine Pride: https://www.divine-pride.net/database/item/450356/abyss-lake-roaring-armor-1

It has 50 DEF and 10 MDEF.

We multiply this by 9, which gives 450 DEF and 90 MDEF.

Now you run the tool say you want to convert DEF/MDEF and put in 450 for DEF and 90 for MDEF.

The tool returns 48/43.

Now you divide this by 9, which gives 5 DEF and 4 MDEF (I recommend rounding down to reduce the renewal power creep). That would be the most accurate representation you can get by conversion.

prerenewal.zip

  • MVP 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...