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

    placement/removeUnits Question

    Scheduled Pinned Locked Moved Map Making
    23 Posts 7 Posters 8.4k Views 7 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.
    • FrostionF Offline
      Frostion Admin @beelee
      last edited by

      @beelee Sounds like you are making an interesting XML. I have also been wanting to give units movement when they get placed, but never figured out how. Nice if you have.

      What is ”Cernel's xml”? And what is your “Also keeping track of things that aren't in POS2” thing? Are you making like a list of good tricks? 😉

      It would be nice to have a real “XML code guide” one day, with examples of possibilities and options that folks have figured out.

      Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

      B 2 Replies Last reply Reply Quote 0
      • B Offline
        beelee @Frostion
        last edited by

        @Frostion
        Cernel's xml is a few posts above. I never knew how to change unit attachments. There's a few that you can add to tech abilities, but I always would make a new unit and replace the old one. Cernel's was the first time I saw an example of unitAttachmentName I think it is, so I could just change the unitAttachment instead for most stuff. I think if I have the tech that places the new unit fire at bid phase, then maybe they'll work when the game starts. At least I think thats what prastle meant. Haven't tried it yet. Idk how that'd work after the game started though. I know there's a way to turn off certain delegates so you can skip things but I haven't quite figured that out yet.

        Anyway I think it's all in POS2 and Veqryn did provide some nice examples of stuff. There's a few that are hard for me to grasp though. Basically I look at what others have done, yourself, Zim Zero, Rolf and others and copy it. crazy_german's posts are always informative and several others I can't think of right now.

        So I don't think I've actually found anything new yet. Some stuff is just worded differently. I would always see the changes when a new triplea came out, but didn't know how to use them. maybe there just kinda built in to what's already there. Idk.

        But yea I was thinking it'd be cool to have a list of "good tricks" or something like that. There's a lot of info out there it's just hard to find.

        so far the givesMovement thing hasn't worked quite the way I'd like. I made a bomber an airfield and had it give movement to a fighter. Which works, but if it's in a TTy that already has an airfield and their movement bonus is the same it won't stack. If it's higher, then it'll override the lower bonus and work. I don't think the engine can do that though.

        1 Reply Last reply Reply Quote 0
        • B Offline
          beelee @Frostion
          last edited by

          @Frostion
          So what's been working for getting the units to move when they're first placed is to have them place on the player's turn before the player who receives the units turn.

          I was always just doing the default where they were placed on your combat move and then they wouldn't do anything. So use the same trigger just set when so it fires the player before. I'm not sure if you can have it fire at the end of there turn and still work (haven't tried it) but any time before their combat move has been working.

          N 1 Reply Last reply Reply Quote 0
          • N Offline
            Numetalfan @beelee
            last edited by

            I designed conditions and a trigger:

            <attachment name="triggerSpaintoPro-Axis" attachTo="Pro-Axis" javaClass="TriggerAttachment" type="player">
            <option name="when" value="after:Pro-AlliesCombatMove"/>
            <option name="conditions" value="conditionAttachmentalliedbattlespain:conditionAttachmentobjectiveG4cn"/>
            <option name="removeUnits" value="Spain:all"/>
            <option name="changeOwnership" value="Spain:any:Pro-Axis:false"/>
            <option name="placement" value="Spain:pa_infantry" count="3"/>
            <option name="uses" value="1"/>
            </attachment>

            everythings works..
            ....except:
            <option name="removeUnits" value="Spain:all"/>

            all original (neutral) units there remain. What can be the reason for that?

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              beelee @Numetalfan
              last edited by

              @numetalfan so Spain is a True Neutral that changes into a Pro-Axis Neutral ?

              If so you might need to remove the Neutral units before it changes ownership to pro-axis and then add them back as pro-axis after if needed.

              You'd probably need separate triggers.

              This is just a guess

              wc_sumptonW 1 Reply Last reply Reply Quote 0
              • wc_sumptonW Offline
                wc_sumpton @beelee
                last edited by

                @Numetalfan

                The units do not belong to Pro-Allies. 'removeUnits' is looking into Spain and removing all Pro-Allies units.

                Cheers...

                N 1 Reply Last reply Reply Quote 0
                • N Offline
                  Numetalfan @wc_sumpton
                  last edited by

                  @wc_sumpton

                  so in the placement phase it is

                  <unitPlacement unitType="infantry" territory="Spain" quantity="3"/>

                  so no owner nation.
                  but the trigger has to be attached to someone

                  the units are located in:
                  ...\units\Neutral

                  my first idea:

                  <attachment name="triggerSpaintoPro-Axis1" attachTo="Neutral" javaClass="TriggerAttachment" type="player">
                  <option name="when" value="after:Pro-AlliesCombatMove"/>
                  <option name="conditions" value="conditionAttachmentalliedbattlespain:conditionAttachmentobjectiveG4cn"/>
                  <option name="removeUnits" value="Spain:all"/>
                  <option name="uses" value="1"/>
                  </attachment>

                  does not work, maybe it's because of
                  attachTo="Neutral

                  how to solve this ?

                  B TheDogT 2 Replies Last reply Reply Quote 0
                  • B Offline
                    beelee @Numetalfan
                    last edited by

                    @numetalfan so Spain has changed to "Neutral_Axis" or w/e you have in your game. So try the attachTo="Neutral_Axis"

                    1 Reply Last reply Reply Quote 0
                    • wc_sumptonW Offline
                      wc_sumpton
                      last edited by

                      @Numetalfan

                      I am sorry, but I don't have a simple answer. The only way I am able to remove 'Neutral' units it to have a 'Neutral' player. '<option name="players" value="Neutral"/> dose not seem to work.

                      Again sorry. 😞

                      Cheers...

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

                        @wc_sumpton said in placement/removeUnits Question:

                        @Numetalfan

                        I am sorry, but I don't have a simple answer. The only way I am able to remove 'Neutral' units it to have a 'Neutral' player. '<option name="players" value="Neutral"/> dose not seem to work.

                        Again sorry. 😞

                        Cheers...

                        I think @redrum already clarified that the "Neutral" player is sort of a program hack to support simple "neutral" defensive units. For anything more complex than that, I believe you are supposed to have an actual player, hiding it and pre-assigning it to "Does Nothing".

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

                          @numetalfan
                          Try using a pseudo player, I call them "none", with a

                          <player name="none" optional="false" canBeDisabled="false" defaultType="DoesNothing" isHidden="true"/>

                          https://forums.triplea-game.org/tags/thedog
                          https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

                          N 2 Replies Last reply Reply Quote 1
                          • N Offline
                            Numetalfan @TheDog
                            last edited by

                            @all

                            I will try that, thx

                            1 Reply Last reply Reply Quote 0
                            • N Offline
                              Numetalfan @TheDog
                              last edited by

                              @thedog

                              now everything works!

                              1 Reply Last reply Reply Quote 2

                              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
                              • 2
                              • 2 / 2
                              • First post
                                Last post
                              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums