View previous topic :: View next topic |
Author |
Message |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Tue Feb 05, 2008 3:46 pm Post subject: Conditional Default.cfg for multi-engine compatibility |
|
|
I just want to float this idea up for someone to shoot it down as being bad for some reason.
He's what I'd like to do in an ideal world:
For a gamedir game, I would like to have a default.cfg in quake.rc that conditionally executes an additional cfg (like darkplaces.cfg) to support extra engine features without mucking up the console with a 1000 invalid command/invalid cvar messages.
First:
1. Does DarkPlaces already support this somehow?
2. If not, what would be a good way to do this that isn't blasphemous to Quake Standards? Would modifying the engine to do read special comments that other engines would ignore like ...
Quote: | //#dp exec darkplaces.cfg |
Or should I just toss in a .pk3 with an alternate default.cfg and darkplaces.cfg in it that DarkPlaces uses instead and hope no other engine supports .pk3 files?
Any ideas? I'm asking because I don't want to do something hideous when someone has an elegant idea.
I want to support many different engines (engine-neutral), but take advantage of DarkPlaces features.
/qc extensions wouldn't work because that isn't engine-neutral, right? |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Tue Feb 05, 2008 11:39 pm Post subject: |
|
|
temp1 "exec darkplaces.cfg"
alias $temp1 -jump
$temp1
alias $temp1 ""
temp1 ""
Something like that might work.
You'll want "unalias exec" to be somewhere in your darkplaces.cfg somewhere though...
Interestingly, quakeworld engines don't report any errors when loading configs at start up.
qc gives greater logic and a way of easily testing what the engine is, what it supports, etc. But stuffcmding stuff to the clients every time they connect to a map is bad karma.
Alternativly, for darkplaces at least, you could exploit the fact that only two engines support menu.dat, and that its loaded on startup. Unfortunatly I'm not sure if its possible to have a null menu.
FTE supports 'if FTE isin $version then exec youarerunningfte.cfg' Which is a funky way to detect things, and I think DP supports an if command too, though probably doesn't support $version. But there's two different engines detected and distinguished :) _________________ What's a signature? |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Wed Feb 06, 2008 11:37 am Post subject: |
|
|
Spike wrote: | temp1 "exec darkplaces.cfg"
alias $temp1 -jump
$temp1
alias $temp1 ""
temp1 ""
Something like that might work.
You'll want "unalias exec" to be somewhere in your darkplaces.cfg somewhere though...
Interestingly, quakeworld engines don't report any errors when loading configs at start up.
qc gives greater logic and a way of easily testing what the engine is, what it supports, etc. But stuffcmding stuff to the clients every time they connect to a map is bad karma.
Alternativly, for darkplaces at least, you could exploit the fact that only two engines support menu.dat, and that its loaded on startup. Unfortunatly I'm not sure if its possible to have a null menu.
FTE supports 'if FTE isin $version then exec youarerunningfte.cfg' Which is a funky way to detect things, and I think DP supports an if command too, though probably doesn't support $version. But there's two different engines detected and distinguished  |
Sounds like I'll have to use something non-standard.
Very well!  |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2004 phpBB Group
|