-
Notifications
You must be signed in to change notification settings - Fork 1
/
data.lua
237 lines (224 loc) · 6.73 KB
/
data.lua
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
227
228
229
230
231
232
233
234
235
236
237
local properties = require("common-properties")
require("items")
require("entities")
require("equipment")
-- The utility constants are defined in the core mod.
-- Removing this property means trigger-target-types "common" and "ground-unit" do not have to be created.
data.raw["utility-constants"]["default"].default_trigger_target_mask_by_type = nil
-- The "x-unknown" prototypes are defined in the core mod.
-- Setting the subgroup to an existing one means the default subgroup "fluid" does not have to be created.
data.raw["fluid"]["fluid-unknown"].subgroup = "other"
-- Setting the collision mask to something walkable means the game accepts this as the needed tile prototype.
data.raw["tile"]["tile-unknown"].collision_mask = {"ground-tile"}
-- Miscellaneous prototypes that are required by the required prototypes. Mostly categories.
data:extend({
{
type = "recipe-category",
name = "crafting"
},
{
type = "resource-category",
name = "basic-solid"
},
{
type = "fuel-category",
name = "chemical"
},
{
type = "ammo-category",
name = "dummy-ammo-category"
},
{
type = "equipment-category",
name = "dummy-equipment-category"
},
{
type = "module-category",
name = "dummy-module-category"
},
{
type = "optimized-particle",
name = "dummy-optimized-particle",
life_time = 2,
pictures = properties.animation(),
render_layer = properties.render_layer,
render_layer_when_on_ground = properties.render_layer
},
properties.add_icon
{
type = "item-group",
name = "dummy-item-group"
}
})
-- The remaining core prototypes
-- Core prototypes are named prototypes that the game requires to always exist, for example a "signal-everything" virtual signal.
-- Core prototypes that are items or entities are included in items.lua and entities.lua respectively.
data:extend({
{
type = "item-subgroup",
name = "other",
group = "dummy-item-group"
},
{
type = "equipment-grid",
name = "dummy-equipment-grid",
equipment_categories = {"dummy-equipment-category"},
height = 1,
width = 1
},
properties.add_icon
{
type = "virtual-signal",
name = "signal-everything",
subgroup = "other"
},
properties.add_icon
{
type = "virtual-signal",
name = "signal-anything",
subgroup = "other"
},
properties.add_icon
{
type = "virtual-signal",
name = "signal-each",
subgroup = "other"
},
{
type = "damage-type",
name = "physical"
},
{
type = "damage-type",
name = "impact"
},
{
type = "trivial-smoke",
name = "smoke-building",
animation = properties.animation(),
duration = 1,
cyclic = true
}
})
-- The map settings are required, despite not being a core prototype. These map settings are simply a copy from the base mod.
data:extend({
{
type="map-settings",
name="map-settings",
pollution=
{
enabled=true,
diffusion_ratio=0.02,
min_to_diffuse=15,
ageing=1,
expected_max_per_chunk=150,
min_to_show_per_chunk=50,
min_pollution_to_damage_trees = 60,
pollution_with_max_forest_damage = 150,
pollution_per_tree_damage = 50,
pollution_restored_per_tree_damage = 10,
max_pollution_to_restore_trees = 20,
enemy_attack_pollution_consumption_modifier = 1
},
enemy_evolution=
{
enabled=true,
time_factor = 0.000004,
destroy_factor = 0.002,
pollution_factor = 0.0000009
},
enemy_expansion=
{
enabled = true,
max_expansion_distance = 7,
friendly_base_influence_radius = 2,
enemy_building_influence_radius = 2,
building_coefficient = 0.1,
other_base_coefficient = 2.0,
neighbouring_chunk_coefficient = 0.5,
neighbouring_base_chunk_coefficient = 0.4;
max_colliding_tiles_coefficient = 0.9,
settler_group_min_size = 5,
settler_group_max_size = 20,
min_expansion_cooldown = 4 * 3600,
max_expansion_cooldown = 60 * 3600
},
unit_group=
{
min_group_gathering_time = 3600,
max_group_gathering_time = 10 * 3600,
max_wait_time_for_late_members = 2 * 3600,
max_group_radius = 30.0,
min_group_radius = 5.0,
max_member_speedup_when_behind = 1.4,
max_member_slowdown_when_ahead = 0.6,
max_group_slowdown_factor = 0.3,
max_group_member_fallback_factor = 3,
member_disown_distance = 10,
tick_tolerance_when_member_arrives = 60,
max_gathering_unit_groups = 30,
max_unit_group_size = 200
},
steering=
{
default=
{
radius = 1.2,
separation_force = 0.005,
separation_factor = 1.2,
force_unit_fuzzy_goto_behavior = false
},
moving=
{
radius = 3,
separation_force = 0.01,
separation_factor = 3,
force_unit_fuzzy_goto_behavior = false
}
},
path_finder=
{
fwd2bwd_ratio = 5,
goal_pressure_ratio = 2,
max_steps_worked_per_tick = 1000,
max_work_done_per_tick = 8000,
use_path_cache = true,
short_cache_size = 5,
long_cache_size = 25,
short_cache_min_cacheable_distance = 10,
short_cache_min_algo_steps_to_cache = 50,
long_cache_min_cacheable_distance = 30,
cache_max_connect_to_cache_steps_multiplier = 100,
cache_accept_path_start_distance_ratio = 0.2,
cache_accept_path_end_distance_ratio = 0.15,
negative_cache_accept_path_start_distance_ratio = 0.3,
negative_cache_accept_path_end_distance_ratio = 0.3,
cache_path_start_distance_rating_multiplier = 10,
cache_path_end_distance_rating_multiplier = 20,
stale_enemy_with_same_destination_collision_penalty = 30,
ignore_moving_enemy_collision_distance = 5,
enemy_with_different_destination_collision_penalty = 30,
general_entity_collision_penalty = 10,
general_entity_subsequent_collision_penalty = 3,
extended_collision_penalty = 3,
max_clients_to_accept_any_new_request = 10,
max_clients_to_accept_short_new_request = 100,
direct_distance_to_consider_short_request = 100,
short_request_max_steps = 1000,
short_request_ratio = 0.5,
min_steps_to_check_path_find_termination = 2000,
start_to_goal_cost_multiplier_to_terminate_path_find = 2000.0,
overload_levels = {0, 100, 500},
overload_multipliers = {2, 3, 4},
negative_path_cache_delay_interval = 20
},
max_failed_behavior_count = 3,
difficulty_settings =
{
recipe_difficulty = defines.difficulty_settings.recipe_difficulty.normal,
technology_difficulty = defines.difficulty_settings.technology_difficulty.normal,
-- technology_price_multiplier -- not needed
-- research_queue_setting -- not needed
}
}
})