This repository has been archived by the owner on Jun 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.cfg
230 lines (160 loc) · 9.55 KB
/
config.cfg
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
------------------------------
-- old --
------------------------------
------------------------------
------------------------------
------------------------------
------------------------------
-- DEBUG --
------------------------------
-- TODO debug path (JAK USTALANE??)
-- TODO some global verbose level??
-- Path for creating debug files
--DebugOutPath = 'tests/out/'
-- Drawing images of each step of generation
GraphGeneratorDrawSteps = true
-- Drawing final generation image
GraphGeneratorDrawFinal = true
-- Drawing images keep dot source files
GraphGeneratorDrawKeepDotSources = true
------------------------------
-- params/DetailedParams --
------------------------------
-- Assumption on a default side of average zone (for S-size map)
StandardZoneSize = 18
-- How much zone side is increased/decreased depending on parameter's choice and map size
ZoneSizeStep = 3
------------------------------
-- params/LMLInitializer --
------------------------------
-- Maxmimal level that a zone can have
MaxZoneLevel = 10
-- Level of zone where the player starts (there is minor chance for +1 for two highest difficulty levels)
MinLocalZoneLevel = 1
-- Chance for an additional start town (2 max), depending on Towns frequency parameter value
StartTownChance = {0, 0, 0, 0.1, 0.3}
-- Chance for a town in local zones, depending on Towns frequency parameter value
LocalTownChance = {0.05, 0.15, 0.25, 0.35, 0.45}
-- Weights for town types in local zones: RACE (player's race), NEUTRAL (chosen by the generator), or RANDOM (chosen during the map load).
LocalTownType = {{key='RACE', value=5}, {key='NEUTRAL', value=4}, {key='RANDOM', value=1}}
-- Chance for a NEUTRAL/RANDOM town in non-local zones, depending on Towns frequency parameter value
BufferTownChance = {0.1, 0.2, 0.3, 0.4, 0.5}
-- Weights for town types in local zones: RACE (player's race), NEUTRAL (chosen by the generator), or RANDOM (chosen during the map load).
BufferTownType = {{key='RACE', value=4}, {key='NEUTRAL', value=5}, {key='RANDOM', value=1}}
-- Chance for base mines (wood+ore) in player towns, depending on welfare parameter value (1-low, 5-high)
MineBasePlayerTownChance = {0.6, 1.0, 1.0, 1.0, 1.0}
-- Chance for primary mines (town-dependent resources or random for RANDOM) in player towns, depending on welfare parameter value (1-low, 5-high)
MinePrimaryPlayerTownChance = {0.2, 0.3, 0.5, 0.7, 0.9}
-- Chance for gold mine in player towns, depending on welfare parameter value (1-low, 5-high)
MineGoldPlayerTownChance = {0.0, 0.0, 0.0, 0.0, 0.1}
-- Chance for base mines (wood+ore) in all non-player towns, depending on welfare parameter value (1-low, 5-high)
MineBaseOtherTownChance = {0.2, 0.5, 0.7, 0.9, 1.0}
-- Chance for primary mines (town-dependent resources or random for RANDOM) in all non-player towns, depending on welfare parameter value (1-low, 5-high)
MinePrimaryOtherTownChance = {0.1, 0.2, 0.3, 0.4, 0.5}
-- Chance for gold mine in all non-player towns, depending on welfare parameter value (1-low, 5-high)
MineGoldOtherTownChance = {0.0, 0.0, 0.1, 0.2, 0.3}
-- Max number of RANDOM mines in no-town local zones, depending on welfare parameter value (1-low, 5-high)
MineRandomLocalMax = {1, 1, 2, 3, 3}
-- Chance for random mine in no-town local zones (depending on welfare)
MineRandomLocalChance = {0.1, 0.2, 0.3, 0.4, 0.5}
-- Max number of RANDOM mines in no-town buffer zones, depending on welfare parameter value (1-low, 5-high)
MineRandomBufferMax = {1, 2, 3, 3, 4}
-- Chance for random mine in no-town buffer zones (depending on welfare)
MineRandomBufferChance = {0.1, 0.2, 0.3, 0.4, 0.5}
-- Fraction (from the lowest) of buffer zones that have sure first outer
OuterBufferFixed = 0.5
-- Probability for the remaining zones to have their first outer
OuterBufferRemainingChance = 0.5
-- Max additional outers (no more than #players-1) depending on branching parameter value (1-low, 5-high)
OuterBufferExtraMax = {0, 1, 2, 2, 3}
-- Chance for additional outers depending on branching parameter value (1-low, 5-high)
OuterBufferExtraChance = {0.1, 0.1, 0.1, 0.2, 0.2}
-- Weights for increasing/decreasing buffer outer level given the zone's level
OuterBufferDifficulty = { {key=-1, value=0}, {key=0, value=2}, {key=1, value=2}, {key=2, value=1}}
-- Minimal level of local zone that can contain outer, depending on pvp focus parameter value (1-high, 5-low)
OuterLocalSafetyLevel = {1, 2, 2, 3, 4}
-- Max local outers (no more than #players-1) depending on branching parameter value (1-low, 5-high)
OuterLocalMax = {1, 1, 2, 2, 3}
-- Chance for local outers depending on branching parameter value (1-low, 5-high)
OuterLocalChance = {0.1, 0.1, 0.1, 0.2, 0.2}
-- Modifier of local zone outer levels depending on pvp focus parameter value (1-high, 5-low)
OuterLocalLevelBonus = {-1, -0.5, 0, 0.5, 1}
-- Zones required for additional teleport roll (lower number means more chance for monoliths)
TeleportZonesPerBatch = 10
-- Teleport (monolith) roll maximum (threshold is 5 for the lowest branching and 1 for the highest)
TeleportRollLimit = 5.0
-- Maximum instances of teleport in single-player part of the map
TeleportSingleMax = 2
------------------------------
-- lml/GraphGenerator --
------------------------------
-- The upper bound for the number of production application tries (error when it is exceeded)
GrammarMaxSteps = 100
-- Set weight for each production. Weights can be constant numbers or names of parameters from 'paramsDetailed'
Grammar = {
{'PushOutGreaterThenPivot', 15}, -- For the first non-final node divides it content using random pivot and push out new node containing greater elements
{'DivideEqualHorizontally', 15}, -- For the first non-final node, if it contains only one-class zones, divides it content into new final nodes and put them horizontally (edges copying depends on 'branching' value)
{'DuplicateEdge' ,'branching'}, -- Duplicates random edge (if there is only one edge between the nodes)
{'ConnectDistantNodes' ,'branching'}, -- Adds edge between two random previously not connected nodes (only local-local or nonlocal-nonlocal)
{'AlwaysFail' , 0} -- Test production that always fails
}
-- Values for sorting lists of local zones by their interestingness
FeatureInterestingnessValuesLocal = { TOWN = 5, BASEMINE = 1, PRIMARYMINE = 2, RANDOMMINE = 2, GOLDMINE = 3, OUTER = 5.5, TELEPORT = 2,}
-- Values for sorting lists of buffer by their interestingness
FeatureInterestingnessValuesBuffer = { TOWN = 5, BASEMINE = 1, PRIMARYMINE = 2, RANDOMMINE = 2, GOLDMINE = 3, OUTER = 2, TELEPORT = 3,}
-- Ratio modifying chance for pushing high buffer zones from locals (geometric progression) in PushOutGreaterThenPivot production , depending on pvp focus parameter value (1-high, 5-low)
PushOutDistantPivotRatio = {1.2, 1.05, 1.0, 0.95, 0.8}
-- Chance for copying all divided node connections in DivideEqualHorizontally production, depending on branching parameter value (1-low, 5-high)
DivideEqualCopyConnectionsChance = {0.0, 0.5, 0.8, 1.0, 1.0}
------------------------------
-- TOWNS and MINES --
------------------------------
-- Influences the probabilities of picking each town type when NEUTRAL town type is placed
TownNeutralWeights = {Castle=1, Rampart=1, Tower=1, Inferno=1, Necropolis=1, Dungeon=1, Stronghold=1, Fortress=1, Conflux=0}
-- Which mines are considered as PRIMARY for which race (town type) (see http://www.heroesofmightandmagic.com/heroes3/towncosts.shtml)
MinesPrimaryPerRace = {
Castle={'Gems', 'Crystal'},
Rampart={'Crystal','Gems'},
Tower={'Gems', 'Crystal'},
Inferno={'Mercury','Sulfur'},
Necropolis={'Mercury','Sulfur'},
Dungeon={'Sulfur','Gems'},
Stronghold={'Crystal','Gems'},
Fortress={'Sulfur','Mercury'},
Conflux={'?','?'},
}
-- Influences the probabilities of picking each mine type in local zones when RANDOM mine is placed in local zone
MinesRandomLocalWeights = {
[1]={Wood=6,Ore=6,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[2]={Wood=6,Ore=6,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[3]={Wood=5,Ore=5,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[4]={Wood=4,Ore=4,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[5]={Wood=3,Ore=3,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[6]={Wood=2,Ore=2,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[7]={Wood=1,Ore=1,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[8]={Wood=1,Ore=1,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=2},
[9]={Wood=1,Ore=1,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=3},
[10]={Wood=0,Ore=0,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=4},
}
-- Influences the probabilities of picking each mine type in local zones when RANDOM mine is placed in buffer zone
MinesRandomBufferWeights = {
[1]={Wood=4,Ore=4,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[2]={Wood=4,Ore=4,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[3]={Wood=4,Ore=4,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[4]={Wood=3,Ore=3,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[5]={Wood=3,Ore=3,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[6]={Wood=2,Ore=2,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=1},
[7]={Wood=1,Ore=1,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=2},
[8]={Wood=1,Ore=1,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=2},
[9]={Wood=0,Ore=0,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=3},
[10]={Wood=0,Ore=0,Mercury=2,Sulfur=2,Crystal=2,Gems=2,Gold=4},
}
------------------------------
-- FUTURE --
------------------------------
------------------------------
-- FUTURE --
------------------------------
-- TODO priority and default mines
--
-- TODO Probabilities for NEUTRAL castles // if one want Rampart-only map, etc ^^