Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Help creating a map

    Map Making
    5
    27
    2489
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      smoke last edited by

      Long-time axis & allies player, first time trying to create a map on TripleA. Been following these tutorials
      https://github.com/triplea-game/triplea/blob/master/docs/map-making/tutorial/creating-custom-map-xml.md
      https://github.com/triplea-game/triplea/blob/master/docs/map-making/tutorial/map-and-map-skin-making.md
      to try and create the board game "Conquest of Nerath" in TripleA's engine because A&A and CON are very similar in rules and gameplay. I followed the tutorials in creating the required folders, files, and everything relating to the map image itself. The part that I need help on is the XML file part. If I am correct, then if I followed the first 9 steps correctly (on the first link above) then all I need to do is create a working XML file, stick it into "games", (triplea > downloadedMaps > conquest > games) and then I'll have a functioning map? So anyway, I took the XML file from a map that I am familiar with, WW2v3 1941.
      https://github.com/triplea-maps/WW2v3-1941_v2/blob/master/games/WW2v3-1941_v2.xml
      Figured I could just edit this one to have CON's rules, troops, and territory names, and be fine. However, there are a lot of things to an XML file and I was wondering if there is a discord or something where I can maybe hop in a call with someone and they can give me some pointers? I have done most of the busy work in defining all the territories and connections, but I am not a coder and some of the syntax is confusing & I'm already getting an error when trying to run the game saying

      Unexpected error reading Game XML, Parsing halted at line: 1339, column: 3, while mapping to: org.triplea.map.data.elements.ShallowParsedGame, error: ParseError at [row,col]:[1339,3] Message: The element type "production" must be terminated by the matching end-tag " ".  
      
      javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1339,3] Message: The element type "production" must be terminated by the matching end-tag " ".
      

      So yeah, what are my options for troubleshooting? Is there anyone that can help?

      W B RogerCooper 3 Replies Last reply Reply Quote 2
      • W
        wc_sumpton @smoke last edited by

        @smoke

        Hail and welcome!! Your error seems to be coming from a badly formatted xml, and may not contain an end tag, </production>, for the <production> tag. The way the error reads though makes me think that there is more to it. The only way to be sure would be to post the xml, so that others may be more helpful.

        Sorry I can't be more informative.

        Cheers...

        1 Reply Last reply Reply Quote 2
        • B
          beelee @smoke last edited by

          @smoke right on map making can be fun as well as maddening at the same time. 🙂

          Do whatever wc suggests as he is a map master. He can also drive a truck and flip flapjacks 🙂 Multi taleneted. 🙂

          Think he tested Expert on the range too. Not 100% sure on that one though 🙂

          1 Reply Last reply Reply Quote 0
          • S
            smoke last edited by smoke

            conquest.xml
            This is my current XML file, couldn't figure out how to post my whole map folder. I was able to fix the error thanks to sumpton, and now TripleA doesn't show me any errors when I try to select the map. The map now loads fine, and I can see the starting map with starting troops, but this pops up
            f49820b9-77ea-406b-b16c-b242136b2dbe-image.png
            and the game becomes stuck in a frozen-like state where I cannot start my first turn. Currently trying to figure out why that is... and also high on my priority list is figuring out how to use this website
            http://www.starlords3k.com/XOB.html
            to implement more specific rules for the game. For example, all troops hit on a dice roll of 6 or more, but better troops get to role a higher-sided dice. Infantry get to roll a d6, (must roll a 6 to hit) and dragons get to roll a d20 (rolling a 6 through 20 scores a hit). So the diceSides option might be able to achieve this, but I have no idea where to put in the option in my XML code.

            Any help greatly appreciated!

            B 1 Reply Last reply Reply Quote 1
            • B
              beelee @smoke last edited by

              @smoke

              can you post a saved game ? Should be a stack trace for the error then

              S 1 Reply Last reply Reply Quote 1
              • S
                smoke @beelee last edited by

                @beelee 2024-1-29-Conquest-of-Nerath.tsvg

                TheDog 1 Reply Last reply Reply Quote 1
                • TheDog
                  TheDog @smoke last edited by

                  @smoke
                  I think it might be best to share your current map, use Google Drive or OneDrive or similar to share your Conquest folder.

                  Copy your map folder to the cloud, post a url link to the forums so we can download it.

                  TheDog S 2 Replies Last reply Reply Quote 1
                  • TheDog
                    TheDog @TheDog last edited by TheDog

                    @smoke
                    In the xml;
                    The wizard cannot have these lines (EDIT: see next post below)
                    <option name="canIntercept" value="true"/>
                    <option name="canEscort" value="true"/>
                    <option name="airDefense" value="1"/>
                    <option name="airAttack" value="1"/>
                    As these belong to an isAir unit

                    Monster cannot have (EDIT: see next post below)
                    <option name="airAttack" value="1"/>

                    diceSides
                    AFAIK you cannot use diceSides globally more than once, so you need to convert the probabilities to use d10 or d12, dont use d20, for all Attack values
                    So for the Nerath attack dice equate to 2,4,5,6,8 d10 TripleA Attack values
                    eg. d6=2 and d20=8 using the above d10 diceSides

                    In TripleA there are also special attacks that can change the dice sides but these should not be used for 'normal' combat.

                    W 1 Reply Last reply Reply Quote 2
                    • W
                      wc_sumpton @TheDog last edited by

                      @thedog said in Help creating a map:

                      The wizard cannot have these lines
                      <option name="canIntercept" value="true"/>
                      <option name="canEscort" value="true"/>
                      <option name="airDefense" value="1"/>
                      <option name="airAttack" value="1"/>
                      As these belong to an isAir unit
                      Monster cannot have
                      <option name="airAttack" value="1"/>

                      Not true, scramble, intercept and air battles rules were added to the engine and were not/ are not restricted to air units only.

                      I think @smoke problem comes from testing on 2.5.

                      Cheers...

                      TheDog 1 Reply Last reply Reply Quote 2
                      • TheDog
                        TheDog @wc_sumpton last edited by

                        Ah, good to know.

                        1 Reply Last reply Reply Quote 2
                        • S
                          smoke @TheDog last edited by

                          @thedog so I should use diceSides at the beginning of the XML to change the default dice to a d10 (or d12)? and here is my current map folder. still actively changing things like troops images and other misc things in the xml like starting troop locations but still same result when trying to run game.

                          https://drive.google.com/drive/folders/18TGoV1R3MNxX4CxjA4I7Qkp3SiVgTPoc?usp=drive_link

                          TheDog W 2 Replies Last reply Reply Quote 0
                          • TheDog
                            TheDog @smoke last edited by TheDog

                            @smoke
                            Well done on producing a map from scratch!

                            Yes use diceSides at the beginning you choose d10 or d12.

                            Change this line to false false like below
                            <property name="Use Shipyards" value="false" editable="false">

                            It will then have a territory error.

                            I also note you have no productionFrontier for your nations.

                            W 1 Reply Last reply Reply Quote 2
                            • W
                              wc_sumpton @smoke last edited by

                              @smoke

                              At line 640 you have "</attachmentList>" which is causing one of you problems because "territoryAttachment" needs to be contained within the "attachmentList", so remove or comment out this line and uncomment the "</attachmentList>" located at line 1234.

                              Now to talk about the "territoryAttachment":

                              <attachment name="territoryAttachment" attachTo="Amil Forest" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
                                <option name="productionOnly" value="4"/>
                                <option name="resources" value="1"/> <!-- Needs a second value (Money/Cards) -->
                                <option name="victoryCity" value="1"/>
                              </attachment>
                              

                              Still looking at more...

                              Cheers...

                              1 Reply Last reply Reply Quote 2
                              • W
                                wc_sumpton @TheDog last edited by

                                @thedog

                                Tag Team?

                                Cheers...

                                TheDog 1 Reply Last reply Reply Quote 2
                                • TheDog
                                  TheDog @wc_sumpton last edited by

                                  @wc_sumpton
                                  Yay 😁

                                  1 Reply Last reply Reply Quote 2
                                  • RogerCooper
                                    RogerCooper @smoke last edited by

                                    @smoke Congratulations for trying to create a mod based on Conquest of Nerath. I had been thinking of doing one myself.

                                    My first suggestion to you is to use a code editor that can verify the parsing in editor. I use XML Copy Editor. This will catch a lot of errors.

                                    I also suggest as this is your first mod, create an XML-only mod on an existing map like WW2v3. It will be lot easier and you can get your code working for units without having to worry about the complexities of map design.

                                    S 1 Reply Last reply Reply Quote 2
                                    • S
                                      smoke @RogerCooper last edited by

                                      @rogercooper @TheDog @wc_sumpton Thanks for the help and suggestions, I've made some progress and cleaned up my xml file a bit. No errors to report at the moment, but I have some questions.

                                      • I'd like to have one of my land troops (wizard) be able to attack before other units, no matter what. Very similar to the first strike ability of submarines. Is the only way to accomplish this to use the 'isSub' unit attachment? I don't want the other parts of isSub, like the interactions between destroyers and air units.

                                      • I'd like for my warship unit to be able to fight in sea battles as well as carry troops on it, like a mix between a transport ship and a destroyer into one unit. So I have this for the warship:

                                      <attachment name="unitAttachment" attachTo="warship" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                            <option name="movement" value="2"/>
                                            <option name="isSea" value="true"/>
                                            <option name="transportCapacity" value="2"/>
                                            <option name="attack" value="2"/>
                                            <option name="defense" value="2"/>
                                          </attachment>
                                      

                                      However, when I try to play the game, TripleA tells me that restricted transports cannot have an attack or defense value.

                                      • I'd like the wizard unit and fighter unit, while being transported by a warship, to be able to participate in sea combat. Meaning, a warship can load a wizard and a fighter, move one spot into the seazone where an enemy warship is located, have battle occur (1 warship, 1 wizard, 1 fighter vs 1 warship), and then if the attacking warship survives, it can unload any surviving cargo onto adjacent land. Then, that cargo can participate in a land battle right then and there. A unique scenario in the game where a troop can participate in two different battles on a single turn, but I don't know how to implement it.

                                      • Can I make it so all air troops can end their turn on water and not die? I tried adding the 'isAir' and 'isSea' tags to the troops to no avail.

                                      • Special scenarios in which troops get more than 1 dice during combat. (can land up to 2 hits in a single round of combat) Example: The Siege troop has a 3/8 chance to hit while defending, but while attacking, it has two attacks of 3/8 hitting chance, so it can possibly destroy 2 enemy units while attacking. Similarly, the Water Elemental troop has two hit opportunities while attacking/defending in the water, but only 1 while on land.

                                      • My game's factory equivalent is called a Castle. You need a castle to spawn troops, Castle's cannot move, and Castle's can defend with a 3/4 chance to hit. I'd like for Castle's to be able to be taken as a casualty during combat, but if done, the Castle becomes "inactive". It will sit out of the rest of the battle until the battle is over. If the attacker wins, the Castle's ownership is transferred to the attacker and is "reactivated". (Just like a factory, units cannot be spawned there until following turn). If the defender wins, the castle is just reactivated and can defend and spawn troops as normal.

                                      • Is there a way to enable zooming? I've always been able to zoom in and out while playing TripleA to see troops and territories more closely, but I can't seem to zoom in my game.

                                      • During the production phase, the production window that pops up is way bigger and stretched than it should be, it looks horrible but it is still functional. Any settings to modify that?

                                      game folder: https://drive.google.com/drive/folders/1xHP0NEUev45fm0xQwYJHHL4WQA97z3Rg?usp=sharing

                                      TheDog B W 4 Replies Last reply Reply Quote 0
                                      • TheDog
                                        TheDog @smoke last edited by TheDog

                                        @smoke
                                        Well done on getting this far!

                                        Wizard attacks first
                                        You need to use targeted AA attacks with

                                        		<option name="isAAforCombatOnly" value="true"/>			<!-- use AA for normal combat only -->
                                        			<option name="offensiveAttackAA" value="1"/>		<!-- sets the value the AA will attack at -->
                                        			<option name="attackAA" value="1"/>					<!-- misnomer, this applies to defense -->
                                        			<option name="attackAAmaxDieSides" value="24"/>
                                        			<option name="offensiveAttackAAmaxDieSides" value="24"/>
                                        			<option name="maxAAattacks" value="1"/>
                                        			<option name="maxRoundsAA" value="-1"/>
                                        				<option name="mayOverStackAA" value="true"/>
                                                        <option name="typeAA" value="Wizard-Zap"/>
                                                        <option name="targetsAA" value="List of units that can be zapped"/>
                                        

                                        The above will attack before

                                        <option name="isFirstStrike" value="true"/>
                                        

                                        .
                                        Transports that can fight
                                        In Warship attachment you need

                                        <option name="isCombatTransport" value="true"/>	<!-- this sea unit can transport & fight. units will not be able to move through it like they would a transport, and it can be taken casualty during battle as normal -->
                                        

                                        .
                                        ** Warship/transport with fighting troops on board**
                                        TripleA cannot do this.

                                        Ran out of time. 🙄

                                        TheDog 1 Reply Last reply Reply Quote 2
                                        • TheDog
                                          TheDog @TheDog last edited by

                                          Also I dont think <diceSides value="24"/> is supported as a lot of the combat values are just 6, even though you have values higher than 6.
                                          So suggest you use dice sides 12 and halve your attack & defence values.

                                          S 1 Reply Last reply Reply Quote 1
                                          • B
                                            beelee @smoke last edited by

                                            @smoke said in Help creating a map:

                                            During the production phase, the production window that pops up is way bigger and stretched than it should be, it looks horrible but it is still functional. Any settings to modify that?

                                            I'm pretty sure it goes by how many characters are in the unit name. So you wanna try and not make them longer than needed.

                                            I think I ended up 17 max. For the height I think it just goes by how many you have. Post a shot if you want

                                            1 Reply Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums