View unanswered posts | View active topics It is currently Wed Nov 21, 2018 1:37 pm



Reply to topic  [ 24 posts ] • Topic rating: Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average. 
 Driver Randomizer anyone? Random Game and Track Reset Tools 
Author Message


Joined: Sat Feb 27, 2010 6:57 pm
Posts: 36
Post Driver Randomizer anyone? Random Game and Track Reset Tools
I'm not sure if anybody has thought of this before, but one thing I've often thought would improve generally is if the driver ai strength had some variance each time you start a race. If the ai setting is the same on all the cars, they tend to run in a tight pack. If you set some with higher and some lower, they tend to sift out the same for most races. This tendency is more obvious with certain cars (I'm seeing it with my R/C set I'm working where I have to create a pretty big AI difference in order for the cars not to bunch up too much).

I think what might work is a utility that lets you set a high and low ai range for each driver, and every time you launch generally with the utility it randomizes between those numbers. It would be better if it was built into the game, but that's not happening any time soon :weep:

Just to be clear I'm not talking about the ai setting in the car itself, but the driver setting that you adjust in-game.

Anyone up to the task?


Tue Mar 02, 2010 3:01 pm
Profile E-mail
User avatar


Joined: Fri Jan 08, 2010 10:38 pm
Posts: 694
Location: Finland
Post Re: Driver Randomizer anyone?
This probably would need creating a whole new driver file and possibly change the exe :eyes:

Good idea and would be great to see this happening, though.


Tue Mar 02, 2010 3:13 pm
Profile E-mail
User avatar


Joined: Sun Dec 27, 2009 3:03 pm
Posts: 1188
Location: Poland
Post Re: Driver Randomizer anyone?
I don't think that was made before, but it shouldn't be that hard to creators of other GR-related software. Lets say, that before starting GR you run a program, which randomizes ai-value in given range of selected drivers. It would open, read, change and save the driver file.

_________________


[cpk] [tou] [ser] TTA 2012 | [cpk] [gtc] GT Pack | [cpk] [ral] WRC Cars: Cordoba, Impreza, SX4 | [cpk] [tou] Touring Cars (reuploaded)


Tue Mar 02, 2010 4:16 pm
Profile E-mail
User avatar


Joined: Sun Dec 27, 2009 2:18 pm
Posts: 442
Location: Geldern
Post Re: Driver Randomizer anyone?
Nice Idea, maybe Rich Nagel is able to do this (but only in DOS :flip: ), or Majortom.

_________________
Please don't visit my GeneRally "website", it hasn't been updated since 8 years, and there aren't any new tracks!!

My "Museum"


Tue Mar 02, 2010 4:54 pm
Profile E-mail
User avatar


Joined: Mon Dec 28, 2009 10:26 am
Posts: 1117
Post Re: Driver Randomizer anyone?
The thing is to know when GR reads the driver files. If he read them every time before the race, while loading the track, then it would be easy to do a prog that generate random values for the files every 2minutes so that when GR loads the driver, it is randomized and remains in the memory until the next loading screen...

Otherwise, you would have to restart GR for a prog like that to work...

Unless you use CheatEngine or something in the kind to modify values of variables to put the random values for the colors and other things. Actually, I have to test out if it is possible to modify the PoV with C.E. (in example) while GR is running...

Hope this is somekind helpfull :bg:


Tue Mar 02, 2010 6:43 pm
Profile E-mail YIM


Joined: Sat Feb 27, 2010 6:57 pm
Posts: 36
Post Re: Driver Randomizer anyone?
Well, I did realize that you would need to re-start GeneRally every race if you want it to re-set the random values. It's a worthwhile trade-off for the added feature in my opinion. What would be nice is a custom GeneRally launcher that could initialize the track and drivers, with the randomized ai settings. Then when it launches the game you could just hit race. I don't know if that's possible though because every time I start GeneRally I have to pick my driver and track.


Tue Mar 02, 2010 7:10 pm
Profile E-mail
User avatar

GeneRally Wizard

Joined: Mon Dec 28, 2009 8:03 pm
Posts: 316
Post Re: Driver Randomizer anyone?
I have tested this with a little program that changes the KI-Value of
a certain driver file every 15 sec. While GeneRally is running and the program
in background, no changes are recognized, because GeneRally loads the
driver files only once at the beginning.

Before starting GR it is no problem to change some KI values randomly.
For a new setting you must leave GR again and again.

Another way could be, to change the values in a Savedgame for starting order
in background. In this case you have different KI values when loading, but always
the same starting order and track.


Wed Mar 03, 2010 1:19 am
Profile E-mail
User avatar


Joined: Mon Dec 28, 2009 10:26 am
Posts: 1117
Post Re: Driver Randomizer anyone?
majortom wrote:
I have tested this with a little program that changes the KI-Value of
a certain driver file every 15 sec. While GeneRally is running and the program
in background, no changes are recognized, because GeneRally loads the
driver files only once at the beginning.

So it does work? I mean, when you change track, the AIs are changing? Color changes are do-able?


Wed Mar 03, 2010 1:48 am
Profile E-mail YIM
User avatar


Joined: Fri Jan 08, 2010 10:38 pm
Posts: 694
Location: Finland
Post Re: Driver Randomizer anyone?
Could car changes too be possible mid-championship :scratch:

Championship starting with formula and then changing to rallycar mid-season for an example.


Wed Mar 03, 2010 1:13 pm
Profile E-mail
User avatar


Joined: Sun Dec 27, 2009 3:03 pm
Posts: 1188
Location: Poland
Post Re: Driver Randomizer anyone?
Hmmm, maybe editing saved game?

_________________


[cpk] [tou] [ser] TTA 2012 | [cpk] [gtc] GT Pack | [cpk] [ral] WRC Cars: Cordoba, Impreza, SX4 | [cpk] [tou] Touring Cars (reuploaded)


Wed Mar 03, 2010 5:25 pm
Profile E-mail


Joined: Sat Feb 27, 2010 6:57 pm
Posts: 36
Post Re: Driver Randomizer anyone?
Okay, here's my thoughts on what I would like to see, with the info from Major Tom:

Gui GeneRally launcher which allows you to choose your palette, a driver set, and set up an ai range for each computer driver from that driver set. The program would store driver sets within a sub folder, then copy those files into the driver folder when it launches the game, randomizing the ai (KI?) value for those drivers.

In addition, it would store save game sets within sub folders (and copy them in and out of the GeneRally saves folder as necessary), each of which would represent 1 race out of a series, using the driver set you specified. Either these would have to be created by the user and saved manually, or maybe the program could do that as long as you choose the track and car, etc.. Not sure how much can be done to create the save file or modify it externally. If possible, the saves would need to be modified with a randomizing of the start order. It would be nice if the program could track points and allow start order based on that.

Now, here's the interesting part. The program would be active in the background, and would monitor a certain key press. When it detects the key press, it ALT-F4's out of GeneRally, and automatically re-launches the game, allowing you to then load the next race in the series from the save games list, with a new randomized KI for the drivers.

If the program could somehow keep track of points from race finishes (perhaps extract them when you hit the key that resets the game) that would allow you an external way to run championship series, and maybe even save the results, etc...

Sounds good no? I wish I had the knowledge to program this myself, but it's beyond my abilities.


Wed Mar 03, 2010 7:48 pm
Profile E-mail


Joined: Sat Feb 27, 2010 6:57 pm
Posts: 36
Post Re: Driver Randomizer anyone?
Just a quick update. I did some tests with driver edits and save files. Here's what I observed:

Changing the ai value of a computer driver is not reflected upon loading up the save file, it keeps the original ai value it was saved with

Changing the driver's color values is reflected when loading the save file

Deleting the driver does not remove him from the save file, it reverts to the original colors it was saved under

Changing the driver's car doesn't affect the save file.

Creating a new driver with the same name as the original driver in the save file allows you to change the colors

*****If you delete the human driver file, then create a new one as a computer driver with the same name, you can then edit that driver's ai value, and it will be reflected when you load the game (this is big!)

These observations lead me to some conclusions. First, if the drivers themselves and their ai values are contained within the save file, as they must be, we should be able to edit them. If so, then it would not require restarting the game to randomize the ai value, just loading up the save file after the program has modified them (key press).

If it's not possible to edit the ai values in the save file, for whatever reason, the work around would be to create human drivers for all the drivers in a race. Create the save files for all the tracks in your series with these drivers. Then either manually, or with the program, delete those human drivers (all except yourself), and replace them with computer drivers using the same names. Now the program, when it resets can modify the driver ai values and they'll be reflected with each loading of the save game.


Wed Mar 03, 2010 8:30 pm
Profile E-mail
User avatar

GeneRally Wizard

Joined: Mon Dec 28, 2009 8:03 pm
Posts: 316
Post Re: Driver Randomizer anyone?
Hmm, I think, I would be able to change KI value, colors and reaction time in a save game.
Starting order is more complicated.

One way is, to run a proggi in background to do these changes every 2-3 minutes.
If you load the save game next time you have different settings.

Or I can generate a set of a few copys of a save game (1 click) before starting GR.
These copys can be raced one after another and you will have different values in each race.

Give me one week and I will make a little test proggi ...

I can't neglect my training for NBR :)


Wed Mar 03, 2010 9:33 pm
Profile E-mail


Joined: Sat Feb 27, 2010 6:57 pm
Posts: 36
Post Re: Driver Randomizer anyone?
Can you clarify what KI is? And Reaction Time? As for starting order, is it complicated because of trying to do it by points? Or is random start order hard too? I thought in your prior post you said that was possible. Maybe one way would be to modify the driver names and colors and re-organizing the ai values accordingly. That way it seems like you're getting a new starting grid, when actually it's just the driver values which are being changed. Mixed races with different cars would be the problem with this idea, unless you can set the car in the save file as well.

Of the two scenarios you describe, I like the first idea better. What about using a keyboard key to update the values? This way you could do it manually when you start a new race (just before loading the save). Maybe you could do both the key press, and the timed reset, that way it would work with or without the key press, but you could press the key just to be sure it's updated, in case you restart the race right away.

How about changing the track itself in the save file? I know, I'm getting carried away, but if you could do that then you would just need one save that you load every time you want to race, and the external program would update the track to the next in the series (you set this in the program), or it could choose a random track from those in a specified folder. Obviously, like changing the driver settings, it would only update this by time, or key press (if that's do-able).


Wed Mar 03, 2010 10:08 pm
Profile E-mail
User avatar

GeneRally Wizard

Joined: Mon Dec 28, 2009 8:03 pm
Posts: 316
Post Re: Driver Randomizer anyone?
KI=AI, you are right. I have forgotten to translate. KI in German is 'K√ľnstliche Intelligenz'
Reaction is, what you can change here in Savegame Reader:

Image

Define a HotKey is possible in normal Windows, but I have not tested it in DirectX.

For changing AI-Values, you must simple change some bytes in the save game.
Changing Starting Order is more complicated. You must change more data and arrange it new.
For changing the track, you must have an algorithm that calculates a 16byte hash string.
The savegame is locked to a track with this hash string. The algorithm might be a secret
of GR-Builder.


Thu Mar 04, 2010 9:15 pm
Profile E-mail


Joined: Sat Feb 27, 2010 6:57 pm
Posts: 36
Post Re: Driver Randomizer anyone?
I'm still confused about KI/AI and reaction time. Are they the same thing under different name? In GeneRally you have two AI settings you can adjust that affect the performance of the driver, that I'm aware of. The driver's ai slider, and the ai value in the car file. Is the first one the KI/AI and the 2nd one the reaction time? I'm surprised if you could vary the car value within the save file, but if so, that's another interesting tool to use in this program for further randomizing the ai drivers performance.

So it looks like one save that changes tracks automatically is out of the question, that's not really a surprise though. How about changing the cars each driver is using?

Also, where is this savegame reader you talk about? I'd be interested in checking it out.

Sorry for being a pest with all my questions, but I like this idea, and I can make better suggestions if I understand what's possible and what isn't.


Thu Mar 04, 2010 9:52 pm
Profile E-mail
User avatar

GeneRally Wizard

Joined: Mon Dec 28, 2009 8:03 pm
Posts: 316
Post Re: Driver Randomizer anyone?
You can change the AI-level of the car only in careditor. This is part of
the car like horsepower or downforce. Changing it, changes the car.

The AI value in GR Menu describes, how the AI-Driver follows the AI-Line you
can see in TrackEditor. Results a good or bad AI-Driver.

Reaction Time is the time of starting, when the traffic light goes out.

You will find the Savegame Reader in mostly ervery Competitionpack on this site.


Thu Mar 04, 2010 10:29 pm
Profile E-mail
User avatar

GeneRally Wizard

Joined: Mon Dec 28, 2009 8:03 pm
Posts: 316
Post Re: Driver Randomizer anyone?
I tested a Hot-Key in GR-Menu - and it worked.
Here is a little tool, using F5 in GR.

track_reset.zip

Select a track in the tool window and start GR.
By pressing F5 in GR Menu the selected track will be reseted.
This could be useful in a competition, if you must drive
your race on a reseted track. See help file in zip.

And now I will try it with a savegame ...


Fri Mar 12, 2010 9:14 pm
Profile E-mail
User avatar


Joined: Sun Dec 27, 2009 2:18 pm
Posts: 442
Location: Geldern
Post Re: Driver Randomizer anyone?
Nice work Majortom, please go on like this! :D

_________________
Please don't visit my GeneRally "website", it hasn't been updated since 8 years, and there aren't any new tracks!!

My "Museum"


Fri Mar 12, 2010 11:16 pm
Profile E-mail
User avatar

GeneRally Wizard

Joined: Mon Dec 28, 2009 8:03 pm
Posts: 316
Post Re: Driver Randomizer anyone?
Here is little beta tool for changing the AI values in a saved game.
Random_game.zip (see help text for install)

Make a save game with starting order and load it in the tool.
By preesing F5 in GR menu as a Hotkey, you get a random game out of your startgame
named _random_yourgame.gam with different values for the AIs.
So you get a different race after ervery F5 and reload.

Please test it and comment.
If someone find it usefull, I can work on it ...


Sun Mar 21, 2010 2:33 pm
Profile E-mail


Joined: Sat Feb 27, 2010 6:57 pm
Posts: 36
Post Re: Driver Randomizer anyone?
I checked this out, and it does work very nicely. An enhancement I would suggest is to allow you to set parameters for all the drivers you've created, allowing you to set a random range for each driver individually. This way you can create some drivers who are very consistent, and others who are not. It would need to identify the drivers in the save, and match those to the parameters you've established, I don't know how hard this is to do. Another idea would be for the game to be able to randomize which drivers are in the race out of all available (this would be best as an option you could select, rather than the default behavior). Perhaps you could put a check mark beside all drivers you want to include as randomly available, then if you check just 6 drivers, they would always be in the race, but if you check more, it would randomize the field between those that you check. You could also put a mark by a driver to be certain they are always included (player cars for example)

Great job, this is a terrific utility. I would love to be able to include it as part of my GR/C "mod" when its finished, if you're okay with that, credit given of course.


Tue Mar 23, 2010 2:46 pm
Profile E-mail
User avatar

GeneRally Wizard

Joined: Mon Dec 28, 2009 8:03 pm
Posts: 316
Post Re: Driver Randomizer anyone?
I had the idea with the different settings for each AI too.
That is no problem. I will build a better looking Prog-Window.

To select the drivers from list randomly is difficult. However, it makes little sense.
Principle the drivers differ only in the AI value (apart from name, color and
of course the car). If driver A receives the value of driver B, it is driver B.

Changing the basic AI value and give a different range for each one is possible.

Note: When you race a _random_game with different settings, make a new savegame after
you have finished and load this game in SaveGameReader, you will not see the different
values. You see the original values as they are stored in the drv.file.
The AI Value is stored twice in savegame and SaveGameReader only looks for the first one.


Wed Mar 24, 2010 11:58 pm
Profile E-mail


Joined: Sat Feb 27, 2010 6:57 pm
Posts: 36
Post Re: Driver Randomizer anyone?
I'll try to clarify. Lets say I create a set of ai drivers to match the F1 roster, each with a base ai value and an individual random value which represents strength and consistency. I then would like to be able to select say 10 of those drivers, and when I run a race, have the field be a random mix of any of those 10, plus myself. Each driver has his name and color which I can identify him by, and his performance will match with expectation, but because of the random ai value will not be completely predictable. The process here is that you actually have only 5 ai drivers that are being used, but the parameters of color, name, base ai value and random ai range for all drivers is stored by the program and randomly given to those 5 generic ai so that the field changes according to the randomization. Unfortunately I don't think it's possible to change what cars are used by the drivers in the save file, but if so that would be even better.

Another thing occurred to me as well. Let's say I want to run a series of 10 races. I'll create 10 save games, one for each of these tracks. Currently, when I hit F5 to randomize the AI, it will only randomize the one save file that I've identified in the program, which only handles a single track. I have to exit the program and choose another save file to be able to randomize the next race in my series. Or alternatively I need to randomize all 10 saves/tracks prior to starting GeneRally. Ideally it would be good if you could select a group of saves, or if the program identified save files which have a particular prefix such as RAI_ (random AI), then when I hit F5, it would randomize the ai in all the selected saves, or all those with the RAI_ in the name.


Thu Mar 25, 2010 3:13 pm
Profile E-mail
User avatar

GeneRally Wizard

Joined: Mon Dec 28, 2009 8:03 pm
Posts: 316
Post Re: Driver Randomizer anyone?
hmm, I will try, takes some time .... :coffee:


Thu Mar 25, 2010 10:02 pm
Profile E-mail
Display posts from previous:  Sort by  
Reply to topic   [ 24 posts ] • Topic rating: Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average.Ratings: 0, 0.00 on the average. 

Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.