What is Player canBeDisabled Used For?

  • Admin

    There is a property in game XML on player called 'canBeDisabled' and defined as:
    <!-- 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) -->
    <player name="Italians" optional="false" canBeDisabled="false"/>

    When do maps use this property? Is it just for removing player's phases after they are defeated to speed things up? It appears if you uncheck the checkbox on the player selection screen then it sets to Weak AI but you can still change it. If it has no phases then the player type shouldn't matter?

  • Moderators Admin

    @redrum Correct. Disabled players have all phases nullified (this may be critical, in some cases; look at "Conquest of the World"). They will also refuse whatever actions requiring acceptance, when assigned to an AI that behaves so, or accept any, when assinged to an AI that behaves so, like Does Nothing. Yes, I believe the main usage is for removing player's phases after they are defeated or for skipping them in case the game can be customised on variable number of players, so that, like, you can play it with 2 to 6 players, without requiring several different games, especially referring to games having a Risk style starting setup (look at "Conquest of the World"), to speed things up, particularly important in case of extensive use of triggers.

    The player type is only for selecting casualties in defence and accepting actions, so that you can set it to some AI or have some human player managing it, maybe following the rules of the game for disabled players.
    For example, say, if you want some disabled players to accept all actions proposed to them, then you probably want to assign them to Does Nothing, as this AI always accepts everything (was set so by Veqryn, possibly under my request, or maybe he decided it on its own, anyways), that is not what other AI would do.

    Short story: I believe everything with that option works fine as it is, especially the behaviour of fully nullifying (not just skipping) any phases, except only that I tend to think a better behaviour for disabled players assigned to AI would be for any to accept any actions, instead of any refusing any (any maps would be still able to follow what they prefer by spelling it out in notes and have an human player taking over the disabled players and do what supposed to). However, if you want, I tend to think you can limit the type options to "Does Nothing" and "Human" only, and I also think that it may make more sense "Does Nothing" being the default, here, instead of "Easy". However, I suggest you consult with Veqryn before making any changes, as there may be reasons if he set "Fodder" instead of "Does Nothing" as defaults, since both were already available options, back then.

    Very short story: I think you should leave all working as it is, except that I suggest the default being Does Nothing, but ask Veqryn first, if any changes (I'm particularly curious why he didn't set the default to Does Nothing himself).

  • Moderators Admin

    Also, I guess you already know this, but, just in case, there is a property, namely "Disabled Players Assets Deleted" that it is directly related to the "canBeDisabled" setting, as explained in pos2: "If any players are disabled and unused, then all their units, money, etc, gets deleted at the start of the game during initialization delegate.". I don't know of other properties directly related, but I can't be sure; again, ask Veqryn, in case.

  • Admin

    I think the only map I made that uses this feature is Star Trek Dilithium War.

    I use it as a method of having or not having the Borg join in on the otherwise two alliance fight. So the map can be played with Borg or without, with meaning that they show at the end of the first round and starts to harass everyone.

  • Admin

    @Frostion @Cernel Alright, thanks for the input. I was just thinking when would someone disable a player vs use Does Nothing AI. I'm planning to leave this option as is for now.

Log in to reply