The online racing simulator
LFS Setups / Colours X10-X30 Fix
(99 posts, started )
Quote from Bob Smith :Can't you just create a batch file to do this?

ren "XR GT TURBO_*.*" "XRT_*.*"

???

Sure.. except I haven't written a batch script in years. Perl runs on both my windoze box and FreeBSD boxes.. no need to worry about whether I need .BAT or .SH files



Regards,

Ian
Quote from Bob Smith :Can't you just create a batch file to do this?

ren "XR GT TURBO_*.*" "XRT_*.*"

???

Try it, but back up your sets first
I am getting the following error:

Quote :Use of uninitialized value in substitution (s///) at I:\x10_to_x30_setup_fix.exe line 69.

Hi AP..

Quote from AppiePils :I am getting the following error:

Can you copy / paste the few lines above the error line too please? I think I've got a car name wrong in the lookup table, which will also explain Sven's bug report.



Regards,

Ian
Quote from NotAnIllusion :Try it, but back up your sets first

Works fine for me, you just have to do col and set files individually as it doesn't support multiple wildcards.

Edit again: aha, but it doesn't remove characters. Oh well.
Worked great for nearly all my setups, except about 125 of them...they got transferred over but no three digit vehicle name was given so the files just say "_as1_blah345.set" for example.
Worked for me perfectly great tool
Quote from NetDemon01 :Worked great for nearly all my setups, except about 125 of them...they got transferred over but no three digit vehicle name was given so the files just say "_as1_blah345.set" for example.

Thanks ND.. that definitely confirms a car code error. I don't suppose you happen to know what car it was originally meant for do you? This'd really help me pinpoint the error.

I'll add some sanity checking too for an update



Regards,

Ian
Quote from Ian.H :Thanks ND.. that definitely confirms a car code error. I don't suppose you happen to know what car it was originally meant for do you? This'd really help me pinpoint the error.

I'll add some sanity checking too for an update



Regards,

Ian

Well I can tell you the ones it did work for.
FO8
FOX
FXO
FXR
FZ5
FZR
LX4
LX6
MRT
RAC
RB4
UF1
UFR
XFG
XFR
XRR
XRT

And I believe I did not have any setups for the Sauber to begin with.
So that leaves the new BMW...hmm...seems all were acccounted for but for some reason some setups just didn't transfer.

Nevermind...XRG is missing. Maybe thats the one with the trouble then.
Quote from Ian.H :Hi AP..
Can you copy / paste the few lines above the error line too please? I think I've got a car name wrong in the lookup table, which will also explain Sven's bug report.

Regards,

Ian

Yes of course i can

Renaming I:/1_Games/LFS/data/settings/XR GTR_bl1r_bioha1451.set as I:/_Games/LFS/data/setups/XR GTR_bl1r_bioha1451.set...done!
Use of uninitialized value in substitution (s///) at I:\x10_to_x30_setup_fix.exe line 69.

hmm actually looking at it makes me think it has an issue with the 1_Games as main folder. OK, altered it, my sets got changed .

Thanks for helping out!
Quote from NetDemon01 :Well I can tell you the ones it did work for.

[ snip list ]

And I believe I did not have any setups for the Sauber to begin with.
So that leaves the new BMW...hmm...seems all were acccounted for but for some reason some setups just didn't transfer.

Thanks. My BMW Sauber ones renamed no problem.. that said, AFAIK, all cars have a '_race_s.set' setup file.. all of which appear to have been copied ok for me.

FBMW should be unaffected, as X10 didn't have any FBMW setups (I haven't accounted for this car at all).

This is strange


Regards,

Ian
Quote from AppiePils :Yes of course i can

Renaming I:/1_Games/LFS/data/settings/XR GTR_bl1r_bioha1451.set as I:/_Games/LFS/data/setups/XR GTR_bl1r_bioha1451.set...done!
Use of uninitialized value in substitution (s///) at I:\x10_to_x30_setup_fix.exe line 69.

hmm actually looking at it makes me think it has an issue with the 1_Games as main folder.

Thanks AP! You've nailed it

My regex is sloppy and it's done a string replacement at the _first_ instance of '_' in the complete path, rather than filename(!).

A really shitty bug on my part and will explain the randomness of it working for some and not others.

Thanks for posting this.. I'll get on with a fix and post an update



Regards,

Ian
It is definitely the 'XRG' letters that didn't transfer for me. I finally recongized one of my own setups. Not a big deal for just one car to rename ;-) I can do that manually in a few minutes. Thanks for this script, made it lots easier!
Doesn't work for me... I open it up and the black prompt box closes straight away...
Thankyou very much!!

+1
Quote from NetDemon01 :It is definitely the 'XRG' letters that didn't transfer for me. I finally recongized one of my own setups. Not a big deal for just one car to rename ;-) I can do that manually in a few minutes. Thanks for this script, made it lots easier!

That's even more strange as I definitely detect it correctly as 'XRGT' (or 'XR GT' before I strip the spaces).

I've added checking for this now and fixed the above bug that AP has pointed out to me.

At least now there should be no actual _problems_ when running it.. but still not entirely sure why the XRG fails

If you have a backup of your settings dir ND, could you perhaps restore that and try the updated version I've uploaded to post #1 and let me know if for some reason, this update has fixed that issue too? If so and it still errors, it'll display: 'ERROR: COULD NOT GET CAR CODE FOR $carName' and skip that file.



Regards,

Ian
Quote from CycloNe88 :Doesn't work for me... I open it up and the black prompt box closes straight away...

That's because you just double clicked it. Read the first post again.
Quote from CycloNe88 :Doesn't work for me... I open it up and the black prompt box closes straight away...

Did you open a DOS prompt and then type the command? or did you just double-click the binary? I suspect the latter as it contains no code to close the console.. if so, this won't work, it's not a GUI app and requires keyboard input.



Regards,

Ian
ohhhh, lol thanks
heh.. no probs.

Seeing the posts a little confused about DOS prompts and the likes makes me feel old



Regards,

Ian
<3 Ian
I redownloaded the entire Inferno setups to try again. Worked perfect this time. Nice work, certainly beats all three of the renaming applications I downloaded to try out.
Could the XRG problem be releated to the fact that the XRG files are named 'XR GT' and the XRT 'XR GT Turbo?' It might be getting confused somewhere in there; maybe the XRT string is being applied to the 'XR GT' files too?
Quote from NetDemon01 :I redownloaded the entire Inferno setups to try again. Worked perfect this time. Nice work, certainly beats all three of the renaming applications I downloaded to try out.

Sweet! Thanks again for taking the time to redownload the setups and test again... much appreciated and glad it all worked this time



Regards,

Ian
Thanks Ian

Gave me a car code error for XRT and XRR, seem to have setups for both in my setups folder so I guess it worked.

LFS Setups / Colours X10-X30 Fix
(99 posts, started )
FGED GREDG RDFGDR GSFDG