Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    1. Home
    2. wc_sumpton
    W
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups
    • Invitations

    wc_sumpton

    @wc_sumpton

    278
    Reputation
    388
    Posts
    4321
    Profile views
    3
    Followers
    0
    Following
    Joined Last Online

    wc_sumpton Follow

    Best posts made by wc_sumpton

    • RE: new production unit - barracks

      @Numetalfan welcome to xml programming for TripleA!!

      I'm going to assume that you have very little, if any, prior code writing knowledge. If that is true, then congrats Sir! This is an excellent first attempt!

      Your first steps are right, by defining what you want, a 'barracks' unit that can only produce infantry units. You added the unit to the unit list, and defined its productionRule. The next is repair, like a factory, this unit should be damageable by SBR:

      <repairRule name="repairBarracks">
         <cost resource="PUs" quantity="1"/>
         <result resourceOrUnit="barracks" quantity="1"/>
      </repairRule>
      

      Then add the repairRule to the repairFrontier:

         <repairRules name="repairBarracks"/>
      </repairFrontier>
      

      And so that countries can buy this unit, it will need to be added to the productionFrontier:

         <frontierRules name="buyBarracks"/>
      </productionFrontier>
      

      So far so good, now to the barracks attachment:

      <!--- Barracks --->
      <attachment name="unitAttachment" attachTo="barracks" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
         <option name="isFactory" value="true"/>
      </attachment>
      

      Ok so far. At this point there are two production units, factory and barracks. And both unit can produce all units. So how do we restrict the production of the barracks? We limit where each unit can be produced. In each unitAttachment, artillery, armour, fighter, bomber, transport, battleship, cruiser, destroyer, carrier, submarine and don't forget the aaGun add:

         <option name="requiresUnits" value="factory"/>
      </attachment>
      

      Because infantry can be produced by both, there doesn't need to be anything added to its unitAttachment.

      One last step is to add the option to use requiresUnits:

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

      And there you have it. The barracks should now work as designed. To test add a barracks to France:

         <unitPlacement unitType="barracks" territory="France" quantity="1" owner="Germans"/>
       </unitInitialize>
      

      Load the game, and now Germany can produce only infantry units in France, but they can also still produce infantry in Germany.

      Like I said you had the right ideas, and you went a long way to getting what you wanted. There were just a few things that need to be added or changed. Don't give up now!! Mod! Mod! and Mod some more!!

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: Terrain Effects for movement

      @LaFayette we already have the '<variableList>', so for the <unitClass>;

      <variableList>
         <variable name="airUnits">
            <element name="Fighter"/>
            <element name="Bomber"/>
            :
         </variable>
         :
      </variableList>
      

      This would do just what you are describing.

      Cheers...

      posted in Feature Requests & Ideas
      W
      wc_sumpton
    • RE: Trouble Updating Map

      @beelee
      You have " Neutral Navies are represented with a "Neutral_Navy" <img src="Neutral_Navy.png"/> unit placed in their Home country. " in you notes witch reference the image, that is why you need the 'doc\images' directory. if you remove the call to the image then you will not need that directory.

      Cheers...

      posted in Player Help
      W
      wc_sumpton
    • RE: Non-Combat Movement

      @nitrofish383-d
      This sort of movement can be done using triggers.
      In Invasion USA I have the bombers and helicopters set at a movement of 4 and 3 for combat and then 6 and 8 for non-combat.

      So before the Western players combat move:

      <!-- Western Helicopter/Bomber Combat Move settings -->
      <attachment name="triggerAttachmentWesternHumanHelicopter3CM" attachTo="Western" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
         <option name="conditions" value="conditionAttachmentWesternHumanPlayer"/>
         <option name="unitType" value="helicopter"/>
         <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/>
         <option name="unitProperty" value="movement" count="3"/>
         <option name="when" value="before:westernCombatMove"/>
      </attachment>
      
      <attachment name="triggerAttachmentWesternHumanBomber4CM" attachTo="Western" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
         <option name="conditions" value="conditionAttachmentWesternHumanPlayer"/>
         <option name="unitType" value="bomber"/>
         <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/>
         <option name="unitProperty" value="movement" count="4"/>
         <option name="when" value="before:westernCombatMove"/>
      </attachment>
      

      And before the Non-Combat Move:

      <!-- Western Helicopter/Bomber NCM settings -->
      <attachment name="triggerAttachmentWesternHelicopter6NCM" attachTo="Western" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
         <option name="conditions" value="conditionAttachmentAlwaysTrue"/>
         <option name="unitType" value="helicopter"/>
         <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/>
         <option name="unitProperty" value="movement" count="6"/>
         <option name="when" value="before:westernNonCombatMove"/>
      </attachment>
      
      <attachment name="triggerAttachmentWesternBomber8NCM" attachTo="Western" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
         <option name="conditions" value="conditionAttachmentAlwaysTrue"/>
         <option name="unitType" value="bomber"/>
         <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/>
         <option name="unitProperty" value="movement" count="8"/>
         <option name="when" value="before:westernNonCombatMove"/>
      </attachment>
      

      I hope this gives you some ideas on how to do this type of movement.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • isCapturedBy for resources elements

      When a Capital is captured by default the PUs are also surrendered to the victor. Other resources can be destroyed by triggers, but they can not be captured or surrendered like PUs.

          <resource name="Fuel" isCapturedBy="NONE"/><!-- Would destroy resources on Capital capture -->
          <resource name="Iron" isCapturedBy="ALL"/><!-- Would give resources on Capital Capture -->
      

      Cheers...

      posted in Feature Requests & Ideas
      W
      wc_sumpton
    • Game of Thrones & A Song of Ice and Fire - Official Thread

      mapScreenshot.png
      A Song of Ice and Fire

      Originally by Kor438
      Updated by redrum

      Original map thread: http://tripleadev.1671093.n2.nabble.com/The-Game-of-Thrones-map-bug-tp7587435p7587606.html

      ASoIaF Issues

      • Needs updated to TripleA 1.9
      • Should create github repo and add to TripleA downloads once fixed

      game_of_thrones.png
      Game of Thrones

      Originally by Al
      Updated by Redrum, Wc_sumpton, and Maquis

      Original map thread: http://tripleadev.1671093.n2.nabble.com/A-Song-of-Ice-and-Fire-v1-0-td7581892.html
      Discussion on fixing bugs: https://forums.triplea-game.org/topic/1497/fixed-game-of-thrones-map-bug

      GoT Issues

      • https://github.com/triplea-game/triplea/issues/3160 (not sure if any of these still remain)
      • Several player territory colors are hard to see so relief tiles should be more transparent

      GoT Suggestions

      • Unit images are poor
      • Territories are too big and could be split up a bit more
      • Could use a 2 alliance version so its easier to play with less players
      • Decrease overall territory production by half rounding up
      hispublic created this issue in triplea-game/triplea

      closed G.O.T. map territory issues #3160

      posted in Maps & Mods
      W
      wc_sumpton
    • RE: Houserules/mods for fun

      @Griito
      No you do not have to upload to GitHub. Just include you changes in the map folder. You should be able to test your mod then. I find it easer if the map folder is un-zipped. I also take the '-master' off the un-zipped folder, and relocate the original downloaded zipped file.

      Hope this helps.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: Taking your suggestions for a new UI

      @RoiEX
      The black print is very hard to read, and is impossible where it bleeds over into the brown border. You said you were using a WYSIWYG? Which one and is it a free download?

      Design is not my forte, but I could give it a try.

      Cheers...

      posted in Development
      W
      wc_sumpton
    • RE: Forty Thousand - Official

      @NinjaWolfHybrid the edits @Cernel is talking about are not that much. In the xml replace "attatch" with "attach", this will replace both "attatchment" and "attatchTo", and "Attatchment" with "Attachment". This should allow the map to be played when uncompressed.

      File contains only edited xml:
      fourty_thousand_beta.zip

      Cheers...

      posted in Maps & Mods
      W
      wc_sumpton
    • RE: Russia Can't Attack First Rule

      @Carey-Drake by selecting 'Movement By Territory Restricted' will limit the Russian Player's first turn movements.

      Cheers...

      posted in Player Help
      W
      wc_sumpton

    Latest posts made by wc_sumpton

    • RE: Unable to Load Polygons.txt Error

      @Contango

      @beelee has 'Hit the Nail on the Head'. When working with the .zip file Capitalization matters. You need to change the mapName property:

      <!-- Need to remove the capital letters in value -->
      <!-- <property name="mapName" value="G40_Alt_Universe" editable="false"/> -->
          <property name="mapName" value="g40_alt_universe" editable="false"/>
      

      When working with an unzipped file, capitalization is dependent on the OS you are using.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: Open a Dialog Box when event triggers?

      @Jason-Green-Lowe

      '<originalOwner' can not be set to 'None' unless you create a player as 'None'. But it can set it to 'Natural'. So that is something to think about. 🙂

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: Runtime error on unit placement

      @andrewthree

      What is the error that you are getting? The only error I have received is the "Missing Unit Image" error, because I did not create the factory units in every unit folder. Besides that error, which I ignored, I was able to go several rounds with no problems.

      I used the 'GermanFactory' as a guide and created the same unit for each player, with different production cost. The factories worked good, even the generated PUs worked. Since the is no 'whenCapturedChangesInto', but no attack or defense the unit could not be taken as a casualty, thus when Germany captured a 'RussianFactory' I received the error stated above. But Germany was still able to use the missing factory to produce units.

      I also created one 'factory' using the 'GermanFactory' with different production cost for each player. Because each player used the same 'factory' the was no error, and everything worked well.

      As others have stated, without more information, I have been unable to recreate the problem. But I have tried. Sorry.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: Open a Dialog Box when event triggers?

      @Jason-Green-Lowe

      Sorry for the amount of time it has taken me to reply. Using conditions that test for 'battle', the presents of Italian troops and the presents of enemy troops. I have been able to trigger messages using both 'politics' and 'userActions'. But I have been unable to get Germany to retain control of Rome.

      This maybe a bug. Sorry I was unable to help.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: Open a Dialog Box when event triggers?

      @Jason-Green-Lowe

      It hard to find the error with the information posted. I'm thinking that you don't have the console turn on. To show the console select 'Engine Preferences' from the main menu. Then the 'Game' tab.

      As to you idea, once Rome is liberated, Italy will gain control of that territory. And since that is the Capital for the Italian player, all liberated territories will return to the Italian player.

      The way I read this, the change of relationship happens after so 'givesBackOriginalTerritories' will have no effect until the next time Rome is captured. For this to work I think you are going to have to set the relationship to 'stingy' at the beginning of the game, then check if Germany wants to give back control of the liberated territories.

      Hope this is helpful.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: Open a Dialog Box when event triggers?

      @Jason-Green-Lowe

      Just guessing here but one of the problems might be in when the 'userActionAttachment' trigger are fires. The 'germanUserActions' delegate should be just before 'germanEndTurn' because the endTurn delegate might be clearing the 'battle' flag.

      Also if German, Italian relationship changes is set to 'Allied' with 'givesBackOriginalTerritories' equals 'true' then German never control Rome because once the territory is liberated, Italy will assume control of the territory.

      How to test what is happening. Run you map, and give Rome control to an enemy of Italy. On Germany's turn stage the battle so that German will win. If the color changes to Italy then condition 'German have 'directOwnershipTerritories' of Rome' will be false and the userAction will not fire.

      Hope this explains what is happening, and give you some ideas on how you might fix them.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: trigger question - unit with hit

      @Numetalfan

      Lets take a crack at this. First you want to check for any Americans_west battleship's, and your check looks ok...

      <attachment name="conditionAttachmentPearlHarbour" attachTo="Americans_west" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
         <!-- maybe try 'directExclusionTerritories' -->
         <option name="directPresenceTerritories" value="map"/>
         <!-- 'unitPresence' does not take a player so remove 'Americans_west' -->
         <!-- If you need to reference a different player use <option name="players" ... /> -->
         <option name="unitPresence" value="battleship" count="0"/>
         <option name="rounds" value="1"/>
            <!-- Not needed since attachTo = 'Americans_West' -->
            <!-- <option name="players" value="Americans_west"/> -->
      </attachment>
      
      <attachment name="triggerAttachmentBBrefloating_PearlHarbour" attachTo="Americans_west" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
         <option name="conditions" value="conditionAttachmentPearlHarbour"/>
         <option name="when" value="after:americans_westCombatMove"/>
         <!-- 'placement' does not take a player -->
         <option name="placement" value="53 Sea Zone:battleship" count="1"/>
      </attachment>
      

      See if that helps. As to placing a damage unit, I don't think there is a way, but I could be wrong. You could request a feature to do so, but it would not be added to 1.9.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: TOTAL GLOBAL WORLD WAR II- fusion & clean-up PROJECT

      @ebbe 👍

      I am very glad to hear that you figured out '-reset-' and understand that after using it the other territoryEffect's would need to be set again.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: TOTAL GLOBAL WORLD WAR II- fusion & clean-up PROJECT

      @beelee
      The folder should be called 'territoryEffects'. The image will not show up on the map, but in the status bar that gives quick information about the territory.

      Cheers...

      posted in Map Making
      W
      wc_sumpton
    • RE: TOTAL GLOBAL WORLD WAR II- fusion & clean-up PROJECT

      @ebbe @beelee

      Sorry been very busy lately. I just tried a winter territoryEffect and it seemed to work very well for me. What I did was create the effect:

      <territoryEffectList>
         <territoryEffect name="winter"/>
      </territoryEffectList>
      ...
      <attachment name="territoryEffectAttachment" attachTo="winter" javaClass="games.strategy.triplea.attachments.TerritoryEffectAttachment" type="territoryEffect">
         <option name="combatOffenseEffect" value="infantry" count="1"/>
         <option name="combatOffenseEffect" value="armour" count="-1"/>
         <option name="combatDefenseEffect" value="infantry:armour" count="2"/>
         <option name="noBlitz" value="armour"/>
         <option name="movementCostModifier" value="armour:fighter:bomber:" count="2"/>			
      </attachment>
      

      I added the fighter and bomber to my test. Then my conditions and triggers:

      <attachment name="conditionAttachmentAlwaysTrue" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
         <option name="switch" value="true"/>
      </attachment>
      <attachment name="triggerAttachmentClearWinter" attachTo="Russians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
         <option name="conditions" value="conditionAttachmentAlwaysTrue"/>
         <!-- You will need your own list of territories here -->
         <option name="territories" value="Fall:S. Fall:Ironspikes:Gallgorlad"/>
         <option name="territoryAttachmentName" value="TerritoryAttachment" count="territoryAttachment"/>
         <option name="territoryProperty" value="territoryEffect" count="-reset-"/>
         <option name="when" value="before:russiansCombatMove"/>
         <option name="uses" value="3"/>
      </attachment>
      <attachment name="triggerAttachmentMakeWinter" attachTo="Russians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
         <option name="conditions" value="conditionAttachmentAlwaysTrue"/>
         <!-- You will need your own list of territories here -->
         <option name="territories" value="Fall:S. Fall:Ironspikes:Gallgorlad"/>
         <option name="territoryAttachmentName" value="TerritoryAttachment" count="territoryAttachment"/>
         <option name="territoryProperty" value="territoryEffect" count="-reset-winter"/>
         <option name="when" value="after:russiansNonCombatMove"/>
         <option name="uses" value="2"/>
      </attachment>
      

      I also created a territoryEffects directory under map and added a winter.png. When I hover the mouse over the marked territories during the 'Winter' the icon showed in the status bar and unit movement was restricted. When 'Winter' was over the icon in the status bar was gone and unit movement was no longer restricted.

      Will try to help more time allowing.

      Cheers...

      posted in Map Making
      W
      wc_sumpton