new production unit - barracks



  • @Numetalfan and now another error. I going to blame us both for this. The version at the top can only be numbers. So if you want the ' edited BM' place it with the name or put it in comment brackets:

      <info name="WW2v4-1941" version="1.7"/> <!-- edited BM -->
    

    Doing good so far!! Lets save and run again!

    Cheers...



  • @Numetalfan now there is a whole list of errors! But before you throw you hand up in discuss please notice that all the JAVA error are not there, and if you look into the 'Select Map' list 'WW2v4-1941' is now listed. You can't select it, but it does show that progress is being made! (I think you are still using 1.9.0.0.xxxx, so you may not see the list like I do with the newer version. But you should still at least 2)
    So for the first error at line 883:

    <repairRule name="repairFactoryIndustrialTechnology">
          <cost resource="PUs" quantity="1"/>
          <result resourceOrUnit="factory" quantity="2"/>
          <!-- <repairRules name="repairBarracks"/> Remove -->
    </repairRule>
    
     <repairFrontier name="repair">
          <repairRules name="repairFactory"/>
          <repairRules name="repairBarracks"/> <!-- Add here -->
     </repairFrontier>
    

    The line was just added to the wrong area. And next re-comment out the Industrial Technology productionFrontier block:

    <!-- <productionFrontier name="productionIndustrialTechnology">
                            <frontierRules name="buyInfantryIndustrialTechnology"/>
                            <frontierRules name="buyArtilleryIndustrialTechnology"/>
                            <frontierRules name="buyArmourIndustrialTechnology"/>
                            <frontierRules name="buyFighterIndustrialTechnology"/>
                            <frontierRules name="buyBomberIndustrialTechnology"/>
                            <frontierRules name="buyTransportIndustrialTechnology"/>
                            <frontierRules name="buySubmarineIndustrialTechnology"/>
                            <frontierRules name="buyDestroyerIndustrialTechnology"/>
    			<frontierRules name="buyCruiserIndustrialTechnology"/>
                            <frontierRules name="buyCarrierIndustrialTechnology"/>
                            <frontierRules name="buyBattleshipIndustrialTechnology"/>
                            <frontierRules name="buyAAGunIndustrialTechnology"/>
                            <frontierRules name="buyFactoryIndustrialTechnology"/>
     </productionFrontier> -->
    

    Since the productionRule for Industrial Technology is commented out these should stay commented out. (you may have un-commented these while trying to find other problems, but that's ok).

    Again save and load!

    Cheers...



  • @Numetalfan if everything went right, you should now have a working map. Since there are no Barracks on the map you might have to Edit one in. Test the production by buying some infantry and other different units. You should be able to place infantry at both the barracks and factory, while the other units can only be placed at the factory!

    Are we good so far? Are you ready for your test! Test! TEST! No stinkin' TEST!

    But... yea...

    I think the artillery should be just like the infantry, and produced at both barracks and factory. What changes would you make? Hint -- You could remove just one line. Or for bonus points, you could add just one line!

    Cheers...



  • @wc_sumpton

    thanks to your support, you invested a lot of time helping me, I appreciate that.

    Yet my xml still doesn't work. The parse error seems to be the part where the units, including the barracks, are defined. the syntax misses some </attachment>, but I don't see what is wrong. Maybe you find the error.

    while you fixed my problems the last days, I continued with my next goal:

    extend the map by a new sea zone

    that sea zone will be nr. 66, it will be located south of Italy and contain the islands Sicily and Malta.

    so far my xml was extend by me with the following code lines:

    <territory name="Sicily"/>
    <territory name="Malta"/>
    <territoryOwner territory="Sicily" owner="Italians"/>
    <attachment name="territoryAttachment" attachTo="Sicily" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
    <option name="production" value="1"/>
    </attachment>
    <resourceGiven player="Italians" resource="PUs" quantity="11"/>
    <unitPlacement unitType="infantry" territory="Sicily" quantity="1" owner="Italians"/>
    <attachment name="territoryAttachment" attachTo="Malta" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
    <option name="production" value="0"/>
    </attachment
    <territoryOwner territory="Malta" owner="British"/>
    <connection t1="66 Sea Zone" t2="Sicily"/>
    <connection t1="66 Sea Zone" t2="Malta"/>
    <connection t1="66 Sea Zone" t2="14 Sea Zone"/>
    <connection t1="66 Sea Zone" t2="13 Sea Zone"/>
    <connection t1="Sicily" t2="66 Sea Zone"/>
    <connection t1="Malta" t2="66 Sea Zone"/>

    hope this was so far fine, now the important questions:

    what has to be done to see this on the map, which files have to be manipulated?

    so far I added to the world_war_ii_v4\map\misc
    a Malta.pgn
    a Sicily.pgn
    a b66.pgn

    but I did not do anything in the baseTiles or reliefTiles folders. I need some help with this.

    WW2v4-1941.xml
    is my current file.



  • @Numetalfan whoa there cowboy! Hold your horses! I'm all for adding changes, even if its to the map. But lets take this on one item at a time. Your topic here is "new production unit - barracks", and you stated that your xml still does not work. Until you have a working barracks, you shouldn't be adding other items to the xml. Its nice to know that there is a list of items you might want to add or change, but each item should be discussed as a separate topic so that thing don't get to confusing as we go along. So back to the barracks.

    You started with a working map, "World War II v3 1941", WW2v3-1941.xml and you created a whole new map "WW2v4-1941", WW2v4-1941.xml. Which you add a barracks.png to each nation, otherwise the two directories are still the same. So lets go from there with you new xml.

    First off all references to Malta, Sicily or 66 Sea Zone need to be commented out or removed.

    Once that is done, you need to go back over your unit attachments. You removed all the extra </attachments> that was good but you left:

    <property name="Unit Placement Restrictions" value="true" editable="false"> 
       <boolean/>
    </property>
    

    Under each unit, armour, fighter, bomber, transport, battleship, cruiser, destroyer, carrier, submarine and don't forget the aaGun.

    Next lets talk about copying and pasting. You previous xml had:

        <property name="Territory Turn Limit" value="false" editable="false">
          <boolean/>
       </property>
        <property name="maxBarracksPerTerritory" value="1"/>
        <property name="Placement Restricted By Barracks" value="true" editable="false">
          <boolean/>
        </property>
        <property name="maxFactoriesPerTerritory" value="1"/>
        <property name="Placement Restricted By Factory" value="true" editable="false">
          <boolean/>
        </property>
    

    Your new xml looks like:

        <property name="Territory Turn Limit" value="false" editable="false">
          <boolean/>
       <!-- <property name="maxBarracksPerTerritory" value="1"/> Remove -->
        <!-- <property name="Placement Restricted By Barracks" value="true" editable="false"> Remove -->
          <!-- <boolean/> Remove -->
        <!-- </property> Remove -->
        <property name="Unit Placement Restrictions" value="true" editable="false">
          <boolean/>
        </property>
        <property name="maxFactoriesPerTerritory" value="1"/>
        <property name="Placement Restricted By Factory" value="true" editable="false">
          <boolean/>
        </property>
    

    What happened to the </property> tag under the "<property name="Territory Turn Limit" value="false" editable="false">" and "<boolean/>" lines? You highlighted and pasted over it. When you do that thing break. You have to be careful when you copy from the web and insert it into the xml. For now just add that tag back in, and lets see if we can get these barracks to work!!

    Enjoy.

    Cheers...

    P.S. As to making changes to the map, you could start a new topic so that may be discussed. I would be happy to help you with that!



  • @wc_sumpton

    HI,

    I will start a new sea zone topic later.
    right now I commented all sea zone changes in the xml they should not bother us

    I guess my problem is still the same

    <!-- AA Gun -->
    <attachment name="unitAttachment" attachTo="aaGun" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
      <option name="isAA" value="true"/>
      <option name="transportCost" value="3"/>
      <option name="movement" value="1"/>
    

    <option name="requiresUnits" value="factory"/>
    <property name="Unit Placement Restrictions" value="true" editable="false">
    <boolean/>
    </property>
    </attachment>
    </attachment>

    I have an unterstanding problem wit that </attachment> syntax - what is second </attachment> good for? we have a start
    <attachment name=...
    and an end </attachment> for that
    as well we have a <property name=.. start and </property> to end it.

    when we fix that I hope the game will run.
    my current version is attached
    WW2v4-1941.xml

    I will be online this evenig from about 8 p.m. than we may fix it live



  • @wc_sumpton

    Maybe I can't be online today. If you haven a xml working, please attach it. If it works on my triplea too, I will maybe find the problem, why my xml doesn't work

    Thx



  • @Numetalfan please don't be discouraged. There seems to be a language problem, as I don't think english is your native language. So we can work through this, but I do think you are understanding some concepts. You are right that second </attachment> is not needed and is causing an error. But the <property name="Unit Placement Restrictions" value="true" editable="false"> <boolean/> </property> lines also don't belong in the unitAttachment's. So here is the complete <unitAttachment>'s, including the Barracks and the Factory:

         <!-- Infantry -->
        <attachment name="unitAttachment" attachTo="infantry" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="1"/>
          <option name="transportCost" value="2"/>
          <option name="isInfantry" value="true"/>
          <option name="isAirTransportable" value="true"/>
          <option name="attack" value="1"/>
          <option name="defense" value="2"/>
          <option name="artillerySupportable" value="true"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
     </attachment>
    
        <!-- Artillery -->
        <attachment name="unitAttachment" attachTo="artillery" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="1"/>
          <option name="transportCost" value="3"/>
          <option name="attack" value="2"/>
          <option name="defense" value="2"/>
          <option name="artillery" value="true"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
        </attachment>
    
        <!-- Armour -->
        <attachment name="unitAttachment" attachTo="armour" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="2"/>
          <option name="transportCost" value="3"/>
          <option name="canBlitz" value="true"/>
          <option name="isLandTransport" value="true"/>
          <option name="attack" value="3"/>
          <option name="defense" value="3"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
    
       
        <!-- Fighter -->
        <attachment name="unitAttachment" attachTo="fighter" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="4"/>
          <option name="carrierCost" value="1"/>
          <option name="isAir" value="true"/>
          <option name="attack" value="3"/>
          <option name="defense" value="4"/>
          <option name="canIntercept" value="true"/>
          <option name="canEscort" value="true"/>
          <option name="airDefense" value="1"/>
          <option name="airAttack" value="1"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
    
        
        <!-- Bomber -->
        <attachment name="unitAttachment" attachTo="bomber" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="6"/>
          <option name="isAir" value="true"/>
          <option name="attack" value="4"/>
          <option name="defense" value="1"/>
          <option name="isStrategicBomber" value="true"/>
          <option name="transportCapacity" value="2"/>
          <option name="isAirTransport" value="true"/>
          <option name="airAttack" value="1"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
        
        <!-- Transport -->
        <attachment name="unitAttachment" attachTo="transport" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="2"/>
          <option name="isSea" value="true"/>
          <option name="transportCapacity" value="5"/>
          <option name="attack" value="0"/>
          <option name="defense" value="0"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
       
        <!-- Battle Ship -->
        <attachment name="unitAttachment" attachTo="battleship" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="2"/>
          <option name="isSea" value="true"/>
          <option name="attack" value="4"/>
          <option name="defense" value="4"/>
          <option name="canBombard" value="true"/>
          <option name="hitPoints" value="2"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
        
        <!-- Cruiser -->
        <attachment name="unitAttachment" attachTo="cruiser" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="2"/>
          <option name="isSea" value="true"/>
          <option name="attack" value="3"/>
          <option name="defense" value="3"/>
          <option name="canBombard" value="true"/>
          <option name="hitPoints" value="1"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
        
        <!-- Destroyer -->
        <attachment name="unitAttachment" attachTo="destroyer" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="movement" value="2"/>
          <option name="isSea" value="true"/>
          <option name="attack" value="2"/>
          <option name="defense" value="2"/>
          <option name="isDestroyer" value="true"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
        
        <!-- Carrier -->
        <attachment name="unitAttachment" attachTo="carrier" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="carrierCapacity" value="2"/>
          <option name="movement" value="2"/>
          <option name="isSea" value="true"/>
          <option name="attack" value="1"/>
          <option name="defense" value="2"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
        
        <!-- Submarine -->
        <attachment name="unitAttachment" attachTo="submarine" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="isSub" value="true"/>
          <option name="movement" value="2"/>
          <option name="isSea" value="true"/>
          <option name="attack" value="2"/>
          <option name="defense" value="1"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
        
        <!-- Factory -->
        <attachment name="unitAttachment" attachTo="factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="isFactory" value="true"/>
        </attachment>
    
        <!-- Barracks -->
    <attachment name="unitAttachment" attachTo="barracks" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
       <option name="isFactory" value="true"/>
    <!-- </attachment> Remove -->
        </attachment>
    
        <!-- AA Gun -->
        <attachment name="unitAttachment" attachTo="aaGun" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="isAA" value="true"/>
          <option name="transportCost" value="3"/>
          <option name="movement" value="1"/>
     <option name="requiresUnits" value="factory"/>
    <!-- <property name="Unit Placement Restrictions" value="true" editable="false"> Remove -->
       <!-- <boolean/> Remove -->
    <!-- </property> Remove -->
    <!-- </attachment> Remove -->
    </attachment>
    

    With those changes your xml should run, and look something like:
    WW2v4-1941.xml
    So I hope this helps.

    Cheers...



  • @wc_sumpton

    Thx alot. It works fine, very well.

    I am no native speaker, but my English is fine
    The problems have been syntax issues.

    I started a new topic with that sea zone theme


Log in to reply
 

39746
1889
2197
Who's Online
Visitors Today