gpl to icr2 AI converter
#21
Fastwalker I have found the problem ! The error occurs in the conversion from hexadecimal to normal ASCII. You are currently interpreting the values as Longs and you should be interpreting them as Floats. When I convert the first record as a Long I get the 1067285112 value, when I interpret them as a Float I get the needed 1.2303 ! Then that multiplied by 80 will get the need speed in mph. I hope it is not too dificult to rewrite the code and to work with float instead of long. By the way, if you want to inspect the file for yourself I use a hex editor called Hexworks [download link] and it has an on the fly interpreter in the status bar of the tool. At the top you can shift to the different formats by pressing the appropriate button. I have included a screenshot to show you.

   

Also, this might be coincidence but when I select the first bytes in the .lp file I get a long of the value 65538 ! Rings a bell does it not Grin3
Reply
#22
Thanks Tjerk,

I will only have to change a fell lines of the code.

Hexworks seems very handy, perhaps more than Hexplorer, the one I use.

I will let you know as soon as I have a prelimar version ready.

/
Fatwalker
Reply
#23
Hi All,

Now the converter is working! Just need to do some tuning + the code that handles the .ini files.

A preliminary version will be available soon if real life doesn't keep me too busy.

Regards,
Fastwalker
Reply
#24
Question:

In the setup file should I give the option to set different speed increase factors for each of the following files?

Race.lp
Pit.lp
Maxrace.lp
Minrace.lp
Pass1.lp
Pass2.lp

so if we tell converter to increase gpl speed in 10% do we doe it for all of them? Or we may wish to increase maxminrace and passx by a different factor?

BTW, I have a version that can already convert all the above files :-).
Only the panic and pace files are left.

/
Fastwalker
Reply
#25
I think that is a good idea. Will the program ALWAYS increase the speed or is it set in the .ini ? In that case you could have the increase set at 100% by default and have something to the effect of the following in the .ini:

speed_increase (0=not used, 1=used):1

speed_factor_race.lp (in %):115
speed_factor_pit.lp (in %):100
speed_factor_maxrace.lp (in %):115
speed_factor_minrace.lp (in %):115
speed_factor_pass1.lp (in %):116
speed_factor_pass2.lp (in %):117

So that the values get multiplied by 1.00 by default but if the speed_increase value is set at 1 then the program will multiply the speed of the race.lp by 1.15, the pit.lp by1.00, etc.

Once again [as with my earlier remarks about possible usage of the .ini file regarding number of records] it would probably be smart to print some info to the screen as to which values are being used in the conversion proces.
Reply
#26
Just curious, but could this converter give better results than the stuff that came from the GPL > N3 converter?
IIRS Driver Champion (2005-2007, 2010-2014)
IIRS Team Champion (2004-2014)
Reply
#27
Tjerk Wrote:I think that is a good idea. Will the program ALWAYS increase the speed or is it set in the .ini ? In that case you could have the increase set at 100% by default and have something to the effect of the following in the .ini:

speed_increase (0=not used, 1=used):1

 speed_factor_race.lp (in %):115
 speed_factor_pit.lp (in %):100
 speed_factor_maxrace.lp (in %):115
 speed_factor_minrace.lp (in %):115
 speed_factor_pass1.lp (in %):116
 speed_factor_pass2.lp (in %):117

So that the values get multiplied by 1.00 by default but if the speed_increase value is set at 1 then the program will multiply the speed of the race.lp by 1.15, the pit.lp by1.00, etc.

Once again [as with my earlier remarks about possible usage of the .ini file regarding number of records] it would probably be smart to print some info to the screen as to which values are being used in the conversion proces.


Hello Tjerk,
To answer your first question:
in current test version, speed increase is harcoded. However, I can fetch any parameters we like in the .ini file.

However to make code easy I suggest the following that if we specify 100 for a speed than the gpl speed will be multiplied by 1.0 i.e. no change. However, if we specify a value < 100 or > 100, the speed will be decresed or increase respectively.

Regarding, your last suggestion, yes, the tool will print info to the screen and to a log.txt file so you can analyse the info later after you try the AI in the game.

/
Fastwalker
Reply
#28
Wolf_pd Wrote:Just curious, but could this converter give better results than the stuff that came from the GPL > N3 converter?

Well, it will depend on the quality of the ai in the gpl track. but we can add some features to make the cars behave more like champcars than 1967 F1s!

Another idea is to do a basic conversion with this tool and create another one to do some adjustments to icr2 and n3 ai files.

/
Fatswalker
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)