TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    land transport - how to make them work?

    Scheduled Pinned Locked Moved Map Making
    17 Posts 3 Posters 2.4k Views 3 Watching
    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.
    • cameronC Offline
      cameron
      last edited by cameron

      interesting... because it doesn't care about "paratroopers" not being there. i'd assumed that this was because they were "hardcoded" techs rather than custom ones...
      looks like paratroopers is but mechanizedInfantry isn't as now that i've added them to the tech list they both appear on the player tab but only paratroopers has the "X"...
      which means i'll have to do the more complicated triggered tech assignment... which i think i deleted b/c i gave capitals +1 techTocken generation instead of the "science" tech... sorry, i'm getting babbly.

      EDIT: sorted now with the triggered tech and adding it to the list.
      thanks for the help! 🙂

      C 1 Reply Last reply Reply Quote 1
      • C Offline
        Cernel Moderators Lobby Moderators @cameron
        last edited by

        @cameron said in land transport - how to make them work?:

        interesting... because it doesn't care about "paratroopers" not being there. i'd assumed that this was because they were "hardcoded" techs rather than custom ones...
        looks like paratroopers is but mechanizedInfantry isn't as now that i've added them to the tech list they both appear on the player tab but only paratroopers has the "X"...
        which means i'll have to do the more complicated triggered tech assignment... which i think i deleted b/c i gave capitals +1 techTocken generation instead of the "science" tech... sorry, i'm getting babbly.

        EDIT: sorted now with the triggered tech and adding it to the list.
        thanks for the help! 🙂

        "mechanizedInfantry" is as hardcoded as "paratroopers".

        I believe that you should not experience any difference for anything which you mention unless motivated by something different which you did.

        I don't see any reasons why you would need to use triggers: hardcoded techs can be activated per player at start game via a "techAttachment". If you did this successfully for "paratroopers", you should be able to do the same for "mechanizedInfantry".

        I'm fearing you may be using triggers to work around a problem which should rather be reported and fixed.

        1 Reply Last reply Reply Quote 2
        • cameronC Offline
          cameron
          last edited by cameron

          well, my initial use of

          		<attachment name="techAttachment" attachTo="Ottoman_Empire" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
          			<option name="mechanizedInfantry" value="true"/>
          		</attachment>
          

          didn't work.
          but using

          		<attachment name="conditionAttachmentAlwaysTrue" attachTo="Ottoman_Empire" javaClass="RulesAttachment" type="player">
          			<option name="switch" value="true"/>
          		</attachment>
          		<attachment name="triggerAttachmentmechanizedInfantryForOttoman_Empire" attachTo="Ottoman_Empire" javaClass="TriggerAttachment" type="player">
          			<option name="conditions" value="conditionAttachmentAlwaysTrue"/>
          			<option name="tech" value="mechanizedInfantry"/>
          			<option name="uses" value="1"/>
          			<option name="when" value="before:GermanyTech"/>
          		</attachment>
          

          did.

          i'm not sure how i'd go about reporting it... is that a github thing? oh, i do see a bug reports subforum... still not sure what exactly to report.

          EDIT: hmmm... in crazygs_ww1.xml they use

              <attachment name="techAttachment" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
                <option name="techCost" value="20"/>
                <option name="mechanizedInfantry" value="true"/>
              </attachment>
          

          and that works, albeit with that weird "techCost" bit of which i know nothing...

          C 1 Reply Last reply Reply Quote 1
          • C Offline
            Cernel Moderators Lobby Moderators @cameron
            last edited by

            @cameron Sounds like "techCost" (which is how much it costs to buy tech rolls, default being 5) is needed, which I find something strange if intended at all, but I'm mostly curious about what you did for "paratroopers" instead because you said that worked fine or at least differently.

            Definitely, if all you need is giving some "techCost" value too, better doing that than working around with triggers.

            1 Reply Last reply Reply Quote 2
            • cameronC Offline
              cameron
              last edited by cameron

              		<attachment name="techAttachment" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
              			<option name="paratroopers" value="true"/>
              		</attachment>
              

              i'm pretty sure for mechanizedInfantry i just copy-pasta'd the paratroopers block and then did a replace all of paratroopers -> mechanizedInfantry.

              oh, and as an aside, when i tried commenting out mechanizedInfantry from the tech list after putting in the triggers i did get the error you expected.

              1 Reply Last reply Reply Quote 0
              • cameronC Offline
                cameron
                last edited by

                just tried it with

                		<attachment name="techAttachment" attachTo="Ottoman_Empire" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
                			<option name="techCost" value="5"/>
                			<option name="mechanizedInfantry" value="true"/>
                		</attachment>
                

                and it failed to work. so triggers it is but i don't know why...

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  Cernel Moderators Lobby Moderators @cameron
                  last edited by

                  @cameron said in land transport - how to make them work?:

                  just tried it with

                  		<attachment name="techAttachment" attachTo="Ottoman_Empire" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
                  			<option name="techCost" value="5"/>
                  			<option name="mechanizedInfantry" value="true"/>
                  		</attachment>
                  

                  and it failed to work. so triggers it is but i don't know why...

                  I suggest you make

                  		<attachment name="techAttachment" attachTo="Ottoman_Empire" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
                  			<option name="techCost" value="5"/>
                  			<option name="paratroopers" value="true"/>
                  			<option name="mechanizedInfantry" value="true"/>
                  		</attachment>
                  

                  and everything else the same between "paratroopers" and "mechanizedInfantry", and, if what happens is that (for the same player) "paratroopers" is active and works while "mechanizedInfantry" does not, report it (as a problem) uploading your map somewhere.

                  I do agree with going with the triggers so long as the problem (if it is a problem) is not fixed, of course.

                  wc_sumptonW 1 Reply Last reply Reply Quote 3
                  • wc_sumptonW Offline
                    wc_sumpton @Cernel
                    last edited by

                    @cameron
                    I think @cernel has something here. I believe that "techAttachment" are the same as "rulesAttachment" and "playerAttachment" and that only one is used per player since they are not individually named like triggerAttachment/conditionAttachment. So, if you have:

                    <attachment name="techAttachment" attachTo="Ottoman_Empire" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
                       <option name="mechanizedInfantry" value="true"/>
                    </attachment>
                    <attachment name="techAttachment" attachTo="Ottoman_Empire" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
                       <option name="paratroopers" value="true"/>
                    </attachment>
                    

                    Then only one "techAttachment" is used. Try doing both together, you don't have to add the "techCost" if you don't want to.

                    Cheers...

                    1 Reply Last reply Reply Quote 3
                    • cameronC Offline
                      cameron
                      last edited by cameron

                      yep

                      		<attachment name="techAttachment" attachTo="Ottoman_Empire" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
                      			<option name="mechanizedInfantry" value="true"/>
                      			<option name="paratroopers" value="true"/>
                      		</attachment>
                      

                      works fine. 🙂
                      i think that with multiple separate entries it just goes with the last one listed... replacing the previous, i guess.

                      well, that was an interesting journey. 😉

                      thanks, y'all!

                      C 1 Reply Last reply Reply Quote 1
                      • C Offline
                        Cernel Moderators Lobby Moderators @cameron
                        last edited by

                        @cameron said in land transport - how to make them work?:

                        yep

                        		<attachment name="techAttachment" attachTo="Ottoman_Empire" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
                        			<option name="mechanizedInfantry" value="true"/>
                        			<option name="paratroopers" value="true"/>
                        		</attachment>
                        

                        works fine. 🙂
                        i think that with multiple separate entries it just goes with the last one listed... replacing the previous, i guess.

                        well, that was an interesting journey. 😉

                        thanks, y'all!

                        I assumed that the two options were either within the same attachment or within attachments belonging to different players.

                        You should just never have more than one attachment having the same name attached to the same player.

                        1 Reply Last reply Reply Quote 2
                        • cameronC Offline
                          cameron
                          last edited by

                          the Steampunk_Advanced.xml that i've been modding had them like that, as separate entries i mean.
                          this is my first proper mod so it's all rather new to me.

                          1 Reply Last reply Reply Quote 3

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • 1 / 1
                          • First post
                            Last post
                          Powered by NodeBB Forums