LuDiAI AfterFix

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
xarick
Transport Coordinator
Transport Coordinator
Posts: 335
Joined: 26 Feb 2015 00:52

LuDiAI AfterFix

Post by xarick »

LuDiAI AfterFix

LuDiAI AfterFix is an AI that builds road, air and ship routes
transporting either mail or passengers.

It's an AI that is built upon the original work of lukin_'s LuDiAI.
Initial work was on fixing issues found on the original, but it became
something more of its own later on.


Main differences or improvements

- Builds ships
- Adds more configuration settings
- Randomizes most configuration settings when started as Random AI
- Can build more than 500 road vehicles
- Builds more airport types
- Builds helicopters
- Builds statues
- Builds the company HQ
- Sells old aircraft
- Is aware of cargo distribution setting
- Is aware of plane speed setting
- Is aware of aircraft max range
- Is aware of map size for route distances
- Is aware of infrastructure maintenance costs
- Matches aircraft type with airport type
- Plans optimal distances between airports
- May build more than one aircraft per route at once
- May add or remove more than one road vehicle at once during management
- Renews vehicles when better models become available
- Plans a maximum number of vehicles a route can support
- Attaches road stations to existing airports
- Removes unserviced road routes
- Use of customized road pathfinder
- Retries road construction if it finds an obstacle instead of giving up
- Is aware of articulated road vehicles' need of drivethrough stations
- Upgrades road bridges
- Retries construction of road stations instead of giving upon instantly
- Schedules removals of leftover road stations and depots on failure
- May also try to build road depots in the source or destination towns
- Founds towns
- Initiates advertising campaigns in towns
- Funds construction of buildings in towns
- Loans and repays on-the-go


Configuration Settings

Town Cargo:
Choses which cargo the AI will handle. If the AI started as Random AI, the choice will be randomized on startup.

- Passengers:
The AI creates Passenger only routes via road, air and/or water.

- Mail:
The AI creates Mail only routes via road, air and/or water.

- Passengers and Mail:
The AI creates both Passenger and Mail routes via road, air and/or canal.


Town choice priority:
Defines how the AI will pair two towns. If the AI Started as Random AI, one of the following options will be picked at random on startup.

- Most cargo produced first:
The AI choses the most productive towns first when creating a service.

- None, pick at random:
The AI choses the towns at random when creating a service.

- Shorter routes first:
The AI choses towns which are closer to each other first when creating a service.

- Longer routes first:
The AI choses towns which are further from each other first when creating a service.


Is friendly:
When enabled, the AI tries to avoid building its stations near stations of other companies. When disabled, it is allowed to do so. If the AI started as Random AI, the decision will be randomized on startup.


Can station spread:
When enabled, the AI expands its road stations by distantly joining new station pieces, to enlarge station coverage. It may also join road stations with airports, docks and vice-versa whenever possible. If the AI started as Random AI, the decision will be randomized on startup.


Road support:
Enables or disables the usage of road routes.


Water support:
Enables or disables the usage of water routes.


Air support:
Enables or disables the usage of air routes.


Approximate number of days in transit for road routes:
Lower values may help pathfinding faster, but at the cost of lesser profits. Higher values may slow pathfinding and may not necessarily yield the best profits, assuming the default engines are being used. AI random value of up to -5/+5 is added on startup, and the limit can never go below 10 or above 150.


Road pathfinder profile:
Select the behaviour of the pathfinder when connecting two towns by roads. If the AI started as Random AI, the choice will be randomized on startup.

- Custom:
Tweaked for low construction costs when the AI is poor, by avoiding watered coast tiles, which may result in some weird bridges across two coasts. May try to avoid going through drivethrough stations. May build more bridges or tunnels in difficult terrain, especially when the slopes are too steep. If the AI is rich, it may build really long bridges and tunnels. Relatively slow, but overall, the better planner.

- Default:
Though the pathfinder interval cost values have been reworked and some of the logic regarding bridges and how are roads connected to each other, the default profile tries to mimic the behaviour of the original LuDiAI pathfinder. It is not cost conscious regarding coasts, slopes or bridges, doesn't avoid drivethrough stations and does not build too long bridges or tunnels.

- Fastest:
Optimized for fastest planning speed, at the cost of low road reuse. It prefers fewer curves, which could result in roads going through sharp landscapes, or be longer than necessary. Can only build small bridges, which may not be ideal for maps with lots of water. Cannot build tunnels.


Road route capacity mode:
Determines how the AI will handle the capacity of a route by managing the number of vehicles when there's enough cargo waiting at the stations. If the AI started as Random AI, the choice will be randomized on startup.

- Maximum of 25 road vehicles:
Depending on the cargo waiting, the AI may decide to add road vehicles to the route, as long as it doesn't go over 25. It adds one at a time per management cycle.

- Estimate maximum number of road vehicles:
Same as above, but instead of 25 road vehicles, the maximum number is based on the distance between stations, maximum speed of the engine and the number of loading bays available at the stations. Stations may also spread to accommodate more loading bays, and thus more vehicles. It also adds one at a time per management cycle.

- Adjust number of road vehicles dynamically:
In this mode, the AI will keep adding vehicles to the route whenever there's cargo waiting, but will also remove road vehicles if it finds its vehicles unable to move. It will be constantly doing this all the time, which may slow down management. Contrary to the other modes, it can add or remove multiple vehicles at once per management cycle.


Road route load orders mode:
Determines how road vehicles set up their orders. If the AI started as Random AI, the choice will be randomized on startup.

- Full load before departing:
The vehicles will use 'Full load any cargo' on their go-to orders.

- Load something before departing:
A conditional order is placed between their go-to orders that Jump to their respective go-to order when load percentage is equal to zero.

- May load nothing before departing:
The default 'Load if available' is used on their go-to orders.


Approximate number of days in transit for water routes:
Lower values may help pathfinding faster, but at the cost of lesser profits. Higher values may slow pathfinding and may not necessarily yield the best profits, assuming the default engines are being used. AI random value of up to -5/+5 is added on startup, and the limit can never go below 10 or above 150.


Water route capacity mode:
Determines how the AI will handle the capacity of a route by managing the number of vehicles when there's enough cargo waiting at the stations. If the AI started as Random AI, the choice will be randomized on startup.

- Maximum of 10 ships:
Depending on the cargo waiting, the AI may decide to add ships to the route, as long as it doesn't go over 25. It adds one at a time per management cycle.

- Estimate maximum number of ships:
Same as above, but instead of 10 ships, the maximum number is based on the distance between stations and maximum speed of the engine. It also adds one at a time per management cycle.

- Adjust number of ships dynamically:
In this mode, the AI will keep adding ships to the route whenever there's cargo waiting. Contrary to the other modes, it can add or remove multiple ships at once per management cycle.


Water route load orders mode:
Determines how ships set up their orders. If the AI started as Random AI, the choice will be randomized on startup.

- Load something before departing:
A conditional order is placed between their go-to orders that Jump to their respective go-to order when load percentage is equal to zero.

- May load nothing before departing:
The default 'Load if available' is used on their go-to orders.


Air route load orders mode:
Determines how aircraft set up their orders. If the AI started as Random AI, the choice will be randomized on startup.

- Full load before departing:
The vehicles will use 'Full load any cargo' on their go-to orders.

- May load nothing before departing:
The default 'Load if available' is used on their go-to orders.


Build company statues in towns:
When enabled, the AI will build statues in honour of its company, providing a permanent boost to station rating in those towns. If the AI started as Random AI, the decision will be randomized on startup.


Run advertising campaigns in towns:
When enabled, the AI will run advertising campaigns in towns, providing a temporary boost to stations with low rating and cargo waiting in a small, medium or large radius around the town center. When used with "Build company statues in towns", it will prioritize the building of statues over advertising campaigns. If the AI started as Random AI, the decision will be randomized on startup.


Fund construction of new buildings in towns:
When enabled, the AI will fund the construction of new buildings in the smaller towns it services, providing a temporary boost to town growth. When used with "Build company statues in towns", it will prioritize the building of statues over funding construction.If the AI started as Random AI, the decision will be randomized on startup.


Found towns:
When enabled, the AI will sponsor the construction of new towns in the map. If the AI started as Random AI, the decision will be randomized on startup.


Build headquarters:
When enabled, the AI will build a company headquarters randomly in the map, as cost efficient as possible. If the AI started as Random AI, the decision will be randomized on startup.


AI-GS communication support:
Allow communication between AI and Game Script SCP libraries. Currently supports Company Value GS, where the AI will think twice before spending money in town actions, just to maintain the lead or to maintain catch-up against the company ranked first.


Change log
LuDiAI AfterFix
===============
v20 (16-06-2022)
- Fixed a crash when trying to build a lock

v19 (15-06-2022)
- OpenTTD and API requirements set to 12.0
- Removed "Cities only" setting
- Added "Water support" setting. AI can now build ship routes with canals if money allows it
- Added "Approximate number of days in transit for water routes" setting
- Added "Water route capacity mode" setting with three choices to pick from: "Maximum of 10 ships", "Estimate maximum number of ships" and "Adjust number of ships dynamically"
- Added "Water route load orders mode" setting with two choices to pick from: "Load something before departing" and "May load nothing before departing"
- Added "Air route load orders mode" setting with two choices to pick from: "Full load before departing" and "May load nothing before departing"
- Added "Build company statues in towns" setting
- Added "Run advertising campaigns in towns" setting
- Added "Fund construction of new buildings in towns" setting
- Added "Found towns" setting
- Added "Build headquarters" setting
- Try to balance time management between road vehicles and aircraft
- Advertising campaigns are no longer governed by the "Is friendly" setting
- Fixed incorrect reserve money calculations when planning for a road route
- Fixed clone vehicle estimation costs
- Allow rotating between building a passenger or mail road route when there's no engines available or when the AI is short on money for one type of cargo
- Fixed incorrect usage of a variable related to checking whether all routes were used, to become possible to separate passenger routes from mail routes
- Fixed a crash that could occur when loading from a savegame and engine models were no longer available for our routes
- Fixed an issue related to retrieving capacity of engines that have just become obsolete and unbuildable resulting in estimated profit miscalculations
- Fixed a bug when trying to add only one more road vehicle to a route, it was instead adding two
- Improved retrieving of engine cargo capacity method
- Reworked the entire save/load code to use less operations to save
- Reworked the majority of aircraft code to follow a similar structuring than that of road vehicles

v18 (11-06-2021)
- OpenTTD and API requirements set to 1.11.0
- Use AIPriorityQueue instead of Sorted List for road pathfinder
- Avoid the AI from loaning (too much) money when performing town actions
- Fixed a rare crash that could occur when an airport is attached to a road station that expanded in the meanwhile

v17 (16-12-2020)
- Use Sorted List instead of Native Heap for road pathfinder

v16 (18-04-2020)
- Actually remove NoCarGoal requirements, only part of it was removed

v15 (15-04-2020)
- Use Native Heap instead of Fibonacci Heap for road pathfinder
- Tweak road pathfinder code for improved performance
- Remove NoCarGoal requirements, as it wasn't really using it

v14 (09-03-2020)
- OpenTTD and API requirements set to 1.10.0
- Fixed english typos in the code, readme and changelog
- Road bridge names are no longer reported as rail bridges
- Planning air routes now takes into consideration whether infrastructure maintenance costs are enabled or not. It's far from perfect, but the AI plans air routes with at least 7 aircraft and try to fully serve it, before attempting a new route. It also only considers airports with the cheapest maintenance costs that can still support each of the aircraft types available. Due to the conservative approach of these changes, the AI may not perform as well as before in the very long run, but it should be able to have a better start
- Upgrading engines to a better model may be done over time instead of all at once, depending on available money
- AI is now able to get the correct capacity of a refited vehicle in most situations which should result in better engine choices
- Fixed a bug that caused detection of a suitable tile for a road depot to be incorrect
- Fixed a bug in the road pathfinder which in theory should result in a better path choice
- Fixed a bug that caused helicopter routes to be created without a hangar resulting in no helicopters being built and the route being demolished right away
- Reduced the amount of messages about failed air routes caused by low funds
- Aircraft routes may now be fully closed if they're not profitable enough
- Tweaked the income formula for aircraft, most noticeable the estimated optimal number of days when "Vehicle breakdowns" are set to "Normal". It is also able to determine how many aircraft are needed to turn a profit
- Fixed a rare division by zero error that could occur when counting the number of vehicles needed for a route
- Town actions, such as building statues, advertising campaigns and founding towns, now may only happen when the loan is zero which should result in better survivability of the AI
- When looking for a suitable airport location, also take into consideration the distance to the center of the town in case of multiple spots with the same number of houses nearby

v13 (04-01-2020)
- Fixed a bug that caused the AI to take too long to start
- When chosing a place for an airport, also take mail acceptance into consideration when "Town cargo" is set to "Passengers and Mail"

v12 (19-09-2019)
- Reworked all remaining valuators in hope to prevent stalls caused by the AI
- Don't terminate a route under plan when in the meanwhile the maximum number of road vehicles is reached. Resume it later whenever the limit permits it
- Prefer building stations on locations with more houses around while best routes are not yet used
- Pathfinder number of tries have been changed to iterations, and is now interrupted after more than a day iterating, to be resumed later on
- Custom and fastest pathfinder profiles tweaked to restrict the search area into a rectangle, which should improve pathfind total time
- Reworked how breakdowns are taken into consideration. It no longer filters out engines from the choice pool. It is now part of the income formula
- Added "Road route load orders mode" setting with 3 options to chose from: "Full load before departing", "Load something before departing" and "May load nothing before departing"
- Changed the way vehicles are added to newly constructed road routes. A vehicle is started every few days after the previous one, which should end improving cargo rating at the stations
- Only send negative profit road vehicles to depots 30 days after the last time a vehicle was added on a route, and after all vehicles have started on a new route. Also remove then one at a time
- When renewing road vehicles, remember which order the vehicle was running, and skip to it after renewal
- Fixed a bug that happened during jam detection, where the information about last time a vehicle was removed was missing
- Road vehicles added to an existing route, via "Adjust number of road vehicles dynamically" option, now start to go to whichever station has the most cargo waiting, by subtracting the engine capacity each time one is added in this manner
- Set group names to road routes and air routes
- Added the ability to select "Passengers and Mail" for "Town cargo" setting
- When evaluating towns for possible road and air routes, use a customized cargo production rating based on transported percentage for "Most cargo produced first" option
- Fixed a bug in "None, pick at random" which was preventing the last two available towns to be picked by the randomizer
- Fixed a bug with freeform edges that caused getting the offset of a tile to be off by 1
- Fixed a bug when checking for stations nearby, an incorrect radius was being applied to the search
- Fixed a bug in getting the first available Passenger or Mail cargo. It was, instead, getting the last available ones
- Fixed a bug on checking wether "distant_join_stations" were on, preventing construction of airports and road stations on adjacent road stations and airports as separate stations
- Reworked air route plan mode, to be more flexible by allowing it to interrupt the search after more than a day iterating suitable locations for airports
- Fixed a bug that prevented displaying a message about new air routes being successfully built if all planned aircraft weren't built
- Fixed a bug that caused clearing the lists of tried towns in an incorrect manner, causing the town search to not finish correctly, during 2nd airport construction phase
- Permit building airports with less catchment radius once the best routes have been used
- "Minimum distance between towns for road routes" has been removed. "Aproximate number of days in transit for road routes" has been added, which replaces the old setting. Has a minimum value of 10 and a maximum of 150. Note that much higher values increase the pathfinding search to unfeasible amounts of time
- Reworked road route management to be more often interrupted, to allow the AI perform more of the other tasks
- Allow construction of more road vehicle stations on already serviced towns once best routes have been used, or if "None, pick at random" is chosen
- Builds all statues first, then advertising campaigns after, and try not to advertise as much as before
- Added a workaround for when loading from a savegame, it removes road stations or depots that happen to not be registered during save due to being in a queue that hasn't finished in time before the save occurred

v11 (08-04-2019)
- Failure to detect a 2 tile sized tunnel or bridge was preventing road construction
- "Minimum distance between towns for road routes" setting has a random deviation of 15

v10 (27-03-2019)
- Fixed a crash that could occur when attempting to sell a road vehicle
- Avoid using valuators when looking for a suitable airport location

v9 (21-02-2019)
- Fixed a bug that caused aircraft to be in the wrong group

v8 (17-02-2019)
- Added SCP support for Company Value GS
- Added vehicle groups for routes
- Reworked send to depot code with recourse to two special groups for the effect
- Added shared orders support for vehicles
- Several optimizations were done to increase vehicle and route management speeds
- Initiates small, medium and large advertising campaigns
- Funds construction of new buildings in towns
- Reevaluated pathfinder number of tries so that it doesn't take more or less time than necessary to find a path
- Fixed a bug that caused towns founded by others than self to go unnoticed by the town manager for road routes
- Renew aircraft when a better engine model becomes available
- Fixed a bug that caused incomplete removal of road vehicle routes. Their removal is now scheduled instead

v7 (22-12-2018)
- Fixed a crash when founding a town

v6 (22-12-2018)
- Added 3 new settings:
- "Minimum distance between towns for road routes", which was always 40 in previous versions
- "Road pathfinder profile", which was "Custom" in the previous version and "Default" in even earlier versions. "Fastest" is the newer choice
- "Road route capacity mode", which was always "Maximum of 25 road vehicles" in previous versions. "Estimate maximum number of road vehicles" and "Adjust number of road vehicles dynamically" are the newer choices
- Reworked "Random picks" setting into "Town choice priority", with 4 options to chose from. "None, pick at random" is the equivalent choice if "Random picks" was on, and "Most cargo produced first" is the equivalent choice if it was off. "Shorter routes first" and "Longer routes first" are the newer choices
- Road route minimum distance takes map size into account
- Changed road route maximum distance to always have a minimum delta between it and the minimum distance
- No longer retries to find a nearby town to connect by road with na increased maximum distance after failing the first time
- Managing road routes can now be interrupted and continued next cycle
- Account for more road vehicles when estimating costs for building a road route
- Save messages are hidden
- The maximum number of pathfinder attempts is now based on distance and profile used. Also reduces duration of each attempt
- The formula used for computing days in transit for a road vehicle was wrong and has been fixed
- Prevent road vehicles with incomplete orders from running
- Renew road vehicles when a better engine model becomes available
- Station spread road stations only when it reaches maximum capacity
- Account for at least two aircraft when estimating costs for building na air route
- Try to build next air routes with two aircraft minimum, one per airport
- Managing air routes was being denied if "Air Support" is turned off while there were air routes
- Builds statues
- Builds company HQ
- Does not change company name upload loading from a savegame
- Founds towns

v5 (29-09-2018)
- OpenTTD and API requirements set to 1.4.0
- Upgrading road vehicles, engines and bridges was being denied once the AI had reached the maximum number of vehicles
- Allow road pathfinder to be interrupted and resumed without losing its current path finding progress, allowing the AI to manage other things in between, by up to 5 times
- Allow pathbuilder to retry construction when failing to build planned route roads
- Tweaked pathfinder internal cost values and how they're measured, which should result in more bridges and tunnels on difficult terrain, while being cost conscious at the same time when on a low budget
- Allow pathfinder to build bridges over rail and rivers in more occasions
- Prevent pathfinder to connect roads with level crossings in most situations
- Prevent blocking of road stations of other companies while constructing its own road stations
- Allow a few more cases where locations without adjacent roads could be suitable for constructing a road station

v4 (18-09-2018)
- There was still some cases where drive through road stations were not being built, resulting in vehicles with few orders
- Reduce number of stalls when managing too many road routes, when looking for suitable airport and road station locations
- Road vehicle engine model choice is no longer based only on maximum speed, but also on capacity, cargo payment, distance of route, days in transit and reliability

v3 (16-09-2018)
- When expanding a road station, the counting of articulated road vehicles could be incorrect in determining the need of a drivethrough station
- The build manager wasn't setting the articulated variable value at all
- When building or expanding a road station, there could be cases where the station wasn't being built at all, resulting in vehicles with few orders
- Disabled breakdowns were not being considered on estimating the viability of an aircraft engine

v2 (15-09-2018)
- Estimating air route costs could account an incorrect aircraft price
- Helicopter engine list could include invalid and unbuildable models
- Valuator for best aircraft income was using the wrong distance type
- Allow more towns to be searched for a suitable first airport
- Don't start road construction when there are no engines available
- Builds or expands routes with only drivethrough road stations if there's only articulated road vehicles
- Increased town's mail last month production lower limit
- Loosened the aircraft income estimator lower limit
- Lowered the bar for what's deemed profitable to an aircraft

v1 (14-09-2018)
- Uploaded to BaNaNaS
Last edited by xarick on 16 Jun 2022 19:12, edited 3 times in total.
Formerly known as Samu
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: LuDiAI AfterFix

Post by Baldy's Boss »

So,one of my companies just BOUGHT a LuDuiAI AfterFix...its longtime closest competitor.
The save is four weeks after the merger,the last day of separate business was October 1st and the 265 acquired road vehicles were repainted in T&B livery overnight for October 2nd.
The heavy debt load and constant expenditure on new road vehicles (the whole fleet are one model bus or one model mail van though) will not be carried forward,but what should my Manager know in regard to integrating the acquisition?
Attachments
TuhavenandBadburgRRCo.,30thOct1939.sav
Every train is from T&B side and every road vehicle from LuDiAI side of the merger.
(4.33 MiB) Downloaded 137 times
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: LuDiAI AfterFix

Post by Baldy's Boss »

Another of my companies bought 75% of one only to have its performance immediately tank,provoking my "Is this a Sit-Down Strike or What?" topic over on General,I was wondering if the company was programmed to self-destruct if it got a majority shareholder (it invested heavily in obsolete,unreliable,low-capacity,slow vehicles).

But as this screenshot shows,it can do that even when I have NOT invested in it.
Attachments
Gudingstone Railroad, 30th Jan 1938.png
1938 and it's almost all horse wagons...new ones!
(1.11 MiB) Not downloaded yet
xarick
Transport Coordinator
Transport Coordinator
Posts: 335
Joined: 26 Feb 2015 00:52

Re: LuDiAI AfterFix

Post by xarick »

I can't load the savegame, it is using some NewGRF's that are not available in the online content.
Formerly known as Samu
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: LuDiAI AfterFix

Post by Baldy's Boss »

xarick wrote: 20 Jun 2021 10:27 I can't load the savegame, it is using some NewGRF's that are not available in the online content.
I'm sorry...they WERE available when I downloaded them.(I gather the Brianum series are the problem).
AAAHogEx
Engineer
Engineer
Posts: 109
Joined: 30 Jan 2022 15:37
Location: Japan

Re: LuDiAI AfterFix

Post by AAAHogEx »

LuDiAI AfterFix had a rare crash
Attachments
ss 2022-12-20 093829.png
(1.41 MiB) Not downloaded yet
xarick
Transport Coordinator
Transport Coordinator
Posts: 335
Joined: 26 Feb 2015 00:52

Re: LuDiAI AfterFix

Post by xarick »

Thanks for reporting.

At first it seemed the AI was happily building passenger vehicles with 0 capacity for passengers, which I found very strange. The code should have already excluded engines that couldn't transport passengers using AIEngine.CanRefitCargo for that. But somehow, when using AIVehicle.GetBuildWithRefitCapacity was returning 0 for passengers which at this point in the code, I didn't think it was possible.

The vehicles that the AI was building however, had a capacity of 7 passengers. AI was estimating profits for engines with a supposedly capacity of 0. The division by 0 happens because it's trying to add more vehicles into a route, using engine capacity as the divisor.

Turns out AIVehicle.GetBuildWithRefitCapacity is bugged for articulated vehicles. It returns the capacity of the first part of an articulated engine:
https://github.com/OpenTTD/OpenTTD/issues/9954

The engine is articulated, a horse with a carriage, where the horse has a capacity of 0 passengers, the carriage 7.
I should perhaps prevent the division by zero from happening, though.
Formerly known as Samu
AAAHogEx
Engineer
Engineer
Posts: 109
Joined: 30 Jan 2022 15:37
Location: Japan

Re: LuDiAI AfterFix

Post by AAAHogEx »

Then maybe it will be fixed in a future version. By the way, my AI excludes it with a 0 check just in case.
xarick wrote: 06 Jan 2023 18:51 Turns out AIVehicle.GetBuildWithRefitCapacity is bugged for articulated vehicles. It returns the capacity of the first part of an articulated engine:
https://github.com/OpenTTD/OpenTTD/issues/9954
Coincidentally, this issue was also the one I reported. :tongue:
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: LuDiAI AfterFix

Post by peter1138 »

This AI assumes that MAIL exists as a cargo, and will crash if it does not exist.
He's like, some kind of OpenTTD developer.
AAAHogEx
Engineer
Engineer
Posts: 109
Joined: 30 Jan 2022 15:37
Location: Japan

Re: LuDiAI AfterFix

Post by AAAHogEx »

Crashed.
ss_ludi.png
(362.54 KiB) Not downloaded yet
Attachments
1993-04-25.sav
(2.35 MiB) Downloaded 2 times
xarick
Transport Coordinator
Transport Coordinator
Posts: 335
Joined: 26 Feb 2015 00:52

Re: LuDiAI AfterFix

Post by xarick »

peter1138 wrote: 13 Feb 2024 11:47 This AI assumes that MAIL exists as a cargo, and will crash if it does not exist.
I have a fix in progress, still testing it.
AAAHogEx wrote: 21 Feb 2024 17:17 Crashed.
ss_ludi.png
I see what happened was most likely the engine existed in one moment, and then expired in the next. These type of issues are a pain to deal with, as they could happen in the most inopportune moment. I'll see what I can do.
Formerly known as Samu
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests