Navigation

    TripleA Logo

    TripleA Forum

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

    Handling Customized Techs

    Map Making
    3
    9
    110
    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.
    • RogerCooper
      RogerCooper last edited by

      I need to have some customized techs in a mod, that are available to all players. Is there a way of doing this? Do I need to rename a hard-coded tech and use that as a trigger to add a production rule?

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

        @rogercooper

        Yea I don't think you need to rename a hardcoded one. It's been a few years since I did it but basically copied the two that Veq did for Global 40 explained in POS2.

        I made a pile of them for "Global 40 House Rules".

        I don't remember exactly what i did but here's xml. Search techname and pick one in the second group to follow. First group is the hardwired but last two custom I think.

        Screenshot from 2025-05-13 16-49-40.png

        Global_40_House_Rules.xml

        RogerCooper 1 Reply Last reply Reply Quote 1
        • RogerCooper
          RogerCooper @beelee last edited by

          @beelee I am seeing this code.

          <attachment name="triggerAttachment_MobileArtillery" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                <option name="trigger" value="conditionAttachmentMobileArtillery"/>
                <option name="productionRule" value="productionGermans:buyMobile_Artillery"/>
                <option name="productionRule" value="productionRussians:buyRussian_Mobile_Artillery"/>
                <option name="productionRule" value="productionJapanese:buyJapanese_Mobile_Artillery"/>
                <option name="productionRule" value="productionAmericans:buyMobile_Artillery"/>
                <option name="productionRule" value="productionBritish:buyMobile_Artillery"/>
                <option name="productionRule" value="productionUK_Pacific:buyMobile_Artillery"/>
                <option name="productionRule" value="productionItalians:buyMobile_Artillery"/>
                <option name="productionRule" value="productionANZAC:buyMobile_Artillery"/>
                <option name="productionRule" value="productionFrench:buyMobile_Artillery"/>
                <option name="when" value="before:germansPurchase"/>
                <option name="uses" value="1"/>
              </attachment>
          

          It looks to me that adding the trigger adds Mobile_Artillery to everyone, not just the player who developed it.

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

            @rogercooper

            yea if I remember right these techs were for all players. To do a specific player only, you need to trigger it.

            Again, I don't remember exactly the code but I'm pretty sure it can be done. I will try and find it later tonight.

            You want a custom tech only available to certain players not all ? Is that what you are after ?

            Edit
            Ahh yea looking at the above you can just elimnate the players you don't want to produce it. I didn't look at the condition yet

            RogerCooper 1 Reply Last reply Reply Quote 1
            • RogerCooper
              RogerCooper @beelee last edited by

              @beelee I want to use the same tech list for everyone, without having to create a separate trigger for every tech & player.

              B W 2 Replies Last reply Reply Quote 1
              • B
                beelee @RogerCooper last edited by beelee

                @rogercooper

                Oh well the above should work then.

                Edit
                "Improved_Mech_Inf" is a custom one. You can follow it in the Global 40 mod Veq did.

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

                  @rogercooper said in Handling Customized Techs:

                  I want to use the same tech list for everyone, without having to create a separate trigger for every tech & player.

                  You cannot use the same tech list for all players like you can with production.
                  In <technology> all tech used should be listed in <technologies> sub section. In <playerTech> sub section are the <category> and <tech>. Each player is assigned a <playerTech> so players cannot share the <category><tech> information. <category><tech> can be left empty and triggers used to fill/add to later.
                  If custom tech are being used each player will need a <techAttachment>. These may also be left empty. Because these are under the <attachment> section "foreach" can be used to assign each player the same <techAttachment>.
                  <playerAttachment> <shareTechnology> can be used to share researched tech. Each player would require a <playerAttachment> with each subsequent player listed under <shareTechnology>. A player may have only one <playerAttachment> as creating more will overwrite each other.

                  Hope this gives you food for thought.

                  Cheers...

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

                    @wc_sumpton Thank for the help from you and beelee. I think that I won't use technology tables at all. Instead I will use triggers to grant technologies (production rules) with "foreach" loops.

                    The tech system in TripleA suffers from hard-coding, but it would be difficult to fix the program without breaking the existing mods

                    W 1 Reply Last reply Reply Quote 3
                    • W
                      wc_sumpton @RogerCooper last edited by

                      @rogercooper said in Handling Customized Techs:

                      The tech system in TripleA suffers from hard-coding, but it would be difficult to fix the program without breaking the existing mods

                      This would incur what one would think "fixing" would need to be done. Maybe "expanding" the present system would be better.

                      Either way someone would still need to define how the system is "broken".

                      Still, I didn't understand what was meant by this statement. Sorry.

                      Cheers...

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