Jump to content
  • 0

About combining several monster modes.


zHep

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   1
  • Joined:  04/11/14
  • Last Seen:  

Hi! Can someone help me with this?

I'm kinda working on a mob editor application and i'm having hard time understanding how to combine these monster modes. Can someone explain how it works?

Especially when you are trying to combine a lot of modes. I feel like the doc/mob_db_mode_list.txt is not complete coz there's no guide on how to combine these modes.

Thanks in advance! And sorry for bad english. Lol.


 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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

Use the bitwise OR operator, for example (MD_CANMOVE | MD_LOOTER).

Edited by Nitrous
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   1
  • Joined:  04/11/14
  • Last Seen:  

thanks for the tip @Nitrous. already found a solution. hehe

it's actually a web-based item and mob database editor, so i found some way to compute hexed numbers.

In javascript, just use "toString(16)" to get the hexadecimal value of a number. while in PHP, its dechex(decimal to hex) and hexdec(decimal to hex). I just need to add the decimal value of the mode first then i just use these codes to get its hex value. :D

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

thanks for the tip @Nitrous. already found a solution. hehe

it's actually a web-based item and mob database editor, so i found some way to compute hexed numbers.

In javascript, just use "toString(16)" to get the hexadecimal value of a number. while in PHP, its dechex(decimal to hex) and hexdec(decimal to hex). I just need to add the decimal value of the mode first then i just use these codes to get its hex value. :D

Windows calculator has this built in if yoy switch to programmers mode.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  797
  • Reputation:   226
  • Joined:  01/30/13
  • Last Seen:  

It's a lot easier to work with hex though. Because each character will always exactly have 4 bits (1, 2, 4 and 8) and then you just need to add those together and you have A=10 to F=15.

 

So if you have modes 0x0001, 0x0004, 0x0008, 0x0020, 0x0800, 0x1000 and 0x2000 you can just calculate it in your head: 0x382D

With decimals you'd probably need a calculator.

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