File: fields.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 (114 lines) | stat: -rw-r--r-- 4,941 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
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
106
107
108
109
110
111
112
113
114
// Create 0-5 planet bodies dependent on planet density setting
CREATE_PLANETS
'''        EffectsGroup  // Low density: max 3 bodies: 0-3 planet, 0-1 asteroid, 0-1 gasgiant (none: 24.84+%)
            scope = And [
                System
                Object id = Source.SystemID
            ]
            activation = And [
                Size high = 5
                (GalaxyPlanetDensity = 1)
            ]
            effects = [
                // 8% planet = 92% none
                If condition = Random probability = 0.08
                    effects = [[EFFECT_CREATE_PLANET]]
                // 50% asteroid, 10% planet = 40% none
                If condition = Random probability = 0.5
                    effects = [[EFFECT_CREATE_ASTEROID]]
                else = If condition = Random probability = 0.2
                    effects = [[EFFECT_CREATE_PLANET]]
                // 10% planet, 22.5% gasgiant = 67.5% none
                If condition = Random probability = 0.1
                    effects = [[EFFECT_CREATE_PLANET]]
                else = If condition = Random probability = 0.25
                    effects = [[EFFECT_CREATE_GASGIANT]]
            ]
        EffectsGroup  // Medium density: max 4 bodies: 0-3 planet, 0-2 asteroid, 0-2 gasgiant (none: 15.53+%)
            scope = And [
                System
                Object id = Source.SystemID
            ]
            activation = And [
                Size high = 5
                (GalaxyPlanetDensity = 2)
            ]
            effects = [
                // 15% asteroid, 17% planet = 68% none
                If condition = Random probability = 0.15
                    effects = [[EFFECT_CREATE_ASTEROID]]
                else = If condition = Random probability = 0.2
                    effects = [[EFFECT_CREATE_PLANET]]
                // 30% planet = 70% none
                If condition = Random probability = 0.3
                    effects = [[EFFECT_CREATE_PLANET]]
                // 20% planet, 25.6% gasgiant = 54.4% none
                If condition = Random probability = 0.2
                    effects = [[EFFECT_CREATE_PLANET]]
                else = If condition = Random probability = 0.32
                    effects = [[EFFECT_CREATE_GASGIANT]]
                // 20% asteroid, 20% gasgiant = 60% none
                If condition = Random probability = 0.2
                    effects = [[EFFECT_CREATE_ASTEROID]]
                else = If condition = Random probability = 0.25
                    effects = [[EFFECT_CREATE_GASGIANT]]
            ]
        EffectsGroup  // High density: max 5 bodies: 0-5 planet, 0-3 asteroid, 0-2 gasgiant (none: 4.39+%)
            scope = And [
                System
                Object id = Source.SystemID
            ]
            activation = And [
                Size high = 5
                (GalaxyPlanetDensity = 3)
            ]
            effects = [
                // 50% asteroid, 12.5% planet 37.5% none
                If condition = Random probability = 0.5
                    effects = [[EFFECT_CREATE_ASTEROID]]
                else = If condition = Random probability = 0.25
                    effects = [[EFFECT_CREATE_PLANET]]
                // 30% 2xplanet, 14% planet+asteroid, 10% asteroid = 46% none
                If condition = Random probability = 0.5
                    effects = If condition = Random probability = 0.6
                            effects = [
                                [[EFFECT_CREATE_PLANET]]
                                [[EFFECT_CREATE_PLANET]]
                            ]
                        else = If condition = Random probability = 0.7
                            effects = [
                                [[EFFECT_CREATE_PLANET]]
                                [[EFFECT_CREATE_ASTEROID]]
                            ]
                else = If condition = Random probability = 0.2
                    effects = [[EFFECT_CREATE_ASTEROID]]
                // 35% planet, 19.5% gasgiant = 45.5% none
                If condition = Random probability = 0.35
                    effects = [[EFFECT_CREATE_PLANET]]
                else = If condition = Random probability = 0.3
                    effects = [[EFFECT_CREATE_GASGIANT]]
                // 20% planet, 24% gasgiant = 56% none
                If condition = Random probability = 0.2
                    effects = [[EFFECT_CREATE_PLANET]]
                else = If condition = Random probability = 0.3
                    effects = [[EFFECT_CREATE_GASGIANT]]
            ]
'''

EFFECT_CREATE_PLANET
'''CreatePlanet
    type = OneOf(Barren, Desert, Inferno, Ocean, Radiated, Swamp, Terran, Toxic, Tundra)
    planetsize = OneOf(Tiny, Small, Medium, Large)
'''

EFFECT_CREATE_ASTEROID
'''CreatePlanet
    type = Asteroids
    planetsize = Asteroids
'''

EFFECT_CREATE_GASGIANT
'''CreatePlanet
    type = GasGiant
    planetsize = GasGiant
'''