Navigation

    TripleA Logo

    TripleA Forum

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

    A general way to define infinite

    Feature Requests & Ideas
    6
    15
    2583
    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.
    • C
      Cernel Moderators last edited by

      Have a way, for whatever numerical value or count, to set it at "infinite", comprising minus infinite (if negative are supported).

      For example, in the xml of another_world, you can see:
      <option name="attemptsPerTurn" value="99999"/>

      I'm not talking of this option in particular, as there are a lot of other options in which mapmakers set an arbitrarily very high value, to mean infinite, that it is sort of hacky. A couple examples are defining you don't have a stack limit for constructions (in a unit attachment) or you want to remove all of some resource (in a trigger).

      Currently, there are several options and properties that have "-1" meaning infinite, that is also the way you define infinite rounds (thus no retreat) in the battlecalculator, and I also think that is not very good and definitely not intuitive on the user (and, of course, it is viable only for options meant to accept only positive values).

      What I would prefer would be that no number means infinite.
      For example:
      <option name="attemptsPerTurn" value=""/>
      or
      <option name="attemptsPerTurn" value="+"/>
      would mean "infinite".
      While not having that option at all, in the attachment, would mean "1", that is the default value (as it works now).

      Also, in the battlecalculator, having no value in "Retreat After Round" and "Retreat When X Units Left" meaning infinite (instead of it having to be "-1", that looks strange).

      redrum LaFayette 2 Replies Last reply Reply Quote 1
      • redrum
        redrum Admin @Cernel last edited by

        @cernel Generally, I agree with you. The challenges are:

        1. Many options use '-1' currently and many maps use that so unless we updated a lot of maps then we'd have to continue supporting that even if we added a better way to specify 'infinite'.
        2. This is would a pretty significant code update given all the options that should be updated to handle 'infinite'.
        C 2 Replies Last reply Reply Quote 0
        • C
          Cernel Moderators @redrum last edited by

          @redrum Yeah I was assuming either you keep supporting "-1" or you mass change such occurrences into the new way of defining infinite, for all repository maps. Now, the second solution would not be very nice on @RogerCooper.

          Ok. So I understand that it is not possible to generally define an "infinite" symbol or practice, but each option and property would need specific update to add something that it reads as infinite.

          Theorically, most actual cases the like are positives only, so they could use the "-1" solution, tho I really wonder if a better way is possible. Especially for properties, like battle rounds, that may be user editable, expecting the user to know that he has to input "-1" to mean unlimited doesn't feel right to me (I wouldn't image any games working like that).

          alkexr 1 Reply Last reply Reply Quote 0
          • alkexr
            alkexr @Cernel last edited by

            @cernel said in A general way to define infinite:

            Especially for properties, like battle rounds, that may be user editable, expecting the user to know that he has to input "-1" to mean unlimited doesn't feel right to me

            How is expecting the user to know he has to input "infinite" or "+" any better?

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

              @alkexr Main suggestion was no value equals infinite.

              alkexr 2 Replies Last reply Reply Quote 0
              • alkexr
                alkexr @Cernel last edited by

                @cernel said in A general way to define infinite:

                Main suggestion was no value equals infinite.

                That changes nothing about the fact that the user has to know what denotes infinity.

                C 1 Reply Last reply Reply Quote 0
                • alkexr
                  alkexr @Cernel last edited by

                  @cernel Unless the information shows up on the user interface or you have something like a drop-down list or a numeric up-down which turns into "infinity" if you go below valid values.

                  C W 2 Replies Last reply Reply Quote 0
                  • C
                    Cernel Moderators @alkexr last edited by

                    @alkexr That was mostly a side matter. The main matter here is being able to set infinite instead of writing 10000 or something. It may be there is not a user friendly way to do it, and this topic is open to suggestions.

                    1 Reply Last reply Reply Quote 1
                    • C
                      Cernel Moderators @alkexr last edited by

                      @alkexr A drop down list would be a good addition also because now the user can't know (for numerical properties) what are the max and min unless by hitting them. Not sure if in this case the infinite symbol (∞) might be telling enough.

                      1 Reply Last reply Reply Quote 0
                      • W
                        wc_sumpton @alkexr last edited by

                        @alkexr
                        A while ago I wondered about adding a description to the <property> tag to help players understand these 'Map Options' better.

                        See Map Options

                        Cheers...

                        1 Reply Last reply Reply Quote 0
                        • W
                          wc_sumpton last edited by

                          @Cernel, @redrum, @alkexr
                          Just a thought on this topic. Most of the time that I use that big number is to reset a resource. So if resourceCount accepted '-reset-' as a value, then some of these negative large numbers would go away.

                          I know that this does not help with things like 'Land Battle Rounds'.

                          Cheers...

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

                            @redrum In the meantime, if I guess it would be an easy touch, I suggest setting in the engine that every time a value or count equal to "10000" is read, the engine reads it as infinite, and documenting this in pact of steel. This would be a bit patchy, but can only make things a little more consistent, especially if documented. Probably, then, better not accepting values greater than "10000".

                            alkexr 1 Reply Last reply Reply Quote -1
                            • alkexr
                              alkexr @Cernel last edited by

                              @cernel It would be exactly as patchy as just simply using 10000 as practically infinity, which is what we do now.

                              1 Reply Last reply Reply Quote 2
                              • E
                                erik542 last edited by

                                Various languages have double.positiveInfinity and double.negativeInfinity in some form.

                                But in terms of the battle calc, you could just have a checkbox for "fight to finish" then the actual background implementation doesn't show up in the UI. It's an extra click for calcing strafes though as "fight to finish" would be on by default.

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

                                  @cernel I would suggest to add an infinite=true flag.

                                  eg:

                                  <option name="attemptsPerTurn" infinite="true"/>
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • 1 / 1
                                  • First post
                                    Last post
                                  Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums