TripleA Logo TripleA Forum
    • TripleA Website
    • Recent
    • Popular
    • Register
    • Login

    Question about trenches domination 1914 no mans land

    Scheduled Pinned Locked Moved Map Making
    59 Posts 6 Posters 4.0k Views 6 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.
    • wc_sumptonW
      wc_sumpton @Ramon
      last edited by

      @Ramon said:

      -can i make tech dice basically hit every time (so they hit at 1 or higher, basically you pay 20 ipcs for guarenteed tech unlock)

        <property name="Low Luck for Technology" value="true" editable="true">
           <boolean/>
         </property>
      

      Give the player the number of dice equal to "diceSides".

      @Ramon said:

      <option name="isMarine" value="true"/>

      "isMarine" takes a number value. "isMarine"=true is converter to "isMarine"=1. "isMarine" can also be set to negative values.

      @Ramon said:

      If i understand correctly you can basically give conscripts 1 attack, and make every unit (except trenches) debuff them with 1?

      Yea.. but upon further testing, because both units are 0, the buff was not applied, so I'm still working on this.

      wc_sumpton said:

      It can get slightly complicated.

      Cheers...

      R 1 Reply Last reply Reply Quote 1
      • R
        Ramon @wc_sumpton
        last edited by

        @wc_sumpton

        Hi Wc,

        Thanks a lot for your time!

        I hope im not asking too much but i still cant figure the tech dice system.

        I understand that i have to turn on low luck for tech.
        We use 6 diceSides so 20 ipc cost should give 6 dices.

        I first tried this:

        <attachmentList>
        <attachment name="techAttachment" attachTo="Japanese" javaClass="TechAttachment" type="player">
        <cost resource="PUs" quantity="20"/>
        <result resourceOrUnit="techTokens" quantity="6"/>
        <option name="resourceCount" value="6"/>
        </attachment>

        To be honest i tried to copy it straight from the production rule for "normal" units.

        But this doesnt work, the engine doesnt recognize the property definition for the option "resource Count"

        Im kinda lost now, do you know how to implement this? We basically want 20 IPC to give the player enough tech dice for a guaranteed unlock.

        Another question:

        We want to create an unit called the Flying Boat, which is basically an airplane but the airplane:

        • Can land only on water, not on land
        • move through hostile sea zones, ignoring enemy ships
        • be able to move after fighting in a battle (if they still have range left over)
        • be able to attack land territories

        So far i figured out how to make planes "land" on sea (putting their carriercost at 0)

        <attachment name="unitAttachment" attachTo="Flying_Boat" javaClass="UnitAttachment" type="unitType">
        <option name="isAir" value="true"/>
        <option name="attack" value="6"/>
        <option name="defense" value="4"/>
        <option name="movement" value="4"/>
        <option name="carrierCost" value="0"/>

        Now obviously this is still considered a air unit by the engine, it can move through hostile seazones, it can move after fighting in a battle and it can attack land territories.

        The problem is that it can obviously still land on land, which we dont want.

        but do you know if its theoretically possible to make the unit unable to land on land?

        ~Cheers!

        B wc_sumptonW 3 Replies Last reply Reply Quote 0
        • B
          beelee @Ramon
          last edited by

          @Ramon

          you might be able to use a negative terrain resource. I think that's how you do it. Might check Total World War. Pretty sure they have certain territories that certain units can't go to depending on terrain and or weather.

          1 Reply Last reply Reply Quote 1
          • wc_sumptonW
            wc_sumpton @Ramon
            last edited by wc_sumpton

            @Ramon said:

            <attachmentList>
            <attachment name="techAttachment" attachTo="Japanese" javaClass="TechAttachment" type="player">
            <cost resource="PUs" quantity="20"/>
            <result resourceOrUnit="techTokens" quantity="6"/>
            <option name="resourceCount" value="6"/>
            </attachment>

            Is this trying to setup techTokens for purchase through the purchase screen or is this trying to give Japanese 6 techTokens and remove 20 PUs. Either way this has nothing to do with techs.
            To give Japanese 6 techTokens:

            	<attachment name="triggerAttachment_Give_Japanese_6_techTokens" attachTo="Japanese" javaClass="TriggerAttachment" type="player">
            		<option name="conditions" value="conditionAttachment_Give_Japanese_6_techTokens"/>
            		<option name="resource" value="techTokens"/>
            		<option name="resourceCount" value="6"/>
            		<option name="when" value="before:JapaneseTech"/>
            	</attachment>
            

            To remove 20 PUs:

            	<attachment name="triggerAttachment_Take_20_PUs_From_Japanese" attachTo="Japanese" javaClass="TriggerAttachment" type="player">
            		<option name="conditions" value="conditionAttachment_Give_Japanese_6_techTokens"/>
            		<option name="resource" value="PUs"/>
            		<option name="resourceCount" value="-20"/>
            		<option name="when" value="before:JapaneseTech"/>
            	</attachment>
            

            For this to work correctly, it has to be in 2 different attachments. Combining them will use only the last "resourceCount":

            	<attachment name="triggerAttachment_Give_Take_From_Japanese" attachTo="Japanese" javaClass="TriggerAttachment" type="player">
            		<option name="conditions" value="conditionAttachment_Give_Japanese_6_techTokens"/>
            		<option name="resource" value="techTokens"/>
            		<option name="resourceCount" value="6"/>
            		<option name="resource" value="PUs"/>
            		<option name="resourceCount" value="-20"/>
            		<option name="when" value="before:JapaneseTech"/>
            	</attachment>
            

            Will subtract 20 PUs and subtract 20 techTokens.

            Cheers...

            R 1 Reply Last reply Reply Quote 1
            • wc_sumptonW
              wc_sumpton @Ramon
              last edited by

              @Ramon said:

              The problem is that it can obviously still land on land, which we dont want.

              but do you know if its theoretically possible to make the unit unable to land on land?

              Sorry, but this is going to have to be player enforce. There is only one way, that I know of, that allows air units to fly over a territory that could block the landing of that air unit in the same territory and it deals with relationshipTypes.

              Cheers...

              1 Reply Last reply Reply Quote 3
              • VictoryFirstV
                VictoryFirst
                last edited by VictoryFirst

                @ramon Yeah the fact that they can attack land but cannot land on it makes it virtually impossible. It can be done, but it will result in any air unit not being able to land on land, not just the Flying Boat. The other option would be to disallow the Flying Boat to enter land altogether.

                R 1 Reply Last reply Reply Quote 2
                • R
                  Ramon @wc_sumpton
                  last edited by

                  @wc_sumpton

                  Hi WC,

                  Thanks a lot for your response!

                  If i understand correctly this forces the japanese player to buy 6 dice for 20 ipc each round right?

                  Is it possible to give the player a choice? either buy 6 dice or dont buy any?

                  Cheers!

                  wc_sumptonW 1 Reply Last reply Reply Quote 0
                  • R
                    Ramon @VictoryFirst
                    last edited by

                    @VictoryFirst

                    Hi Victory,

                    Thanks for your response!

                    Is disallowing the flying boats to attack and land on land altogether relatively easy? If so how can this be done?

                    B wc_sumptonW VictoryFirstV 3 Replies Last reply Reply Quote 1
                    • B
                      beelee @Ramon
                      last edited by

                      @Ramon

                      The other option would be to disallow the Flying Boat to enter land altogether.

                      yea that's what I was trying to suggest, I just can't remember how to do it 🙂

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

                        @Ramon said:

                        Is disallowing the flying boats to attack and land on land altogether relatively easy? If so how can this be done?

                        Using "unitsNotAllowed" in territoryEffect.

                        Cheers...

                        1 Reply Last reply Reply Quote 1
                        • VictoryFirstV
                          VictoryFirst @Ramon
                          last edited by VictoryFirst

                          @Ramon I think the best way to do this is to add a territoryEffect called "Land", add the territory effect to every land territory in the game, then create a territoryEffectAttachment for "Land" with the option "unitsNotAllowed", as WC said above.

                          First specify this after relationshipTypes and before gamePlay

                          <territoryEffectList>
                              <territoryEffect name="Land"/>
                          </territoryEffectList>
                          

                          Then add this to every territoryAttachment of land territories. You can probably use AI to speed up this process.

                          <attachment name="territoryAttachment" attachTo="Albania" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
                              ...
                              <option name="territoryEffect" value="Land"/>
                              ...
                          </attachment>
                          

                          Lastly, add this:

                          <attachment name="territoryEffectAttachment" attachTo="Land" javaClass="TerritoryEffectAttachment" type="territoryEffect">
                                <option name="unitsNotAllowed" value="FlyingBoat"/>
                          </attachment>
                          
                          B 2 Replies Last reply Reply Quote 2
                          • B
                            beelee @VictoryFirst
                            last edited by

                            @VictoryFirst said:

                            <property name="Movement By Territory Restricted" value="true" editable="false">
                            <boolean/>
                            </property>

                            there it is. I knew I'd remember if I just saw it again lol.

                            Good luck Ramon. You have the A Team helping you. If those guys can't figure it out, then it can't be done.

                            Then they will have to make engine changes 🙂

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

                              @VictoryFirst said:

                              <property name="Movement By Territory Restricted" value="true" editable="false">
                              <boolean/>
                              </property>

                              there it is. I knew I'd remember if I just saw it again lol.

                              Good luck Ramon. You have the A Team helping you. If those guys can't figure it out, then it can't be done.

                              Then they will have to make engine changes 🙂

                              1 Reply Last reply Reply Quote 1
                              • wc_sumptonW
                                wc_sumpton @Ramon
                                last edited by wc_sumpton

                                @Ramon said:

                                Is it possible to give the player a choice? either buy 6 dice or dont buy any?

                                Create it as a purchasable item:

                                    <productionRule name="buyTechTokens">
                                      <cost resource="PUs" quantity="20"/>
                                      <result resourceOrUnit="techTokens" quantity="6"/>
                                    </productionRule>
                                

                                and add to the production of each player. The triggers are not needed when doing this.
                                "userActions" can be used:

                                    <attachment name="userActionAttachment_Japanese_Purchase_6TT" attachTo="Japanese" javaClass="UserActionAttachment" type="player">
                                      <option name="conditions" value="conditionAttachment_Is_Japanese_Not_AI"/>
                                      <option name="activateTrigger" value="triggerAttachment_Give_Japanese_6_techTokens"/>
                                      <option name="activateTrigger" value="triggerAttachment_Take_20_PUs_From_Japanese"/>
                                      <option name="text" value="Japanese_6TT"/>
                                      <option name="attemptsPerTurn" value="1"/>
                                    </attachment>
                                

                                Then the actionstext.properties:

                                Japanese_6TT.BUTTON=[Purchase]
                                Japanese_6TT.DESCRIPTION=Purchase 6 techTokens for 20 PUs.
                                Japanese_6TT.NOTIFICATION_SUCCESS=You have purchased 6 techTokens for 20 PUs.
                                Japanese_6TT.OTHER_NOTIFICATION_SUCCESS=The Japanese have purchased 6 techTokens for 20 PUs.
                                

                                There are 2 problems with this approach. The AI does not use "userActions". This can be checked by using "isAI":

                                    <attachment name="conditionAttachment_Is_Japanese_AI" attachTo="Japanese" javaClass="RulesAttachment" type="player">
                                      <option name="isAI" value="true"/>
                                    </attachment>
                                    <attachment name="conditionAttachment_Is_Japanese_Not_AI" attachTo="Japanese" javaClass="RulesAttachment" type="player">
                                      <option name="conditions" value="conditionAttachment_Is_Japanese_AI"/>
                                      <option name="invert" value="true"/>
                                    </attachment>
                                     <attachment name="triggerAttachment_Japanese_Purchase_6TT" attachTo="Japanese" javaClass="TriggerAttachment" type="player"> 
                                		<option name="conditions" value="conditionAttachment_Is_Japanese_AI"/>
                                		<option name="chance" value="3:6"/>
                                		<option name="chanceIncrementOnFailure" value="1"/>
                                		<option name="chanceDecrementOnSuccess" value="1"/>
                                		<option name="notification" value="Japanese_6TT"/>
                                		<option name="when" value="before:JapaneseTech"/>
                                		<option name="players" value="@All-Players@"/>
                                      <option name="activateTrigger" value="triggerAttachment_Give_Japanese_6_techTokens"/>
                                      <option name="activateTrigger" value="triggerAttachment_Take_20_PUs_From_Japanese"/>
                                	</attachment> 
                                

                                The other problem is there is no way to test if Japanese have the 20PUs, they will always be able to purchase the 6 techTokens.

                                Cheers...

                                1 Reply Last reply Reply Quote 1

                                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
                                • 3
                                • 2 / 3
                                • First post
                                  Last post
                                Powered by NodeBB Forums