1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ini.exe trick/fun

Discussion in 'Racer' started by Mr Whippy, Jul 28, 2010.

  1. I want to use this useful editing tool for altering content elegantly.

    For instance, my current WIP car has a plain white texture, and uses diffuse/ambient adjustments to the cars paint shader to change the cars colour. So rather than maintaining 10 various car.shd files constantly during development, each with a different colour but 99% similar data, I can simply have 10 batch files which alter the specific fragments needed...


    ..\..\..\..\ini ..\car.shd carpaint.diffuse 0.8 0 0 1
    (a bright red paint, running from a batch file in a folder called 'config' within the car folder (to keep it tidy)

    You could also set some fancy diff settings for a Ferrari, so through it's various modes it changes the aggression of the TCS and diff slip amount...

    ..\..\..\..\ini ..\car.ini differential.locking_coeff 100

    These fun little fragment changes make doing things really nice, since you can maintain and keep the main car.ini, but change small things for testing or simply for fun quickly and easily.

    It would be cool if Ruud formalised this perhaps, so we could run these batch files from the console (and when they were run, the associated file edited was also re-loaded into the game so the changes took effect there and then)

    Either way, pretty fun little tool to use to change things.

    Right now I have this altering my cars engines, weights, wheel models/weights/inertias, gearboxes/types and so on, and my cars colours, with about 20 small bat files in the config folder of my cars folder...
    Better than having about 100 seperate car.ini files under sub-folders using Raven etc... (despite Raven still being fantastic, it's not as nice as this system for configuring a car with many variables)

    One other area where it is limited for now, is replacing references...


    can't easily be changed to


    Thus, if you define several sound sets in your car.ini for different exhausts/engines, and then refer to them so they can easily be swapped, there is no way (that I can see) to do that yet using the ini.exe tool.


  2. Well, I'm thinking about creating a little batch script that would setup a new Racer release for best settings for my system. It is really a pain to change racer.ini each time a new version is released.
  3. Dave Stephenson

    Dave Stephenson
    Technical Administrator Staff

    You could just save a copy of the old and Diff/Merge them. That will allow you to instantly see the difference and choose which of the old settings to roll into the new file in a quick, easy, visual way.
  4. Yes, I have done that for a while, but I gets tedious pretty quick. I'd just prefer a one-click solution really... :p
  5. Dave Stephenson

    Dave Stephenson
    Technical Administrator Staff

    its a fair point :) depends how often you do it. 1-click always sounds an inviting proposition.
  6. With time & some practice, it's becoming more easier. Still, I also been thinking of this little problem, I'm generally tweaking a lot this file, because can't run certain settings when I drive with my G25 on 3 screens (shadowmapping/ projected shadows on/off), so what could be really cool, would be a sort of a "profiler" where you set your racer.ini variables & save them as a new profile easily loadable when calling it for example from the console...

    It's just an idea & I also admit it's painful to edit all those files manually, especially the geometry.ini which could be one of the biggest file (Max. number of models in a track ~ 7000), we need some kind of workaround.
  7. Ruud

    RACER Developer

    Normally for multi-computer solutions, we use 'racer -f <inifile>' where <inifile> is loaded as the primary ini file. Any values not found are still loaded from racer.ini. So if you have racer_3scr.ini with 'monitors=3' you can run Racer as 'racer -f racer_3scr.ini'.
    There's a script command to set ini values btw, but it's a bit limited wrt changing car.ini files. Hm.
  8. Stereo

    Premium Member

    Is it possible to configure racer.ini to allow multiple copies running on one computer? (eg. so I'm not stuck with one incredibly wide forward view - configuring a secondary screen to have helicopter or side views would be nice but I don't have 2 desktops running)

    When I try it gives an error with the second copy, "Multiview: can't create server on port 25010" which doesn't seem to be configurable, even if I have use_remote_server=1.
  9. Thx Ruud, works perfectly, it will be easier from now on, will create a bunch of shortcuts with different values & do more racer.ini testing/debugging.
  10. Ruud

    RACER Developer

    2 Racers on 1 computer isn't possible no. Too many conflicts with ethernet and such. Also, sending back & forth commands on the same machine on the same port (the console for example sends & receives on the same port) is not possible. All read/write operations should be split then over 2 ports, and even then it seems impossible.