NFSAddons Forums

Main Menu

Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)

Started by Zalcus20, Jul 26, 2021, 12:41 PM

Zalcus20

Good day all,

I have just completed adjusting the AI bots behavior on a well-known track: Lost Speedway from the "GT MOD".  The bots are not 100% perfect, but they will no longer drive very slow and will not crash into the walls as much.  This was done by editing the files "spdfA.bin" and "spdrA.bin" (speed files).

The speed files have been attached to this post for you to see the significant improvement made by editing only these files. If anyone is interested, try this out and post your thoughts here.  :)

To install, make sure you already have the Lost Speedway track by Fangio installed in your nfshs Data/Tracks directory. Then extract the zipped speed files and replace (make a backup first) the original speed files found in the directory.

I've also made these adjustments for the Transtropolis track released by nfsfan83 a few years ago.  However, I need to seek his permission to upload the complete track since many more adjustments were made besides these.  If you see this message nfsfan83, please let me know if you are ok with this.  ;)

Regards.

PS: Using the "madland" cheat makes it almost impossible to place first in a single race on this track now. 

nfsfan83

Zalcus You can fixed A.I in all my track :)

I want also upload fixed Transtrapolis track with Your fixed A.I


JimDiabolo

Get T3ED, Stock & Expansion Pack from Magenta Cloud.

noise

Good news...after 20 years addon trackbugs get fixed, like visibility, rearview mirror (thnx to J.diabolo) and now AI by Zalcus. Gonna try soon.

Zalcus20

@nfsfan83: Thank you for your permission. I will upload the updated version sometime this week!  =D

@JimDiabolo: I found out that the second set of numbers in the speed bin files influence the driving line for the ai. From my experiments, the higher the number, the further to the right of the track the ai opponents will drive. The lower the number, the closer to the left they will drive. Though In some cases, the reverse is true.

I am currently adjusting Urban Germany's (by JP RACING) speed files. I'll attach them here when done.

noise

"Though In some cases, the reverse is true."

Probably Left Hand Drive cars. lol

b.t.w: Can these speedbin files influence the behaviour of AI and traffic. Opponents make odd moves.

Zalcus20

The speed files do not seem to have any impact on ai cops/traffic. Only the ai opponents. I do admit that they do still make some strange "gravity-defying" moves, lol. This seems to occur when the physical track is stretched (as is the case with the Lost Speedway track)  But at least they can keep up with the player now and provide some competition  >:D

EDIT: I just realized in my first post, I said "ai behavior". I meant "ai driving line". AI behavior is most likely hardcoded.  :-\

EDIT 2: In order to change the line of the ai cops/traffic cars, the ai lanes (not driving lines) have to be editable (represented in T3ed as those light blue lines in the virtual road view). Currently, they are uneditable.

Zalcus20

Speed files for Urban Germany are complete. They are attached to this post.

Using the 'madland' cheat on this track really shows off how capable the ai opponents are at reaching top speed (especially in class AAA).

Since this has been finished sooner than expected, I'm going to go right ahead and upload the fixed version of Transtropolis now... Thanks again to nfsfan83 for your consent! I will look into more of your tracks that I can hopefully fix.

Regards.  :)

nfsfan83

Zalcus if You have free time please fix A.I in my citytracks like NY, LA, Miami and Vegas?

Zalcus20

Decided to further investigate the ai in the Lost Speedway track. Although the speed files were adjusted, they still come off the road at certain times.  :o
Looking at the track more closely in T3ed revealed that the virtual road is not properly centered. On some parts of the track, the lanes fall outside of the passable boundaries, causing the ai to slam into the walls or drive off the road at these points. These issues have been corrected. 8) The ai opponents now drive the best line possible (to my knowledge) trying their best to stay on the paved road.  However, since the TR file has been edited, I need to seek permission from the original author. Does anyone know if the author of Lost Speedway, Fangio, is still active and if he would allow me to upload a fixed version? I would contact him myself but I can't send emails at the moment (strange bug I guess?).  :-\

@nfsfan83: I'll see what can be done.  ;)

JimDiabolo

Quote from: Zalcus on Jul 29, 2021,  6:44 AM
@JimDiabolo: I found out that the second set of numbers in the speed bin files influence the driving line for the ai. From my experiments, the higher the number, the further to the right of the track the ai opponents will drive. The lower the number, the closer to the left they will drive. Though In some cases, the reverse is true.
It true that the speed files are important for the ai driving line, but I am still not 100% sure how.
Btw. In the next t3ed the “adjust road width” will be working again. In the version I got from Nappe1 only the “Denis Method” worked. As you wrote this seems to be important for cops and traffic.
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

Zalcus20

I am now fixing the well-known AI bot problem on the Mystic Peaks track (about halfway done). It turns out the problem was to do with a bunch of zeros (nulls) being found throughout the speed files. Simply changing their value to a higher number like 96, increased the bots IQ, lol. Now they can complete the track in both directions without getting stuck.

Also fixing some minor issues with the track, like a floating tree, and some collision properties with signs. The modified track will be uploaded here on the site when complete.

@JimDiabolo: This and the type 6 objects are really great news. Can't wait to perform more experiments when the updated T3ed is made public.

EDIT: @JimDiabolo: I noticed in the t3ed3.png image, the ai lane on the right side (the thin light blue line) is touching the virtual road width boundary (the thick purple line). Just want to bring to your attention that when this happens a bug results in game where the AI cops won't deploy a spike strip or roadblock on that area of the track. The traffic also will not pull over when cops turn on their sirens. To avoid this bug, the ai lanes must be kept within the virtual road width boundaries. It must be never touch or fall outside of them.  ;)

Zipper

I'm glad to read this. Hope someday the tutorial sees the light so we can help you on it.
Always looking for NFSIISE source code

Zalcus20

I'm not so good with making tutorials, but maybe when or if I figure out exactly how the speed file works, I'll try to make one.  ;)

My update to Mystics Peaks was uploaded here about 24 hours ago, but it didn't appear on the addons list yet. :( So I'm going to attach the speed files here (since this is all you need to get the bots working). Other fixes are minor.

More updates for more tracks follow soon.  :)

nfsfan83