Navigation

    TripleA Logo

    TripleA Forum

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

    Can you make Canals use conditions ?

    Map Making
    3
    5
    382
    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
      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
        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
          beelee @Cernel last edited by

          @Cernel right on thanks

          1 Reply Last reply Reply Quote 0
          • redrum
            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.

            ron-murhammer created this issue in triplea-game/triplea

            closed Canal Attachment Improvements #344

            B 1 Reply Last reply Reply Quote 3
            • B
              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
              • 1 / 1
              • First post
                Last post
              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums