.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   HL Engine Mapping (http://forums.bots-united.com/forumdisplay.php?f=20)
-   -   Server Commands (http://forums.bots-united.com/showthread.php?t=1390)

dead bwoy 16-04-2004 11:58

Server Commands
 
How do you get a map to run a cfg file running server commands? (Special rules for the map)

SoUlFaThEr 16-04-2004 12:53

Re: Server Commands
 
i dont believe you can make a MAP exec a .cfg file on your server.
just make the cfg, get in the map, open console and
do: exec myspecialcfg.cfg

i am not aware of a map being able to control server commands or execute external files for server commands

anyone else?

Pierre-Marie Baty 16-04-2004 14:28

Re: Server Commands
 
A very simple metamod plugin can be written that would do what you want. It's a matter of 5 minutes, possibly even less. I'm sure Mark would love writing something like this :)

dead bwoy 16-04-2004 21:10

Re: Server Commands
 
Is there any way to hack a map file's entities to run a server command without using metamod, like bot_add or mp_hostagepenalty 0. Like in a .res, .ent, .wad, .pak, or whatever. This will be used in a Single Player Game, so I dont even think metamod will work even if I wanted to use it.

Terran 16-04-2004 23:02

Re: Server Commands
 
Go to www.metamod.org and look for the single player version of MetaMod.
Than go to www.amxmod.net and search for the plugin map_cfg...
From your signature I assume you know how to get and install AMX ;).

dead bwoy 16-04-2004 23:41

Re: Server Commands
 
The thing is:
I don't want to use metamod!
Im working on a project for czero and I dont want to include metamod in the project. If there's no other way, I'll have to drop the idea...

Would it be possible to create a simple plugin (non-metamod) that would only use the required functions to run a cfg file for a map of the same name? ie: have the plugin run de_dust.cfg when starting de_dust.bsp

Terran 17-04-2004 09:31

Re: Server Commands
 
Well, you could do it the hard way:
- grap the HPB Bot source code
- remove the bot specific part leaving only the hooking stuff (or is this already available somewhere?)
- add some code to load map specific configs

This is like reinventing the wheel...

dead bwoy 17-04-2004 10:26

Re: Server Commands
 
Quote:

- remove the bot specific part leaving only the hooking stuff (or is this already available somewhere?)
- add some code to load map specific configs
Would this be very time consuming? Could someone let me know what I need to keep? I'll need to know what to add as well, but lets just take this one step at a time.
Are there any whole files that can be removed? And this is for making a non-metamod plugin correct? Like I'd load it up in the target line or something like that?

Terran 17-04-2004 10:44

Re: Server Commands
 
You would use it instead of metamod or a bot with all implications this will produce.

Pierre-Marie Baty 17-04-2004 12:38

Re: Server Commands
 
The only way to do this, as Terran says, is to create a hook DLL (like a bot, like metamod). That is, a DLL that you will specify in the liblist.gam instead of the czero DLL. That would require a minimum of coding skill, though.

In the HPB_bot template, for example, you need to keep engine.cpp, dll.cpp, linkfunc.cpp ; then you need to remove all third party code from all the functions in dll.cpp and engine.cpp and only let the engine calls happen, and add your config file parsing code in ServerActivate().

dead bwoy 18-04-2004 06:59

Re: Server Commands
 
the hpb source (and the 3-in1 pack sdk-metamod-hpb source) does not include a file named linkfunc.cpp
Also, it looks as though the HPB source from the 3-in-1 source pack hooks into metamod? What would be an appropiate source to use for a non metamod hook? (non metamod bot source)

sPlOrYgOn 18-04-2004 07:06

Re: Server Commands
 
download hpbbot 3.0 source.
it's not a metamod plugin.

dead bwoy 18-04-2004 08:15

Re: Server Commands
 
ok this looks much better
can i delete all the header files too?

sPlOrYgOn 18-04-2004 08:35

Re: Server Commands
 
maybe you should look through it first.

dead bwoy 18-04-2004 09:56

Re: Server Commands
 
well, since I have no coding experience and lack the patience for a forum walkthrough, if ne1 is willing to create this thingy, they will get full credit for the design/coding of the thing, to be used in a new mod. PM me if ne1's interested! It's not an esential part of the mod, but it sure would make a nice feature!

Terran 18-04-2004 10:13

Re: Server Commands
 
You're writing about a new mod but have no coding experience? Than I assume you assist somebody else who is actually programming the mod? If it's a real mod like DOD, CS etc. with a new client.dll than you should integrate this feature directly into the mod...

sPlOrYgOn 18-04-2004 10:34

Re: Server Commands
 
he was trying to make a metamod plugin but now has given up due to no coding experience and is asking someone else to make it for him.

BAStumm 20-04-2004 23:26

Re: Server Commands
 
actually if you just install HPB_bot version 3.0 and set it to not actually load any bots you can use HPB_bots map specific config stuff to exec server commands. This was really intended to have diff bot settings for each map but can also be used to exec other server commands. So you probably wouldn't need to write any code at all. Assuming you can get HPB_bot to load under czero.

There are other utilities around that already allow you to have map specific configs. One is halfd I can think of top my head but it is linux only.

Terran 21-04-2004 22:12

Re: Server Commands
 
He wants that feature for a single player game therefore halfd isn't an option.

rob 21-04-2004 23:21

Re: Server Commands
 
meanmod has scenario files for every map, but i think he wants something a little less full featured

dead bwoy 22-04-2004 04:27

Re: Server Commands
 
Yes, I can't wait for mean source to be released so i can try to add czero support too. I have MUCH to learn in coding tho...

[NvT]_KaszpiR_ 30-04-2004 11:48

Re: Server Commands
 
you could try to write it in perl :P (just a weird idea crossed my mind)


All times are GMT +2. The time now is 15:19.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.