Jump to content
  • 0

Monster 'Mode' data


Echoes

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   5
  • Joined:  03/30/13
  • Last Seen:  

Hello rAthena c:

 

I'm having some problems figuring out how to create the 'mode' for my custom mob since I don't know what do I need to do to obtain the desired one.

 

I'm using the mode numbers listed here: https://rathena.org/wiki/Custom_Mobs, but I don't want my mob to be just one mode.

 

Do I need to sum up the mode numbers there to obtain the desired AI?

 

Thank you :D

Edited by Echoes
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   228
  • Joined:  01/30/13
  • Last Seen:  

Why would you get that result?

 

Go digit by digit:

First digit: 2 (0x200000) = 2

Second digit: 8 (0x080000) = 8

Third digit: 1 (0x001000) + 2 (0x002000) + 4 (0x004000) = 7

Fourth digit: 2 (0x000200) = 2

Fifth digit: 1 (0x000010) + 2 (0x000020) + 8 (0x000080) = 11 = B

Sixth digit: 1 (0x000001) = 1

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

Yup

Make sure you only add together the basic modes, not the combinations, as that will screw up the mode.

Edited by Nitrous
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  354
  • Reputation:   108
  • Joined:  01/30/13
  • Last Seen:  

This mode sytem is hexadecimal, when you add more than 1 modes you just need to combine them (just like equipables jobs for items).

But a common tip used is just use the mode from anoter mob, if you want a passive and looter monster, just use Poring's mode... or if want a agressive, cast detector, boss, just take Dark Priest's mode.

Edited by FXFreitas
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   431
  • Joined:  01/26/16
  • Last Seen:  

Mob modes in the wiki is outdated. Please refer to doc directory in your emulator directory instead.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   228
  • Joined:  01/30/13
  • Last Seen:  

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   5
  • Joined:  03/30/13
  • Last Seen:  

Thank you for the information, and sorry for the late response.

MD_CANMOVE            | 0x000001 |        1
MD_LOOTER             | 0x000002 |        2
MD_AGGRESSIVE         | 0x000004 |        4
MD_ASSIST             | 0x000008 |        8
MD_CASTSENSOR_IDLE    | 0x000010 |       16
MD_BOSS               | 0x000020 |       32
MD_PLANT              | 0x000040 |       64
MD_CANATTACK          | 0x000080 |      128
MD_DETECTOR           | 0x000100 |      256
MD_CASTSENSOR_CHASE   | 0x000200 |      512
MD_CHANGECHASE        | 0x000400 |     1024
MD_ANGRY              | 0x000800 |     2048
MD_CHANGETARGET_MELEE | 0x001000 |     4096
MD_CHANGETARGET_CHASE | 0x002000 |     8192
MD_TARGETWEAK         | 0x004000 |    16384
MD_RANDOMTARGET       | 0x008000 |    32768
MD_IGNOREMELEE        | 0x010000 |    65536
MD_IGNOREMAGIC        | 0x020000 |   131072
MD_IGNORERANGED       | 0x040000 |   262144
MD_MVP                | 0x080000 |   524288
MD_IGNOREMISC         | 0x100000 |  1048576
MD_KNOCKBACK_IMMUNE   | 0x200000 |  2097152
MD_NORANDOM_WALK      | 0x400000 |  4194304
MD_NOCAST_SKILL       | 0x800000 |  8388608

According to what did you guys say, if I want monster with the next features:

MD_CANMOVE
MD_CASTSENSOR_IDLE
MD_BOSS
MD_CANATTACK
MD_CASTSENSOR_CHASE
MD_CHANGECHASE
MD_CHANGETARGET_MELEE
MD_CHANGETARGET_CHASE
MD_TARGETWEAK
MD_MVP
MD_KNOCKBACK_IMMUNE

I just need to sum up the values of those caracteristics, meaning:

0x(000001+000010+000020+000080+000200+001000+002000+004000+080000+200000) = 0x287311

 

And that last number is what I need to write in the mode section of the custom mob script?

 

Again, sorry for the late response, my week have been busy :c and thanks for the answers!

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   431
  • Joined:  01/26/16
  • Last Seen:  

I just need to sum up the values of those caracteristics, meaning:

0x(000001+000010+000020+000080+000200+001000+002000+004000+080000+200000) = 0x287311

 

And that last number is what I need to write in the mode section of the custom mob script?

Numbers prefixed with `0x` are in hexadecimal format (base 16, with range of 0 to F), so you can't add these up like they are base 10 numbers.

You might want to add base 10 numbers (1 2 4 8 ...) we noted together without adding 0x prefix instead.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   5
  • Joined:  03/30/13
  • Last Seen:  

You might want to add base 10 numbers (1 2 4 8 ...) we noted together without adding 0x prefix instead.

So if I want the mob with the said features, the way to calculate the mode would be the next?

1+16+32+128+512+1024+4096+8192+16384+524288+2097152=2651825

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   228
  • Joined:  01/30/13
  • Last Seen:  

It's much easier, you just need to know:

 

A = 10

B = 11

C = 12

D = 13

E = 14

F = 15

 

0x(000001+000010+000020+000080+000200+001000+002000+004000+080000+200000) = 0x2872B1

 

You simply calculate per digit, no carrying over needed. That's the great thing about hex.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   5
  • Joined:  03/30/13
  • Last Seen:  

It's much easier, you just need to know:

 

A = 10

B = 11

C = 12

D = 13

E = 14

F = 15

 

0x(000001+000010+000020+000080+000200+001000+002000+004000+080000+200000) = 0x2872B1

 

You simply calculate per digit, no carrying over needed. That's the great thing about hex.

But as you said, then I would think of the number 0x287311 to be 0x2873B, or is there another way to do the maths before and after adding the letter :o?

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   228
  • Joined:  01/30/13
  • Last Seen:  

For some reason this reply displayed for me today. Maybe some bug with the year?

Anyway, if you still want the answer - I honestly don't understand how you can even reach that conclusion. When adding hexadecimals there's no number over flow. You just add per digit.

Take a look at the second digit from the right, you will have:

0 + 1 + 2 + 8 + 0 + 0 + 0 + 0 + 0 +0 = 11

11 in hexidecimal is a B. So the result for the second digit from the right is B. You do the same for every digit.

  • 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...