Page 6 of 6

Re: CivilAI

Posted: 01 Jan 2020 19:54
by xarick
CivilAI-25 has a bug function GetVersion() { return 24; }

Re: CivilAI

Posted: 02 Jan 2020 02:01
by PikkaBird
Whoops. :roll:

I also took the opportunity to fix some logic which was largely preventing the AI building new cargo trains once it had a passenger network.

Version 29:
Bug fixes:
Trains
- Fix AI getting stuck trying to build a junction on a station tile.

Version 28:
Tweaks:
Road Network:
- Unified and revised the road depot building code, removing the old concept of "Home Depot."

Version 27:
Bug fixes:
Trains:
- Fixed AI getting stuck building wagons if it fails to build a locomotive.

Version 26:
Bug fixes:
- Correctly updated version number in-game.
Trains:
- Fixed AI not building new rail lines if it has existing termini with available connections but no supplying industries.

Re: CivilAI

Posted: 02 Jan 2020 08:55
by andythenorth
Hurrah! More trains! :D

Found something weird in v29, got a train with only one order. It's plugged up that route. :twisted:

Re: CivilAI

Posted: 02 Jan 2020 15:27
by PikkaBird
That's odd. I'll look out for that. In the meantime, I guess it will sell such trains after 2 years when they fail to make any income. :)

Version 30:
Bug fixes:
- Fixed crash when loading a savegame (due to the changes in v28, oops!).
Trains
- Fixed crash when AI attempts to electrify tracks of another company (reported by andythenorth).

Re: CivilAI

Posted: 14 Jan 2020 11:42
by PikkaBird
I really do enjoy Civi's naming + the "Silly" toyland townnames. :D
Image3.png
Image3.png (63.62 KiB) Viewed 584 times

Re: CivilAI

Posted: 14 Jan 2020 20:08
by Darthrafael
I've found a bug that's likely to do with the vehicle GRFs I use, but I thought it would be a good idea to bring this to your attention.

It bought a Metro Cammell EMU, then decided it wanted carriages, and proceeded to buy 827.7 tiles worth of carriages it could not attach to the train, for a total of about 2000-ish carriages?
uhm.PNG
uhm.PNG (1.54 KiB) Viewed 552 times

Re: CivilAI

Posted: 15 Jan 2020 01:15
by PikkaBird
Thanks! Yep, clearly a problem with the wagons not being able to attach to the loco. Damn NewGRF authors and their BAD FEATURES. ;)

Which newgrf is it? I'll experiment and see what I can come up with. :)

Re: CivilAI

Posted: 15 Jan 2020 05:37
by Darthrafael
PikkaBird wrote:
15 Jan 2020 01:15
Thanks! Yep, clearly a problem with the wagons not being able to attach to the loco. Damn NewGRF authors and their BAD FEATURES. ;)

Which newgrf is it? I'll experiment and see what I can come up with. :)
It's a NewGRF that goes by the name of UKRS2, you might have heard of it? :)
The carriages are from RUKTS, meanwhile, so the issue might be purely because of NewGRF mixing? Still, maybe it's fixable?

Re: CivilAI

Posted: 15 Jan 2020 06:46
by PikkaBird
Darthrafael wrote:
15 Jan 2020 05:37
Still, maybe it's fixable?
I'm sure it is. I'll try out the GRF combination, thanks. :)

Re: CivilAI

Posted: 17 Jan 2020 07:09
by PikkaBird
I figure I've got enough bug fixes and tweaks to release another version. :) I really need to focus on the new pathfinder for v32 though, as the route building is what's really slowing the AI down now.

Version 31:
Features:
Trains:
- AI can now build stations and trains of varying lengths, instead of always 3 tiles.
- AI will build additional freight trains to meet demand.
Road Network:
-Building the intercity road network has been disabled.
Tweaks:
- AI will now avoid planting trees on farm fields.
- Most parameters (max buses, minimum air route distance etc) have been removed from the player-adjustable AI options.
- If you're an advanced user and really want to change these numbers, you'll find them at the end of saveload.nut.
Trains:
- Made avoiding double-connecting industries more reliable.
- Tinkered with locomotive selection to avoid using high-speed locomotives for freight.
Aircraft:
- AI can now buy a cheaper aircraft if its ideal aircraft is too expensive.
Bug fixes:
Trains:
- Fixed wagon selection bug that was preventing electrified freight trains from renewing.
- Disallowed PBS-locked track loops at station entrances.
- Fixed AI ripping up newly built routes because it couldn't quite afford the locomotive yet.
- Added code to handle NewGRF wagons not being attachable (thanks Darthrafael).
Goods Trucks:
- Fixed the AI repeatedly trying to build goods pickup routes to unroutable factories.
- Fixed the AI buying lots of goods trucks if the dropoff station stops accepting goods.
- Fixed the AI building a goods pickup depot when it cannot afford the trucks.

Re: CivilAI

Posted: 17 Jan 2020 18:52
by andythenorth
I broke it again, sorry :oops:

2 types of crash, see attached :)

Re: CivilAI

Posted: 18 Jan 2020 02:30
by PikkaBird
Excellent. Fun fact: this bug did not manifest before v31 because of a typo that was causing it to build a passenger car if it couldn't find a mail van. Fix a bug, make a bug. :)

Version 32:
Bug fixes:
Trains:
- Fixed crash when there is no appropriate mail van available for a new passenger train (reported by andythenorth).