rec.autos.simulators

N4 AI Parameter Editing

BearMt

N4 AI Parameter Editing

by BearMt » Wed, 11 Apr 2001 07:45:24

Hi all...
While trying to develop a program to randomize driver ratings in AI, I came
across a problem...hopefully someone out there knows how to get around it.
I traced the problem down to this...when I open a .car file with
notepad/wordpad, and change one of the AI Parameters, then save the file, it
will no longer appear on the opponent screen.  Does anyone know why this
happens, or how to alter the AI params outside of the game?
Thanks in advance...
      Ken
Tim

N4 AI Parameter Editing

by Tim » Wed, 11 Apr 2001 08:57:39

When you save the file in a text editor your adding a character at the end
of the file, thus corrupting it
No way to get around that
Try using Visual Basic or Visual C, open the file as a binary and read it
into an array of some sort, edit it then write it back out as a binary


Mike Whit

N4 AI Parameter Editing

by Mike Whit » Wed, 11 Apr 2001 09:27:15

Probably because the .car file is not plain text and notepad/wordpad is
screwing up the file or file name.


Tex

N4 AI Parameter Editing

by Tex » Wed, 11 Apr 2001 10:50:08

Yeah.  Often when opening a text file in NP/WP, a .txt extension will get
tagged onto the end of the filename when saving, so ai.ini becomes
ai.ini.txt.  You should be able to fix this by re-naming the file in
explorer and removing the erroneous extension info.  At least that's what
happened to me with GPL's core.ini.  Good luck!


> Probably because the .car file is not plain text and notepad/wordpad is
> screwing up the file or file name.



> > Hi all...
> > While trying to develop a program to randomize driver ratings in AI, I
> came
> > across a problem...hopefully someone out there knows how to get around
it.
> > I traced the problem down to this...when I open a .car file with
> > notepad/wordpad, and change one of the AI Parameters, then save the
file,
> it
> > will no longer appear on the opponent screen.  Does anyone know why this
> > happens, or how to alter the AI params outside of the game?
> > Thanks in advance...
> >       Ken

Mike Whit

N4 AI Parameter Editing

by Mike Whit » Wed, 11 Apr 2001 12:10:55

But that is only part of the problem.  Most likely there are "characters" in
the .car file that NP/WP will either change, or ignore while loading.


> Yeah.  Often when opening a text file in NP/WP, a .txt extension will get
> tagged onto the end of the filename when saving, so ai.ini becomes
> ai.ini.txt.  You should be able to fix this by re-naming the file in
> explorer and removing the erroneous extension info.  At least that's what
> happened to me with GPL's core.ini.  Good luck!



> > Probably because the .car file is not plain text and notepad/wordpad is
> > screwing up the file or file name.



> > > Hi all...
> > > While trying to develop a program to randomize driver ratings in AI, I
> > came
> > > across a problem...hopefully someone out there knows how to get around
> it.
> > > I traced the problem down to this...when I open a .car file with
> > > notepad/wordpad, and change one of the AI Parameters, then save the
> file,
> > it
> > > will no longer appear on the opponent screen.  Does anyone know why
this
> > > happens, or how to alter the AI params outside of the game?
> > > Thanks in advance...
> > >       Ken

Tim

N4 AI Parameter Editing

by Tim » Wed, 11 Apr 2001 15:33:06

Windows .ini files are, by definition, text files
.car files need some sort of ascii file editor
There are several shareware pgms out there if you want to edit them manually
otherwise you'll need a programming language



rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.