Author Topic: Special config options, joysticks, force feedback and other nifty things  (Read 2412 times)

0 Members and 1 Guest are viewing this topic.

Offline Amon_Re

  • 28
    • http://www.kefren.be
Special config options, joysticks, force feedback and other nifty things
I was wondering what options are supported in .fs2_open/fs2_open.ini ?
Is it there that i can specify my joystick? Or should it be able to locate the joystick automagicly?
What other nifty things can i toss inthere?
Sig? What sig?

 

Offline Amon_Re

  • 28
    • http://www.kefren.be
Re: Special config options, joysticks, force feedback and other nifty things
Ok, turns out it finds the joystick automagicly.
Is it possible to define other things inthere?
Sig? What sig?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Special config options, joysticks, force feedback and other nifty things
The ini file options will change when Windows starts using it to.  I'm working on a new interim launcher which will be cross-platform and use the new ini format (it's based on the real future launcher code) but the game itself won't actually recognize the new options yet.

There are currently options for speech but since speed isn't actually supported yet under Linux that won't do much good.  I'm working on speed code for OS X now since it has a built in speech system that's comparable to that on Windows.  The Linux speech support has worked in the past but it was very cumbersome and didn't support everything we needed.  I'll revisit that at a later time.

There is really only one sound option, "SoundSampleRate" which should really be set at 44100 for movies to sound correct, but any legal sample rate will do.  The only graphics option which does anything is "GammaD3D" which will be renamed to just "Gamma" when we go to a fully ini based config system on all platforms.  When I start again with my experimental Linux graphics tree there will be anti-alias options and a few other OGL specific things.

There is one joystick related option, "CurrentJoystick", which is a number assignment from 0 to how ever many joysticks that SDL can see and in the order that SDL sees them.  By default it's set to 0 which will just use the first joystick that SDL finds.  In the newer code that I'm working on the joysticks will be referenced by name rather than by order so that you don't have to worry about SDL getting the order messed up as you plug and unplug joystick devices.  If you use a debug build and have "+JOYSTICK" (not case sensitive) in ~/.fs2_open/data/debug_filter.cfg then the debug log will give you a full list of the joysticks that SDL detects.

Force Feedback isn't supported, though I did write code for the icculus.org version a few years ago.  The problem was that it just didn't work right but that was probably due more to my joystick (not enough memory for the effects and I didn't know how to manage it properly) than the code.  I rewrote the code several times trying to get it working but it never was 100%, and the code isn't in the best shape right now either.  Since I was never happy with it I never put it in CVS, though I do still have it.  Perhaps someone will volunteer to take that over at some point and finish it up and get the code worthy of being in CVS.

 

Offline Amon_Re

  • 28
    • http://www.kefren.be
Re: Special config options, joysticks, force feedback and other nifty things
Ok, if you need a betatester for the force feedback thingie, let me know.

Another thing i was wondering, is it possible to specify a mod directory? So that mods don't end up in the main data directory (considering that's located in /usr/games here i'd rather not have to mess with that dir at all)
Sig? What sig?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Special config options, joysticks, force feedback and other nifty things
I might dig up the force feedback code and put it in CVS for whoever wants to try it but it's going to be a build option and an ini option.  Oh and you'll pretty much be on you own if the code causes your FF joystick to go insane and attack you. :)

Mod directories are off of ~/.fs2_open/ and off of the main directory where you have the game installed (ie, it checks in $(HOME) first and then the gamedir).  The "-mod" cmdline option allows you to specify one or more directory names to use for mods.  I use "-mod scp,mediavp" when I'm playing a normal game.  Then I have two directories, ~/.fs2_open/scp, and ~/.fs2_open/mediavp that the files come out of.  Anything that gets saved (except for logs and pilot files) will go into the first listed mod directory.  I tend to use different game directories for total conversions like TBP, WCS, and Inferno but you still have to specific a -mod directory to keep all of the files separated in ~/.fs2_open.  The only restriction on what the -mod directory is is that it has to be lowercase, no exceptions.

You can also go deep with it, "-mod mods/scp,mods/mediavp", if you wanted to keep even more order in your directories.  There is a path length limit (consider max length of 128 though it's larger in some areas) for the whole thing so try not to bury the files too deep or it won't be able to find everything.

 

Offline Amon_Re

  • 28
    • http://www.kefren.be
Re: Special config options, joysticks, force feedback and other nifty things
Thx, off to do some damage, err, betatesting :D
Sig? What sig?