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

    Can you make Canals use conditions ?

    Scheduled Pinned Locked Moved Map Making
    5 Posts 3 Posters 884 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.
    • B Online
      beelee
      last edited by

      Revisiting this. Tried a while back and couldn't get it to work. Anyway, can I add a condition to the "canalAttachment" ?
      I have this:

      <attachment name="canalAttachmentDanish" attachTo="113 Sea Zone" javaClass="games.strategy.triplea.attachments.CanalAttachment" type="territory">
      <option name="conditions" value="CDGneutralsModified"/>
      <option name="canalName" value="Danish Straits"/>
      <option name="landTerritories" value="Denmark"/>
      </attachment>

      I get this error:
      Missing property definition for option 'conditions' in attachment 'canalAttachmentDanish'

      Looks as if "canals" doesn't work using "conditions". Is that right ? Is there a way around this if so ?
      I have the "condition" listed before the"canal" in the xml. I want to turn the "canal" on or off depending on "conditions". Can triplea do that ?

      Thanks

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

        @beelee Supporting conditions check for canals is something that has been requested a number of times, but nothing ever came out of it.

        In general, the way canals are coded is weird and arguably confusing, with the double attachments, and options doubled, as well (conditions would be too, if supported without restyling the whole canal attachements).

        For now, you can hack what you want by making a dummy "box" territory that is required by the canal and that is triggered under those conditions to the ownership of whoever is supposed to be able to make use of the canal. Normally ownership must exist since start turn, but if you change ownership directly with triggers without counting the territory as captured I suppose that should not apply, but you have to test it, to be sure.

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

          @Cernel right on thanks

          1 Reply Last reply Reply Quote 0
          • redrumR Offline
            redrum Admin
            last edited by

            Yeah, here was the most recent discussion: https://github.com/triplea-game/triplea/issues/344

            Honestly the biggest challenge here is dealing with all the existing maps. If we had a clean slate, I would design the attachments differently and allow for conditions.

            TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

            B 1 Reply Last reply Reply Quote 3
            • B Online
              beelee @redrum
              last edited by

              @redrum

              well not any simple solutions it appears. I see it's closed now as well.

              If one were to start from scratch, could you then make the canal thingy like a game property or something to that effect ? Then the old maps would still work as long as the new canal thing wasn't activated ? Or would there be conflicts between the two that wouldn't allow it ?

              I'm guessing starting from scratch would be labor intensive from a time standpoint as well ?

              At any rate, thanks for the link and reply. My fantasy of actually trying to learn how to do stuff like that has run into the reality of my small cranium 🙂

              1 Reply Last reply Reply Quote 0

              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
              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums