Navigation

    TripleA Logo

    TripleA Forum

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

    Making RISK within TripleA - Help Requested

    Maps & Mods
    6
    38
    3102
    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.
    • SlendyMcTendies
      SlendyMcTendies @TheDog last edited by

      @thedog Thank you. I did find another example of this in "Pact of Steel" and applied it as desired. (I still need to confirm it's working, but based on what you posted it should work.)

      1 Reply Last reply Reply Quote 1
      • SlendyMcTendies
        SlendyMcTendies last edited by

        @TheDog I'm struggling to get the victory notifications to work. I'm not sure what I'm doing wrong.

        TheDog 1 Reply Last reply Reply Quote 0
        • TheDog
          TheDog @SlendyMcTendies last edited by

          I think you might have to post an extract of the code
          Use the </> button to encapsulate the text to make it code.

          SlendyMcTendies 1 Reply Last reply Reply Quote 0
          • SlendyMcTendies
            SlendyMcTendies @TheDog last edited by SlendyMcTendies

            @thedog Here's the GitHub repository. The branch I'm working on is "0.1.0".

            https://github.com/SlendyMcTendies/ww2_risk_of_defeat/tree/0.1.0

            You're going to see a lot of different "Victory" Condition/Notification code commented out because I was trying everything I could think of.

            TheDog 1 Reply Last reply Reply Quote 0
            • TheDog
              TheDog @SlendyMcTendies last edited by TheDog

              Remove the comments from 6220-6224 as that is required for any trigger code.
              Line 6258 needs to be true

              Line 6236 might need to be true depending on the code you use

              Try that for now.

              To get the code working around 6229-6234 you need to remove the comments that are required to make it work at line 1364 to 1378, but I think you have worked that out.

              SlendyMcTendies 1 Reply Last reply Reply Quote 2
              • SlendyMcTendies
                SlendyMcTendies @TheDog last edited by

                @thedog Yup. That worked. Idk how I didn't put that together. Thank you very much!

                1 Reply Last reply Reply Quote 2
                • SlendyMcTendies
                  SlendyMcTendies last edited by

                  I want to limit the number of times players can perform Political Actions per turn. I've noticed that people can offer alliances, then immediately turn around on those alliances, as well as every other Political Action.

                  The solution I have in mind is adding a new resource, which I'm calling "Influence Tokens", but I only want the players to have a specific number Influence they can use each turn. Right now I'm thinking 3, and I only want players to have 3 Influence Tokens to use each turn, regardless of how many they used on the previous turn.

                  How would I implement this?

                  I looked through the reference material everyone has suggested to me very hard, but I still can't quite find a solution.

                  B TheDog 2 Replies Last reply Reply Quote 0
                  • B
                    beelee @SlendyMcTendies last edited by

                    @slendymctendies Hmm ... yea I don't really know, but you might look at using "chance" with a condition that requires the "token" to be present in a certain territory

                    SlendyMcTendies 1 Reply Last reply Reply Quote 0
                    • TheDog
                      TheDog @SlendyMcTendies last edited by TheDog

                      @slendymctendies
                      It is human nature to spend something that is free, Influence, especially when is given free every turn.

                      In the Shogun I choose for some Political actions to cost 5pu, this is the cost of the cheapest unit, so maybe you could consider the same.

                      As in life the wealthier you are, the more influence you can try to exert by spending/giving it.

                      .
                      But, to answer your question.
                      Create a Resource called Influence under <resourceList> heading
                      <resourceList>
                      <resource name="PUs"/>
                      <resource name="Influence"/>

                      Also need an icon called Influence.png 20x20px in \resources folder

                      Remove unspent Influence at the end of the turn, this will be a Trigger before:endRoundStep for each player.

                      Make the player to spend Influence for each Political action like
                      <option name="costResources" value="1:Influence"/>
                      see The Shogun for something similar.

                      SlendyMcTendies 1 Reply Last reply Reply Quote 0
                      • SlendyMcTendies
                        SlendyMcTendies @beelee last edited by

                        @beelee Managed to get something like I wanted working. Should be good enough:

                        <attachment name="conditionAttachment_GermansExist" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <!--Do Germans Exits?-->
                        	<option name="directOwnershipTerritories" count="0-+"/>
                        </attachment>
                        
                        <attachment name="triggerAttachment_InfluenceRegenerate_Germans" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                        	<option name="trigger" value="conditionAttachment_GermansExist"/>
                        	<option name="when" value="after:germansPlace"/> <!--fire when Placement Phase ends-->
                        	<option name="resource" value="Influence"/> <!--What resource to modify?-->
                        	<option name="resourceCount" value="1"/> <!--How many given?-->
                        </attachment>
                        

                        This essentially a "dummy" condition which will always be true, and will therefore always fire the trigger.

                        On a separate note, I see a property tag called "Honorable Surrender". What does it do?

                        I ask partially because after playing a few test games with my friends, I've noticed that there isn't an option to "surrender" or otherwise leave a game without making everyone go to the pre-game screen. Is there a way for people to leave the game without it doing that?

                        B 1 Reply Last reply Reply Quote 0
                        • SlendyMcTendies
                          SlendyMcTendies @TheDog last edited by SlendyMcTendies

                          @thedog I don't know how I didn't see your post sooner, but yes I ultimately came to this conclusion and accomplished it like so:

                          <attachment name="conditionAttachment_GermansExist" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                          	<option name="directOwnershipTerritories" count="0-+"/>
                          	<option name="rounds" value="2-+"/> <!--Wait until after the first turn-->
                          </attachment>
                          
                          <attachment name="triggerAttachment_InfluenceReset_Germans" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                          	<option name="trigger" value="conditionAttachment_GermansExist"/>
                          	<option name="when" value="after:germansPurchase"/> <!--fire after Purchase Phase, which is just in time for the Politics phase-->
                          	<option name="resource" value="Influence"/> <!--Target Influence Resource-->
                          	<option name="resourceCount" value="3"/> <!--Give 3 Influence-->
                          </attachment>
                          
                          <attachment name="triggerAttachment_InfluenceDrain_Germans" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                          	<option name="trigger" value="conditionAttachment_GermansExist"/>
                          	<option name="when" value="after:germansPlace"/> <!--fire after Place Phase, which is effectively the end of the turn-->
                          	<option name="resource" value="Influence"/> <!--Target Influence Resource-->
                          	<option name="resourceCount" value="-3"/> <!--Remove 3 Influence (total Influence value cannot be negative, therefore it will always become 0)-->
                          </attachment>
                          

                          I set War Declarations to cost 1 Influence, offering Ceasefires (only available when at war) cost 2 Influence, and Offering an Alliance or Breaking an Alliance costs 3 Influence.

                          The thought process behind these costs is "War is easy, Peace is not". Plus, it makes people think harder about who they ally with since you can only make one offer per turn, and you can't go straight into War with someone you were just Allied with.

                          TheDog 1 Reply Last reply Reply Quote 1
                          • TheDog
                            TheDog @SlendyMcTendies last edited by

                            Interesting, I like it and your logic.

                            prastle 1 Reply Last reply Reply Quote 2
                            • prastle
                              prastle Moderators Admin @TheDog last edited by prastle

                              @SlendyMcTendies I am not on much anymore but good luck. I would recommend you ask @LaFayette and @Cernel about previous work they have done in the past on a map from a few years ago.

                              SlendyMcTendies 1 Reply Last reply Reply Quote 1
                              • SlendyMcTendies
                                SlendyMcTendies @prastle last edited by

                                @prastle Thank you! I've actually gotten the map to the point where it's near complete. The only thing left is playtesting for bugs and errors I've missed and general balancing. I just recently made a post sharing the github link to the map/game.

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

                                  @slendymctendies said in Making RISK within TripleA - Help Requested:

                                  On a separate note, I see a property tag called "Honorable Surrender". What does it do?
                                  I ask partially because after playing a few test games with my friends, I've noticed that there isn't an option to "surrender" or otherwise leave a game without making everyone go to the pre-game screen. Is there a way for people to leave the game without it doing that?

                                  So you want some players able to surrender and allow others to keep playing ?

                                  There's probably a better way to do it, but maybe just set the surrendered player to neutral ?

                                  SlendyMcTendies 1 Reply Last reply Reply Quote 0
                                  • SlendyMcTendies
                                    SlendyMcTendies @beelee last edited by

                                    @beelee Well that's the thing, I don't know how to have a player actually "surrender". The only option we can find is simply leaving the game which kicks everyone to the pre-game lobby. That's why I'm asking what the "Honorable Surrender" property does and how it's supposed to work.

                                    <property name="Honorable Surrender" value="false" editable="false">
                                          <boolean/>
                                        </property>
                                    

                                    Yes, I know it's set to "false" in this example but it doesn't do anything even when it's "true". Do I have to write a surrender system for this to work?

                                    LaFayette 1 Reply Last reply Reply Quote 0
                                    • LaFayette
                                      LaFayette Admin @SlendyMcTendies last edited by

                                      @slendymctendies Honorable surrender reflects the number of VC cities that need to be held before the game is considered completed. There are other 'surrender' levels that require more VC cities to be captured.

                                      To have a player legitimately surrender would need to be a new feature. Converting all units to neutral would probably be straight forward, a bit more complicated to think of the mixed unit cases where the surrendering player had units in a shared territory.

                                      SlendyMcTendies 1 Reply Last reply Reply Quote 1
                                      • SlendyMcTendies
                                        SlendyMcTendies @LaFayette last edited by

                                        @lafayette Hmm. Ok. I already have an automated "Victory" system which seems to accomplish the same thing.

                                        I'll probably write a surrender system into the game. I have a few ideas on how it could be accomplished.

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