/
buildings.macros
105 lines (95 loc) · 4.96 KB
/
buildings.macros
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// sets stability (happiness) on planets in empire that has adopted the policy this macro effect is added to, if those planets' species like or dislike the policy
POLICY_LIKE_DISLIKE_SCALING
'''(1.0 + (Statistic If condition = EmpireHasAdoptedPolicy empire = Target.Owner name = "PLC_LIBERTY")
- 0.5*(Statistic If condition = EmpireHasAdoptedPolicy empire = Target.Owner name = "PLC_CONFORMANCE"))'''
STABILITY_PER_LIKED_OR_DISLIKED_BUILDING_ON_PLANET
'''4.0 * [[POLICY_LIKE_DISLIKE_SCALING]]'''
STABILITY_PER_LIKED_OR_DISLIKED_BUILDING_IN_SYSTEM
'''1.0 * [[POLICY_LIKE_DISLIKE_SCALING]]'''
SPECIES_LIKES_OR_DISLIKES_BUILDING_STABILITY_EFFECTS
'''
// species like building on the same planet
EffectsGroup
scope = And [
Object id = Source.PlanetID
Population low = 0.001
(SpeciesContentOpinion species = LocalCandidate.Species name = ThisBuilding > 0)
]
accountinglabel = "LIKES_BUILDING_LABEL"
effects =
SetTargetHappiness value = Value + [[STABILITY_PER_LIKED_OR_DISLIKED_BUILDING_ON_PLANET]] * SpeciesContentOpinion species = Target.Species name = ThisBuilding
// species dislike building on the same planet
EffectsGroup
scope = And [
Object id = Source.PlanetID
Population low = 0.001
(SpeciesContentOpinion species = LocalCandidate.Species name = ThisBuilding < 0)
]
accountinglabel = "DISLIKES_BUILDING_LABEL"
effects =
SetTargetHappiness value = Value + [[STABILITY_PER_LIKED_OR_DISLIKED_BUILDING_ON_PLANET]] * SpeciesContentOpinion species = Target.Species name = ThisBuilding
// species like building in the same system
EffectsGroup
scope = And [
Planet
InSystem id = Source.SystemID
Population low = 0.001
Not Object id = Source.PlanetID // but not on same planet, which is covered by above case
(SpeciesContentOpinion species = LocalCandidate.Species name = ThisBuilding < 0)
]
accountinglabel = "DISLIKES_BUILDING_LABEL"
effects =
SetTargetHappiness value = Value + [[STABILITY_PER_LIKED_OR_DISLIKED_BUILDING_IN_SYSTEM]] * SpeciesContentOpinion species = Target.Species name = ThisBuilding
// species dislike building in the same system
EffectsGroup
scope = And [
Planet
InSystem id = Source.SystemID
Population low = 0.001
Not Object id = Source.PlanetID // but not on same planet, which is covered by above case
(SpeciesContentOpinion species = LocalCandidate.Species name = ThisBuilding > 0)
]
accountinglabel = "LIKES_BUILDING_LABEL"
effects =
SetTargetHappiness value = Value + [[STABILITY_PER_LIKED_OR_DISLIKED_BUILDING_IN_SYSTEM]] * SpeciesContentOpinion species = Target.Species name = ThisBuilding
// species like building in empire
EffectsGroup
scope = And [
Planet
OwnedBy empire = Source.Owner
Population low = 0.001
Not InSystem id = Source.SystemID
(SpeciesContentOpinion species = LocalCandidate.Species name = ThisBuilding > 0)
]
accountinglabel = "LIKES_BUILDING_LABEL"
effects =
SetTargetHappiness value = Value + ((NamedReal name = "BUILDING_LIKE_EMPIRE_SQRT_SCALING" value = 1.0) *
max(1.0,
Statistic Count condition = And [
Building
Building name = ThisBuilding
OwnedBy empire = Source.Owner
]
)^(-0.5)
) * [[POLICY_LIKE_DISLIKE_SCALING]] * SpeciesContentOpinion species = Target.Species name = ThisBuilding
// species dislike building in empire
EffectsGroup
scope = And [
Planet
OwnedBy empire = Source.Owner
Population low = 0.001
Not InSystem id = Source.SystemID
(SpeciesContentOpinion species = LocalCandidate.Species name = ThisBuilding < 0)
]
accountinglabel = "DISLIKES_BUILDING_LABEL"
effects =
SetTargetHappiness value = Value + ((NamedReal name = "BUILDING_LIKE_EMPIRE_SQRT_SCALING" value = 1.0) *
max(1.0,
Statistic Count condition = And [
Building
Building name = ThisBuilding
OwnedBy empire = Source.Owner
]
)^(-0.5)
) * [[POLICY_LIKE_DISLIKE_SCALING]] * SpeciesContentOpinion species = Target.Species name = ThisBuilding
'''