How do you use stockpiled PPs?

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Message
Author
User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: How do you use stockpiled PPs?

#16 Post by alleryn »

Proposed changes for Meter_Type entries (1):
  • "Imperial Stockpile Use Limit" - fix (this is done)
  • "Stat - Primary" --> "Ship Part Capacity" : "The Capacity of a Ship Part describes its primary function: Shield Strength for Shields, Fighter Capacity for Hangars, population for Colony Pods, etc."
  • "Stat - Secondary" --> "Ship Part Secondary" : "Used as a supplement for [[metertype METER_CAPACITY]] (ed. note: would read "Stat - Primary" or "Ship Part Capacity") when additional information about a ship part is required, for example Shot Damage for a Hangar (to supplement Fighter Capacity) or Shots per Attack for a Flak Cannon (to supplement Shot Damage)."
  • "Size" --> "Field Size" : "Measures the size of a field. A list of the various types of fields can be found at [[encyclopedia ENC_FIELD_TYPE]]."
    or
    "Measures the radius of a [[encyclopedia ENC_FIELD_TYPE]] (ed. note: would read "Field Type")."
    or
    "Measures the size of a field. A list of [[encyclopedia ENC_FIELD_TYPE]]s is available on the Pedia."
  • "Industry": "...Any un-allocated Industry is lost each turn. ..." --> "...Any un-allocated Industry is converted via the [[metertype METER_IMPERIAL_PP_TRANSFER_EFFICIENCY]] (ed. note: would read "Industry to Stockpile PP Transfer Ratio") and added to the Imperial Stockpile. ..."

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: How do you use stockpiled PPs?

#17 Post by dbenage-cx »

@Dilvish, I was wrong about ships and appreciate the correction.
It does seem to be at least used for stat icon for fleets?
The minor concern here is allowing a right click context to be added to any meter icon, similar to sidepanel (suppose it could later be changed if a PR is submitted).

My initial thought for METER_CAPACITY_VALUE_DESC / METER_SECONDARY_STAT_VALUE_DESC was some generated list, but I've no qualms with them remaining some generic description.
The capacity value was intentionally not labeled Capacity, both so the similarity with SecondaryStat was apparent, and due to only sometimes being displayed to player as Capacity (Strength, Detection Range, etc).

re: METER_SIZE, also currently used for number of ships in a fleet.
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: How do you use stockpiled PPs?

#18 Post by alleryn »

dbenage-cx wrote:re: METER_SIZE, also currently used for number of ships in a fleet.
Are people comfortable with this being used for both?

I'm inclined to split this into two separate meters. It doesn't even seem like they should be of the same type; i mean field size is obviously a float, but fleet size seems like it would be counted in discrete pieces.

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: How do you use stockpiled PPs?

#19 Post by alleryn »

New suggestion for METER_SIZE:
Split into two: METER_RADIUS and METER_COUNT

METER_COUNT: "Count": The number of discrete objects in a collection, for example, the number of ships in a fleet.
METER_RADIUS: "Radius": The radius of a circular phenomenon, for example, the radius of a field. (See [[encyclopedia ENC_FIELD_TYPE]] for a list of the types of fields you may encounter in FreeOrion).

I'm going to do some more analysis, now that i'm a bit more comfortable finding where these meters actually get used. Will report back later. -alleryn

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: How do you use stockpiled PPs?

#20 Post by alleryn »

Some of this seems like it'll take quite a while to sort out, so i figured i'd try to push through the minor stuff:
https://github.com/freeorion/freeorion/pull/1895

That is intended to take care of "Imperial Stockpile Use Limit" and "Industry" (the french article for the latter still says that unused industry points are wasted, rather than converted into stockpile points... i just left a note in fr.txt that it needs an update).

Beyond that, it feels like a bit of a morass to me.

METER_CAPACITY seems to be doing a lot of things at once and require extra syntax in a number of places since sometimes it's referred to textually as "Capacity" and other times as ""Damage", and in the Pedia as "Stat - Primary".

It also is used at least once just as a literal "Capacity", when the player opens the pedia to look at a ship design, for Fuel [[METER_CAPACITY]]. In this case perhaps it would be better replaced by [[LITERAL_CAPACITY]] since it's really not being used as a meter in this context.

[[METER_SIZE]] is also a bit overloaded, referring to both the discrete quantity Fleet Count, and the continuous quantity Field Radius.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: How do you use stockpiled PPs?

#21 Post by Geoff the Medio »

alleryn wrote:[METER_CAPACITY] is used at least once just as a literal "Capacity", when the player opens the pedia to look at a ship design, for Fuel [[METER_CAPACITY]].
Where is this happening? If you mean for the fuel tank part, this would be a correct use of METER_CAPACITY, as it is referring to the capacity of the fuel part. (METER_FUEL is used to track how much fuel a ship has.)
[METER_CAPACITY is] really not being used as a meter in this context.
You seem to have a particular idea of what a meter is / should be, which is not reflected in current reality. Tracking capacities of parts is the primary use of the METER_CAPACITY meter type.
[[METER_SIZE]] is also a bit overloaded, referring to both the discrete quantity Fleet Count, and the continuous quantity Field Radius.
In this case, it actually is only being used as an actual meter in the field size context. For ships, METER_SIZE is just used in the UI to indicate that ship count for a fleet should be displayed, as that is not actually a meter of any UniverseObject, but some meter type needed to be used to indicate that that info was to be calculated due to how that code was structured.

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: How do you use stockpiled PPs?

#22 Post by alleryn »

Geoff the Medio wrote:
alleryn wrote:[METER_CAPACITY] is used at least once just as a literal "Capacity", when the player opens the pedia to look at a ship design, for Fuel [[METER_CAPACITY]].
Where is this happening? If you mean for the fuel tank part, this would be a correct use of METER_CAPACITY, as it is referring to the capacity of the fuel part. (METER_FUEL is used to track how much fuel a ship has.)
[METER_CAPACITY is] really not being used as a meter in this context.
You seem to have a particular idea of what a meter is / should be, which is not reflected in current reality. Tracking capacities of parts is the primary use of the METER_CAPACITY meter type.
What i'm referring to is this bit:
https://github.com/freeorion/freeorion/ ... .txt#L4610

Code: Select all

ENC_SHIP_DESIGN_DESCRIPTION_STATS_STR
'''
For [[encyclopedia ENC_SPECIES]]: %1%
Total [[encyclopedia DAMAGE_TITLE]]: %2%    [[PC_DIRECT_WEAPON]] Shots: %3%
[[metertype METER_STRUCTURE]]: %4%    [[metertype METER_SHIELD]]: %5%
[[metertype METER_DETECTION]]: %6%    [[metertype METER_STEALTH]]: %7%
[[metertype METER_SPEED]]: %8%    [[metertype METER_FUEL]] [[METER_CAPACITY]]: %9%
Colonization [[METER_CAPACITY]]: %10%    [[metertype METER_TROOPS]]: %11%
[[OBJ_FIGHTER]] [[encyclopedia DAMAGE_TITLE]]: %13%    [[ENC_SDD_HANGAR]]: %12%    [[ENC_SDD_BAY]]: %14%
Estimated combat strength   (<i>ignoring shields</i>):  %15$.f   (%16$.2f per PP)
            (<i>enemy with attack %17$.1f and shields %18$.1f</i>):  %19$.f   (%20$.2f per PP)
'''
And this bit:
https://github.com/freeorion/freeorion/ ... .cpp#L2138

Code: Select all

   return (FlexibleFormat(UserString("ENC_SHIP_DESIGN_DESCRIPTION_STATS_STR"))
            % species
            % attack
            % ship->SumCurrentPartMeterValuesForPartClass(METER_MAX_SECONDARY_STAT, PC_DIRECT_WEAPON)
            % structure
            % shield
            % ship->CurrentMeterValue(METER_DETECTION)
            % ship->CurrentMeterValue(METER_STEALTH)
            % ship->CurrentMeterValue(METER_SPEED)
            % ship->CurrentMeterValue(METER_MAX_FUEL)
            % design->ColonyCapacity()
            % ship->TroopCapacity()
            % ship->FighterMax()
            % (attack - ship->TotalWeaponsDamage(0.0f, false))
            % ship->SumCurrentPartMeterValuesForPartClass(METER_MAX_CAPACITY, PC_FIGHTER_BAY)
            % strength
            % (strength / cost)
            % typical_shot
            % enemy_DR
            % typical_strength
            % (typical_strength / cost)).str();
}
I guess you're right that i may have a particular idea of what a meter should be. A meter is literally something used to measure. Of course it doesn't have to be that, but i'd argue it makes the code more legible if the word is used in alignment with its meaning outside of the code.

For both the fuel and the colonization "capacity", i don't see how METER_CAPACITY is being used as a meter. The things that are really measuring are METER_MAX_FUEL and ColonyCapacity(). [[METER_CAPCITY]] is simply being used as a string literal to make the word "capacity" (or a translation) appear on the screen. Or that's how i read it.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: How do you use stockpiled PPs?

#23 Post by Geoff the Medio »

alleryn wrote:What i'm referring to is this bit:

Code: Select all

ENC_SHIP_DESIGN_DESCRIPTION_STATS_STR
'''
For [[encyclopedia ENC_SPECIES]]: %1%
Total [[encyclopedia DAMAGE_TITLE]]: %2%    [[PC_DIRECT_WEAPON]] Shots: %3%
[[metertype METER_STRUCTURE]]: %4%    [[metertype METER_SHIELD]]: %5%
[[metertype METER_DETECTION]]: %6%    [[metertype METER_STEALTH]]: %7%
[[metertype METER_SPEED]]: %8%    [[metertype METER_FUEL]] [[METER_CAPACITY]]: %9%
Colonization [[METER_CAPACITY]]: %10%    [[metertype METER_TROOPS]]: %11%
[[OBJ_FIGHTER]] [[encyclopedia DAMAGE_TITLE]]: %13%    [[ENC_SDD_HANGAR]]: %12%    [[ENC_SDD_BAY]]: %14%
Estimated combat strength   (<i>ignoring shields</i>):  %15$.f   (%16$.2f per PP)
            (<i>enemy with attack %17$.1f and shields %18$.1f</i>):  %19$.f   (%20$.2f per PP)
'''
That is just using the stringtable entry for "capacity" in another string. This has nothing to do with how the MeterType enums METER_CAPACITY or METER_FUEL are used in the C++ code.
For both the fuel and the colonization "capacity", i don't see how METER_CAPACITY is being used as a meter. The things that are really measuring are METER_MAX_FUEL and ColonyCapacity(). [[METER_CAPCITY]] is simply being used as a string literal to make the word "capacity" (or a translation) appear on the screen. Or that's how i read it.
Yes... which is fine, as this is a bit of text in the stringtable. Which is what all of the [[STUFF]] in stringtable entries does.

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: How do you use stockpiled PPs?

#24 Post by alleryn »

geoffthemedio commented 2 hours ago (from github issue thread)
The capacity meter is used internally for most part stats, particularly the "primary" stat. To the player, for a weapon part, the primary stat is the part's damage.
If the use of "Stat - Primary", "Stat - Secondary" is to be esoteric enough that we are hiding from the player what these meters really do ("Stat - Primary" is referring to capacity in some places, but damage in others; yet if i'm understanding you correctly we shouldn't be referring to the damage of a weapon as its capacity when addressing the player), then perhaps they shouldn't get listed in the pedia at all? Or should "Stat - Primary" (i.e. METER_CAPACITY_VALUE_LABEL/DESC) somehow display twice in the pedia -- once as "damage" and once as "capacity"?

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: How do you use stockpiled PPs?

#25 Post by dbenage-cx »

alleryn wrote:If the use of "Stat - Primary", "Stat - Secondary" is to be esoteric enough that we are hiding from the player what these meters really do ("Stat - Primary" is referring to capacity in some places, but damage in others; yet if i'm understanding you correctly we shouldn't be referring to the damage of a weapon as its capacity when addressing the player), then perhaps they shouldn't get listed in the pedia at all?
If not referenced from anywhere (can not think of any), think de-listing just these two meters would be fine.

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: How do you use stockpiled PPs?

#26 Post by alleryn »

I've sort of lost my motivation on wanting to clean up these nagging issues. If it bothers other people i'm happy to get back into it, but otherwise i'll just leave it for now.

Post Reply