DumbAI

DumbAIMisc  1.2.1

  • Thread starter Thread starter ancient_3
  • 160 comments
  • 10,925 views
ancient_3 updated DumbAI with a new update entry:

teleportation, yellow flags and messaging system

changelog:

- added teleportation to pits management for stuck cars: teleportation to pits without possibility to get back on tracks after 30 seconds continuously spent at less than 5 km/h

- added Yellow Flag warnings completing the AC flag system: yellow flags added when AI spent more than 1 second on track at less than 5 km/h

- added messaging using native AC system to display 3 kind of events driven by DumbAI: AI that went to pits , track sector under Yellow Flag + driver...

Read the rest of this update entry...
 
Csp 0.3.0p212
All Lua apps disabled
New AI behavior disabled
I raced in a 1978 F1 race at Mugello, 10 laps: all the retired cars remained in the pits.
Problems detected: at the start, the opponents had retired to the pits, I had to select "restar session" from the menu to have them on the starting grid.
When passing on the start straight, with cars already retired, the yellow flag message for retired drivers kept appearing.
At the end of the race, in the CM menu, "Race Canceled"
Maybe my CSP version isn't working?
 
Csp 0.3.0p212
All Lua apps disabled
New AI behavior disabled
I raced in a 1978 F1 race at Mugello, 10 laps: all the retired cars remained in the pits.
Problems detected: at the start, the opponents had retired to the pits, I had to select "restar session" from the menu to have them on the starting grid.
When passing on the start straight, with cars already retired, the yellow flag message for retired drivers kept appearing.
At the end of the race, in the CM menu, "Race Canceled"
Maybe my CSP version isn't working?
well well, I made DumbAI 1.2 on p338 so I did not test on p212, sorry. DLAA tempted me too much, I broke my promise to keep the same CSP version for DumbAI ...

one after the other :

"I raced in a 1978 F1 race at Mugello, 10 laps: all the retired cars remained in the pits." => good :)

"at the start, the opponents had retired to the pits, I had to select "restar session" from the menu to have them on the starting grid." => strange but explainable in some way: car speed is registered from start of the session , so if on the grid, speed is registered at 0 (or a small amount) , the stuck counter is working and DumbAI would register a yellow flag then after 30 seconds a teleport to pit and retirement. I had to add a race start check which is triggered when car goes over 5 km/h so that yellow flag is not triggered and they won't get teleported before the start.

Strange thing, in my CSP version, 5 km/h is the threshold to make it work, if you put 4 km/h, it does not work, you need at least 5 :).

Maybe if you can, try this: got to DumbAI/structures/ folder, open bot.lua with a text editor, change line 407
from: if this.hasStartedRace == false and car.speedKmh > 5 then

to : if this.hasStartedRace == false and car.speedKmh > 30 then

save it, start again the race and see if it works now, let me know

" When passing on the start straight, with cars already retired, the yellow flag message for retired drivers kept appearing." => this one, I don't get it. All the loop for yellow flag is checked by isInPit== true so they should definetely not trigger it. I'll have a test on Mugello to see it.

"At the end of the race, in the CM menu, "Race Canceled" => this one I get it 'cause I'm just working on it: I badly implemented the BlockTeleport at bot level, causing a leak and the impossiblity to release it. And if it is not released, cars can't go to pit after the race is over and the end of the session is likely corrupted. I just tested a hotfix that seems to work here, but must double check that the block teleport is still efficient with this new proper implementation. Complex stuff... until I upload a correct hotfix, you can try to escape , got to pit manually and then exit the session, sometimes it works.

Thanks for the report again :)
 
Last edited:
" When passing on the start straight, with cars already retired, the yellow flag message for retired drivers kept appearing." => this one, I don't get it. All the loop for yellow flag is checked by isInPit== true so they should definetely not trigger it. I'll have a test on Mugello to see it.
@Gabriele tested it with Lotus Exos and Ferrari 312T on Mugello Kunos + Climax F1 textures, enabled use extended physics or not, I never had this yellow flag for car retired in pits with CSP p338. A bit afraid to get back to p212 now that I have found my graphics settings with this new version, I'm not even sure I'll ever change one day because this one looks perfect to me and still allows to uncheck new AI behavior...

Talking about this, to @Tetri and other fanatics of the lap time (including myself lol), I made some experiment with respectively extended physics disabled, enabled and enabled + new AI behavior

Conditions were Monza Kunos , 5 laps, quick race, 11 opponents, AI 100%, agression 0%, no fuel rate, no tyre wear, no damages, best tyre compound set by DumbAI, ideal conditions for track and weather

Lotus Exos Stage 1
no extended physics attempt 1 : best best lap = 1'29'0 , worst best lap 1'29'9
no extended physics attempt 2 : best best lap = 1'29'0 , worst best lap 1'29'6
no extended physics attempt 3 : best best lap = 1'29'2 , worst best lap 1'29'9

extended physics, no new AI behavior attempt 1 : best best lap = 1'29'2 , worst best lap 1'30'5
extended physics, no new AI behavior attempt 2 : best best lap = 1'29'2 , worst best lap 1'30'5

extended physics, new AI behavior attempt 1 : best best lap = 1'29'3 , worst best lap 1'30'6



Lamborghini Countach
no extended physics attempt 1 : best best lap = 2'14'9 , worst best lap 2'15'7

extended physics, no new AI behavior attempt 1 : best best lap = 2'15'7 , worst best lap 2'17'1

extended physics, new AI behavior attempt 1 : best best lap = 2'15'5 , worst best lap 2'17'6

To be continued ... (we need to know !)

New TeleportBlock seems OK, I'll upload the fix very soon, sorry for the mess
 
@Gabriele tested it with Lotus Exos and Ferrari 312T on Mugello Kunos + Climax F1 textures, enabled use extended physics or not, I never had this yellow flag for car retired in pits with CSP p338. A bit afraid to get back to p212 now that I have found my graphics settings with this new version, I'm not even sure I'll ever change one day because this one looks perfect to me and still allows to uncheck new AI behavior...

Talking about this, to @Tetri and other fanatics of the lap time (including myself lol), I made some experiment with respectively extended physics disabled, enabled and enabled + new AI behavior

Conditions were Monza Kunos , 5 laps, quick race, 11 opponents, AI 100%, agression 0%, no fuel rate, no tyre wear, no damages, best tyre compound set by DumbAI, ideal conditions for track and weather

Lotus Exos Stage 1
no extended physics attempt 1 : best best lap = 1'29'0 , worst best lap 1'29'9
no extended physics attempt 2 : best best lap = 1'29'0 , worst best lap 1'29'6
no extended physics attempt 3 : best best lap = 1'29'2 , worst best lap 1'29'9

extended physics, no new AI behavior attempt 1 : best best lap = 1'29'2 , worst best lap 1'30'5
extended physics, no new AI behavior attempt 2 : best best lap = 1'29'2 , worst best lap 1'30'5

extended physics, new AI behavior attempt 1 : best best lap = 1'29'3 , worst best lap 1'30'6



Lamborghini Countach
no extended physics attempt 1 : best best lap = 2'14'9 , worst best lap 2'15'7

extended physics, no new AI behavior attempt 1 : best best lap = 2'15'7 , worst best lap 2'17'1

extended physics, new AI behavior attempt 1 : best best lap = 2'15'5 , worst best lap 2'17'6

To be continued ... (we need to know !)

New TeleportBlock seems OK, I'll upload the fix very soon, sorry for the mess
I'm looking for a download for csp 0.3.0p338 to test 😂
Maybe it's csp's fault.
 
I ran the race with csp 0.3.0p338, I still found 2 problems: drivers retired before the start (I will try again with the code modification) at the end of the race, again "race cancelled" 🙃
 
ancient_3 updated DumbAI with a new update entry:

Hotfix for 1.2

change log:

- removed BlockTeleport system which was not able to override correctly retirement rules of AC and CSP and was messing end of races and return to Content Manager

- refined YellowFlag system, added option in settings to change Yellow Flag triggering speed threshold

- cosmetic changes in the Race engineer

- cleaning of session restarts and use of global variables

As a consequence, the only way to have proper retirement without retired cars going back on track...

Read the rest of this update entry...
 
I ran the race with csp 0.3.0p338, I still found 2 problems: drivers retired before the start (I will try again with the code modification) at the end of the race, again "race cancelled" 🙃
Have a look to the last hotfix, it should solve all your problems.

Everything was linked with the impossibility to find a way in lua to make a correct retirement status. Race were not able to finish.

I removed all this part in DumbAI code and now the app is just following native AC/CSP behavior. Race cancelled should not happen anymore but I'm afraid you will have to stick to new AI behaviour and be sure that you have "get back to the race after going to pits" un-checked.

I found it be the exclusive way to have no retired cars going back on track, with a correct retirement that allows to finish the race.

Yellow flag tracking was reworked so that it is no more dependant at start of a speed limit. There is a small 5 second period after the red lights are extinguished before the yellow flag tracking starts and it is disabled before the red light appear. Should solve your problem at start.

Tested it extensively on Mugello with Ferrari 312t , CSP 0.3.0 p338 with new AI behavior and "get back to the race after going to pits" un-checked, never saw any cars getting back on track with this hotfix.
 
Last edited:
Have a look to the last hotfix, it should solve all your problems.

Everything was linked with the impossibility to find a way in lua to make a correct retirement status. Race were not able to finish.

I removed all this part in DumbAI code and now the app is just following native AC/CSP behavior. Race cancelled should not happen anymore but I'm afraid you will have to stick to new AI behaviour and be sure that you have "get back to the race after going to pits" un-checked.

I found it be the exclusive way to have no retired cars going back on track, with a correct retirement that allows to finish the race.

Yellow flag tracking was reworked so that it is no more dependant at start of a speed limit. There is a small 5 second period after the red lights are extinguished before the yellow flag tracking starts and it is disabled before the red light appear. Should solve your problem at start.

Tested it extensively on Mugello with Ferrari 312t , CSP 0.3.0 p338 with new AI behavior and "get back to the race after going to pits" un-checked, never saw any cars getting back on track with this hotfix.
csp 0.3.0p338 10 laps at Vallelunga Classic
"New AI behavior" enabled, but "AI retirement setting" disabled.
There were no retirements, but everything worked fine without any issues. 😄🥳
 
Hi,

I noticed a somewhat weird behaviour with the latest version of your app and Nuzzi's FIA Flags app (I'm on csp 0.3.0p342) . I can´t remember having this problem a few months ago. So the problem is about yellow flags. There was a yellow flag situation at the one of last laps of the race, the yellow flag was triggered and cars respected it, but after it returned to green cars were still going slow so I could pass them easily. Is this app still compatible with Nuzzi's FIA Flags app?
 
Hi,

I noticed a somewhat weird behaviour with the latest version of your app and Nuzzi's FIA Flags app (I'm on csp 0.3.0p342) . I can´t remember having this problem a few months ago. So the problem is about yellow flags. There was a yellow flag situation at the one of last laps of the race, the yellow flag was triggered and cars respected it, but after it returned to green cars were still going slow so I could pass them easily. Is this app still compatible with Nuzzi's FIA Flags app?
Hi, I don't know how Nuzzi's Flags app works but I can tell you how DumbAI works:

1) if car speed is for 1 second < to speed limit set to trigger yellow in the settings, then rise the yellow flag status.

2) what is yellow flag status ? for DumbAI, it is just sending a message in AC HUD and rising the native Flag status of AC, so no speed reduction from DumbAI or anything else, just AC native behavior when its native yellow flag status has been rised

3) when the indicent is finished (either the bot was able to get back on track with some speed or AC/CSP teleported it to pits and retired), ensure that the race flag AC status is reset to normal, no green flag from DumbAI.

So in your case, I'd say that either Nuzzi app missed the return to normal or maybe the release of the flag overrided Nuzzi Flag app somewhere ?

I also know that AC is quicker to detect Yellow Flag conditions than DumbAI as it also checks for collision. DumbAi only checks itself for car with low speed: my idea was just to obtain some informations about crashes but also for car with damages that run very slow on track. Mainly for the display, especially to check for the closest sector in front of the player that is under yellow flag.

This gives me the idea to have also a listener to the native AC yellow flag but not sure I would be able to catch car concerned and its position on track. I prefered to keep it simple: instead of checking for every collision for any bot, consider that one crash , if it is relevant for the race, make the crashed cars slow under a speed threshold.

But theoretically, there is the possibility that the crash send the other car to the moon and the DumbAI yellow flag is not triggered, I made it once using Ferrari 312T at first corner of Mugello, the bot went out of the track and disappeared with no news lol
 
Last edited:
Back