How to default a player to be the AI?
-
It is assumed you can somehow modify
<player_list>
so that certain players are set to be one of the AI types by default. I haven't run across any example maps that are doing this, so how would it be done? -
@eqqman hmm ... will ping @wc_sumpton
-
@eqqman
from 1941 Global Command Decision<player name="Germany" optional="true" canBeDisabled="true" defaultType="Human" isHidden="false"/> <player name="USSR" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/>
USSR defaults to Hard AI
You cannot set a default to Fast AI or any other AI type.
-
@thedog I see thank you! One of the reasons I was looking into this was to make certain players "Do Nothing" AI on maps where they only basically exist for bookkeeping purposes, which I guess is not an option. But still useful to know for the other cases.
-
@eqqman
Just in case you dont have all the option, this is from my map
settlers_fallen_empire<playerList> <!-- In turn order (it is important that the players are listed in turn order)--> <!-- optional: just means 'does this player require a capital?'. if optional is false, they require at least 1 capital. if optional is true, they may have no capitals. --> <!-- canBeDisabled: if true means that the player will skip all of their phases. their delegates will be removed from the game (so triggers will not happen during those delegates either) --> <!-- defaultType: optional, default is "Human"; options are "Human", "AI", "DoesNothing"; sets player to this type by default in the player selection window --> <!-- isHidden: optional, default is "false"; options are "true", "false"; if true doesn't show player in player selection window --> <!-- no capitals, shows all phases, start player as AI, isHidden=true is for faction to start as AI -->
<player name="AlAnfa" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/> <player name="Orcs" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/> <player name="Undead" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/> <player name="Ratkin" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/> <player name="Demon" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/> <player name="Dragonkin" optional="true" canBeDisabled="true" defaultType="Human" isHidden="false"/> <!-- only Humans can play this faction --> <player name="Imperial" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/> <player name="Dwarf" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/> <player name="Elf" optional="true" canBeDisabled="true" defaultType="AI" isHidden="false"/> <player name="Merefolk" optional="true" canBeDisabled="true" defaultType="Human" isHidden="false"/> <!-- only Humans can play this faction --> <player name="Celestial" optional="true" canBeDisabled="true" defaultType="Human" isHidden="false"/> <player name="none" optional="false" canBeDisabled="false" defaultType="DoesNothing" isHidden="true"/>
-
@thedog It was stated before that "You cannot set a default to Fast AI or any other AI type", so then what is "DoesNothing"?
-
So the "none" can be used as a faction that does nothing, but can have;
- "capital" code.
- step logic like notifications
- conditions
Search map xml for to look for "DoesNothing" and then the faction to find actual use.