Inside3D!
     

Conditional Default.cfg for multi-engine compatibility

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Tue Feb 05, 2008 3:46 pm    Post subject: Conditional Default.cfg for multi-engine compatibility Reply with quote

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
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Tue Feb 05, 2008 11:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Wed Feb 06, 2008 11:37 am    Post subject: Reply with quote

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 Smile


Sounds like I'll have to use something non-standard.

Very well! Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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