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

    Need a little help with Triggers, etc.

    Scheduled Pinned Locked Moved Maps & Mods
    4 Posts 3 Posters 1.9k 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.
    • StohrmS Offline
      Stohrm
      last edited by

      I've been playing the tutorial; as I actually like it more than the original game itself. Anyway, I'm trying to change my copy of it; so it's more of a campaign type game than a tutorial; but I'm new to all this (or new again; as I had toyed with it a year or so ago).

      So, what I'm trying to accomplish is this: I want to change the unlocking of the (Purchase ability of the) Artillery Unit from late in the game (Just before attacking Russia) to way earlier in the game (after Germany's first combat move).

      Thus any information anyone can provide on how to change the trigger(s) what be extremely helpful. Thank You and if there's a Wiki (or whatever) dealing with Modding: please point me in that direction as well.

      SK

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

        @stohrm Most of the modding boils down to understanding and changing the game XML. The best reference is actually the POS2 XML which provides definitions and examples of most of the available features: https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml

        The best thing to do is either unzip an existing map and start changing stuff to try it out. Or use the in-game map creator to create a new map. Those are probably the best 2 ways to learn.

        For your specific example you'd need to change this condition which I believe unlocks buying artillery for the various nations:

        <attachment name="conditionAttachment130" attachTo="Neutral_Nations" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
        	<option name="directPresenceTerritories" value="Bolivia" count="1"/>
        	<option name="unitPresence" value="infantry" count="1"/>
        </attachment>
        

        You'd need to change that to reference a different event instead of an infantry being present in Bolivia as that condition triggers these:

        <attachment name="triggerAttachment130b" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
        	<option name="conditions" value="conditionAttachment130"/>
        	<option name="uses" value="1"/>
        	<option name="when" value="after:britishEndTurn"/>
        	<option name="productionRule" value="production_Germans:buyArtillery"/>
        </attachment>
        
        <attachment name="triggerAttachment130c" attachTo="Italians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
        	<option name="conditions" value="conditionAttachment130"/>
        	<option name="uses" value="1"/>
        	<option name="when" value="after:britishEndTurn"/>
        	<option name="productionRule" value="production_Italians:buyArtillery"/>
        </attachment>
        

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

        StohrmS 1 Reply Last reply Reply Quote 1
        • StohrmS Offline
          Stohrm @redrum
          last edited by

          @redrum Thanks

          I do recall (now) that Pact of Steel 2's xml has a lot of excellent comments and explanations.

          I tried using the Map Creator (part 2); but I get errors when trying to load the xml and such. I'm probably not pointing to the right map file or whatever; but I'll figure that out too (eventually).

          The coding will come to me once I grasp the concept of how the conditions and triggers work. Like you said, it'll (probably) take a lot of trial and error (before I get it right).

          But again, Thank You. At least I have more to work with now.

          SK

          alkexrA 1 Reply Last reply Reply Quote 0
          • alkexrA Offline
            alkexr @Stohrm
            last edited by

            @stohrm Map Creator part 2... just forget that. It was buggy and glitchy even when it was supposed to work.

            "For the world is changing: I feel it in the water, I feel it in the earth, and I smell it in the air."

            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