.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
MM plugin that returns bsp model numbers.
Old
  (#1)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default MM plugin that returns bsp model numbers. - 02-04-2004

In my Metamod plugin for CS I would like to be able to face a door, press a key and have the plugin tell me the model number of the door.

Does anyone have example code on how I would do this?
Thanks.
  
Reply With Quote
Re: MM plugin that returns bsp model numbers.
Old
  (#2)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: MM plugin that returns bsp model numbers. - 02-04-2004

doors are models? ???
[edit]
maybe you meant what texture it was?
[/edit]
  
Reply With Quote
Re: MM plugin that returns bsp model numbers.
Old
  (#3)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: MM plugin that returns bsp model numbers. - 02-04-2004

Doors are entities,
a brush, entity
as opposed to a point entity.

I need the MODEL number associated with the door.
For example here is a typical door ENTITY.
{
"model" "*17"
"origin" "2448 232 -488"
"stopsnd" "0"
"movesnd" "0"
"wait" "30"
"speed" "3"
"angles" "0 -2 0"
"distance" "90"
"classname" "func_door"
}

Notice it's model is 17.
That is what I am looking for from a mm plug in.
  
Reply With Quote
Re: MM plugin that returns bsp model numbers.
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: MM plugin that returns bsp model numbers. - 02-04-2004

PMTools plugin does what you want

Here's an example of what you can do with it. Point your gun at a door, and type "traceline" in the console. Then get the hit entity number and type "printent " followed by that number :
Quote:
PMTOOLS (console): Tracing a LINE 100 units forward from player's view angles (1.3 -4.6 0.0)
PMTOOLS (console): Detailed trace results:
PMTOOLS (console): fAllSolid = 0 (plane is valid)
PMTOOLS (console): fStartSolid = 0 (initial point was NOT in a solid area)
PMTOOLS (console): fInOpen = 1 (in open space)
PMTOOLS (console): fInWater = 0 (NOT in water)
PMTOOLS (console): flFraction = 0.75 (0% completed)
PMTOOLS (console): vecEndPos = Vector (600.0, 691.0, -108.6)
PMTOOLS (console): flPlaneDist = 4.00
PMTOOLS (console): vecPlaneNormal = Vector (-1.0, 0.0, 0.0)
PMTOOLS (console): pHit = Entity #124 ("func_door_rotating")
PMTOOLS (console): iHitgroup = 0 (nothing - 0)
PMTOOLS (console): Distance traced: 75.2
PMTOOLS (console): Printing out entity #124 variable information...
PMTOOLS (console): (variable name = value (meaning))
PMTOOLS (console): pEntity->v.classname = 64515936 ("func_door_rotating")
PMTOOLS (console): pEntity->v.globalname = 0 ("")
PMTOOLS (console): pEntity->v.origin = Vector (604.0, 660.0, -102.0)
PMTOOLS (console): pEntity->v.oldorigin = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.velocity = Vector (0.0, 0.0, 0.0) - Length 0.000 - Length2D 0.000
PMTOOLS (console): pEntity->v.basevelocity = Vector (0.0, 0.0, 0.0) - Length 0.000 - Length2D 0.000
PMTOOLS (console): pEntity->v.clbasevelocity = Vector (0.0, 0.0, 0.0) - Length 0.000 - Length2D 0.000
PMTOOLS (console): pEntity->v.movedir = Vector (0.0, 1.0, 0.0)
PMTOOLS (console): pEntity->v.angles = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.avelocity = Vector (0.0, 0.0, 0.0) - Length 0.000 - Length2D 0.000
PMTOOLS (console): pEntity->v.punchangle = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.v_angle = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.endpos = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.startpos = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.impacttime = 0.000
PMTOOLS (console): pEntity->v.starttime = 0.000
PMTOOLS (console): pEntity->v.fixangle = 0 (nothing)
PMTOOLS (console): pEntity->v.idealpitch = 0.000
PMTOOLS (console): pEntity->v.pitch_speed = 0.000
PMTOOLS (console): pEntity->v.ideal_yaw = 0.000
PMTOOLS (console): pEntity->v.yaw_speed = 0.000
PMTOOLS (console): pEntity->v.modelindex = 27
PMTOOLS (console): pEntity->v.model = 64516040 ("*26")
PMTOOLS (console): pEntity->v.viewmodel = 0 ("")
PMTOOLS (console): pEntity->v.weaponmodel = 0 ("")
PMTOOLS (console): pEntity->v.absmin = Vector (598.0, 654.0, -162.0)
PMTOOLS (console): pEntity->v.absmax = Vector (610.0, 722.0, -44.0)
PMTOOLS (console): pEntity->v.mins = Vector (-5.0, -5.0, -59.0)
PMTOOLS (console): pEntity->v.maxs = Vector (5.0, 61.0, 57.0)
PMTOOLS (console): pEntity->v.size = Vector (10.0, 66.0, 116.0)
PMTOOLS (console): pEntity->v.ltime = 0.000 (current time is 38.791)
PMTOOLS (console): pEntity->v.nextthink = -1.000 (current time is 38.791)
PMTOOLS (console): pEntity->v.movetype = 7 (MOVETYPE_PUSH)
PMTOOLS (console): pEntity->v.solid = 4 (SOLID_BSP)
PMTOOLS (console): pEntity->v.skin = 0 ("")
PMTOOLS (console): pEntity->v.body = 0 ("")
PMTOOLS (console): pEntity->v.effects = 0 ()
PMTOOLS (console): pEntity->v.gravity = 0.000 (fraction /1 of normal)
PMTOOLS (console): pEntity->v.friction = 0.000
PMTOOLS (console): pEntity->v.light_level = 0
PMTOOLS (console): pEntity->v.sequence = 0 ("")
PMTOOLS (console): pEntity->v.gaitsequence = 0 ("")
PMTOOLS (console): pEntity->v.frame = 0.000 (position /255 of total in sequence)
PMTOOLS (console): pEntity->v.animtime = 0.000 (current time is 38.791)
PMTOOLS (console): pEntity->v.framerate = 0.000 (times normal speed)
PMTOOLS (console): pEntity->v.controller = {0, 0, 0, 0}
PMTOOLS (console): pEntity->v.blending = {0, 0}
PMTOOLS (console): pEntity->v.scale = 0.000
PMTOOLS (console): pEntity->v.rendermode = 0 (kRenderNormal)
PMTOOLS (console): pEntity->v.renderamt = 0.000
PMTOOLS (console): pEntity->v.rendercolor = Vector (0.0, 0.0, 0.0) (RGB)
PMTOOLS (console): pEntity->v.renderfx = 0 (kRenderFxNone)
PMTOOLS (console): pEntity->v.health = 0.000
PMTOOLS (console): pEntity->v.frags = 0.000
PMTOOLS (console): pEntity->v.weapons = 0 (00000000000000000000000000000000)
PMTOOLS (console): pEntity->v.takedamage = 0.000 (DAMAGE_NO)
PMTOOLS (console): pEntity->v.deadflag = 0 (DEAD_NO)
PMTOOLS (console): pEntity->v.view_ofs = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.button = 0 ()
PMTOOLS (console): pEntity->v.impulse = 0
PMTOOLS (console): pEntity->v.chain = NULL
PMTOOLS (console): pEntity->v.dmg_inflictor = NULL
PMTOOLS (console): pEntity->v.enemy = NULL
PMTOOLS (console): pEntity->v.aiment = NULL
PMTOOLS (console): pEntity->v.owner = NULL
PMTOOLS (console): pEntity->v.groundentity = NULL
PMTOOLS (console): pEntity->v.spawnflags = 0
PMTOOLS (console): pEntity->v.flags = 0 ()
PMTOOLS (console): pEntity->v.colormap = 0 (0x0)
PMTOOLS (console): pEntity->v.team = 0
PMTOOLS (console): pEntity->v.max_health = 0.000
PMTOOLS (console): pEntity->v.teleport_time = 0.000
PMTOOLS (console): pEntity->v.armortype = 0.000
PMTOOLS (console): pEntity->v.armorvalue = 0.000
PMTOOLS (console): pEntity->v.waterlevel = 0 (not in water)
PMTOOLS (console): pEntity->v.watertype = 0
PMTOOLS (console): pEntity->v.target = 0 ("")
PMTOOLS (console): pEntity->v.targetname = 0 ("")
PMTOOLS (console): pEntity->v.netname = 0 ("")
PMTOOLS (console): pEntity->v.message = 0 ("")
PMTOOLS (console): pEntity->v.dmg_take = 0.000
PMTOOLS (console): pEntity->v.dmg_save = 0.000
PMTOOLS (console): pEntity->v.dmg = 0.000
PMTOOLS (console): pEntity->v.dmgtime = 0.000 (current time is 38.791)
PMTOOLS (console): pEntity->v.noise = 0 ("")
PMTOOLS (console): pEntity->v.noise1 = 64516128 ("doors/doormove9.wav")
PMTOOLS (console): pEntity->v.noise2 = 64516232 ("common/null.wav")
PMTOOLS (console): pEntity->v.noise3 = 0 ("")
PMTOOLS (console): pEntity->v.speed = 100.000
PMTOOLS (console): pEntity->v.air_finished = 0.000
PMTOOLS (console): pEntity->v.pain_finished = 0.000
PMTOOLS (console): pEntity->v.radsuit_finished = 0.000
PMTOOLS (console): pEntity->v.pContainingEntity = Entity #124 ("func_door_rotating")
PMTOOLS (console): pEntity->v.playerclass = 0
PMTOOLS (console): pEntity->v.maxspeed = 0.000
PMTOOLS (console): pEntity->v.fov = 0.000
PMTOOLS (console): pEntity->v.weaponanim = 0
PMTOOLS (console): pEntity->v.pushmsec = 0
PMTOOLS (console): pEntity->v.bInDuck = 0 (FALSE)
PMTOOLS (console): pEntity->v.flTimeStepSound = 0 (current time is 38.791)
PMTOOLS (console): pEntity->v.flSwimTime = 0 (current time is 38.791)
PMTOOLS (console): pEntity->v.flDuckTime = 0 (current time is 38.791)
PMTOOLS (console): pEntity->v.iStepLeft = 0
PMTOOLS (console): pEntity->v.flFallVelocity = 0.000
PMTOOLS (console): pEntity->v.gamestate = 0
PMTOOLS (console): pEntity->v.oldbuttons = 0
PMTOOLS (console): pEntity->v.groupinfo = 0
PMTOOLS (console): pEntity->v.iuser1 = 0
PMTOOLS (console): pEntity->v.iuser2 = 0
PMTOOLS (console): pEntity->v.iuser3 = 0
PMTOOLS (console): pEntity->v.iuser4 = 0
PMTOOLS (console): pEntity->v.fuser1 = 0.000
PMTOOLS (console): pEntity->v.fuser2 = 0.000
PMTOOLS (console): pEntity->v.fuser3 = 0.000
PMTOOLS (console): pEntity->v.fuser4 = 0.000
PMTOOLS (console): pEntity->v.vuser1 = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.vuser2 = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.vuser3 = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.vuser4 = Vector (0.0, 0.0, 0.0)
PMTOOLS (console): pEntity->v.euser1 = NULL
PMTOOLS (console): pEntity->v.euser2 = NULL
PMTOOLS (console): pEntity->v.euser3 = NULL
PMTOOLS (console): pEntity->v.euser4 = NULL
PMTOOLS (console): End of dump.
http://racc.bots-united.com/releases/pmtools_plugin.zip



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: MM plugin that returns bsp model numbers.
Old
  (#5)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: MM plugin that returns bsp model numbers. - 02-04-2004

Oh man! What would the world be like with out
Pierre-Marie Baty!

EXACTLY what I need to help me hack doors easily.
I have already added the code to my map hack utility!

I am working on a way WHERE you can POINT to a door, fire the trace to get the model # (so you can find THE door entity) and then select which way you want the door to slide open left or right. Map hack then modifies the door to be a func_door instead of a func_door_rotating <= these give bots a lot of trouble and I don't even care for them myself!

Now maphack can even modify the doors!

One totally noobie question.
The angle used to make the door slide into the wall has to be, 0 or 180 (makes the door move left or right into the wall) IF it is aligned on the x axis,
or we need to use 90 or 270 if the door is aligned on the Y axis.

So if I am pointing at a door how can I tell if I am (mostly) facing angle
0,180,90, or 270?


+Y 90 ^
|
|
180 -X ----> +X 0
|
|
-Y 270

???

Once I have this a new feature of maphack will be:
Point to a door that swings open (func_door_rotating), you get a menu asking if you want the door to slide open to the left or the right, and then maphack will automatically change the door entity to be a func_door, the type that slide into the wall. The type of door the bots handle way better!

Once I have this I will be able to setup a map for bots with 28 spawn points per side and all doors "fixed" in less then one round time!
Woot!

Last edited by Austin; 02-04-2004 at 07:59..
  
Reply With Quote
Re: MM plugin that returns bsp model numbers.
Old
  (#6)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: MM plugin that returns bsp model numbers. - 02-04-2004

I don't know at all about these angles. But anyway, why do you bother hacking all your doors in all your maps when the fix for the bots to navigate doors perfectly like humans is known already ? My metamod port of POD-bot has no problem with any sort of door, by the way.

You could easily imagine a fix based on this one for POD-bot 2.5 and include it into the PodFix plugin...

I have the feeling you're wasting a lot of time...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: MM plugin that returns bsp model numbers.
Old
  (#7)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: MM plugin that returns bsp model numbers. - 02-04-2004

Quote:
Originally Posted by Pierre-Marie Baty
why do you bother hacking all your doors in all your maps when the fix for the bots to navigate doors perfectly like humans is known already ? My metamod port of POD-bot has no problem with any sort of door, by the way.
I have the feeling you're wasting a lot of time...
Nope!
Take a look at this PM. It is THE pod2.6MM.
This bot was STUCK AT THE FU_KING func_door_rotating.
And he got stuck simply BY THE EDGE OF THE DOOR!
The bot got stuck ON THE EDGE OF THE DOOR AND WOULD NOT GIVE IT UP, PERIOD, Jumping every few seconds and trying to move straight ahead to no avail.



I have been at this, running servers with pod.x bots for 2.5 years.
They SIMPLY-SCREW-UP-BADLY ON the func_door_rotating type of doors.
They get stuck behind them.
They get stuck on the edges.
They bunch up on both sides pushing the doors incessantly trying to open them in vain, since other bots are on the other side doing the same thing, and the door can't possibly swing open with bots on both sides.
THIS HAS BEEN T-H-E #1 worst thing about the bots that makes then less playable then they could be. Perhaps is it worse for me over others since I run a server with 28 BOTs on the same team.

When I put in my "fix" which was to change all the doors to func_door, my regular players ALL commented how much better and more fun the the bots were playing the maps.

If you can give me a fix where
they would not get stuck on the edge of a rotating door,
would not get stuck behind an open rotating door,
and a fix where like 3 bots on both sides of a rotating door get through about as well as humans then I would GLADLY "quit wasting my time!"
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com