Raised This Month: $79 Target: $400
 19% 

Entity Info


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Technical/Development       
pizzahut
Senior Member
Join Date: Oct 2004
Old 05-27-2005 , 16:21   Entity Info
Reply With Quote #1

I wanted to find out where certain infos about sentry guns are stored in TFC, as things like the team and owner keys are *not* used for these. So I wrote a plugin that dumps all keys of an entity to console, except for the empty ones (value zero or empty string).

You need the engine module for this plugin.

Instructions: Look at an entity, press attack. You can use a melee weapon from a distance to avoid damage. A HUD message will come up with the number (id) of the entity, and informing you that more info is available in the console. To save the data, enter the command condump in console. This will write a plain ASCII file.

Example:
Quote:
You finish building the sentry gun.
-xS- pizzahut has built a sentry gun
Entity 308 [Looking at the mounted sentry gun here.]
EV_INT_movetype = 5
EV_INT_solid = 3
EV_INT_sequence = 2
EV_INT_modelindex = 151
EV_INT_watertype = -1
EV_INT_flags = 32
EVINT_colormap = 41110
EV_FL_nextthink = 50.254356
EV_FL_frame = 127.990234
EV_FL_animtime = 50.154358
EV_FL_framerate = 1.000000
EV_FL_health = 150.000000
EV_FL_takedamage = 2.000000
EV_FL_max_health = 150.000000
EV_VEC_origin = (-572.000000,-1404.000000,-218.781967)
EV_VEC_angles = (0.000000,184.053955,0.000000)
EV_VEC_absmin = (-589.000000,-1421.000000,-219.781967)
EV_VEC_absmax = (-555.000000,-1387.000000,-169.781967)
EV_VEC_mins = (-16.000000,-16.000000,0.000000)
EV_VEC_maxs = (16.000000,16.000000,48.00000)
EV_VEC_size = (32.000000,32.000000,48.000000)
EV_VEC_view_ofs = (0.000000,0.000000,22.000000)
EV_ENT_pContainingEntity = 308
EV_SZ_classname = building_sentrygun
EV_SZ_model = models/sentry1.mdl
EV_BYTE_controller1 = 238
EV_BYTE_controller2 = 127
You put some shells into your sentry gun.
Entity 304 [I'm looking at the base (the feet) of the sentry here.]
EV_INT_movetype = 6
EV_INT_solid = 2
EV_INT_modelindex = 154
EV_INT_watertype = -1
EV_INT_flags = 544
EV_FL_takedamage = 2.000000
EV_VEC_origin = (-572.000000,-1404.000000,-239.981964)
EV_VEC_angles = (0.00000,184.053955,0.000000)
EV_VEC_absmin = (-589.000000,-1421.000000,-240.981964)
EV_VEC_absmax = (-555.000000,-1387.000000,-234.981964)
EV_VEC_mins = (-16.000000,-16.000000,0.000000)
EV_VEC_maxs = (16.000000,16.000000,4.000000)
EV_VEC_size = (32.000000,32.000000,4.000000)
EV_ENT_pContainingEntity = 304
EV_SZ_classname = building_sentrygun_base
EV_SZ_model = models/base.mdl
You put some shells into your sentry gun.
] condump
Btw, the condump command has a bug, where occasionally a single character is missing. Like this excerpt from above example is missing an underscore:
Quote:
EVINT_colormap = 41110
Attached Files
File Type: sma Get Plugin or Get Source (ent_info.sma - 2070 views - 4.7 KB)
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.

Last edited by pizzahut; 02-08-2014 at 15:20. Reason: Bug was in condump command, not console itself.
pizzahut is offline
sixcentgeorge
Junior Member
Join Date: Feb 2006
Location: villevieille
Old 08-30-2006 , 10:28   Re: Entity Info
Reply With Quote #2

work great ;]
sixcentgeorge is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 07-16-2020 , 01:58   Re: Entity Info
Reply With Quote #3

Updated Entity Info plugin with Cvar entity_info 0|1. That turns the plugin on or off. Also optimized this for admins only instead of looping it through all players. I've used this to explore and fix many idiosyncrasies of maps from invalid classnames, to you-name-it, stop broken door sound.

Pik program allows pdata INT value changes in console. Examples provided within the script.
Attached Files
File Type: sma Get Plugin or Get Source (entity_info.sma - 24 views - 4.8 KB)
File Type: sma Get Plugin or Get Source (pdata_explorers_pik.sma - 24 views - 2.1 KB)
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 08-31-2020 at 12:24. Reason: sha256sum caca936b18e7872dee83223bcb40160346f3e1bf592de37bda73f7eee1247bea
DJEarthQuake is offline
pizzahut
Senior Member
Join Date: Oct 2004
Old 08-29-2020 , 15:55   Re: Entity Info
Reply With Quote #4

DJEarthQuake wants to continue this plugin. If his updated version gets approved, this thread (old plugin) can be unapproved.
pizzahut is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:49.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode