Named values for ship structure?

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Post Reply
Message
Author
User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Named values for ship structure?

#1 Post by Oberlus »

In Hull definitions we have base hull structure and sometimes some effects:

Code: Select all

    structure = 12
    [...]
            effects = SetMaxStructure value = Value + ( min(Source.Age*1, 45) * [[SHIP_STRUCTURE_FACTOR]] )
Notice that base structure doesn't need (must not use) SHIP_STRUCTURE_FACTOR, because that multiplication is done in the backend, while you do need to include the factor for any SetMaxStructure effect. That inconsistency is troublesome for reporting values in stringtables:
We have this:

Code: Select all

Organic Growth: starts with 12 [[metertype METER_STRUCTURE]], grows an additional 45 over 45 turns.
I need this:

Code: Select all

Organic Growth: starts with [[value SH_SENTIENT_MAX_STRUCTURE_INITIAL]] [[metertype METER_STRUCTURE]], grows an additional [[SH_SENTIENT_MAX_STRUCTURE_GROWTH_MAX]] over [[value SH_SENTIENT_OLD_AGE]] turns.
How should I register the value for the base structure? Adding to named_values.macros one new entry for each hull (two new entries for hulls with regeneration) ?

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Named values for ship structure?

#2 Post by Ophiuchus »

Geoff's original idea for that was to have special tags.
(So usually not using named values.)
e.g. [[hullstructure SH_BASIC_SMALL]]
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Post Reply