[PATCH] Show only player owned systems in production window
Moderator: Committer
[PATCH] Show only player owned systems in production window
Hello! I made two small patches that restrict systems that are shown in the production window to those where player has colonized planets (in current trunk it's possible to select any system even where production isn't possible). I tested them as much as I can but more testing is always good - also I don't have a Windows machine set up currently.
Since this is my first contribution for the project it probably has some drawbacks - please comment if you see something!
Back to the pactches: the first one fixes updates of cache of which empires own a colony in a system and the second one allows only systems with colonies owned by the player to be shown in the production window. If unsuitable for production system is selected with map browser then production window is closed. If unsuitable for production system is selected while clicking on "Production" button then empire's capital is selected.
The patches license is GPLv2 or later.
Since this is my first contribution for the project it probably has some drawbacks - please comment if you see something!
Back to the pactches: the first one fixes updates of cache of which empires own a colony in a system and the second one allows only systems with colonies owned by the player to be shown in the production window. If unsuitable for production system is selected with map browser then production window is closed. If unsuitable for production system is selected while clicking on "Production" button then empire's capital is selected.
The patches license is GPLv2 or later.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
-
[The extension patch has been deactivated and can no longer be displayed.]
Re: [PATCH] Show only player owned systems in production win
I don't know about that... owning a planet isn't necessarily a condition for being able to build there. In cases where a building or project's build location isn't limited by needing to own the planet, there can be other restrictions used such as whether or not the player has a particular ship in the system, or the value of espionage meters, when such exist. A better feature, IMO, would be the ability to select unowned planets as build locations.
Also, welcome and thanks for contributing. In the future, I'd consider making a thread to discuss a potential change before going ahead with it, to avoid potentially wasted effort, discouragement, etc.
Also, welcome and thanks for contributing. In the future, I'd consider making a thread to discuss a potential change before going ahead with it, to avoid potentially wasted effort, discouragement, etc.
Warning: Antarans in dimensional portal are closer than they appear.
Re: [PATCH] Show only player owned systems in production win
Sorry, I don't quite get this. I don't know the examples for such cases - what ships can produce something on the planet? Can you tell me a specific use case that breaks something in the current version of the game? When espionage is ready it probably won't be hard to implement a necessary change (if there'd be a need for such change). This patch is only a UI change, not a balancing.Bigjoe5 wrote:I don't know about that... owning a planet isn't necessarily a condition for being able to build there. In cases where a building or project's build location isn't limited by needing to own the planet, there can be other restrictions used such as whether or not the player has a particular ship in the system, or the value of espionage meters, when such exist. A better feature, IMO, would be the ability to select unowned planets as build locations.
Thanks. This is just a "training-up" for me, so no discouragement even if it's not committed. As it's told every good work of software starts by scratching a developer's personal itch. So it was my personal itch.Bigjoe5 wrote:Also, welcome and thanks for contributing. In the future, I'd consider making a thread to discuss a potential change before going ahead with it, to avoid potentially wasted effort, discouragement, etc.
Edit: small update - now double-clicking the system opens production window as well only if the system has a player's colony there; otherwise it just centers the map on the system.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Re: [PATCH] Show only player owned systems in production win
There is no such case at the moment. This is due to the limitation of the UI in not being able to select unowned planets from the production screen. Given that limitation, your patch makes sense, but I would prefer to get rid of that limitation entirely.zhur wrote:Can you tell me a specific use case that breaks something in the current version of the game? When espionage is ready it probably won't be hard to implement a necessary change (if there'd be a need for such change). This patch is only a UI change, not a balancing.
Warning: Antarans in dimensional portal are closer than they appear.
Re: [PATCH] Show only player owned systems in production win
I can try to remove the limitation but first I need to understand what's the use cases for the change. From my experience with 4X games, you first build a colony/settlement/whatever and then able to produce something there. Since I am new, maybe I missed some point in the FreeOrion design that works differently - you have a better vision. But I think the immediate gain from the change - better user experience (no clicking in production window through systems where production isn't possible, no counter-intuitive cases where one system is shown in production window but the production is scheduled in another one) is greater than possible design decisions later. How do you think? Maybe you just try the patch and see for yourself?Bigjoe5 wrote:There is no such case at the moment. This is due to the limitation of the UI in not being able to select unowned planets from the production screen. Given that limitation, your patch makes sense, but I would prefer to get rid of that limitation entirely.zhur wrote:Can you tell me a specific use case that breaks something in the current version of the game? When espionage is ready it probably won't be hard to implement a necessary change (if there'd be a need for such change). This patch is only a UI change, not a balancing.
Re: [PATCH] Show only player owned systems in production win
Regarding the patch itself, I've notice a couple of bugs:
1. Clicking the production button when an unowned system is selected gives focus to a player-owned system, but doesn't open the production window. The production button must be clicked again before the window will open.
2. Double clicking on unowned systems does just center the map on them, as claimed - however, double clicking on player-owned systems has the same effect, and no longer seems to open the production window.
The use of trade or influence will probably be done in a separate window from production, so doesn't directly affect what to do with production, but espionage or other influence projects will definitely need to behave something like the production projects I just described, and it would be nice if the production and influence screens behaved similarly or identically in terms of selecting systems and planets.
1. Clicking the production button when an unowned system is selected gives focus to a player-owned system, but doesn't open the production window. The production button must be clicked again before the window will open.
2. Double clicking on unowned systems does just center the map on them, as claimed - however, double clicking on player-owned systems has the same effect, and no longer seems to open the production window.
Yeah, that's how it typically works in most cases for FO as well, but there have been ideas tossed around about having particular "factory" ship parts or whatever, that might allow you to build something in a system where you don't have any colonies, if such a ship is present. The "Gateway to the Void" building would be a use case for this, since its effect destroys all ships in the system, regardless of ownership - it might as well be unowned, in fact, or better yet, create a "Gateway to the Void" special attached to the system. Which brings me to the more generic use case for being able to select unowned planets as a production target. My hope is that the production system will be made a bit more generic, so that more stuff can be done than just build planets and ships, and the player can queue more generic "projects" that have arbitrary effects upon completion (or even continuous projects that take effect during production). A player might send a ship off to another system and queue a terraforming project, or a project to add a particular special to a planet or system. There's no guarantee in such a case that the target of such a project will need to be a location owned by the player.zhur wrote:I can try to remove the limitation but first I need to understand what's the use cases for the change. From my experience with 4X games, you first build a colony/settlement/whatever and then able to produce something there.Bigjoe5 wrote:There is no such case at the moment. This is due to the limitation of the UI in not being able to select unowned planets from the production screen. Given that limitation, your patch makes sense, but I would prefer to get rid of that limitation entirely.
The use of trade or influence will probably be done in a separate window from production, so doesn't directly affect what to do with production, but espionage or other influence projects will definitely need to behave something like the production projects I just described, and it would be nice if the production and influence screens behaved similarly or identically in terms of selecting systems and planets.
This can still happen when the player has more than one location for production - although it might be a nice idea to add a filter to the production queue to only show items being built at a particular location.zhur wrote:...no counter-intuitive cases where one system is shown in production window but the production is scheduled in another one...
Warning: Antarans in dimensional portal are closer than they appear.
- eleazar
- Design & Graphics Lead Emeritus
- Posts: 3858
- Joined: Sat Sep 23, 2006 7:09 pm
- Location: USA — midwest
Re: [PATCH] Show only player owned systems in production win
I lean toward the opinion that as the game is now, such a patch improves things. Though of course i prefer the idea of compressing planets in the sidebar when they aren't relevant so you still have a sense of place. But that is not a quick fix.
But still, even if all these ideas are implemented, for most of the game a significant fraction, (probably a majority) of the planets won't be valid possible targets for building stuff. The main point here is not cluttering the player's attention with planets where he can't build something. If we increase the number of places were the player can build (not just on owned planets), the logic that hides/compresses planets were things can't be built would have to be correspondingly changed. Unless that is technically unfeasible for arcane scripting reasons?Bigjoe5 wrote:...but there have been ideas tossed around about having particular "factory" ship parts or whatever, that might allow you to build something in a system where you don't have any colonies, if such a ship is present. The "Gateway to the Void" building would be a use case for this, since its effect destroys all ships in the system, regardless of ownership - it might as well be unowned, in fact, or better yet, create a "Gateway to the Void" special attached to the system. Which brings me to the more generic use case for being able to select unowned planets as a production target. My hope is that the production system will be made a bit more generic, so that more stuff can be done than just build planets and ships, and the player can queue more generic "projects" that have arbitrary effects upon completion (or even continuous projects that take effect during production). A player might send a ship off to another system and queue a terraforming project, or a project to add a particular special to a planet or system. There's no guarantee in such a case that the target of such a project will need to be a location owned by the player.
Re: [PATCH] Show only player owned systems in production win
Maybe this should be done in the way that colony ships and outpost ships work? Custom action that requires selecting the special ship and an object in system. This has a limitation that only non-empty systems could be affected, though.Bigjoe5 wrote:Yeah, that's how it typically works in most cases for FO as well, but there have been ideas tossed around about having particular "factory" ship parts or whatever, that might allow you to build something in a system where you don't have any colonies, if such a ship is present. The "Gateway to the Void" building would be a use case for this, since its effect destroys all ships in the system, regardless of ownership - it might as well be unowned, in fact, or better yet, create a "Gateway to the Void" special attached to the system. Which brings me to the more generic use case for being able to select unowned planets as a production target.
https://github.com/mmoderau
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556
Re: [PATCH] Show only player owned systems in production win
This is not how it should work. Let me try to get a Windows SDK to try to reproduce.Bigjoe5 wrote:Regarding the patch itself, I've notice a couple of bugs:
1. Clicking the production button when an unowned system is selected gives focus to a player-owned system, but doesn't open the production window. The production button must be clicked again before the window will open.
2. Double clicking on unowned systems does just center the map on them, as claimed - however, double clicking on player-owned systems has the same effect, and no longer seems to open the production window.
I kind of get this now. Though for me it sounds like interface similar to colonization/invasion, and not through production window, is more appropriate for such kinds of tasks.Bigjoe5 wrote:Yeah, that's how it typically works in most cases for FO as well, but there have been ideas tossed around about having particular "factory" ship parts or whatever, that might allow you to build something in a system where you don't have any colonies, if such a ship is present. The "Gateway to the Void" building would be a use case for this, since its effect destroys all ships in the system, regardless of ownership - it might as well be unowned, in fact, or better yet, create a "Gateway to the Void" special attached to the system. Which brings me to the more generic use case for being able to select unowned planets as a production target. My hope is that the production system will be made a bit more generic, so that more stuff can be done than just build planets and ships, and the player can queue more generic "projects" that have arbitrary effects upon completion (or even continuous projects that take effect during production). A player might send a ship off to another system and queue a terraforming project, or a project to add a particular special to a planet or system. There's no guarantee in such a case that the target of such a project will need to be a location owned by the player.
These are again different tasks. You want espionage to be like production on enemy planets? Seems strange to me, really. If I'd be a game designer I'd probably invent a new and unique espionage mechanics not similar to basic colony management task like production. But please don't look for anything offensive in what I wrote - I'm not familiar enough with the game yet to advice anything. Anyway do you agree that having more user-friendly production window now is probably more useful than potential lowering of efforts for implementing a new feature in the future? And thanks for feedback btw!Bigjoe5 wrote:The use of trade or influence will probably be done in a separate window from production, so doesn't directly affect what to do with production, but espionage or other influence projects will definitely need to behave something like the production projects I just described, and it would be nice if the production and influence screens behaved similarly or identically in terms of selecting systems and planets.
Re: [PATCH] Show only player owned systems in production win
It should still be possible to compress planets where things can't be built - either planets where the player cannot currently build anything, or where the player cannot currently build the selected item. There may be potential performance issues for the first, since I think that would require evaluating the location conditions for all the producible items for each planet in the system, but that probably won't end up being a problem unless designing ships is the player's favourite part of the game, and he hasn't learned how to delete ship designs.eleazar wrote:But still, even if all these ideas are implemented, for most of the game a significant fraction, (probably a majority) of the planets won't be valid possible targets for building stuff. The main point here is not cluttering the player's attention with planets where he can't build something. If we increase the number of places were the player can build (not just on owned planets), the logic that hides/compresses planets were things can't be built would have to be correspondingly changed. Unless that is technically unfeasible for arcane scripting reasons?
This is a bit different though, since when a player opens a system with no owned planets, he had to deliberately click on that system, knowing he didn't own any planets there, whereas when he opens a system with owned and unowned planets, the appearance of unusable planets is just a side effect of wanting to get at the usable planets.
Even without the ability to produce on unowned planets, the player still may want to check out enemy planets while he's in the production screen - it won't necessarily be more convenient in all cases to leave the production screen, then look at the enemy system in the side panel, then go back to the production screen to queue your ships or whatever. Clicking on a system in which you can't build doesn't necessarily indicate that you intends to leave the production screen, so it shouldn't make you leave the production screen - I'm dubious of adding unexpected side effects to the player's actions that makes some assumption about his intentions.
I don't disagree, and we definitely need to have support for arbitrary effects groups to be activated via the UI. There are advantages to doing it with production as well though, such as forcing the player's important ships to be vulnerable at the construction location. Constructing a starlane might be another example of this - the player might need to have a valuable and expensive ship stationed at each end of the starlane-to-be for the duration of its construction, creating additional risk when trying to create a starlane into enemy territory.zhur wrote:I kind of get this now. Though for me it sounds like interface similar to colonization/invasion, and not through production window, is more appropriate for such kinds of tasks.Bigjoe5 wrote:Yeah, that's how it typically works in most cases for FO as well, but there have been ideas tossed around about having particular "factory" ship parts or whatever, that might allow you to build something in a system where you don't have any colonies, if such a ship is present. The "Gateway to the Void" building would be a use case for this, since its effect destroys all ships in the system, regardless of ownership - it might as well be unowned, in fact, or better yet, create a "Gateway to the Void" special attached to the system. Which brings me to the more generic use case for being able to select unowned planets as a production target. My hope is that the production system will be made a bit more generic, so that more stuff can be done than just build planets and ships, and the player can queue more generic "projects" that have arbitrary effects upon completion (or even continuous projects that take effect during production). A player might send a ship off to another system and queue a terraforming project, or a project to add a particular special to a planet or system. There's no guarantee in such a case that the target of such a project will need to be a location owned by the player.
I believe that it's more important to make the things the player can do with espionage unique, rather than giving it unique mechanics or UI - if anything, making it the same as production will just reduce the learning curve for the player.zhur wrote:These are again different tasks. You want espionage to be like production on enemy planets? Seems strange to me, really. If I'd be a game designer I'd probably invent a new and unique espionage mechanics not similar to basic colony management task like production.Bigjoe5 wrote:The use of trade or influence will probably be done in a separate window from production, so doesn't directly affect what to do with production, but espionage or other influence projects will definitely need to behave something like the production projects I just described, and it would be nice if the production and influence screens behaved similarly or identically in terms of selecting systems and planets.
I don't know that it is more user friendly - this patch assumes that clicking on a planet in which the player has no owned systems signifies an intent to leave the production window, which regardless of his ability to produce items there, isn't necessarily valid.zhur wrote:Anyway do you agree that having more user-friendly production window now is probably more useful than potential lowering of efforts for implementing a new feature in the future?
Warning: Antarans in dimensional portal are closer than they appear.
Re: [PATCH] Show only player owned systems in production win
I think the reason is not updated empire ownership cache. Did you apply both patches? Did you load a game that was started before you applied the patches?Bigjoe5 wrote:Regarding the patch itself, I've notice a couple of bugs:
1. Clicking the production button when an unowned system is selected gives focus to a player-owned system, but doesn't open the production window. The production button must be clicked again before the window will open.
2. Double clicking on unowned systems does just center the map on them, as claimed - however, double clicking on player-owned systems has the same effect, and no longer seems to open the production window.
Re: [PATCH] Show only player owned systems in production win
Ah yes, my bad. I only downloaded the one from your second post - didn't look carefully enough at the attachments in your first post to realize I was missing something.zhur wrote:I think the reason is not updated empire ownership cache. Did you apply both patches? Did you load a game that was started before you applied the patches?
Warning: Antarans in dimensional portal are closer than they appear.
Re: [PATCH] Show only player owned systems in production win
And how often do you do this? What I am trying to tell is that using production window for its main purpose - to select your own system for production and select something for producing is much more important.Bigjoe5 wrote:Even without the ability to produce on unowned planets, the player still may want to check out enemy planets while he's in the production screen - it won't necessarily be more convenient in all cases to leave the production screen, then look at the enemy system in the side panel, then go back to the production screen to queue your ships or whatever. Clicking on a system in which you can't build doesn't necessarily indicate that you intends to leave the production screen, so it shouldn't make you leave the production screen - I'm dubious of adding unexpected side effects to the player's actions that makes some assumption about his intentions.
I find this most logical behavior in such case: there are only player-owned systems in the side panel drop-down list in production mode. Hence other systems are not showed there. Can you suggest a better approach?Bigjoe5 wrote:I don't know that it is more user friendly - this patch assumes that clicking on a planet in which the player has no owned systems signifies an intent to leave the production window, which regardless of his ability to produce items there, isn't necessarily valid.
OK, irrespective of my arguments seems like you think that how production window works currently is better. Is this the common opinion of the community or lead developers?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [PATCH] Show only player owned systems in production win
I don't like the caching mechanism used in the patch(es), particularly as it appears to involve serializing more / new information. Why this is necessary, I don't see, and if it is, it shouldn't be able to send information to players that they shouldn't know due to the limits of their visibility. I also imagine things would work fine to not have any such caching at all, and just check every time if a system has planets owned by particular empires.
Having clicking or double-clicking a system do different things depending on not-necessarily-obvious details of the system doesn't seem like a good idea. A particular user action should have a consistent result, be that showing the system or opening the production screen to a system.
Even if a system doesn't have any valid production locations for an empire, there's no reason to make it impossible to view the system in the production screen, particularly if doing so means the same UI action would do one thing in some situations, do nothing in other situations, or do something else in yet other situations. This could be confusing for players.
It is acceptable to remove some systems from the next / previous cycle of planets, though I don't think those really get much use and they aren't really important enough to warrant spending much time tweaking the behaviour of.
Having clicking or double-clicking a system do different things depending on not-necessarily-obvious details of the system doesn't seem like a good idea. A particular user action should have a consistent result, be that showing the system or opening the production screen to a system.
Even if a system doesn't have any valid production locations for an empire, there's no reason to make it impossible to view the system in the production screen, particularly if doing so means the same UI action would do one thing in some situations, do nothing in other situations, or do something else in yet other situations. This could be confusing for players.
It is acceptable to remove some systems from the next / previous cycle of planets, though I don't think those really get much use and they aren't really important enough to warrant spending much time tweaking the behaviour of.
Re: [PATCH] Show only player owned systems in production win
Caching was already partially present but wasn't working because of missing serialization. I think indeed it can be removed.Geoff the Medio wrote:I don't like the caching mechanism used in the patch(es), particularly as it appears to involve serializing more / new information. Why this is necessary, I don't see, and if it is, it shouldn't be able to send information to players that they shouldn't know due to the limits of their visibility. I also imagine things would work fine to not have any such caching at all, and just check every time if a system has planets owned by particular empires.
Strictly speaking it has a consistent result - attempt to open a production window at the system. For systems without player owned planets it just fails.Geoff the Medio wrote:Having clicking or double-clicking a system do different things depending on not-necessarily-obvious details of the system doesn't seem like a good idea. A particular user action should have a consistent result, be that showing the system or opening the production screen to a system.
I don't understand what's the reason it should be possible to view such system in production screen (except it is done so currently). There is nothing confusing for me as a new player but probably you have a better vision of how most players play the game.Geoff the Medio wrote:Even if a system doesn't have any valid production locations for an empire, there's no reason to make it impossible to view the system in the production screen, particularly if doing so means the same UI action would do one thing in some situations, do nothing in other situations, or do something else in yet other situations. This could be confusing for players.
Heh, since I already hacked this part of UI that's probably the only thing left to do with this patch (like removing systems without any planets - if such change is acceptable). Seems like I indeed was too quick to try to make a change without discussing it first. Sorry for wasting your and Joe's time - I was only trying to do some good.Geoff the Medio wrote:It is acceptable to remove some systems from the next / previous cycle of planets, though I don't think those really get much use and they aren't really important enough to warrant spending much time tweaking the behaviour of.