Cleaning Up True Sight Mobs
Posted: 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:
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.
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;
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.