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

    Invisible units

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    30 Posts 5 Posters 14.7k Views 5 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.
    • C Offline
      Cernel Moderators @redrum
      last edited by

      @redrum Another possible use of this feature is for making mapskins that don't display units you would not hide by default. For example, one could do a "battle" mapskin for a map (like Civil War) where you have a lot of economic units. That mapskin could have all the non-battle units hidden, and one could switch to that when he doesn't care to see them. In this case a quick key for jumping through the available map skins would help.

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

        @cernel Ah ok. I see what you mean. Yeah map.properties is probably a better place for it since it really a display only issue.

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

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

          Here is the PR: https://github.com/triplea-game/triplea/pull/3917. Essentially you can now specify units that won't be drawn on the map, territory panel, or unit help (also won't throw an error if you don't include images for them in the unit folders as long as you aren't using them anywhere else like production/etc).

          Here is an example of what I added to Red Sun Over China:
          dont_draw_units=ruralproduction,station

          Before
          image

          After
          image

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

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

            @redrum Cool, but, on a second thought, I'm not so sure anymore my suggestion of not having it displayed in the territory tab too was the right way to go. I was thinking in term of the unit to be represented by an invisible image and, in this case, of course better not having it in territory tab. On the other hand, now that the image doesn't display on the board anymore, that is the main item, maybe we should assume that invisible images should not be used (they were always a hack anyways), thus, for example, the "station" unit could be shown by the image @Hepps posted (the image of a station) that would be seen in the territory tab but not on board, this being consistent with the fact that the board is making the presence clear by other graphic means. Also I'm thinking about spotting bugs in that, say, you miss to add a "station" somewhere, and that would be easier to spot if is still displayed in the territory tab. So, I'm not definitive on this, but thinking about it again, especially on the account of games imperfections or for an easy way to be sure of what it is when you play a new game, maybe it would be better not to draw it in the board but still displaying it in the territory tab? Of course, this assumes that mapmakers would use actual images, to display in territory tab. What does @alkexr would think would be best for his map as well between:

            1. Having the factory unit never displayed on board and territory tab.

            2. Providing an actual visible image for the factory unit, and having it displayed in territory tab but not on board.

            ?

            Anyways, I don't feel strong one way or the other. Just having some doubts on the utility of hiding the image from the territory tab too.

            I didn't think about the unit help, and yeah that can easily become a mess with many utility units (just look at Age of Tribes), even without considering invisible ones, and I don't have a clear idea about it. I think a good game should just provide a good table in notes for giving the info, but, as we know, it is not rare that most games don't and not few of those that do say different stuff in notes than what it is the game, so the unit help is really a useful feature. I'm oriented to think that unit help should go the same way as territory tab.

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

              @cernel I think not showing them at all is probably better. Don't want players to get confused on seeing a unit in one place then not seeing it display on the map. At least for ROSC, I definitely feel ruralproduction not displaying anywhere is best and think stations probably better not to show anywhere but could argue that one a bit.

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

              redrumR HeppsH 2 Replies Last reply Reply Quote 0
              • redrumR Offline
                redrum Admin @redrum
                last edited by

                PR is merged and this can be tested out by downloading the latest RSOC and using the latest pre-release: https://github.com/triplea-game/triplea/releases/tag/1.9.0.0.11665. Rock on!

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

                General_ZodG 1 Reply Last reply Reply Quote 1
                • HeppsH Offline
                  Hepps Moderators @redrum
                  last edited by Hepps

                  @redrum I think that makes sense. If the unit does not interact with the game, meaning it can't be attacked and simply provides a solution to the map maker for functionality, then it really doesn't need to be in the map or tab.

                  The mapmaker should really be describing the impacted behavior in his notes, since often times the unit itself is purely a means to an end and not really intended to be a unit at all.

                  "A joyous heart sours with the burden of expectation"
                  Hepster

                  1 Reply Last reply Reply Quote 0
                  • General_ZodG Offline
                    General_Zod Moderators @redrum
                    last edited by General_Zod

                    @redrum Your current version is great but I think it would be nice to allow map maker to decide where exactly it needs to be displayed. That being said maybe build in an additional option into this by adding one more letter to the code as follows.

                    dont_draw_units=ruralproduction,station (wont draw anywhere)

                    dont_draw_units_m=ruralproduction,station (wont draw on map only)

                    dont_draw_units_h=ruralproduction,station (wont draw on help page only)

                    dont_draw_units_t=ruralproduction,station (wont draw on territory tab only)

                    dont_draw_units_m_t=ruralproduction,station (wont draw on map and territory tab or any mix in one line of code.)

                    @cernel makes some good points for might wanting to see it in territory tab or help page while still in the mapmaking phases. This may help a mapmaker identify or pinpoint issues early. As the help page goes it also shows the true values for each unit at the point of opening help page (updates itself). This helps if using triggers that manipulate values. Also it will simply by flexible enough to accommodate unmentioned scenarios.

                    Additionally it might be helpful to have a feature that can disable the selection of invisible units on map. So it doesn't even show up in a selection list on any movement phases (cm, ncm). I guess can just give 0 movement too.

                    redrumR C 2 Replies Last reply Reply Quote 0
                    • redrumR Offline
                      redrum Admin @General_Zod
                      last edited by

                      @general_zod Yeah, I'd probably spell it out but that was my thought as well. For now, I think I'll leave my initial feature and see how people want to use it. If a mapmaker has a strong case to want it shown some places and not others then I'm glad to expand this to have more fine grain control.

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

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

                        @general_zod If going finer, I'd rather go this way:

                        For the Unit Help, having a specific property for it, to fully customize what's in it and its order, on the same model as the "production_tabs.properties". This is probably needed anyways, since the way the Unit Help tabs currently work is very raw, and it doesn't really work well even for very basic games like World At War (or any games having units that may get added by triggers during the course of it).

                        In this case, you should get an error if at any point during the game you are able to purchase a unit not present in Unit Help.

                        For the showing / not showing in territory tab (while always not on board), I'm thinking that this probably needs to remain standard, as I doubt that mapmakers may go consistently one way or the other, and would just end up like some sort of random personal preference.

                        In this case you should get an error if you have in purchase screen a unit meant not to be drawn, as I think that would not make sense.

                        EDITED as on a second thought better not relate to image presence.

                        I want also to point out that combat units (you would see in the battle window and in the battlecalculator) may be a good candidate for not being drawn in the territory tab. For example, you can have a game in which in each territory there is always 1 capturable combat unit, providing some additional defence or whatever, that would be better not being drawn (everywhere) in the map. Or you could have a game where everywhere there is a river you have a "river" combat unit, that (as long as it is always there) can be not drawn, if it is already shown by the graphic.

                        C General_ZodG 2 Replies Last reply Reply Quote 0
                        • C Offline
                          Cernel Moderators @Cernel
                          last edited by Cernel

                          Meaning that I think the not drawn user case is not really related to something being production or logistic related, but to the fact of being ubiquitous (the reason why maps with factories everywhere used invisible images for them is because those units where everywhere, thus ridiculously redundant to see, not because they were factories; it would be just the same if you would have capturable units defending at 4 everywhere).

                          Of course, it needs to be surely there, thus being either a capturable infrastructure or something immediately replaced by triggers. This doesn't change the matter as, for example, you would not have invisible ruralproduction units if they would be destroyed on capture.

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

                            I would like to update (make a pull request for) Feudal Japan with this new feature, but I've still that "Delete costPU" pending pull request, and I don't know how to do it splitting the two.

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

                              @cernel You can have multiple PRs open at the same time. As long as they don't end up editing the same lines in the same file then there shouldn't be any issues.

                              Just make sure you create a separate branch when submitting the new changes.

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

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

                                @redrum I've no idea how to do that. What I just do is to compare the target repository with my repository, that is a modified version of that repository I forked.

                                I guess I could do it by making a second GitHub account where to fork the repository again and modify it in a different way.

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

                                  @cernel Yeah, its gonna be pretty tough to explain how to go about doing that I realize. For this case, I think its gonna be easier if you just post your recommended changes here and I'll update the repo.

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

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

                                    @redrum No, problem, I'll do it in the future. I want to propose other changes for that map anyways. Was just to hide the invisible factory in all territories.

                                    1 Reply Last reply Reply Quote 0
                                    • General_ZodG Offline
                                      General_Zod Moderators @Cernel
                                      last edited by

                                      @cernel The battle calculator could definitely use this feature or a similar method. In order to keep the selections minimal. At least until it is completely overhauled 🙂

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

                                        It is also a relief since now you can go see how many units are in a territory, looking at the tab, without having to remember to subtract 1 or whatever. Trying it, it really feels nice not having anymore those ghost units around; it really makes a difference, the game looks significantly more like it.

                                        On this regard, maybe the units that are not drawn should be not counted in the players tab either. I'm not certain, but tend to think so.

                                        Anyways, have to report a bug. If the map has no images for the units that are not drawn, you get the missing image error when you try to do something with them with Edit mode. I think omitted units should be editable, so that is fine, and getting an invisible image when you are in edit mode, but you should not get the error. Or maybe this is an argument for providing (not blank) units images also for the units that are not drawn, so that they are visible in the edit window and pop ups, if you want to edit them?

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

                                          @cernel Or maybe it would be just better to make them not editable either; I'm leaning in that direction, actually. Probably if a unit is not drawn, it should be something that you should never have a need to edit, unless the map has some faults, and that should rather be addressed by reporting / debugging, since anyways power users can press on with the game by removing the entry in map.properties (another reason why it is better having it there instead of the xml, also for testing and bug proofing during development, while not touching the xml for that).

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

                                            @cernel But I'm really undecided here, since when you are dealing with a map made by someone else, it is really handy to use edit mode (in remove units mode) to be sure about what is in that territory, now that units may be hidden.

                                            I'm thinking units supposed to be never drawn should be allowed not having an image assigned (of course they should like in the case of all territories having a combat infrastructure), but, if editable, the engine should not give any errors for missing images when editing, if the unit is not to be drawn.

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