My implementation may have been oriented by my next idea that was having a faction AI that would fallback on the era AI.
However, I should have not let me influence by it as this is not in the scope of the current patch and there is no evidence that the current implementation of the patch will help anyhow to implement that idea.

So I will work on reduce the footprint of the patch by following your guidance of storing only the AI id and make no change in the get_default_ai_parameters.

In the meantime, I put in attachment the era I use to test the patch (select "Default+Nightmares" era in the game creation dialog). When turning a side to AI controller, the "default AI with curse formula" should pop-up in the AI selection widget (after the patch is applied).

you must not touch default_config_ and configuration::get_default_ai_parameters() at all, since it is 'default fallback values for ai parameters, which are supposed to be always present, regardless of UMC'

note that you do not need to store 'config era_default_config_', since you store all the era AI configs anyway; just store the id of the default configuration and use it configuration::get_default_ai_algorithm()

also (not required, but will be a good thing to allow me to test quickly), please provide a separate attach with the test era.

If an AI has been developed for an era, it is likely that the owner intends to have that AI used by default when playing the era.
For example, when creating a game and allocating a slot to a computer player, the AI algorithm should then be set to the AI coming along the era.

To implement this, I have created a use_as_default property to be set in the [ai] key inside the [era]. When set to true (default=false) the era AI will be selected by default when allocating a slot in a game to a computer player.

NB: the droid command will still affect the standard default AI to the side. This case will be taken care of, a soon as the implementation in the patch is validated.

NB-2: the wiki has to be updated to list the new use_as_default property of the [ai] key. This will be done if the patch is accepted. That might require the creation of a entry for [ai] inside [era] tag description as currently only [ai] inside [side] is documented.

Copyright (C) 2004-2006, the Gna! people. Posted items are owned by whoever posted them.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.