Entity Flags/Flag

Post Reply
mizzy
Posts: 9
Joined: Tue Nov 03, 2015 8:33 pm

Entity Flags/Flag

Post by mizzy » Mon Jan 30, 2017 5:25 pm

So i have done pretty good at finding and fixing most stuff. When it comes to what was recently changed in mob.pools, my question is. What and were can i find info on flag and Entity Flags. How would you properly use the mobflags command in game? Is the Entityflags # a total of a bunch of flags and can that be broken down to know which flags are set to a particular mob? Its probably all information i know and in front of me but i am slightly lost.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Entity Flags/Flag

Post by TeoTwawki » Wed Feb 01, 2017 1:02 am

mizzy wrote:So i have done pretty good at finding and fixing most stuff. When it comes to what was recently changed in mob.pools, my question is. What and were can i find info on flag and Entity Flags. How would you properly use the mobflags command in game? Is the Entityflags # a total of a bunch of flags and can that be broken down to know which flags are set to a particular mob? Its probably all information i know and in front of me but i am slightly lost.
Here
https://github.com/DarkstarProject/dark ... ity.h#L104
and here
viewtopic.php?f=19&t=2432&hilit=+flags#p13056
This field was previously called "unknown". I decided it was too awkward having "flags" sitting right next to a field called "flag" and that the field should be named for what it actually is.

For mobs you can target one and then use @setmobflags
I haven't made the NPC one a binding yet. I will either change the command to effect either object type (preferred) or add a 2nd command. This is nearly the same as the players nameflags, and the values in the enum aren't everything the client uses (see my other post I linked above).

Note: Some of the flag bits will not visibly have any effect until you re-zone, because the server client doesn't load everything on the fly. Like model size - that only gets used by the client what it loads the model.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

mizzy
Posts: 9
Joined: Tue Nov 03, 2015 8:33 pm

Re: Entity Flags/Flag

Post by mizzy » Wed Feb 01, 2017 9:25 am

Thanks so much! This is what i was looking at but the number didnt add up with some mobs in the db even if there were mulitiple flags.So I wasnt sure if i was missing something.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Entity Flags/Flag

Post by TeoTwawki » Wed Feb 01, 2017 2:29 pm

database uses decimal but the enums are in hex because its easier to represent things that can be combined that way.

0x00000004
+
0x00000040
=
0x00000044 (decimal 68)
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Post Reply