There are still a lot of hard-coded descriptions, like this which not only misses the factor:
SH_ORGANIC_DESC
'''A living hull with three external slots and one internal slot.
Organic Growth: starts with 5 [[metertype METER_STRUCTURE]], but grows an additional 5 structure over 25 turns.
...
The base structure should simply be removed from the text. The correct value can be seen down in the generated ship overview.
Perhaps organic growth could be formalized and added to that overview? Otherwise it should be modified using named values that the pedia can refer to.
I have plans for updating the pedia for this stuff.
There was mention of a performance hit for adding NamedValues here: https://github.com/freeorion/freeorion/pull/3931
Is this something I should worry about? What's the preferred method, should I change all these entries to named values? Include the game rule in the string table? Something else?
wobbly wrote: ↑Sun Jul 03, 2022 9:58 am
There was mention of a performance hit for adding NamedValues here: https://github.com/freeorion/freeorion/pull/3931
Is this something I should worry about? What's the preferred method, should I change all these entries to named values? Include the game rule in the string table? Something else?
The problem was solved by not using Lookups in focs files for values declared outside named_values.focs
wobbly wrote: ↑Sun Jul 03, 2022 9:58 am
There was mention of a performance hit for adding NamedValues here: https://github.com/freeorion/freeorion/pull/3931
Is this something I should worry about? What's the preferred method, should I change all these entries to named values? Include the game rule in the string table? Something else?
guessing from oberlus description and "fix" (workaround) that was not a performance issue, but rather a kind of delay caused by a race/parallelism issue (looking up the named value before its definition was parsed).
this should only be possible when parsing is not finished yet. but the bug did not indicate exactly how the pedia was accessed.
so i think this should not have happened... maybe the python parsing does something different which makes this kind of bug possible(?)
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Oberlus wrote: ↑Sun Jul 03, 2022 7:10 am
by default, structure factor is x8, damage factor is x6.
Is this is in some dataset, that everything could be linked too, including pedia entries, so if there are any changes to these defaults, only the dataset needs changing?
Oberlus wrote: ↑Sun Jul 03, 2022 7:10 am
by default, structure factor is x8, damage factor is x6.
Is this is in some dataset, that everything could be linked too, including pedia entries, so if there are any changes to these defaults, only the dataset needs changing?
LIVING_HULL_AUTO_REGEN
Living hull regenerates [[value SHP_LIVING_HULL_REPAIR]] [[metertype METER_STRUCTURE]] between combats and [[value SHP_LIVING_HULL_FUEL_REGEN]] [[metertype METER_FUEL]] while stationary.
here the pedia is displaying the actual in game value [[value SHP_LIVING_HULL_REPAIR]]
SH_ORGANIC_DESC
'''A living hull with three external slots and one internal slot.
Organic Growth: starts with 5 [[metertype METER_STRUCTURE]], but grows an additional 5 structure over 25 turns.
Here the numbers are hardcoded into the pedia: "starts with 5", "5 over 25 turns"
wobbly wrote: ↑Sun Jul 03, 2022 2:05 pm
And as a plus side to replying to your post I notice that the description of organic hulls is wrong. They've had 1 external slot for a long time now.
So I'd add a screenshot of the entry, but.. the forum says attachment quota is full. If you go to the pedia entry for organic hull:
"A living hull with three external slots and one internal slot." - "Wrong "
wobbly wrote: ↑Sun Jul 03, 2022 2:28 pm
Is there a simple way to grab the correct in-game version used for External Slot: 1 in the stringtable entries for ship hulls?
currently not. needs backend support.
one way to implement: specific tags to query certain properties of content.
more generic, another way to implement: tags to query/execute ValueRefs (this probably could be bootstrapped faster by using named value refs).
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.