FreeOrion

Forums for the FreeOrion project
It is currently Fri Dec 15, 2017 8:28 am

All times are UTC


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.



Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Nov 27, 2017 5:17 pm 
Offline
Space Squid
User avatar

Joined: Sun Nov 19, 2017 6:32 pm
Posts: 86
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. ..."


Top
 Profile  
 
PostPosted: Wed Nov 29, 2017 4:03 am 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
@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.


Top
 Profile  
 
PostPosted: Thu Nov 30, 2017 7:58 am 
Offline
Space Squid
User avatar

Joined: Sun Nov 19, 2017 6:32 pm
Posts: 86
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.


Top
 Profile  
 
PostPosted: Thu Nov 30, 2017 10:43 pm 
Offline
Space Squid
User avatar

Joined: Sun Nov 19, 2017 6:32 pm
Posts: 86
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


Top
 Profile  
 
PostPosted: Fri Dec 01, 2017 2:18 am 
Offline
Space Squid
User avatar

Joined: Sun Nov 19, 2017 6:32 pm
Posts: 86
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.


Top
 Profile  
 
PostPosted: Fri Dec 01, 2017 7:01 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
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.)
Quote:
[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.
Quote:
[[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.


Top
 Profile  
 
PostPosted: Fri Dec 01, 2017 8:18 am 
Offline
Space Squid
User avatar

Joined: Sun Nov 19, 2017 6:32 pm
Posts: 86
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.)
Quote:
[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:
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:
   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.


Top
 Profile  
 
PostPosted: Fri Dec 01, 2017 11:43 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
alleryn wrote:
What i'm referring to is this bit:
Code:
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.
Quote:
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.


Top
 Profile  
 
PostPosted: Fri Dec 01, 2017 4:22 pm 
Offline
Space Squid
User avatar

Joined: Sun Nov 19, 2017 6:32 pm
Posts: 86
geoffthemedio commented 2 hours ago (from github issue thread)
Quote:
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"?


Top
 Profile  
 
PostPosted: Tue Dec 05, 2017 10:17 am 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group