Currently Online

Latest Posts

Topic: Crashes due to building preciousness of <=0

Topic Opener
Joined: 2017-02-08, 20:06
Posts: 323
Tribe Member
Location: Eisenach, Germany
Posted at: 2024-03-14, 08:13

hessenfarmer wrote:

I agree about the crash. we should not crash from the ai.
But we can not ensure that the AI is able to handle every possible permutation of the tribes multiple options to define buildings.
By this we check the tribes in the official game for compliance with the AI. If some new feature is deemed really necessary for a tribes character, then we might add some code tom the AI. But we can't do this for Plugins.
The AI can handle multiple buildings planting trees as can be seen in the amazons, however it is not designed to handle buildings properly, that produce multiple different things (in the example clay, reed, and trees and probably more)

The crash can be reproduced very easily: If the lumberjack can do more than just fell trees and harvest wood, the building that sows the other plants automatically gets a preciousness of <= 0 over the course of the game and the AI handler crashes. I tested this by letting the lumberjacks harvest cotton and reed as a test. All of my farms got a preciousness of <= 0 and the game crashed some time after the start of a new AI game. The background to the action was that I wanted to remove all farms in the base mod for my tribe and let the lumberjack harvest all the basic raw materials. This doesn't work because the game simply crashes.

Obviously the AI can't handle it if another building type/worker type acts as a support in addition to the forester for lumberjack.

Edited: 2024-03-14, 08:41

My widelands project:

Top Quote