Cleaning Up True Sight Mobs

Post Reply
lautan
Developer
Posts: 164
Joined: Mon Jul 30, 2012 6:17 pm

Cleaning Up True Sight Mobs

Post by lautan » Sun Sep 08, 2013 10:18 pm

This is kinda a guide on how to clean up true sight mobs. Lots of mobs are true sight or sound when they shouldn't be. Apocalypse612 is interested in taking this on but this is still useful information for everyone.

Finding True Sight / Sound Mobs

You can see all mobs in the db with true sight / sound with this query:

Code: Select all

select count(*) from mob_pools where behavior & 8 = 8 or behavior & 16 = 16;
This will blindly find all mobs, some of them are correct! This is from the table in sql/mob_pools.sql in the behavior column.

You can also go into the sql/mob_pools.sql file and search for mobs yourself.

Fixing it

Once you found a mob that has the wrong behavior. You can remove a behavior by subtracting the behavior number. The true sight number is 8, so minus 8 from the behavior value.

You can find all the behavior numbers in src/map/entities/mobentity.h. Remember these numbers are in hexidecimal so you have to convert it to decimal.

Behaviors can be added by adding the behavior number.

Apocalypse612
Developer
Posts: 40
Joined: Sat Mar 30, 2013 12:00 pm

Re: Cleaning Up True Sight Mobs

Post by Apocalypse612 » Mon Sep 09, 2013 10:06 am

I accept your challenge.

Done. Patch in contributions section.

Post Reply