Limited battle round



  • Where and how do you limit battle rounds on any map. If it needs to bee coded, in which file should the code be changed?



  • You will need to change the xml file, it should be located here.

    ~user\triplea\downloadedMaps\mapname.zip\map\games\mapname.xml
    

    I don't remember what it is you need to change, but you can find it in the Pact of Steel 2 xml. That map acts as a tutorial for map making.



  • @Simon-Westerlund
    in every maps xml you find the following lines to determine the rounds for sea, air, land each:

    	<property name="Land Battle Rounds" value="2" editable="true">
    		<number min="-1" max="100"/>
    	</property>
    
    	<!-- Sea Battle Rounds means the number of rounds that a normal Battle goes on for (sea). Default is -1, and if negative, the battle continues forever until 1 side is eliminated. -->
    	<property name="Sea Battle Rounds" value="2" editable="true">
    		<number min="-1" max="100"/>
    	</property>
    
    	<property name="Air Battle Rounds" value="2" editable="true">
    		<number min="-1" max="100"/>
    	</property>


  • Thank you for the reply. I acctually solved it by examining maps that had it in their map options, like "the Great War". Not(!) every map has that code line in it's xml file, but at least as long as the map is based on WW2V2 rules, you can add the option to limit battle rounds by adding the above code lines to the xml files, like so;

    1. Find map in triplea/downloadedMaps/'map name'
    2. in map folder open file map/games/'map name'.xml
    3. find code section <propertyList>
    4. insert following code lines like image below;

    battleroundslimited.png

    Then you should be able to freely tweak battle rounds limit.

    Hope this thread is helpful to others as well

    Happy conquering!


Log in to reply