Allow users to de-select objectives when starting games



  • Some players like to play without certain objectives. There's been a request made to allow users to select objectives that they don't want to play with in certain games. Is it possible to add a screen, perhaps under map options where a game will be started with a few objectives removed.

    At the moment, if you don't want to play with all objectives you have to edit the PUs (or whatever) out of the game after the objective is collected.

    Apparently it is possible to do this with techs. How easy is this to implement?



  • @simon33 depends on how big you go. 45 or so total objectives in BM3 with 25 new ones. Probably take 10-15 minutes an objective depending on how familiar one is with the xml. Plus you'd need to add the tech phase back in.



  • @simon33 With some xml knowledge, adding a map option that disables an objective requires changing ~7 lines per objective, and done en masse at most 2 minutes per objective. Just create a new map option, a condition that checks for the map option and add that check as an additional condition option to the objective.

    Example modification of POS2:

    <attachment name="objectiveAttachmentGermans1_EasternEurope" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
          <option name="objectiveValue" value="4"/>
          <option name="alliedOwnershipTerritories" value="East Balkans:Eastern Europe:Ukraine S.S.R.:Belorussia:West Russia:Norway:Karelia S.S.R.:Archangel:Caucus" count="7"/>
    </attachment>
    

    Into this:

    <attachment name="THIS_IS_THE_CONDITION_TO_BE_ADDED" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
          <option name="gameProperty" value="THIS IS THE MAP OPTION TO BE ADDED"/>
    </attachment>
    
    <attachment name="objectiveAttachmentGermans1_EasternEurope" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
          <option name="condition" value="THIS_IS_THE_CONDITION_TO_BE_ADDED"/>
          <option name="objectiveValue" value="4"/>
          <option name="alliedOwnershipTerritories" value="East Balkans:Eastern Europe:Ukraine S.S.R.:Belorussia:West Russia:Norway:Karelia S.S.R.:Archangel:Caucus" count="7"/>
    </attachment>
    

    And, to the end of the xml:

    <property name="THIS IS THE MAP OPTION TO BE ADDED" value="true" editable="true">
          <boolean/>
    </property>
    

  • Moderators

    @simon33 What @alkexr posted is the correct way to do what you are proposing. The downside, of course, is that the game options would become quite long. You don't need to hack it using tech (and, if doing it in any other ways, which I wouldn't, I would rather do it with user actions).



  • @alkexr That's just what I wanted! Thanks.



  • @alkexr much better way then I've been doing it. This is all i can find on "gameProperty" in POS2. gameProperty values: can be set equal to the exact string of any boolean game property option, including custom made up ones.

    Maybe it could be updated with your example for uneducated people like myself