Resource System Assessment and Improvements
-
So I would like to evaluate and improve the current resource system we have to make it so all resources are treated more equally instead of PUs vs everything else both from an engine and AI perspective. I would like all resources to be treated more 'equal' so anything you can do with PUs, you can do with other resources.
I'd like to collect people's thoughts on the current functionality and what improvements they'd like to see.
Some initial thoughts from previous discussion:
End of Turn Report could use some simplification and improvements and be renamed to 'Income Report' or 'Income Summary'- Be able to specify any name for 'PUs'
https://forums.triplea-game.org/topic/418/expand-useractionattachment- Allow any resource to be checked in conditions
- https://forums.triplea-game.org/topic/642/iscapturedby-for-resources-elements
- https://forums.triplea-game.org/topic/587/allow-triggers-to-give-multiple-resources
-
@redrum Either naming convention sounds good. As long as it is generic it gives map makers the ability to be flexible with turn sequences.
As far as the rest of the functionality with the engine as it pertains to multiple resources I'm not 100% sure atm.
The key at a superficial glance would be identifying anywhere in the code where PU is specified as the only path to usage.
ie. repairing something costs X PU.
However, since I can't seem to wrap my head around the code I have no idea what the obstacles are from a coding standpoint.
-
I think the biggest item that would indirectly make resources more equal would allowing for testing any resources stock with conditions. Meaning being able to test if, for example, Germans currently have 13+ PUs / SilverBullions / ..., True or False.
I see this just a better alternative than the otherwise biggest item of expanding the ability to use other resources but PUs for user actions (that I would, then, deprecate, as you would be able to do the same and more with conditions and triggers), that is a strange working thing, as being self-testing and self-acting, while normally (and more functionally) you have separate conditions for testing and triggers for acting (so, for example, you could say that you can make a cost 4 PUs user action if you have 8+ PUs; and many other things, besides just expanding to not PUs resources).
Also, it would be neat if you can customise the wording of PUs, like changing its name to "Talents" or whatever; just for flavour.
-
@Cernel That's a great point. Sometimes having to default to PU as a forced primary resource is frustrating.
-
I got four thing to say:
-
Yay!
-
I would like to see resources as cost/payment in Actions and Operations.
-
How will fuel play together with your new vision concerning other resources? I mean, right now, is fuel just another non-PU resource that has the extra property of automatically being "fuel" if the XML has this enabled? And will this be changed?
-
In the Iron War Europe thread I saw discussion about simplifying the end of turn repport. That would be awesome for maps like Dragon War and Iron War, as these maps have many units generating resources, but if a map only had few units doing this, like if a player had like only 5 special units, then a more detailed report, like the current, would be nice. Maybe a solution is to add an XML property that enabled detailed/compact reporting on/off.
-
-
@Frostion said in Resource System Assessment and Improvements:
I got four thing to say:
-
Yay!
-
I would like to see resources as cost/payment in Actions and Operations.
Yes. What I was saying is that this is clearly the first item at this topic, but I would do it not by expanding the "costPU" option, but by just adding the ability of testing for presence of whatever resources, with normal conditions (all the triggers for removing any resources already exist; so you just need the other side of the coin: being able to test for what you are removing / adding), which would be so much more extensive (and would make the "costPU" option redundant in Actions and Operations).
-
-
@Frostion said in Resource System Assessment and Improvements:
- In the Iron War Europe thread I saw discussion about simplifying the end of turn repport. That would be awesome for maps like Dragon War and Iron War, as these maps have many units generating resources, but if a map only had few units doing this, like if a player had like only 5 special units, then a more detailed report, like the current, would be nice. Maybe a solution is to add an XML property that enabled detailed/compact reporting on/off.
I'm not really bothered by the big end turn report, that you just don't read, but I'm thinking nobody would be against if it would be changed to just:
7 SS-Potential create 7 SS; Germany end with 27 SS
13 Oil create 13 Fuel; Germany end with 83 Fueletc.
or you can just group all by territory, like:
1 SS-Potential in Albania creates 1SS; Germany end with 21 SS
1 Oil in Argentina creates 1 Fuel; Germany end with 71 Fuel
3 Oil in Austria-Bohemia create 3 Fuel: Germany end with 74 Fueletc.
I'm fine with both, and I don't really know if and why we want to see where each unit is, but I guess it may look some neat, as well as not really bothered by the current display.
I'm thinking, to make it more compact, it should be in one of the two formats above. I would just let @Frostion choose what he prefers, as he's the one having used this kinda stuff the most.
-
To make a clear example, now you can give 4 PUs from Americans to British by:
- Having a costPU=4
- Having a trigger adding 4 PUs to British
If you would be able to test for resources you could do it by:
- Having a condition for testing Americans having 4+ PUs
- Having a trigger removing 4 PUs from Americans
- Having a trigger adding 4 PUs to British
All the triggers are already there; it is just needed the condition for testing the presence of any resources, comprising PUs. So, I would go this way, instead of extending the costPU, as this being much more extensive.
-
Just remember that, for maps having resources going both ways (look at Civil War), you need to have all positives before the negatives.
Also I guess changing:
infantry in Sparta creates -1 Manpower; Confederate end with 138 Manpower
to:
infantry in Sparta consumes 1 Manpower; Confederate end with 138 Manpower
would read better, tho seeing the minus sign is clearer; so I'm not sure.
-
@Hepps Yeah, unfortunately if I search for PUs in the code base its a lot. So want to get map maker and player input into where is it most visible to them where we have resource limitations so we can focus on those first.
@Frostion Responses:
2. Added to list. I think Cernel is probably on the right track around reworking conditions to support all resources and then using conditions in user actions.
3. Fuel is a good question and I'm not actually sure how it all works. My vision is you could mark any/multiple resources as 'fuel'/'movement cost'/'supply'. Not sure how flexible it is currently.
4. What would really be nice is a summary level report which each section could say expand to show details.@Cernel Agree that adding conditions for user action testing would be the way to go and then costPU could be deprecated (eventually removed).
-
I'd remove fuel totally from this discussion, as you can fully use whatever resources for it. Fuel has really some major issues / limits for being implemented in a playable / sensible way, but I don't think any of those are related to use other resources instead of PUs, but that would really need a dedicated topic for it, and, even so, such a topic would be so big that would need to be, then, split into many different GitHub issues.
But nevermind me if anyone else is actually seeing any issues for fuel that exist when using other resources but PUs, for it. I might be overlooking something.
-
Just a thought, in theory you can set units to produce negative resources to represent maintenance. The issue is you can't create any penalty for having too little of that resource
-
@Cernel Agree. The only thing I'm considering part of this discussion around fuel was what resources could be used for it. But if we already have full support for any resource (oil vs coal vs fairy dust) then it doesn't need to be considered here. And yeah its a huge topic just by itself given all the current issues (there are also very few strategy games out there that handle fuel well).
@CrazyG I believe there are a few maps that use negative resources for unit maintenance (TAW comes to mind). The penalty tends to be you just don't have enough resources to build any new units which is usually sufficient.
-
Just for completeness, it also exists this option limited to PUs only
<!-- Multiply PUs will multiply all PUs gained or lost during a turn. It will not yet multiply costs of units or any other costs, or starting PUs --> <property name="Multiply PUs" value="1" editable="false"> <number min="1" max="10"/> </property>
Theorically, you could rework this option as being "Multiply ...", where "..." would apply to whatever resource called exactly that way, in the property.
However, while this is a handy property, I don't think anyone will ever really want to use it to multiply anything else but PUs (its usage is about limited to the matter of defining placement limits relatively to the income, without having to set different production and unit placement for each single territory).
Basically, you use this property only in cases like you want all territories to give PUs equal to 2 or more times their placement abilities, and, this way, you can do it without having to set 2 values for each single territory. This is mostly for maps with maintainment costs, where you would have a lot more placement than remaining income for new units, or for having thigh placement limits without necessarily resorting to have the fodder costing only 2 PUs, that is somewhat impractical.So, this is just a notice, but my actual suggestion is forget it and keeping this property working just as it is, as I don't think there should be really any reasons for using it for anything else but PUs.
-
@Cernel Do we have any maps that actually use that property? I do agree with you that the property is really just a shortcut instead of setting unitProduction vs production for each territory. I don't really like it and would actually prefer having a better map creator tool where you could set a single value around unit production for each territory and then be able to set all production/resource values as a multiple of that if wanted (maybe just even as a starting place).
-
@redrum
I don't know if it is currently used by any maps in the repository, but I suggest to keep it.
I think I intend to use it to have all territories in a game producing 6 times their placement abilities, and that would save unnecessarily setting different production and placement abilities, that would take unneeded space in the territory tab (already severely limited by 64x64 pixels units), and be generally not a sensible way to go, in the case you want just all to be multiplied the same way (I don't like showing pointless info).I think it is a well working option, so I don't see reasons for deleting it, even tho it may be not strictly necessary (but I'm not sure if setting different production and placement would work in any cases, with other properties; it might be forcefully bundled with a v3 bombing system).
Summing up, I don't think there is a strong case for keeping this option (but I might be overlooking something) but I don't see any strong case for removing it, either, so my suggestion is quite surely to keep it. It makes the most sense to go that way, in the moment in which you want all to be multiplied the same amount; setting production and unit placement each territory I see it mostly as a way to have specifically defined income and placement values, rather than same ratio for all.
This property was made in order to have a mod of NWO in which you have 2 times the income production and you can buy 1 artillery at 7 PUs etc.. I think it makes more sense than setting double all territories, and I'm not sure if that would be actually possible only with a v3 bombing system.
-
Yes, from what I read in PoS, it seems that unitProduction works only if you are using a v3 bombing model; so that property would be necessary if you are using a v1 or v2 one, like in that case of the NWO mod it was originally meant for (not tested). Anyways, I would keep it, regardless, just as it is, since it makes the most sense, in my mind, in the moment in which you just want all to have the same ratio. If you don't want to bomb at all, I think the biggest item would be not to have additional unit info in territory tab, for no reasons (having just production, instead of both unit and income production).
-
@redrum Regarding, the resource list, in the "End Of Turn Report". The detailed information is useful and if possible, ability to minimize/expand this portion would be cool. But more importantly, totals per resource would definitely be helpful.
Additionally, even more helpful to planning, would be the current real-time resource totals on the "economy tab". So after other nations go and before your turn comes again, you can quickly see real-time resource totals and start planning accordingly, versus manually counting the totals. In Iron War and Dragon War particularly, you cant efficiently plan your projected future purchases without knowing ballpark totals, and if you cant project purchases, you cant plan combat, etc.. .
Also, would be cool if via xml properties, the map maker could choose which resources should be shown on the "economy tab", so as to not just create clutter with lesser data. Same concept would be cool for "stats tab" too.
And back to the "End Of Turn Report", I also think the "End Of Turn" portion of text should be removed. So the report/summary and End Turn delegates can be placed at the start or end of turn. And not look like it was repurposed. I have been using it at start of turn for some time now. People seem to like it more, and it is simply most logical position.
Also since I touched on "economy and stats tabs". Would be extremely helpful to use the real-time data on these tabs for conditions, objectives, political attachments. In particular, Production, PUs, VC, but even Units and TUV would be nice. The possibilities and uses would vastly enhance Triple A.
-
Initial improvements to "Income Summary" are in the latest pre-release: https://github.com/triplea-game/triplea/pull/1996
-
@redrum @CrazyG
In regards to maps and units that allow and use maintenance costs / minus resource production, maybe a good thing to do was to make a new XML option available that allowed players to go into minus in the bank. Like if every turn a player has units or some other thing dragging the economy down below zero. It is pretty weird that there is no penalty or option to implement a penalty (a penalty like having to work one self out of the minus before being able to spend resources again.)
Stuff like Actions and Operations should ofcours not be able to drag a player bellow zero bank resources.