.:: 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 ::. > Enhancement Workshop > Metamod and metamod plugins
Metamod and metamod plugins Plugins and improvements for the metamod server-side mod

Reply
 
Thread Tools
stripper2 place custom mdl
Old
  (#1)
splaTTer
Guest
 
Status:
Posts: n/a
Default stripper2 place custom mdl - 24-07-2004

hi,
does anybody know how to add custom mdls to a cstrike map using the stripper2 plugin?
maybe an extra wall or something like that?

i don't know what "classname" i have to use

thx4anyhelp

greetz splaTTer
  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#2)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: stripper2 place custom mdl - 25-07-2004

If it is a custom model I think you may have to precache it first.Don't know but this may help.

[add]
//Add first hostie
{
classname/hostage_entity
angle/0
model/models/hostage.mdl
skin/0
origin/946 1929 200
}


Now if you want to add walls, laddres, crates, etc you can only clone ones that are already in the map (brush models we are talking about)

It is difficult to figure out but it can be done. Look at the long text after this example ot see how I did this.

I added a copy of one of the wire spools in vertigo and placed it under the ladder near the ts spawn so you can climb up the ladder!

This is all it takes!
But figuring this out took a long night or work..
[add]
{
classname/func_wall
model/*18
origin/-290 -160 -340
}

Here is text right from botman on the subject.
================================================== =======
You'll notice in the example configuration file for crossfire, I duplicate a
couple of the brush models to create "buttons" to open the secret door. What do
you need to know to create a brush model and position it correctly?
You will need to know all of the brush models that are available in that map.
You can only clone existing brush models, you can't make them from scratch. If
you use my BSP tools, you can generate the list of brush models available in a
map. Use the "-m" option on bsp_tool.exe to print out the brush models. You
can redirect this output to a file like so...
code:
--------------------------------------------------------------------------------
C:\BSP_tool> bsp_tool -m stalkyard.bsp > stalkyard.txt
--------------------------------------------------------------------------------
Each brush model in the output will have a minimum bounding box coordinate and a
maximum bounding box coordinate. These two coordinates tell you where a brush
model is located. The origin for this brush model is in the exact middle of the
minimum and maximum coordinates (add the X coordinates together and divide by 2,
add the Y coordinates together and divide by 2, and add the Z coordinates
together and divide by 2 to get the origin).
The model index number is the brush model number. Worldcraft and Half-Life use
a asterisk '*' in front of the brush model number in the model key of the
entity. For example, if I wanted to create a func_wall entity and use brush
model 37, the "model" key value would be "*37".
As I said above, you can't create brush models, you can only clone existing
brush models. When you clone a brush model the clone will be exactly the same
size, shape, and have exactly the same textures as the original brush model.
There's no way to change any of this. You also can't change the orientation
(angles) that the brush model is rendered with (well, actually you can, but it's
a REAL pain in the ass trying to determine what the correct origin of the cloned
model should be, more on this later).
In order to clone the brush model, you need to know what the origin of the clone
will be. The origin for cloned brush models doesn't work like the origin for
other entities. The origin for brush models is a RELATIVE origin. The origin
for the clone is a position in 3D space RELATIVE to the original brush model.
For example, if I had a brush model with a minimum bounding box of (10, 20, 40)
and a maximum bounding box of (40, 80, 100), I would know that the origin of the
original brush model is (25, 50, 70). If I wanted to place a cloned version of
this brush model at ABSOLUTE coordinates (25, 50, 170), 100 units above the
original, I would use (0, 0, 100) as the origin of the cloned brush model.
You can determine the origin of the cloned brush model, by subtracting the
ABSOLUTE 3D coordinate of where you want the clone to be positioned from the
origin of the original brush model. In my example this would be (25-25, 50-50,
170-70) or (0, 0, 100).
Remember that this only copies the brush model to a new location in the world,
it does not scale it up or down, it does not change the textures and it does not
rotate it.
If you want to modify the Stripper2 source code to allow you to rotate a cloned
brush model, I can give you a couple of pointers...
First, you will need to set the angles of the entity (pev->angles) after you
have called the DispatchSpawn() function for it. If you look in the SDK at the
source code for func_wall, for example, it explicitly sets the pev->angles to
(0, 0, 0). Only the DispatchSpawn() function has returned to the Stripper2
code, you are free to change the angles of that newly created entity.
After some experimenting, it appears that the Half-Life engine applys the
rotation to the entity first before it translates it based on the offset. The
problem is that this translation happens with respect to the origin of the
ORIGINAL brush model. So for example, if you have an brush model at (140, -350,
1530) and you rotate it around the Z axis at 90 degrees, you wind up with an
brush model at (-1530, -350, 140). At least, I think that's where it ends up.
Once the rotation is complete, then the brush faces are translated based on the
offset you specified as the origin key in the cloned entity (i.e. since it was
rotated, the origin will now have to change to position it at the same absolute
3D world coordinate).
Even with knowing the rotation relative to the absolute 3D coordinate of the
original brush model and the adjusted offset for the origin of the cloned brush
model, I still wasn't able to get the math working properly to position things
exactly where I wanted, so I left out this feature from the Stripper2 plugin.
At first, I wasn't sure if it used the "origin" of the brush model, the minimum
bounding box coordinate, or the maximum bounding box coordinate for all the
rotation and translation stuff (it makes a BIG difference), but I using the
"origin" of the brush model gave me the closest results to where I wanted to
position the clone in absolute 3D coordinates.
botman

Last edited by Austin; 25-07-2004 at 21:23..
  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#3)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: stripper2 place custom mdl - 30-07-2004

Here is a snippet I use to put coors light beer cans in the basement area of 2fort in tfc.

Code:
 // CACHE MY CUSTOM MODELS/SPRITES
 PRECACHE_MODEL(models/beer1.mdl)
 
 // BEER CANS BLUE BASEMENT
 {
 	netname/stripper2
 	classname/info_tfgoal
 	origin/-590 -2550 -665
 	model/models/beer1.mdl
 	angle/180
 }
 {
 	netname/stripper2
 	classname/info_tfgoal
 	origin/-585 -2668 -685
 	model/models/beer1.mdl
 	angle/160 
 }






  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#4)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: stripper2 place custom mdl - 30-07-2004

Quote:
Originally Posted by BAStumm
Here is a snippet I use to put coors light beer cans in the basement area of 2fort in tfc.

Code:
// CACHE MY CUSTOM MODELS/SPRITES
PRECACHE_MODEL(models/beer1.mdl)
 
// BEER CANS BLUE BASEMENT
{
	netname/stripper2
 ...
What does the netname parameter do?
  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#5)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: stripper2 place custom mdl - 30-07-2004

not much...

phpUA tracks flags as they move (carried) and to make some objects solid I had to make them appear like flags (item_tfgoal) so I named all my added models stripper2 and in phpUA we ignore anything named stripper2 since they dont need to be shown on a webpage. who cares about that beer can LOL.

The beer cans aren't solid so they didn't need that name but I named it anyways, not sure why.

I have other models though which I made solid and as you can see they would be treated as flags in phpUA if not for the netname...

Code:
  SERVER UP hlcmd> listent item_tfgoal
  Sent 'listent item_tfgoal' to server
  Printing out ALL entities in game...
  index CLASSNAME ["netname"] (model): absmin (x, y, z); size (x, y, z); distance d
  114 item_tfgoal (models/flag.mdl): min (-536, 3176, -656); siz (0, 0, 0); dst 0
  151 item_tfgoal (models/flag.mdl): min (-41, -1135, -240); siz (0, 0, 0); dst 0
  282 item_tfgoal (models/couch1.mdl): min (-634, -2633, -685); siz (32, 32, 56); dst 0
  283 item_tfgoal (models/filecabinet.mdl): min (-669, -2569, -680); siz (32, 32, 56); dst 0
  287 item_tfgoal (models/couch1.mdl): min (586, 2585, -685); siz (32, 32, 56); dst 0
  E
 
 pEntity->v.netname = 18543588 ("Red Flag")
 
 pEntity->v.netname = 18858580 ("stripper2")
 pEntity->v.message = 18858772 ("Take a load off!")
think you can set any of the pEntity->v.somethings via stripper2







Last edited by BAStumm; 30-07-2004 at 19:14..
  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#6)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: stripper2 place custom mdl - 30-07-2004

Quote:
Originally Posted by BAStumm
not much...

phpUA tracks flags think you can set any of the pEntity->v.somethings via stripper2
phpUA ?? Never heard of it!

http://phpua.sourceforge.net/
Brian A. Stumm a.k.a. BAStumm (e-mail: brian at phpua dot com)
Project Co-ordinator

31 year old from Spokane, Washington USA with a vision to create live data streams from game servers to the web. I am married and have two children (they are gamers too). Founder/Administrator of SpokaneTeamFortress.com, a fairly large Team Fortress (and recently DoD) community. I dabble in many areas of programming but lean towards web technologies for the *nix platform.


Sounds great, got to check it out!
So tell me, does phpUA give me stripper2 like functionality (in addition to everything else?)

Thanks for the lead.
  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#7)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: stripper2 place custom mdl - 31-07-2004

phpUA is a web based server query and (not finished yet) administration panel. In addition to the php scripts we've written a metamod plugin that gets extended server/player data not possible through traditional queries such as health, armor, team, team scores, money/resources/personal score etc. The best feature of it is the "watch" feature. Check this link, this is my dod server...

http://churchoftux.com/phpua/index.p...watch&server=1

phpUA has nothing to do with stripper2. I just had to make accomodations in phpUA for my personal servers so it didn't treat my custom models that are added via stripper2 as flags in tfc.







Last edited by BAStumm; 31-07-2004 at 03:56..
  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#8)
splaTTer
Guest
 
Status:
Posts: n/a
Default Re: stripper2 place custom mdl - 15-08-2004

thx - that was VERY helpfull!!!

one last question: what classname should i use to playe a custom model?

with func_wall i am not able to change the angel...

the model i want to place is our clan banner in 3d. i want to place it on some walls.

thx4any help

greetz splaTTer
  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#9)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: stripper2 place custom mdl - 16-08-2004

If it's just a texture, you don't want to place a func_wall, you want to place a sprite. See the crossfire example included with Stripper2 where I create a "silly little test sprite" made from an image of Barney.

You will need a sprite creator tool (I used SprWiz which you can still find using google.com, but there are others that you can find by searching on google.com). Once you've made the sprite, you will want to make the sprite an "oriented sprite" so that it will always face one direction (normally sprites always face the player). Again, search on google.com for "half-life oriented sprite" and you'll find a few links on how to modify the sprite to be an oriented sprite.

Then just place the sprite in your map using the same key/value pairs as I used for the test sprite in my crossfire .cfg file.

botman
  
Reply With Quote
Re: stripper2 place custom mdl
Old
  (#10)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: stripper2 place custom mdl - 18-08-2004

Here is some snippets from my 2fort_str.cfg for teamfortress. You can see this logo on most maps played on my tfc server. link in sig.

Code:
  
  // CACHE MY CUSTOM MODELS/SPRITES
  PRECACHE_SPRITE(sprites/stflogo.spr)  
  
  // LOGO SPRITE BLUE BASE
  {
  	netname/stripper2
    classname/env_sprite
    frame/1
    framerate/10
    rendermode/5
    renderamt/255
    scale/1.0
    spawnflags/1  // SF_SPRITE_STARTON
    model/sprites/stflogo.spr
    origin/0 -862 -226
    angles/180 90 180
  }
  	
  // LOGO SPRITE RED BASE
  {
  	netname/stripper2
    classname/env_sprite
    frame/1
    framerate/10
    rendermode/5
    renderamt/255
    scale/1.0
    spawnflags/1  // SF_SPRITE_STARTON
    model/sprites/stflogo.spr
    origin/0 862 -226
    angles/-180 -90 -180
  }







Last edited by BAStumm; 18-08-2004 at 07:40..
  
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