File: upkeep.macros

package info (click to toggle)
freeorion 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 194,940 kB
  • sloc: cpp: 186,508; python: 40,969; ansic: 1,164; xml: 719; makefile: 32; sh: 7
file content (49 lines) | stat: -rw-r--r-- 2,312 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
COLONY_UPKEEP_MULTIPLICATOR
'''(1 + 0.06 * SpeciesColoniesOwned empire = Source.Owner)'''

FLEET_UPKEEP_MULTIPLICATOR
'''(1 +

    // reduce by half if policy adopted
    (1 - 0.5*Statistic If condition = And [Source EmpireHasAdoptedPolicy empire = Source.Owner name = "PLC_ENGINEERING"]) * (
    
    // increase cost dependent on number of ships or number of ship parts
    (1 - (GameRule name = "RULE_SHIP_PART_BASED_UPKEEP")) * (
        (0.01 * ShipDesignsOwned empire = Source.Owner) +
        (0.01 * ShipDesignsInProduction empire = Source.Owner)) +
    (GameRule name = "RULE_SHIP_PART_BASED_UPKEEP") * (
        (0.002 * ShipPartsOwned empire = Source.Owner class = ShortRange) +
        (0.002 * ShipPartsOwned empire = Source.Owner class = FighterHangar) +
        (0.002 * ShipPartsOwned empire = Source.Owner class = Armour) +
        (0.002 * ShipPartsOwned empire = Source.Owner class = Troops) +
        (0.002 * ShipDesignsOwned empire = Source.Owner) +
        (0.01 * ShipDesignsInProduction empire = Source.Owner))))'''


// used within a production cost calculation, in which the location at which the production happens
// is the Target object and another object owned by the producing empire is the source object

SHIP_HULL_COST_MULTIPLIER
'''(GameRule name = "RULE_SHIP_HULL_COST_FACTOR") * [[DESIGN_SIMPLICITY_POLICY_MULTIPLIER]]'''

SHIP_PART_COST_MULTIPLIER
'''(GameRule name = "RULE_SHIP_PART_COST_FACTOR") * [[DESIGN_SIMPLICITY_POLICY_MULTIPLIER]]'''

COLONIZATION_POLICY_MULTIPLIER
'''(1
    - (Statistic If condition = And [Source EmpireHasAdoptedPolicy empire = Source.Owner name = "PLC_COLONIZATION"])/3
    + (Statistic If condition = And [Source EmpireHasAdoptedPolicy empire = Source.Owner name = "PLC_CENTRALIZATION"])/3
)
'''

MARINE_RECRUITMENT_POLICY_MULTIPLIER
'''(1 - 0.5*(Statistic If condition = And [Source EmpireHasAdoptedPolicy empire = Source.Owner name = "PLC_MARINE_RECRUITMENT"]))
'''

DESIGN_SIMPLICITY_POLICY_MULTIPLIER
'''(1 - 0.2*(Statistic If condition = And [
    Source
    EmpireHasAdoptedPolicy empire = Source.Owner name = "PLC_DESIGN_SIMPLICITY"
    ((PartsInShipDesign design = UsedInDesignID) <= 6)  // Used in part or hull cost expressions, in which "UsedInDesignID" will contain the ID of the ship design in which the part is being used
]))
'''