NFSAddons Forums

Need For Speed Forums => General NFS => Topic started by: Zalcus20 on Jul 26, 2021, 12:41 PM

Title: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Jul 26, 2021, 12:41 PM
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. 
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: nfsfan83 on Jul 29, 2021, 5:37 AM
Zalcus You can fixed A.I in all my track :)

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

Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: JimDiabolo on Jul 29, 2021, 6:34 AM
Nice to see the improved AI line.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: noise on Jul 29, 2021, 6:38 AM
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.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Jul 29, 2021, 6:44 AM
@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.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: noise on Jul 29, 2021, 7:33 AM
"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.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Jul 29, 2021, 8:35 AM
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.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Jul 29, 2021, 11:25 AM
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.  :)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: nfsfan83 on Jul 30, 2021, 4:14 AM
Zalcus if You have free time please fix A.I in my citytracks like NY, LA, Miami and Vegas?
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Jul 31, 2021, 1:31 PM
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.  ;)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: JimDiabolo on Aug 01, 2021, 3:32 AM
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.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Aug 02, 2021, 6:53 AM
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.  ;)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zipper on Aug 03, 2021, 6:15 PM
I'm glad to read this. Hope someday the tutorial sees the light so we can help you on it.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Aug 05, 2021, 8:20 AM
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.  :)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: nfsfan83 on Aug 06, 2021, 5:23 AM
In Mystics Peaks A.I have problem that crash in cave
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Aug 12, 2021, 10:10 AM
I'm currently improving "Redrock Outback" track by nfsfan83.  What was meant to be a simple AI improvement project turned out to be an overall track improvement.

These are the improvements so far:
-collision properties have been set with the signs and they now have a rear texture.
-The boxes in the tunnel have been given type 6 properties.
-Ray tracing (shadows) have been added. This greatly enhances the aesthetics and feel of the track.
-99% of invisible walls have been removed.
-Track mesh has been edited to look more complete. 98% of holes in the mesh are closed and in some areas of the track, more scenery was added.
-99% visibility issues have been fixed. This was mainly done by converting many large polygon objects to global objects.

With nfsfan83's permission, I will upload when complete. After which, I will try to make a quick "get started" tutorial on how to edit AI driving lines for those who are interested. Stay tuned...
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Cooya! on Aug 12, 2021, 10:34 AM
These are great news! "Redrock Outback" is by far his best track so far. It has this amazing oldschool-NFS atmosphere... like a stock EA track. What a pity that he always sticks to this overambitious city tracks full of mesh-holes and confusing road layout ... he should definitely do more rural landscape tracks. ;) So let "Cape Hatteras" and "Lost City" follow when you are still not done with "nfsfan83" tracks.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: noise on Aug 12, 2021, 2:59 PM
Great to see nice tracks get improved....

Still...you get in your car and they say: 'there is 2% chance you drive in hole, a 1% chance you hit an invisible wall, and there are boxes in the tunnel. Have fun
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: nfsfan83 on Aug 13, 2021, 9:33 AM
Zalcus You have permission to fixed all my tracks if You want :) we must make NFS4 great Again :D

I still wait for fix:

NY, LA, Miami and Vegas and others... I spent many hours to make best real city tracks in NFS4
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: nfsfan83 on Aug 13, 2021, 9:45 AM
Quote from: Cooya! on Aug 12, 2021, 10:34 AM
These are great news! "Redrock Outback" is by far his best track so far. It has this amazing oldschool-NFS atmosphere... like a stock EA track. What a pity that he always sticks to this overambitious city tracks full of mesh-holes and confusing road layout ... he should definitely do more rural landscape tracks. ;) So let "Cape Hatteras" and "Lost City" follow when you are still not done with "nfsfan83" tracks.

I can't make nice landspace tracks :P Cities track is my love...
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: JimDiabolo on Aug 13, 2021, 11:38 AM
Quote from: nfsfan83 on Aug 13, 2021,  9:45 AM
I can't make nice landspace tracks :P Cities track is my love...
Then who did "Redrock Outback"? Just kidding, it's a really cool track. If Zalcus can fix visibility problems and other things, it will fit perfectly between the original tracks.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Aug 13, 2021, 6:26 PM
Quote from: nfsfan83 on Aug 13, 2021,  9:45 AM

I can't make nice landspace tracks :P Cities track is my love...

On the contrary, Redrock Outback proves how great you are at making nice landscape tracks. Especially now that the visibility is fixed.  ;)

I took a look at your city tracks. Unfortunately, when I try to open them up in T3ed, I get the warning message that "speed files cannot be loaded". Without access to the speed files, I can't fix the AI problem on those tracks.  :(  I'm not giving up though.  I'm sure there is some way to fix it.

Before too much time passes, I am attaching with this post a quickstart guide on how to edit speed files.  I hope it is understandable and clear to everyone.


Quote from: Cooya! on Aug 12, 2021, 10:34 AM
So let "Cape Hatteras" and "Lost City" follow when you are still not done with "nfsfan83" tracks.

You read my mind perfectly. Lost City is next on the list!  8)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: JimDiabolo on Aug 14, 2021, 1:45 AM
From your tutorial: >The values under the “spdxa Speed” column are always less than or equal to the values under the “spdxa preje...” column. The value of “spdxa speed” never exceeds the value of “spdxa preje...”<
I never noticed hat. That could have been my mistake, when I wanted to make the opponents faster.

Quote from: Zalcus on Aug 13, 2021,  6:26 PM
I took a look at your city tracks. Unfortunately, when I try to open them up in T3ed, I get the warning message that "speed files cannot be loaded". Without access to the speed files, I can't fix the AI problem on those tracks.  :(  I'm not giving up though.  I'm sure there is some way to fix it.
You could use speed files from another track, with has the same number of vroad points, and replace those which can't be loaded. You may need to create one by adding blocks.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: nfsfan83 on Aug 14, 2021, 5:55 AM
Quote from: JimDiabolo on Aug 13, 2021, 11:38 AM
Quote from: nfsfan83 on Aug 13, 2021,  9:45 AM
I can't make nice landspace tracks :P Cities track is my love...
Then who did "Redrock Outback"? Just kidding, it's a really cool track. If Zalcus can fix visibility problems and other things, it will fit perfectly between the original tracks.

I mean I can't make nice landscape tracks like Your Lake Diabolo etc ;) Also If I have inspiration by other track, like in nassau it is more easy.

But after all when I see Miami or N.Y in game or in T3ED i'm impressed what I have done ;) so huge number of object and size of track... and all it is still NFS4 engine :D

(https://i.imgur.com/kT784dJ.jpg)

Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Aug 23, 2021, 7:46 AM
Quote from: JimDiabolo on Aug 14, 2021,  1:45 AM
You could use speed files from another track, with has the same number of vroad points, and replace those which can't be loaded. You may need to create one by adding blocks.

This is the solution I have been looking for! Thanks.  :)

"Redrock Outback V2" is almost complete. There are just a few more things to do. Hopefully I can have it uploaded by today. If not, by tomorrow.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: nfsfan83 on Aug 31, 2021, 5:42 AM
Zalcus20 I yesterday test redrock v2 with your fix and nice job, very nice job. View distance and objects are good. In T3ED I see you convert big polygon objects to global? and T3ED don't crash? I want do it in Nassau, I convert polygon to extra objects but when change or resize new extra objects, track was crashed and can be open again. Copy rescue always ;)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Aug 31, 2021, 8:15 AM
Thanks, nfsfan83. And thank you for creating Redrock Outback in the first place!  :)

Sometimes when I convert to global objects, T3ed crashes for me as well.  When this happens, I change the block that the object belongs to (make sure automatic object membership is unchecked) and try again.  Usually works.  Be sure to make several backups when converting a large amount of objects to global.  Many crashes happened when improving Redrock Outback and this saved me every time!  ;)

BTW, are there any more tracks in the making?
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: nfsfan83 on Aug 31, 2021, 9:03 AM
At the moment, no. I'm tired now, it take lot of time, make big track ;)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Sep 02, 2021, 9:50 AM
I can only imagine how tiring making a new track is.  Fixing up tracks alone is tiring.  :D

Take a good rest while I fix up the rest of your tracks.  ;)  I don't have as much time as before, but this is still my goal, especially now that we got more T3ed updates from JimDiabolo.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: pete9516 on Apr 14, 2022, 5:18 AM
Quote from: Zalcus20 on Jul 31, 2021,  1:31 PM
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.  ;)
Hello Zalcus, i think you're getting a little bit too much into copyrights and stuff like that. Fangio is inactive for a very long time now. I don't think that he's doing anything about this specific game nor any other game in things of modeling. I think as long as you give original credits (name of author) it's totally okay to publish YOUR own work on top of the work from somebody else who hasn't been active for like 10 years now. But this is just my opinion. Have a great weekend all and stuff
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: pete9516 on Apr 14, 2022, 5:24 AM
Not to forget to mention people like Martin Leps (i played with him and Ronny77 nfs4 via RadminVPN and his well made mod cars a few weeks ago)  who find it ridiculous to play and to mod a more than 20 years old game.. They just don't care anymore because they "went on" in life and left beautiful games like the first nfs series behind to just play some new generation console games and other crap. And this is not my opinion.
Cheers
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: pete9516 on Apr 23, 2022, 1:05 PM
Does somebody know how i can edit the virtual road points in a way so that the car won't jump randomly into the air anymore? And is it possible to render a single block in T3ED? I want to even the VR points to the track mesh, but you can't see sh*t with the rest of the track mesh. Am i missing something? I've been observing all track editing tutorials i know which exist. :^/ Looking forward for an answer, peace out
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Oct 02, 2022, 5:46 PM
Time to return to fixing up some more of nfsfan83's cool tracks.  This time I am fixing his beautiful "Africa" track.

Fixed so far:
-Eliminated all sticky walls.
-Elminated 95% object pop-ins (better visibility).
-Fixed virtual road issues.
-Adjusted AI driving line and AI max speeds for the forward direction.  (SPDFA.BIN) This is much easier to do thanks to the newest edition of T3ED by JimDiabolo (Build 404).


What needs to be done (at least):
-Adjust AI driving line and AI max speeds for the backward direction.  (SPDRA.BIN)
-Close up the mesh holes.
-Maybe add shadows, depending on the results.
-Maybe add atmospheric effects by editing the fog regions in the Tr files. Not sure yet.

Known issues that most likely can not be resolved:
-Traffic does not spawn/appear on the track in Single Race mode.  This could be due to the fact that the track mesh is stretched. Scaling the track down might solve it but not 100% sure (haven't tested yet). Note that the traffic spawn correctly and you will see them in all Hot Pursuit modes only.
-Rearview Mirror will most likely have to remain off due to the messy LODs.

Stay tuned for updates...
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: JimDiabolo on Oct 03, 2022, 12:13 AM
Shrinking the track may be an option, I think the road is wide enough. It has many visibility problems, good to hear you alreay could fix a lot of them. As always nfsfan83 used nice textures.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: pete9516 on Oct 04, 2022, 1:17 PM
Quote from: Zalcus20 on Oct 02, 2022,  5:46 PM
-Traffic does not spawn/appear on the track in Single Race mode.  This could be due to the fact that the track mesh is stretched. Scaling the track down might solve it but not 100% sure (haven't tested yet). Note that the traffic spawn correctly and you will see them in all Hot Pursuit modes only.
Ain't this just the virtual road border line being out of position? And the virtual road points?
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Oct 04, 2022, 2:38 PM
I had already fixed the virtual road problems by the time I noticed the traffic issue. Besides, the traffic was spawning correctly in all HP modes with the messed up virtual road previously.

So the problem has to be the 'stretched' track mesh (and it is).

Scaling the track by 0.75 factor fixed the problem. Traffic will now be seen in Single Race mode.  :)

Not to mention the track looks better and there is an improved sense of speed.   :D
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: pete9516 on Oct 07, 2022, 9:12 PM
Quote from: Zalcus20 on Oct 04, 2022,  2:38 PM
I had already fixed the virtual road problems by the time I noticed the traffic issue. Besides, the traffic was spawning correctly in all HP modes with the messed up virtual road previously.

So the problem has to be the 'stretched' track mesh (and it is).

Scaling the track by 0.75 factor fixed the problem. Traffic will now be seen in Single Race mode.  :)

Not to mention the track looks better and there is an improved sense of speed.   :D
Once in your tutorial you said that broken traffic would be caused by corrupt virtual road width data. So is this outdated now?
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Oct 10, 2022, 9:18 AM

Quote from: Zalcus20's Speedfiles tutorial.pdf on Oct 04, 2022,  2:38 PM

If the ai lanes and center line were to be outside of the VR boundary,
this will bug the AI. For example:

1. AI cops will not be able to deploy spikestrips and roadblocks on
that section of the track.

2. If you crash or reset your car on this section of the track you
will respawn outside the drivable track and get stuck.

3. The bots will behave unpredictably. They might slam into the side
of the road (walls aka non-passable area), drive in that annoying
'congo line' style, crash into each other, and if you are racing with
traffic, it is guaranteed that they will crash right into them...
Every. Single. Time.

Not sure where in here you saw that statement where the traffic will not spawn on the track. Situation #2 only refers to the human player when performing a manual reset, which is different. 

IIRC, De-M-oN stated that nfs4 traffic works as a 'wave system' which is calculated based on the size of the track and they do not use 'manual reset' unless they are being blocked by something for a longer time.

Traffic seem to be the least affected by the virtual road data. Depending on how bad the virtual road is messed up, they don't pull over when a cop turns on their siren; they 'smash or ride' along the edge of the walls, or they do 360's (rare).

I do admit that now we know how float numbers work (thanks to JimDiabolo and Pomfrit), the tutorial is a bit dated. It's much easier to adjust the virtual road/driving lines now that we can manually drag them around like objects in T3ed. Nevertheless, I still think it's a good way to introduce someone into the basics.  =D
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Oct 10, 2022, 10:34 AM
I had a little fun playing around with T3ed and made the closed tunnel in Aquatica open. That tunnel has been under repair for way too long, lol.  Also programmed the AI racers and traffic to drive through the tunnel as well instead of the outside of it.

Additionally, AI racers have been programmed to choose which tunnel to drive through at the 'split tunnel' (before the neptune tunnel) and they can also choose to drive on the outside/inside of the tunnel between the "S tunnel" and the "Atlantica Tunnel" in backward direction. It's pretty fun to watch.

The attached files work with the default EA Aquatica track. Don't forget to make a backup first, and have fun!
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: noise on Oct 10, 2022, 1:20 PM
 nearly 25 years the tunnel was closed?

I will give it a try soon. Sounds like fun.

So you can force AI & traffic in other directions....nice.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Oct 10, 2022, 1:37 PM
Quote from: noise on Oct 10, 2022,  1:20 PM
So you can force AI & traffic in other directions....nice.

Yes for AI racers. However, traffic remains unaffected  ??? . But don't expect anything like NFS Porsche Unleashed though, lol. The road is pretty much one piece with impassable polygons in the center which gives the illusion of a split road (as you can see with Aquatica). Nevertheless, it's still fun to see which route the AI racers will choose. I share it just for fun.  ^-^

EDIT: I tried replicating this with the divided highway on 'Neighborhood Drive' but it doesn't work as intended  :(. Oh well.  :)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: JimDiabolo on Oct 11, 2022, 12:29 AM
Nice what you did with Aquatica .
Quote from: Zalcus20 on Oct 10, 2022,  1:37 PM
EDIT: I tried replicating this with the divided highway on 'Neighborhood Drive' but it doesn't work as intended  :(. Oh well.  :)
Maybe there is required information in den rest of the HSEXTRA data.
I modified the way T3ED stores it, for the next version.
It was only in long[7], now I use this structure.
struct HS_EXTRA {
    float WidthLeftLane,WidthRightLane;
   long unknown1;
   long nLeftLanePolys,nRightLanePolys;
   long unknown2[2];
} HS_EXTRA;
I haven't looked at the unknown values at all. But when you paste a vroad points data, it will be included.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Oct 11, 2022, 6:40 AM
Maybe this HSEXTRA/unknown data contains more info about the traffic. It's just my guess, though.  :-\

Traffic seem to ignore changes to the virtual road. It might have been a fluke that they obey the divided highway in "Neighborhood Drive".

Hopefully the traffic data is not hardcoded like the speed limit on tracks.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: pete9516 on Oct 11, 2022, 6:53 AM
Quote from: Zalcus20 on Oct 10, 2022,  9:18 AM
Not sure where in here you saw that statement where the traffic will not spawn on the track. Situation #2 only refers to the human player when performing a manual reset, which is different.
I'm sorry, it seems i remembered it wrongly
I think though that this is the reason why the traffic will be present very lately on buggy/glitchy/stretched tracks because if they spawn, they would spawn offtrack
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: PomFrit on Oct 12, 2022, 8:58 AM
Quote from: Zalcus20 on Oct 11, 2022,  6:40 AM
Maybe this HSEXTRA/unknown data contains more info about the traffic. It's just my guess, though.  :-\

Traffic seem to ignore changes to the virtual road. It might have been a fluke that they obey the divided highway in "Neighborhood Drive".

Hopefully the traffic data is not hardcoded like the speed limit on tracks.

Or it can be amount of AI lanes. There are section of tracks where is just 1 light green polygon wich typicaly is 2 AI lanes, but some wide sections have 3 or 4 AI lanes still with 1 light green polygon.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Jan 02, 2023, 4:57 PM
Deciding to do some experiments with T3ed and Atlantica.  As a result I was able to get the AI traffic to drive in the tunnel portion of the Atlantica Civic Center.
https://streamable.com/57gqha (https://streamable.com/57gqha)


I was also able to make the AI Racers drive on the outside of the tunnel in backward mode just after the "S-tunnel".
https://streamable.com/qp1hlv (https://streamable.com/qp1hlv)

I don't know what caused Wild 1 to use the inside of the tunnel. It appears to be a random side effect that happens when editing the v-road data, ai lane selection, and float numbers.

Anyway, I attach the track files here for anyone who is curious ;)
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: JimDiabolo on Jan 03, 2023, 5:51 AM
Very interesting!
I also have the Civic Center in my Atlantica project. Would like to take over the VRoad data if I'm allowed.
Title: Re: Adjusting AI driving lines for usermade tracks (Need For Speed High Stakes)
Post by: Zalcus20 on Jan 03, 2023, 6:01 AM
Quote from: JimDiabolo on Jan 03, 2023,  5:51 AM
Very interesting!
I also have the Civic Center in my Atlantica project. Would like to take over the VRoad data if I'm allowed.

Sure you can. Feel free to use the data found in these files. That's why I share them here.  ;) =D