Fuel Enhancements
-
@redrum Would it be possible to make different directories under resources, like with units, where different players could would be presented with a different icon. In US: A, resources are used to limit the amount of certain unit types. ie... IUs for InfantryUnits... Then the Western Player would see an orange IUs and Southern would see a blue IUs
And I like @Frostion idea also!!
Cheers...
-
@hepps gigglez
-
@Frostion Starting to think you're a mind reader... I was thinking pretty much exactly the same thing. Initially was thinking just a boolean parameter but as you pointed out I realized that there are a number of maps where resources are only used by certain nations.
My thought was "isDisplayedFor" which either has a list of players or NONE (default is its shown to all).
Example:
<resourceList> <resource name="PUs"/> <resource name="Iron"/> <resource name="Fuel"/> <resource name="CR" isDisplayedFor="France:British-Colonies:Italy:British-India:French-Colonies:KNIL"/> <resource name="SS" isDisplayedFor="Germany"/> <resource name="Pilot" isDisplayedFor="Japan"/> <resource name="Officials" isDisplayedFor="USSR"/> <resource name="HiddenResource" isDisplayedFor="NONE"/> </resourceList>
@wc_sumpton It would be possible (like unit images) though I don't think there are a ton of maps that would use different icons per player for the same resource. Probably low priority for now.
-
-
@wc_sumpton Hehe Gigglez!
-
The initial changes to display the resource amounts are now in the pre-release: https://github.com/triplea-game/triplea/releases
Testing and feedback welcome.
-
PR for adding "isDisplayedFor" XML resource property: https://github.com/triplea-game/triplea/pull/3015
<resourceList> <resource name="techTokens" isDisplayedFor="NONE"/> <resource name="PUs" isDisplayedFor="Union"/> <resource name="Manpower" isDisplayedFor="Confederate"/> <resource name="Supplies" isDisplayedFor="Union:Confederate"/> <resource name="Industry"/> <resource name="Leadership"/> </resourceList>
Confederate:
Union:
@Frostion FYI, I was doing some testing on various maps and noticed the resource icons in dragon war are on the larger size: https://github.com/triplea-maps/dragon_war/tree/master/map/resources. You probably want to scale those down
-
@redrum
I will have to test this on all my maps, and I will want to make new small resource png's in the appropriate sizes. As the flag picture in the bottom right corner is 32x32, is this the max size of the resource pictures? I guess that the bar has a fixed seize, so that the bar does not expand if the pictures are too big, right?As for Dragon War, the pictures that are named ???_large.png are used in the purchase screen. Are you telling me that they are also used in the bar? I would have thought that the maybe too small 12x12 pictures called Wood.png, Food.png, Metal.png and PUs.png would be used in the bar.
I will test this new pre-release when I got time. Dunno when that is. Maybe within a few days.
PS: Funny that we both thought about the player specific resources in nearly the same way
-
@frostion From my testing, there is no limit on the bar height but the right portion of the bar where the flag is doesn't scale with the rest of the bar so looks funny if they are too tall. So right now, I think 32x32 would be the max that looks decent though all the defaults that I tested with are 24x24.
Right now I'm pulling in the *_large resources images as the engine standard is regular are 12x12 and *_large are 24x24. The 12x12 are way too small looking. Not sure about the purchase screen. Are you specifying which images it pulls in or does it choose those ones? If so probably need to consider having 3 standard sizes.
-
@redrum
I have tested and confirmed that the purchase screen pulls the _large.png version. And because of this, the large version should be able to be unit size. I guess the best size for the bottom bar is 24x24 and up to 32x32. The reason why the small resource pictures are tiny in Dragon War is because I really didn't know at the time what those pictures were for, and then I just made them 12x12 as this was the size I saw in another map dir (I still don't know what these small pictures are used for. Please enlighten me.)The only two maps I made that uses resources are Dragon War and Star Trek. Both maps have tiny 10x10/12x12 resource pictures plus larger "_large.png" versions for the purchase screen. I will probably make 24x24 versions of resources for all my maps.
-
@frostion Looking at the code, it appears only the *_large version is used and the regular version isn't referenced anywhere.
I think it brings up the question of where should the "resource" images be displayed and what sizes make the most sense. I'd agree that we need at least a unit size version for places where its displayed with units (purchase/place/etc) and some version for the bottom bar.
-
I propose a section devoted to images in POS2.
-
"isDisplayedFor" XML property is now available in the latest pre-release. Looking to get resource income added next.
-
Latest PR to add income to resource bar: https://github.com/triplea-game/triplea/pull/3035
For now, this only takes into account income from territories, units, and NOs. It ignores blockades, war bonds, triggers, relationship upkeep, and bonus income.
-
@redrum right on Good stuff.
Since you mentioned "Blockades" ( even though it's not taken into account ) It'd be cool to have "Convoy Zones" represented if/when it all happens : )Edit: Think I'm on the right thread. : ) Maybe already addressed but will one be able to turn off the bar if they want ?
-
@beelee Setting all your resources to 'isDisplayedFor'=NONE should do the trick thus the treat would be no resources displayed...
Cheers...
-
Nice job so far.
I have one more to add to your list, "createsResourcesList". Not sure if it will be taken into account as trigger.
-
@beelee I believe most maps that use convoy zones, have them treated as territory income not blockade but testing some of the maps and seeing if the income estimate matches what the player gets at the end of their turn would be helpful.
@General_Zod "createsResourcesList" is what I mean by income from units so yes that is already taken into account. Triggers are only referring to actual "TriggerAttachments" that use resource/resourceCount.
FYI. The main reason I'm ignoring blockades, war bonds, and triggers, is that I believe those have some kind of roll/chance option which means they aren't necessarily guaranteed income. If we are going to include those, we'd either need to assume worst possible rolls or average roll so that the amount would be consistent.
-
@redrum I like the progress, please keep it up, it's a game changer for multi-resource maps. I've two suggestions for discussion/consideration
Suggestion 1: right justify the economy display,
Before:
On the near full screen above, the "34(+34)" PU indicator is pretty lonely and without context. I was thinking adding "Russians: 5(+34)" was maybe the way to go, to then realize we have exactly this same information on the right. Justifying the income label to the right groups the current turn information together.
Example 1:
or, example 2:
Here is what that would look like for civil war:
Before:
After:
With many resources, it is kinda nice to have the resources display centered. So three options:
- always centered
- always right justified
- conditional, 1 or 2 resources is right justified, otherwise it is centered
It'll be interesting to hear what the group thinks on this, I'm really torn between the options. I think for Civil War, centered is probably pretty clear, but with one lonely resource, the right justified gives context to the information and groups it, which I also like.
Suggestion 2: split hover text between PU indicator and the expected income indicator
So instead of it all being one hovertext, when the user hovers over the "+34" it'll say expected income (and perhaps would be a good place to note any things in calculation so the number is transparent)
-
@lafayette I can see either way.... I think the key is just consistancy.