├── LICENSE
├── README.md
├── alien-module
├── changelog.txt
├── control.lua
├── data-final-fixes.lua
├── data.lua
├── graphics
│ ├── alien-hyper-magazine.png
│ ├── alien-magazine.png
│ ├── alien-module-1.png
│ ├── alien-module-2.png
│ ├── alien-module-3.png
│ ├── alien-module-4.png
│ ├── alien-module-5.png
│ ├── alien-ore-magazine.png
│ ├── artifact-ore.png
│ └── item-group
│ │ └── module.png
├── info.json
├── locale
│ ├── en
│ │ └── names.cfg
│ └── zh-CN
│ │ └── alien-module_0.4.3.cfg
├── migrations
│ ├── alien-module_0.1.5.json
│ ├── alien-module_0.2.0.lua
│ ├── alien-module_0.2.2.lua
│ ├── alien-module_0.2.3.lua
│ ├── alien-module_0.4.5.lua
│ ├── alien-module_1.0.9.lua
│ ├── alien-module_1.4.4.lua
│ ├── alien-module_1.4.5.lua
│ └── alien-module_1.4.9.lua
├── prototypes
│ ├── entity
│ │ └── entity.lua
│ ├── item-group
│ │ └── item-groups-module.lua
│ ├── item
│ │ ├── alien-components.lua
│ │ ├── alien-economy.lua
│ │ ├── alien-module.lua
│ │ └── alien-warfare.lua
│ ├── recipe
│ │ ├── alien-module.lua
│ │ └── alien-warfare.lua
│ ├── sounds.lua
│ └── technology
│ │ └── technology.lua
├── settings.lua
├── sound
│ └── level_up.ogg
└── thumbnail.png
├── pom.xml
└── src
├── config.properties
└── package.xml
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 renoth
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # factorio-alien-module
2 | A mod for factorio [Link to mod portal](https://mods.factorio.com/mod/alien-module)
3 |
4 | Biters now drop alien ore from which you can smelt alien plates that you can use in alien recipes.
5 |
6 | ## Building the mod
7 |
8 | With maven installed issue the following command:
9 |
10 | `mvn assembly:single install`
11 |
12 | The target folder should now contain the mod zip file. All zipfiles from the target-folder will get copied to the configured factorio mod folder.
13 |
14 | The factorio mod folder can be configured in
15 |
16 | `src/config.properties`
17 |
--------------------------------------------------------------------------------
/alien-module/changelog.txt:
--------------------------------------------------------------------------------
1 | ---------------------------------------------------------------------------------------------------
2 | Version: 2.0.14
3 | Changes:
4 | - fixed quality and space age being required dependencies
5 | ---------------------------------------------------------------------------------------------------
6 | Version: 2.0.13
7 | Changes:
8 | - fix quality hypermodule recipes not updating correctyl
9 | ---------------------------------------------------------------------------------------------------
10 | Version: 2.0.12
11 | Changes:
12 | - make GUI Window a bit smaller
13 | - fix negative progress bug?
14 | ---------------------------------------------------------------------------------------------------
15 | Version: 2.0.11
16 | Changes:
17 | - removed Alien Steel since it is not used anywhere
18 | ---------------------------------------------------------------------------------------------------
19 | Version: 2.0.10
20 | Bugfix:
21 | - Added custom weight to alien items (for balanced rocket loading)
22 | ---------------------------------------------------------------------------------------------------
23 | Version: 2.0.9
24 | Bugfix:
25 | - Fix Nil error in control.lua
26 | ---------------------------------------------------------------------------------------------------
27 | Version: 2.0.7
28 | Bugfix:
29 | - Fix Nil error in control.lua
30 | ---------------------------------------------------------------------------------------------------
31 | Version: 2.0.6
32 | Bugfix:
33 | - Fix changelog
34 | ---------------------------------------------------------------------------------------------------
35 | Version: 2.0.5
36 | Bugfix:
37 | - Reenable upgrading logistic slots again (after migrating to new API)
38 | - Preserve quality on upgrading Hyper Modules
39 | ---------------------------------------------------------------------------------------------------
40 | Version: 2.0.4
41 | Bugfix:
42 | - Make https://mods.factorio.com/mod/Productivity a necessary dependency because of the productivity changes in 2.0.11
43 |
--------------------------------------------------------------------------------
/alien-module/control.lua:
--------------------------------------------------------------------------------
1 | script.on_init(function()
2 | if storage.ignoredalienmodulefactions == nil then
3 | storage.ignoredalienmodulefactions = { enemy = true, neutral = true, _ABANDONED_ = true, _DESTROYED_ = true }
4 | end
5 | initVariables()
6 | verifyCountersForForce("player") -- initialize single player
7 | init_gui()
8 | end)
9 |
10 | script.on_load(function()
11 | verifyCountersForForce("player") -- initialize single player
12 | initVariables()
13 | end)
14 |
15 | -- Calculate module level, minimum 1 maximum 100
16 | function modulelevel(forceName)
17 | local exponent = settings.startup["alien-module-level-exponent"].value
18 |
19 | if (storage.killcount[forceName] == nil) then
20 | storage.killcount[forceName] = 0
21 | end
22 |
23 | if (storage.killcount[forceName] < 10000) then
24 | return math.min(math.max(math.log((storage.killcount[forceName] + 1) * 0.1) * math.pow((storage.killcount[forceName]), exponent), 1) * math.sqrt((storage.killcount[forceName] * 0.0001)), 100)
25 | else
26 | return math.min(math.max(math.log((storage.killcount[forceName] + 1) * 0.1) * math.pow((storage.killcount[forceName]), exponent), 1), 100)
27 | end
28 | end
29 |
30 | function roundModuleLevel(forceName)
31 | return math.floor(modulelevel(forceName) * 1000 + 0.5) / 1000
32 | end
33 |
34 | function initVariables()
35 | if storage.currentmodulelevel == nil then
36 | storage.currentmodulelevel = {}
37 | end
38 | if storage.modulelevel == nil then
39 | storage.modulelevel = {}
40 | end
41 | if storage.killcount == nil then
42 | storage.killcount = {}
43 | end
44 | end
45 |
46 | function init_gui()
47 | for _, player in pairs(game.players) do
48 | player.gui.top.add { type = "frame", name = "alienmodule", direction = "vertical" }
49 | player.gui.top.alienmodule.add { type = "label", name = "killcount", caption = "TEST" }
50 | player.gui.top.alienmodule.add { type = "progressbar", name = "killbar" }
51 |
52 | verifyCountersForForce(player.force.name)
53 | player.gui.top.alienmodule.killbar.value = math.max(roundModuleLevel(player.force.name) - storage.modulelevel[player.force.name], 0)
54 | end
55 | end
56 |
57 | -- pretty print a variable var
58 | function pp(force, key, param)
59 | for _, player in pairs(force.players) do
60 | if type(key) == "string" then
61 | player.print({ key, param })
62 | end
63 | end
64 | end
65 |
66 | function verifyCountersForForce(forceName)
67 | if (tonumber(storage.currentmodulelevel) ~= nil) then
68 | storage.currentmodulelevel = {}
69 | storage.modulelevel = {}
70 | storage.killcount = {}
71 | end
72 |
73 | if not storage.currentmodulelevel[forceName] then
74 | storage.currentmodulelevel[forceName] = 1
75 | end
76 | if not storage.modulelevel[forceName] then
77 | storage.modulelevel[forceName] = 1
78 | end
79 | if not storage.killcount[forceName] then
80 | storage.killcount[forceName] = 0
81 | end
82 | end
83 |
84 | function update_gui()
85 | for _, player in pairs(game.players) do
86 | if player.gui.top.killcount ~= nil then
87 | player.gui.top.killcount.destroy()
88 | end
89 |
90 | if player.gui.top.killbar ~= nil then
91 | player.gui.top.killbar.destroy()
92 | end
93 |
94 | if player.gui.top.alienmodule == nil then
95 | player.gui.top.add { type = "frame", name = "alienmodule", direction = "vertical" }
96 | end
97 |
98 | if player.gui.top.alienmodule.killcount == nil then
99 | player.gui.top.alienmodule.add { type = "label", name = "killcount", caption = "0" }
100 | end
101 |
102 | if player.gui.top.alienmodule.killbar == nil then
103 | player.gui.top.alienmodule.add { type = "progressbar", name = "killbar" }
104 | end
105 | verifyCountersForForce(player.force.name)
106 | player.gui.top.alienmodule.killcount.caption = { 'gui.label', roundModuleLevel(player.force.name), storage.killcount[player.force.name] }
107 | player.gui.top.alienmodule.killbar.value = math.max(roundModuleLevel(player.force.name) - storage.modulelevel[player.force.name], 0)
108 | end
109 | end
110 |
111 | function update_modules(forceName, entities, entityType)
112 | for _, entity in pairs(entities) do
113 | local inventory --what type of inventory does this entity have?
114 |
115 | if entityType == "chest" then
116 | inventory = entity.get_inventory(defines.inventory.chest) --grab a chest's inventory
117 |
118 | -- upgrade logistc requests
119 | local logistics_point = entity.get_requester_point()
120 | if logistics_point ~= nil then
121 | for i = 1, logistics_point.sections_count do
122 | local section = logistics_point.get_section(i)
123 | for ii = 1, section.filters_count do
124 | local slot = section.get_slot(ii)
125 | if slot ~= nil
126 | and slot.value ~= nil
127 | and slot.value.name == "alien-hyper-module-" .. storage.currentmodulelevel[forceName] - 1 then
128 | local current_filter = section.get_slot(ii)
129 | section.set_slot(ii, { value = { name = "alien-hyper-module-" .. storage.currentmodulelevel[forceName], quality = current_filter.value.quality, comparator = current_filter.value.comparator },
130 | min = current_filter.min,
131 | max = current_filter.max })
132 | end
133 | end
134 | end
135 | end
136 |
137 | elseif entityType == "machine" then
138 | inventory = entity.get_module_inventory() --grab a machine's inventory
139 | elseif entityType == "player" then
140 | inventory = entity.get_main_inventory(defines.inventory.player_main) --grab a player's inventory
141 |
142 | -- update currently held items
143 | if entity.cursor_stack ~= nil and entity.cursor_stack.valid_for_read then
144 | if string.find(entity.cursor_stack.name, "^alien%-hyper%-module") then
145 | --if theres a module in this inventory slot
146 | if tonumber(string.match(entity.cursor_stack.name, "%d+$")) < storage.currentmodulelevel[forceName] then
147 | --and its level is less than the "current" one
148 | local old_count = entity.cursor_stack.count
149 | local old_quality = entity.cursor_stack.quality
150 | entity.cursor_stack.clear() --clear the slot
151 | entity.cursor_stack.set_stack({ name = "alien-hyper-module-" .. math.min(storage.currentmodulelevel[forceName], 100), count = old_count, quality = old_quality }) --add the updated level modules with whatever amount we recorded
152 | end
153 | end
154 |
155 | if string.find(entity.cursor_stack.name, "^alien%-hyper%-magazine") then
156 | --if theres a module in this inventory slot
157 | if tonumber(string.match(entity.cursor_stack.name, "%d+$")) < storage.currentmodulelevel[forceName] then
158 | --and its level is less than the "current" one
159 | local old_count = entity.cursor_stack.count
160 | local old_quality = entity.cursor_stack.quality
161 |
162 | entity.cursor_stack.clear() --clear the slot
163 | entity.cursor_stack.set_stack({ name = "alien-hyper-magazine-" .. math.min(storage.currentmodulelevel[forceName], 100), count = old_count, quality = old_quality }) --add the updated level modules with whatever amount we recorded
164 | end
165 | end
166 | end
167 |
168 | -- upgrade logistc requests
169 | local logistics_point = entity.get_requester_point()
170 | if logistics_point ~= nil then
171 | for i = 1, logistics_point.sections_count do
172 | local section = logistics_point.get_section(i)
173 | for ii = 1, section.filters_count do
174 | local slot = section.get_slot(ii)
175 | if slot ~= nil
176 | and slot.value ~= nil
177 | and slot.value.name == "alien-hyper-module-" .. storage.currentmodulelevel[forceName] - 1 then
178 | local current_filter = slot
179 | section.set_slot(ii, { value = { name = "alien-hyper-module-" .. storage.currentmodulelevel[forceName], quality = current_filter.value.quality, comparator = current_filter.value.comparator },
180 | min = current_filter.min,
181 | max = current_filter.max })
182 | end
183 | end
184 | end
185 | end
186 | else
187 | return --error entity type not defined
188 | end
189 |
190 | if inventory == nil then
191 | return
192 | end
193 |
194 | for i = 1, #inventory, 1 do
195 | --loop through all of the entity's inventory slots
196 | local status, err = pcall(function()
197 | if string.find(inventory[i].name, "^alien%-hyper%-module") then
198 | --if theres a module in this inventory slot
199 | if tonumber(string.match(inventory[i].name, "%d+$")) < storage.currentmodulelevel[forceName] then
200 | --and its level is less than the "current" one
201 | local old_count = inventory[i].count --record amount
202 | local old_quality = inventory[i].quality --record quality
203 |
204 | inventory[i].clear() --clear the slot
205 |
206 | if entityType == "player" and inventory.get_filter(i) ~= nil then
207 | -- check if slot is filtered
208 | inventory.set_filter(i, { name = "alien-hyper-module-" .. math.min(storage.currentmodulelevel[forceName], 100), quality = old_quality }) --update filter
209 | end
210 |
211 | inventory[i].set_stack({ name = "alien-hyper-module-" .. math.min(storage.currentmodulelevel[forceName], 100), count = old_count, quality = old_quality }) --add the updated level modules with whatever amount we recorded
212 | end
213 | end
214 |
215 | if string.find(inventory[i].name, "^alien%-hyper%-magazine") then
216 | --if theres a module in this inventory slot
217 | if tonumber(string.match(inventory[i].name, "%d+$")) < storage.currentmodulelevel[forceName] then
218 | --and its level is less than the "current" one
219 | local old_count = inventory[i].count --record amount
220 | local old_quality = inventory[i].quality --record quality
221 |
222 | inventory[i].clear() --clear the slot
223 |
224 | if entityType == "player" and inventory.get_filter(i) ~= nil then
225 | -- check if slot is filtered
226 | inventory.set_filter(i, "alien-hyper-magazine-" .. math.min(storage.currentmodulelevel[forceName], 100)) --update filter
227 | end
228 |
229 | inventory[i].set_stack({ name = "alien-hyper-magazine-" .. math.min(storage.currentmodulelevel[forceName], 100), count = old_count, quality = old_quality })
230 | --add the updated level modules with whatever amount we recorded
231 | end
232 | end
233 | end)
234 | end
235 | end
236 | end
237 |
238 | function update_ammo(forceName, turrets)
239 | for _, entity in pairs(turrets) do
240 | local inventory = entity.get_inventory(defines.inventory.chest) --grab a chest's inventory
241 |
242 | if inventory == nil then
243 | return
244 | end
245 |
246 | for i = 1, #inventory, 1 do
247 | --loop through all of the entity's inventory slots
248 | local status, err = pcall(function()
249 | if string.find(inventory[i].name, "^alien%-hyper%-magazine") then
250 | --if theres hyper ammo in the inventory slot
251 | if tonumber(string.match(inventory[i].name, "%d+$")) < storage.currentmodulelevel[forceName] then
252 | --and its level is less than the "current" one
253 | local stacksize = inventory[i].count --record amount
254 | inventory[i].clear() --clear the slot
255 | inventory[i].set_stack({ name = "alien-hyper-magazine-" .. math.min(storage.currentmodulelevel[forceName], 100), count = stacksize })
256 | end
257 | end
258 | end)
259 | end
260 | end
261 | end
262 |
263 | function update_recipes(assemblers, force)
264 | for _, entity in ipairs(assemblers) do
265 | if entity.get_recipe() ~= nil then
266 | local recipe, quality = entity.get_recipe();
267 |
268 | --if the assembler has a set recipe
269 | if string.find(recipe.name, "^alien%-hyper%-module") then
270 | -- Save the number of modules in the output slot, crafting progress and bonus progress
271 | local finished_module_count = entity.get_inventory(defines.inventory.assembling_machine_output).get_item_count("alien-hyper-module-" .. storage.currentmodulelevel[force.name] - 1)
272 | local crafting_progress = entity.crafting_progress
273 | local bonus_progress = entity.bonus_progress
274 |
275 | if quality ~= nil then
276 | entity.set_recipe(force.recipes["alien-hyper-module-" .. storage.currentmodulelevel[force.name]], quality) --set it to the updated recipe
277 | else
278 | entity.set_recipe(force.recipes["alien-hyper-module-" .. storage.currentmodulelevel[force.name]]) --set it to the updated recipe
279 | end
280 |
281 | -- Add the modules back
282 | if finished_module_count > 0 then
283 | entity.get_inventory(defines.inventory.assembling_machine_output).insert { name = "alien-hyper-module-" .. storage.currentmodulelevel[force.name], count = finished_module_count }
284 | end
285 | -- Restore previous progress
286 | entity.crafting_progress = crafting_progress
287 |
288 | if bonus_progress > 0 and bonus_progress < 1 then
289 | entity.bonus_progress = bonus_progress
290 | end
291 | end
292 |
293 | if settings.startup["alien-module-hyper-ammo-enabled"].value and string.find(entity.get_recipe().name, "^alien%-hyper%-magazine") then
294 | local finished_module_count = entity.get_inventory(defines.inventory.assembling_machine_output).get_item_count("alien-hyper-module-" .. storage.currentmodulelevel[force.name] - 1)
295 |
296 | entity.set_recipe(force.recipes["alien-hyper-magazine-" .. storage.currentmodulelevel[force.name]]) --set it to the updated recipe
297 |
298 | if finished_module_count > 0 then
299 | entity.get_inventory(defines.inventory.assembling_machine_output).insert {
300 | name = "alien-hyper-magazine-" .. storage.currentmodulelevel[force.name],
301 | count = finished_module_count
302 | }
303 | end
304 | end
305 | end
306 | end
307 | end
308 |
309 | function update_quickbar(force)
310 | for _, player in pairs(force.players) do
311 | for i = 1, 100 do
312 | local slot = player.get_quick_bar_slot(i)
313 | if slot ~= nil and slot.name == "alien-hyper-module-" .. storage.currentmodulelevel[force.name] - 1 then
314 | player.set_quick_bar_slot(i, "alien-hyper-module-" .. storage.currentmodulelevel[force.name])
315 | end
316 | end
317 | end
318 | end
319 |
320 | function update_logistic_slots(force)
321 | for _, player in pairs(force.players) do
322 | if player.character ~= nil then
323 | --for i = 1, player.character.request_slot_count do
324 | -- local slot = player.get_personal_logistic_slot(i)
325 | -- if slot ~= nil and slot.name == "alien-hyper-module-" .. storage.currentmodulelevel[force.name] - 1 then
326 | -- player.set_personal_logistic_slot(i, { name = "alien-hyper-module-" .. storage.currentmodulelevel[force.name], min = slot.min, max = slot.max })
327 | -- end
328 | --
329 | -- if settings.startup["alien-module-hyper-ammo-enabled"].value and slot ~= nil and slot.name == "alien-hyper-magazine-" .. storage.currentmodulelevel[force.name] - 1 then
330 | -- player.set_personal_logistic_slot(i, { name = "alien-hyper-magazine-" .. storage.currentmodulelevel[force.name], min = slot.min, max = slot.max })
331 | -- end
332 | --end
333 | end
334 | end
335 | end
336 |
337 | --[[function update_trash_slots(players)
338 | for _, player in pairs(players) do
339 | local old_trash = player.auto_trash_filters
340 | local new_trash = {}
341 |
342 | for key, value in ipairs(old_trash) do
343 | player.print(key)
344 | player.print(value)
345 | if key ~= nil and key == "alien-hyper-module-" .. storage.currentmodulelevel - 1 then
346 | new_trash.insert("alien-hyper-module-" .. storage.currentmodulelevel, value)
347 | else
348 | new_trash.insert(key, value)
349 | end
350 | end
351 |
352 | player.print(new_trash)
353 |
354 | player.auto_trash_filters = new_trash
355 | end
356 | end]]
357 |
358 | function update_enabled_recipe(force)
359 | if force.technologies["automation"].researched then
360 | if storage.currentmodulelevel[force.name] > 1 then
361 | force.recipes["alien-hyper-module-1"].enabled = false
362 | force.recipes["alien-hyper-module-" .. storage.currentmodulelevel[force.name] - 1].enabled = false
363 | force.recipes["alien-hyper-module-" .. storage.currentmodulelevel[force.name]].enabled = true
364 | end
365 | end
366 |
367 | if force.technologies["military"].researched and settings.startup["alien-module-hyper-ammo-enabled"].value then
368 | if storage.currentmodulelevel[force.name] > 1 then
369 | force.recipes["alien-hyper-magazine-1"].enabled = false
370 | force.recipes["alien-hyper-magazine-" .. storage.currentmodulelevel[force.name] - 1].enabled = false
371 | force.recipes["alien-hyper-magazine-" .. storage.currentmodulelevel[force.name]].enabled = true
372 | else
373 | force.recipes["alien-hyper-magazine-1"].enabled = true
374 | end
375 | end
376 | end
377 |
378 | -- not in use yet, prototype for later use
379 | function update_modules_on_surface(surface, force)
380 | local names = {}
381 | local modulesOnGround = surface.find_entities_filtered { force = force, name = 'item-on-ground' }
382 | local current_module_name = 'alien-hyper-module-' .. tostring(math.min(storage.currentmodulelevel[force.name], 100))
383 | local current_magazine_name = 'alien-hyper-magazine-' .. tostring(math.min(storage.currentmodulelevel[force.name], 100))
384 |
385 | for index, module_on_ground in pairs(modulesOnGround) do
386 | --game.print(module_on_ground.stack.name)
387 | local real_name = module_on_ground.stack.name
388 | local module_pos = module_on_ground.position
389 | local item_count = module_on_ground.stack.count
390 | if (string.find(real_name, "^alien%-hyper%-module") and real_name ~= current_module_name) then
391 | module_on_ground.destroy()
392 | surface.create_entity { name = 'item-on-ground', position = module_pos, stack = { name = current_module_name, count = item_count } }
393 | end
394 |
395 | if settings.startup["alien-module-hyper-ammo-enabled"].value and (string.find(real_name, "^alien%-hyper%-magazine") and real_name ~= current_magazine_name) then
396 | module_on_ground.destroy()
397 | surface.create_entity { name = 'item-on-ground', position = module_pos, stack = { name = current_magazine_name, count = item_count } }
398 | end
399 | end
400 | end
401 |
402 | script.on_event(defines.events.on_player_created, function(event)
403 | local forceName = game.players[event.player_index].force.name
404 | if not storage.currentmodulelevel[forceName] then
405 | storage.currentmodulelevel[forceName] = 1
406 | end
407 | if not storage.modulelevel[forceName] then
408 | storage.modulelevel[forceName] = 1
409 | end
410 | if not storage.killcount[forceName] then
411 | storage.killcount[forceName] = 0
412 | end
413 | end)
414 |
415 | -- if an entity is killed, raise killcount
416 | script.on_event(defines.events.on_entity_died, function(event)
417 | local forceName = event.force.name
418 | if not storage.killcount[forceName] then
419 | storage.killcount[forceName] = 0
420 | end
421 |
422 | if (event.entity.type == "unit" and event.entity.force.name == "enemy") then
423 | storage.killcount[forceName] = storage.killcount[forceName] + 1
424 | end
425 | end)
426 |
427 |
428 | -- Every 10 seconds: calculate the module level and upgrade hyper modules if level floor value changed
429 | script.on_nth_tick(600, function(event)
430 |
431 | update_gui()
432 |
433 | -- if the modulelevel is raised by the kill, increase the level of all hyper modules by finding and replacing them
434 | for _, force in pairs(game.forces) do
435 | if not storage.ignoredalienmodulefactions[force.name] then
436 | local forceName = force.name
437 | -- check for force if not present
438 | verifyCountersForForce(forceName)
439 |
440 | storage.modulelevel[forceName] = math.max(math.floor(modulelevel(forceName)), 1)
441 | if (storage.modulelevel[forceName] > storage.currentmodulelevel[forceName]) then
442 | storage.currentmodulelevel[forceName] = storage.currentmodulelevel[forceName] + 1
443 |
444 | --update what module recipe is enabled
445 | update_enabled_recipe(force)
446 |
447 | for _, surface in pairs(game.surfaces) do
448 | local assemblers = surface.find_entities_filtered { force = forceName, type = "assembling-machine" }
449 | local miners = surface.find_entities_filtered { force = forceName, type = "mining-drill" }
450 | local labs = surface.find_entities_filtered { force = forceName, type = "lab" }
451 | local furnaces = surface.find_entities_filtered { force = forceName, type = "furnace" }
452 | local rocketSilos = surface.find_entities_filtered { force = forceName, name = "rocket-silo" }
453 | local chests = surface.find_entities_filtered { force = forceName, type = "container" }
454 | local logisticChests = surface.find_entities_filtered { force = forceName, type = "logistic-container" }
455 | local beacons = surface.find_entities_filtered { force = forceName, type = "beacon" }
456 | local turrets = surface.find_entities_filtered { force = forceName, type = "ammo-turret" }
457 |
458 | update_modules(forceName, assemblers, "machine")
459 | update_modules(forceName, miners, "machine")
460 | update_modules(forceName, labs, "machine")
461 | update_modules(forceName, furnaces, "machine")
462 | update_modules(forceName, rocketSilos, "machine")
463 | update_modules(forceName, chests, "chest")
464 | update_modules(forceName, logisticChests, "chest")
465 | update_modules(forceName, beacons, "machine")
466 |
467 | if settings.startup["alien-module-hyper-ammo-enabled"].value then
468 | update_ammo(forceName, turrets)
469 | end
470 |
471 | -- for _, force in pairs(game.forces) do
472 | update_recipes(assemblers, force)
473 | -- end
474 |
475 | update_modules_on_surface(surface, force)
476 | end
477 | update_modules(force.name, force.players, "player")
478 | -- play level up sound
479 | for _, player in pairs(force.players) do
480 | player.play_sound { path = 'alien-level-up' }
481 | end
482 | update_quickbar(force)
483 | update_logistic_slots(force)
484 | -- update_trash_slots(players)
485 | pp(force, 'gui.module-upgraded', storage.modulelevel[force.name])
486 | else
487 | --every 10 seconds update what module recipe is enabled
488 | if event.tick % 600 == 0 then
489 | update_enabled_recipe(force)
490 | end
491 | end
492 | end
493 | end
494 | end)
495 |
496 | -- Commands
497 | commands.add_command("log_am", nil, function(command)
498 | for name, player in pairs(game.players) do
499 | log(name .. " Player: " .. player.name .. ", force: " .. player.force.name .. ", module level: " .. storage.currentmodulelevel[player.force.name] .. ", current module level: " .. modulelevel(player.force.name) .. ", kill count: " .. storage.killcount[player.force.name])
500 | end
501 | end)
502 |
--------------------------------------------------------------------------------
/alien-module/data-final-fixes.lua:
--------------------------------------------------------------------------------
1 | local loot_to_add = { "artifact-ore" }
2 |
3 | function RampantAddLootToCategory(category, c_max)
4 | for name, table_entry in pairs(data.raw[category]) do
5 | v, tier = string.match(name, "%-v(%d+)%-t(%d+)%-rampant")
6 | if v ~= nil and tier ~= nil then
7 | if table_entry.loot == nil then
8 | table_entry.loot = {}
9 | end
10 | for _, loot in pairs(loot_to_add) do
11 | local already_has_loot = false
12 | for _, loot_entry in pairs(table_entry.loot) do
13 | if loot_entry.item == loot then
14 | already_has_loot = true
15 | end
16 | end
17 | if not already_has_loot then
18 | table.insert(table_entry.loot, {
19 | item = loot,
20 | probability = 1,
21 | count_min = 1,
22 | count_max = c_max * tier,
23 | })
24 | -- log("added loot " .. loot .. " (" .. p .. "," .. c_min .. "," .. c_max .. ") to " .. name)
25 | else
26 | -- log("skipping loot " .. loot .. " for " .. name)
27 | end
28 |
29 | log(name .. "current loot " .. serpent.line(table_entry.loot))
30 | end
31 | end
32 | end
33 | end
34 |
35 | RampantAddLootToCategory("turret", settings.startup["rampant-alienmodule-compat-max-count-turret"].value)
36 | RampantAddLootToCategory("unit-spawner", settings.startup["rampant-alienmodule-compat-max-count-spawner"].value)
--------------------------------------------------------------------------------
/alien-module/data.lua:
--------------------------------------------------------------------------------
1 | require("prototypes.entity.entity")
2 |
3 | require("prototypes.item.alien-module")
4 | require("prototypes.item.alien-components")
5 | require("prototypes.item.alien-warfare")
6 | require("prototypes.item.alien-economy")
7 |
8 | require("prototypes.item-group.item-groups-module")
9 |
10 | require("prototypes.recipe.alien-module")
11 | require("prototypes.recipe.alien-warfare")
12 |
13 | require("prototypes.technology.technology")
14 | require("prototypes.sounds")
15 |
16 | local amount_setting = settings.startup["alien-module-drop-amount"].value / 100
17 |
18 | function AddLootToEntity(entityType, entityName, probability, countMin, countMax)
19 | if data.raw[entityType] ~= nil then
20 | if data.raw[entityType][entityName] ~= nil then
21 | if data.raw[entityType][entityName].loot == nil then
22 | data.raw[entityType][entityName].loot = {}
23 | end
24 | table.insert(data.raw[entityType][entityName].loot, { item = "artifact-ore", probability = probability, count_min = countMin, count_max = math.floor(countMax + 1) })
25 | end
26 | end
27 | end
28 |
29 | local function AddLootToVanillaEnemies()
30 | local SMALL_LOOT_PROBABILITY = 0.33 * amount_setting
31 | local MEDIUM_LOOT_PROBABILITY = 0.66 * amount_setting
32 | local BIG_LOOT_PROBABILITY = 0.83 * amount_setting
33 | local ONE_PROBABILITY = 1 * amount_setting
34 |
35 | AddLootToEntity("unit", "small-spitter", SMALL_LOOT_PROBABILITY, 1, 1)
36 | AddLootToEntity("unit", "small-biter", SMALL_LOOT_PROBABILITY, 1, 1)
37 |
38 | AddLootToEntity("unit", "medium-spitter", MEDIUM_LOOT_PROBABILITY, 1, 2)
39 | AddLootToEntity("unit", "medium-biter", MEDIUM_LOOT_PROBABILITY, 1, 2)
40 |
41 | AddLootToEntity("unit", "big-spitter", BIG_LOOT_PROBABILITY, 1, 5)
42 | AddLootToEntity("unit", "big-biter", BIG_LOOT_PROBABILITY, 1, 5)
43 |
44 | AddLootToEntity("unit", "behemoth-spitter", ONE_PROBABILITY, 2, 20)
45 | AddLootToEntity("unit", "behemoth-biter", ONE_PROBABILITY, 2, 20)
46 |
47 | AddLootToEntity("turret", "little-worm-turret", ONE_PROBABILITY, 1, 5)
48 | AddLootToEntity("turret", "medium-worm-turret", ONE_PROBABILITY, 1, 10)
49 | AddLootToEntity("turret", "big-worm-turret", ONE_PROBABILITY, 1, 25)
50 | AddLootToEntity("turret", "behemoth-worm-turret", ONE_PROBABILITY, 10, 25)
51 |
52 | AddLootToEntity("unit-spawner", "biter-spawner", ONE_PROBABILITY, 20, 50)
53 | AddLootToEntity("unit-spawner", "spitter-spawner", ONE_PROBABILITY, 20, 50)
54 | end
55 |
56 |
57 | -- This is for the Natural Expansion Mod
58 | local function AddLootToNEEnemies()
59 | for i = 1, 20 do
60 | local loot_probability = amount_setting * math.min(i * 0.04, 1) -- 80 % at highest tier
61 | local max_loot_amount = math.floor(math.max(i * 0.101, 1))
62 |
63 | AddLootToEntity("unit", "ne-biter-breeder-" .. i, loot_probability, 1, max_loot_amount)
64 | AddLootToEntity("unit", "ne-biter-fire-" .. i, loot_probability, 1, max_loot_amount)
65 | AddLootToEntity("unit", "ne-biter-fast-" .. i, loot_probability, 1, max_loot_amount)
66 | AddLootToEntity("unit", "ne-biter-wallbreaker-" .. i, loot_probability, 1, max_loot_amount)
67 | AddLootToEntity("unit", "ne-biter-tank-" .. i, loot_probability, 1, max_loot_amount)
68 |
69 | AddLootToEntity("unit", "ne-spitter-breeder-" .. i, loot_probability, 1, max_loot_amount)
70 | AddLootToEntity("unit", "ne-spitter-fire-" .. i, loot_probability, 1, max_loot_amount)
71 | AddLootToEntity("unit", "ne-spitter-ulaunch-" .. i, loot_probability, 1, max_loot_amount)
72 | AddLootToEntity("unit", "ne-spitter-webshooter-" .. i, loot_probability, 1, max_loot_amount)
73 | AddLootToEntity("unit", "ne-spitter-mine-" .. i, loot_probability, 1, max_loot_amount)
74 | end
75 |
76 | for i = 2, 3 do
77 | local MEDIUM_LOOT_PROBABILITY = 0.5 * amount_setting
78 | local BIG_LOOT_PROBABILITY = 1 * amount_setting
79 |
80 | AddLootToEntity("unit", "small-spitter-Mk" .. i, MEDIUM_LOOT_PROBABILITY, 1, 1)
81 | AddLootToEntity("unit", "small-biter-Mk" .. i, MEDIUM_LOOT_PROBABILITY, 1, 1)
82 | AddLootToEntity("unit", "medium-spitter-Mk" .. i, BIG_LOOT_PROBABILITY, 1, 2)
83 | AddLootToEntity("unit", "medium-biter-Mk" .. i, BIG_LOOT_PROBABILITY, 1, 2)
84 | AddLootToEntity("unit", "big-spitter-Mk" .. i, BIG_LOOT_PROBABILITY, 1, 5)
85 | AddLootToEntity("unit", "big-biter-Mk" .. i, BIG_LOOT_PROBABILITY, 1, 5)
86 | end
87 |
88 | -- boss unit from NE
89 | AddLootToEntity("unit", "ne-biter-megladon", 1 * amount_setting, 50, 200)
90 | end
91 |
92 | -- Rampant mod enemies
93 | local function AddLootToRampantEnemies()
94 | for t = 1, 10 do
95 | for v = 1, 20 do
96 | local loot_probability = amount_setting * math.min(t * 0.08, 1) -- 80 % at highest tier
97 | local max_loot_amount = 1
98 |
99 | AddLootToEntity("unit", "neutral-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
100 | AddLootToEntity("unit", "neutral-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
101 | AddLootToEntity("unit", "acid-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
102 | AddLootToEntity("unit", "acid-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
103 | AddLootToEntity("unit", "physical-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
104 | AddLootToEntity("unit", "electric-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
105 | AddLootToEntity("unit", "suicide-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
106 | AddLootToEntity("unit", "nuclear-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
107 | AddLootToEntity("unit", "fire-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
108 | AddLootToEntity("unit", "fire-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
109 | AddLootToEntity("unit", "inferno-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
110 | AddLootToEntity("unit", "troll-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
111 | AddLootToEntity("unit", "troll-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
112 | AddLootToEntity("unit", "fast-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
113 | AddLootToEntity("unit", "fast-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
114 | AddLootToEntity("unit", "laser-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
115 | AddLootToEntity("unit", "laser-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
116 | AddLootToEntity("unit", "wasp-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
117 | AddLootToEntity("unit", "spawner-spitter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
118 | AddLootToEntity("unit", "spawner-biter-v" .. v .. "-t" .. t .. "-rampant", loot_probability, 1, max_loot_amount)
119 | end
120 | end
121 | end
122 |
123 | local function AddLootToSchallEndgameEnemies()
124 | local loot_probability = 1 * amount_setting
125 | --category 5 to 15 (behemoth = 4)
126 | local units = data.raw.unit
127 | for n = 5, 15 do
128 | local loot_min = math.min(n * 1, 15)
129 | local loot_max = math.min(n * 4, 35)
130 | local biter_name = "Schall-category-" .. n .. "-biter"
131 | local spitter_name = "Schall-category-" .. n .. "-spitter"
132 |
133 | if units[biter_name] then
134 | AddLootToEntity("unit", biter_name, loot_probability, loot_min, loot_max)
135 | end
136 | if units[spitter_name] then
137 | AddLootToEntity("unit", spitter_name, loot_probability, loot_min, loot_max)
138 | end
139 | end
140 | end
141 |
142 | if amount_setting > 0 then
143 | AddLootToVanillaEnemies()
144 | AddLootToNEEnemies()
145 | AddLootToRampantEnemies()
146 | AddLootToSchallEndgameEnemies()
147 | end
148 |
--------------------------------------------------------------------------------
/alien-module/graphics/alien-hyper-magazine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/alien-hyper-magazine.png
--------------------------------------------------------------------------------
/alien-module/graphics/alien-magazine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/alien-magazine.png
--------------------------------------------------------------------------------
/alien-module/graphics/alien-module-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/alien-module-1.png
--------------------------------------------------------------------------------
/alien-module/graphics/alien-module-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/alien-module-2.png
--------------------------------------------------------------------------------
/alien-module/graphics/alien-module-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/alien-module-3.png
--------------------------------------------------------------------------------
/alien-module/graphics/alien-module-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/alien-module-4.png
--------------------------------------------------------------------------------
/alien-module/graphics/alien-module-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/alien-module-5.png
--------------------------------------------------------------------------------
/alien-module/graphics/alien-ore-magazine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/alien-ore-magazine.png
--------------------------------------------------------------------------------
/alien-module/graphics/artifact-ore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/artifact-ore.png
--------------------------------------------------------------------------------
/alien-module/graphics/item-group/module.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/graphics/item-group/module.png
--------------------------------------------------------------------------------
/alien-module/info.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "alien-module",
3 | "title": "Alien Loot Economy",
4 | "version": "2.0.14",
5 | "author": "sensenmann",
6 | "homepage": "https://github.com/renoth/factorio-alien-module",
7 | "description": "Makes alien units drop alien ore that can be smelted into alien metal, which can be used for all sorts of alien empowered items.",
8 | "factorio_version": "2.0",
9 | "dependencies": [
10 | "base >= 2.0",
11 | "Productivity >= 2.0.1",
12 | "? bobenemies >= 0.15.2",
13 | "? Natural_Evolution_Enemies >= 0.17.0",
14 | "? Rampant >= 0.16.34",
15 | "? SchallEndgameEvolution >= 1.0.0",
16 | "? ElectricTrains >= 1.0.0",
17 | "! biter_factions",
18 | "! UnlimitedProductivity"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/alien-module/locale/en/names.cfg:
--------------------------------------------------------------------------------
1 | [item-name]
2 |
3 | artifact-ore=Alien Ore
4 | alien-plate=Alien Plate
5 | alien-fuel=Alien Fuel
6 |
7 | alien-module-1=Alien Module I
8 | alien-module-2=Alien Module II
9 | alien-module-3=Alien Module III
10 | alien-module-4=Alien Module IV
11 | alien-module-5=Alien Module V
12 |
13 | alien-hyper-module-1=Alien Hyper Module Level 1
14 | alien-hyper-module-2=Alien Hyper Module Level 2
15 | alien-hyper-module-3=Alien Hyper Module Level 3
16 | alien-hyper-module-4=Alien Hyper Module Level 4
17 | alien-hyper-module-5=Alien Hyper Module Level 5
18 | alien-hyper-module-6=Alien Hyper Module Level 6
19 | alien-hyper-module-7=Alien Hyper Module Level 7
20 | alien-hyper-module-8=Alien Hyper Module Level 8
21 | alien-hyper-module-9=Alien Hyper Module Level 9
22 | alien-hyper-module-10=Alien Hyper Module Level 10
23 | alien-hyper-module-11=Alien Hyper Module Level 11
24 | alien-hyper-module-12=Alien Hyper Module Level 12
25 | alien-hyper-module-13=Alien Hyper Module Level 13
26 | alien-hyper-module-14=Alien Hyper Module Level 14
27 | alien-hyper-module-15=Alien Hyper Module Level 15
28 | alien-hyper-module-16=Alien Hyper Module Level 16
29 | alien-hyper-module-17=Alien Hyper Module Level 17
30 | alien-hyper-module-18=Alien Hyper Module Level 18
31 | alien-hyper-module-19=Alien Hyper Module Level 19
32 | alien-hyper-module-20=Alien Hyper Module Level 20
33 | alien-hyper-module-21=Alien Hyper Module Level 21
34 | alien-hyper-module-22=Alien Hyper Module Level 22
35 | alien-hyper-module-23=Alien Hyper Module Level 23
36 | alien-hyper-module-24=Alien Hyper Module Level 24
37 | alien-hyper-module-25=Alien Hyper Module Level 25
38 | alien-hyper-module-26=Alien Hyper Module Level 26
39 | alien-hyper-module-27=Alien Hyper Module Level 27
40 | alien-hyper-module-28=Alien Hyper Module Level 28
41 | alien-hyper-module-29=Alien Hyper Module Level 29
42 | alien-hyper-module-30=Alien Hyper Module Level 30
43 | alien-hyper-module-31=Alien Hyper Module Level 31
44 | alien-hyper-module-32=Alien Hyper Module Level 32
45 | alien-hyper-module-33=Alien Hyper Module Level 33
46 | alien-hyper-module-34=Alien Hyper Module Level 34
47 | alien-hyper-module-35=Alien Hyper Module Level 35
48 | alien-hyper-module-36=Alien Hyper Module Level 36
49 | alien-hyper-module-37=Alien Hyper Module Level 37
50 | alien-hyper-module-38=Alien Hyper Module Level 38
51 | alien-hyper-module-39=Alien Hyper Module Level 39
52 | alien-hyper-module-40=Alien Hyper Module Level 40
53 | alien-hyper-module-41=Alien Hyper Module Level 41
54 | alien-hyper-module-42=Alien Hyper Module Level 42
55 | alien-hyper-module-43=Alien Hyper Module Level 43
56 | alien-hyper-module-44=Alien Hyper Module Level 44
57 | alien-hyper-module-45=Alien Hyper Module Level 45
58 | alien-hyper-module-46=Alien Hyper Module Level 46
59 | alien-hyper-module-47=Alien Hyper Module Level 47
60 | alien-hyper-module-48=Alien Hyper Module Level 48
61 | alien-hyper-module-49=Alien Hyper Module Level 49
62 | alien-hyper-module-50=Alien Hyper Module Level 50
63 | alien-hyper-module-51=Alien Hyper Module Level 51
64 | alien-hyper-module-52=Alien Hyper Module Level 52
65 | alien-hyper-module-53=Alien Hyper Module Level 53
66 | alien-hyper-module-54=Alien Hyper Module Level 54
67 | alien-hyper-module-55=Alien Hyper Module Level 55
68 | alien-hyper-module-56=Alien Hyper Module Level 56
69 | alien-hyper-module-57=Alien Hyper Module Level 57
70 | alien-hyper-module-58=Alien Hyper Module Level 58
71 | alien-hyper-module-59=Alien Hyper Module Level 59
72 | alien-hyper-module-60=Alien Hyper Module Level 60
73 | alien-hyper-module-61=Alien Hyper Module Level 61
74 | alien-hyper-module-62=Alien Hyper Module Level 62
75 | alien-hyper-module-63=Alien Hyper Module Level 63
76 | alien-hyper-module-64=Alien Hyper Module Level 64
77 | alien-hyper-module-65=Alien Hyper Module Level 65
78 | alien-hyper-module-66=Alien Hyper Module Level 66
79 | alien-hyper-module-67=Alien Hyper Module Level 67
80 | alien-hyper-module-68=Alien Hyper Module Level 68
81 | alien-hyper-module-69=Alien Hyper Module Level 69
82 | alien-hyper-module-70=Alien Hyper Module Level 70
83 | alien-hyper-module-71=Alien Hyper Module Level 71
84 | alien-hyper-module-72=Alien Hyper Module Level 72
85 | alien-hyper-module-73=Alien Hyper Module Level 73
86 | alien-hyper-module-74=Alien Hyper Module Level 74
87 | alien-hyper-module-75=Alien Hyper Module Level 75
88 | alien-hyper-module-76=Alien Hyper Module Level 76
89 | alien-hyper-module-77=Alien Hyper Module Level 77
90 | alien-hyper-module-78=Alien Hyper Module Level 78
91 | alien-hyper-module-79=Alien Hyper Module Level 79
92 | alien-hyper-module-80=Alien Hyper Module Level 80
93 | alien-hyper-module-81=Alien Hyper Module Level 81
94 | alien-hyper-module-82=Alien Hyper Module Level 82
95 | alien-hyper-module-83=Alien Hyper Module Level 83
96 | alien-hyper-module-84=Alien Hyper Module Level 84
97 | alien-hyper-module-85=Alien Hyper Module Level 85
98 | alien-hyper-module-86=Alien Hyper Module Level 86
99 | alien-hyper-module-87=Alien Hyper Module Level 87
100 | alien-hyper-module-88=Alien Hyper Module Level 88
101 | alien-hyper-module-89=Alien Hyper Module Level 89
102 | alien-hyper-module-90=Alien Hyper Module Level 90
103 | alien-hyper-module-91=Alien Hyper Module Level 91
104 | alien-hyper-module-92=Alien Hyper Module Level 92
105 | alien-hyper-module-93=Alien Hyper Module Level 93
106 | alien-hyper-module-94=Alien Hyper Module Level 94
107 | alien-hyper-module-95=Alien Hyper Module Level 95
108 | alien-hyper-module-96=Alien Hyper Module Level 96
109 | alien-hyper-module-97=Alien Hyper Module Level 97
110 | alien-hyper-module-98=Alien Hyper Module Level 98
111 | alien-hyper-module-99=Alien Hyper Module Level 99
112 | alien-hyper-module-100=Alien Hyper Module Level 100
113 |
114 |
115 | alien-magazine=Alien magazine
116 | alien-ore-magazine=Alien ore bullets
117 |
118 | alien-hyper-magazine-1=Alien Hyper Magazine Level 1
119 | alien-hyper-magazine-2=Alien Hyper Magazine Level 2
120 | alien-hyper-magazine-3=Alien Hyper Magazine Level 3
121 | alien-hyper-magazine-4=Alien Hyper Magazine Level 4
122 | alien-hyper-magazine-5=Alien Hyper Magazine Level 5
123 | alien-hyper-magazine-6=Alien Hyper Magazine Level 6
124 | alien-hyper-magazine-7=Alien Hyper Magazine Level 7
125 | alien-hyper-magazine-8=Alien Hyper Magazine Level 8
126 | alien-hyper-magazine-9=Alien Hyper Magazine Level 9
127 | alien-hyper-magazine-10=Alien Hyper Magazine Level 10
128 | alien-hyper-magazine-11=Alien Hyper Magazine Level 11
129 | alien-hyper-magazine-12=Alien Hyper Magazine Level 12
130 | alien-hyper-magazine-13=Alien Hyper Magazine Level 13
131 | alien-hyper-magazine-14=Alien Hyper Magazine Level 14
132 | alien-hyper-magazine-15=Alien Hyper Magazine Level 15
133 | alien-hyper-magazine-16=Alien Hyper Magazine Level 16
134 | alien-hyper-magazine-17=Alien Hyper Magazine Level 17
135 | alien-hyper-magazine-18=Alien Hyper Magazine Level 18
136 | alien-hyper-magazine-19=Alien Hyper Magazine Level 19
137 | alien-hyper-magazine-20=Alien Hyper Magazine Level 20
138 | alien-hyper-magazine-21=Alien Hyper Magazine Level 21
139 | alien-hyper-magazine-22=Alien Hyper Magazine Level 22
140 | alien-hyper-magazine-23=Alien Hyper Magazine Level 23
141 | alien-hyper-magazine-24=Alien Hyper Magazine Level 24
142 | alien-hyper-magazine-25=Alien Hyper Magazine Level 25
143 | alien-hyper-magazine-26=Alien Hyper Magazine Level 26
144 | alien-hyper-magazine-27=Alien Hyper Magazine Level 27
145 | alien-hyper-magazine-28=Alien Hyper Magazine Level 28
146 | alien-hyper-magazine-29=Alien Hyper Magazine Level 29
147 | alien-hyper-magazine-30=Alien Hyper Magazine Level 30
148 | alien-hyper-magazine-31=Alien Hyper Magazine Level 31
149 | alien-hyper-magazine-32=Alien Hyper Magazine Level 32
150 | alien-hyper-magazine-33=Alien Hyper Magazine Level 33
151 | alien-hyper-magazine-34=Alien Hyper Magazine Level 34
152 | alien-hyper-magazine-35=Alien Hyper Magazine Level 35
153 | alien-hyper-magazine-36=Alien Hyper Magazine Level 36
154 | alien-hyper-magazine-37=Alien Hyper Magazine Level 37
155 | alien-hyper-magazine-38=Alien Hyper Magazine Level 38
156 | alien-hyper-magazine-39=Alien Hyper Magazine Level 39
157 | alien-hyper-magazine-40=Alien Hyper Magazine Level 40
158 | alien-hyper-magazine-41=Alien Hyper Magazine Level 41
159 | alien-hyper-magazine-42=Alien Hyper Magazine Level 42
160 | alien-hyper-magazine-43=Alien Hyper Magazine Level 43
161 | alien-hyper-magazine-44=Alien Hyper Magazine Level 44
162 | alien-hyper-magazine-45=Alien Hyper Magazine Level 45
163 | alien-hyper-magazine-46=Alien Hyper Magazine Level 46
164 | alien-hyper-magazine-47=Alien Hyper Magazine Level 47
165 | alien-hyper-magazine-48=Alien Hyper Magazine Level 48
166 | alien-hyper-magazine-49=Alien Hyper Magazine Level 49
167 | alien-hyper-magazine-50=Alien Hyper Magazine Level 50
168 | alien-hyper-magazine-51=Alien Hyper Magazine Level 51
169 | alien-hyper-magazine-52=Alien Hyper Magazine Level 52
170 | alien-hyper-magazine-53=Alien Hyper Magazine Level 53
171 | alien-hyper-magazine-54=Alien Hyper Magazine Level 54
172 | alien-hyper-magazine-55=Alien Hyper Magazine Level 55
173 | alien-hyper-magazine-56=Alien Hyper Magazine Level 56
174 | alien-hyper-magazine-57=Alien Hyper Magazine Level 57
175 | alien-hyper-magazine-58=Alien Hyper Magazine Level 58
176 | alien-hyper-magazine-59=Alien Hyper Magazine Level 59
177 | alien-hyper-magazine-60=Alien Hyper Magazine Level 60
178 | alien-hyper-magazine-61=Alien Hyper Magazine Level 61
179 | alien-hyper-magazine-62=Alien Hyper Magazine Level 62
180 | alien-hyper-magazine-63=Alien Hyper Magazine Level 63
181 | alien-hyper-magazine-64=Alien Hyper Magazine Level 64
182 | alien-hyper-magazine-65=Alien Hyper Magazine Level 65
183 | alien-hyper-magazine-66=Alien Hyper Magazine Level 66
184 | alien-hyper-magazine-67=Alien Hyper Magazine Level 67
185 | alien-hyper-magazine-68=Alien Hyper Magazine Level 68
186 | alien-hyper-magazine-69=Alien Hyper Magazine Level 69
187 | alien-hyper-magazine-70=Alien Hyper Magazine Level 70
188 | alien-hyper-magazine-71=Alien Hyper Magazine Level 71
189 | alien-hyper-magazine-72=Alien Hyper Magazine Level 72
190 | alien-hyper-magazine-73=Alien Hyper Magazine Level 73
191 | alien-hyper-magazine-74=Alien Hyper Magazine Level 74
192 | alien-hyper-magazine-75=Alien Hyper Magazine Level 75
193 | alien-hyper-magazine-76=Alien Hyper Magazine Level 76
194 | alien-hyper-magazine-77=Alien Hyper Magazine Level 77
195 | alien-hyper-magazine-78=Alien Hyper Magazine Level 78
196 | alien-hyper-magazine-79=Alien Hyper Magazine Level 79
197 | alien-hyper-magazine-80=Alien Hyper Magazine Level 80
198 | alien-hyper-magazine-81=Alien Hyper Magazine Level 81
199 | alien-hyper-magazine-82=Alien Hyper Magazine Level 82
200 | alien-hyper-magazine-83=Alien Hyper Magazine Level 83
201 | alien-hyper-magazine-84=Alien Hyper Magazine Level 84
202 | alien-hyper-magazine-85=Alien Hyper Magazine Level 85
203 | alien-hyper-magazine-86=Alien Hyper Magazine Level 86
204 | alien-hyper-magazine-87=Alien Hyper Magazine Level 87
205 | alien-hyper-magazine-88=Alien Hyper Magazine Level 88
206 | alien-hyper-magazine-89=Alien Hyper Magazine Level 89
207 | alien-hyper-magazine-90=Alien Hyper Magazine Level 90
208 | alien-hyper-magazine-91=Alien Hyper Magazine Level 91
209 | alien-hyper-magazine-92=Alien Hyper Magazine Level 92
210 | alien-hyper-magazine-93=Alien Hyper Magazine Level 93
211 | alien-hyper-magazine-94=Alien Hyper Magazine Level 94
212 | alien-hyper-magazine-95=Alien Hyper Magazine Level 95
213 | alien-hyper-magazine-96=Alien Hyper Magazine Level 96
214 | alien-hyper-magazine-97=Alien Hyper Magazine Level 97
215 | alien-hyper-magazine-98=Alien Hyper Magazine Level 98
216 | alien-hyper-magazine-99=Alien Hyper Magazine Level 99
217 | alien-hyper-magazine-100=Alien Hyper Magazine Level 100
218 |
219 | [item-group-name]
220 | alien-module=Alien Items
221 |
222 | [entity-name]
223 | alien-solarpanel=Alien Solarpanel
224 | alien-accumulator=Alien Accumulator
225 | alien-mining-drill=Alien Mining Drill
226 |
227 | [modifier-description]
228 | alien-gun-turret-attack-bonus=Alien turret damage bonus: +__1__
229 |
230 | [mod-name]
231 | alien-module=Alien Loot Economy
232 |
233 | [mod-description]
234 | alien-module=Kill aliens to get alien ore. Use alien ore to craft powerful modules or items.
235 |
236 | [gui]
237 | module-upgraded=Alien Hyper Modules upgraded to level: __1__
238 | label=Hyperlevel __1__ Kills __2__
239 |
240 | [mod-setting-name]
241 | alien-module-ore-conversion=Enable ore conversion receipes
242 | alien-module-hyper-ammo-enabled=Enable alien hyper ammo
243 | alien-module-level-exponent=Level Exponent (higher is faster leveling, default 0.1)
244 | alien-module-hyper-module-effect=Hyper Module effect per level (default 0.01)
245 | alien-module-drop-amount=Alien ore drop amount in %
246 | alien-module-hyper-quality-enabled=Enable quality bonus for Hypermodules?
247 | rampant-alienmodule-compat-max-count-turret=Max drop count from worms
248 | rampant-alienmodule-compat-max-count-spawner=Max drop count from spawners
249 |
250 | [mod-setting-description]
251 | alien-module-ore-conversion=Enable receipes to convert alien ore to any other ore
252 | alien-module-hyper-ammo-enabled=Disable if you dont use it or find the effect spam annoying
253 | alien-module-level-exponent=Sets the steepness of the leveling curve.\n0.1 = 90M kills for level 100\n0.122 = 10M kills for level 100\n0.15 = 1,5M kills for level 100\n0.2 = 130k Kills for level 100
254 | alien-module-hyper-module-effect=Hyper Module effect per level (default 0.01, min = 0.001, max = 0.1). Effects get rounded to the nearest percent.
255 | alien-module-drop-amount=Sets the amount of dropped alien ore in % (min=1, max=10000)
256 | alien-module-hyper-quality-enabled=Activate or deactivate the quality bonus. Disabling can help with unwanted quality clutter.
--------------------------------------------------------------------------------
/alien-module/locale/zh-CN/alien-module_0.4.3.cfg:
--------------------------------------------------------------------------------
1 | [item-name]
2 |
3 | artifact-ore=异星矿石
4 | alien-plate=异星板
5 |
6 |
7 | alien-module-1=异星插件 I
8 | alien-module-2=异星插件 II
9 | alien-module-3=异星插件 III
10 | alien-module-4=异星插件 IV
11 | alien-module-5=异星插件 V
12 |
13 | alien-hyper-module-1=异星超级插件 1
14 | alien-hyper-module-2=异星超级插件 2
15 | alien-hyper-module-3=异星超级插件 3
16 | alien-hyper-module-4=异星超级插件 4
17 | alien-hyper-module-5=异星超级插件 5
18 | alien-hyper-module-6=异星超级插件 6
19 | alien-hyper-module-7=异星超级插件 7
20 | alien-hyper-module-8=异星超级插件 8
21 | alien-hyper-module-9=异星超级插件 9
22 | alien-hyper-module-10=异星超级插件 10
23 | alien-hyper-module-11=异星超级插件 11
24 | alien-hyper-module-12=异星超级插件 12
25 | alien-hyper-module-13=异星超级插件 13
26 | alien-hyper-module-14=异星超级插件 14
27 | alien-hyper-module-15=异星超级插件 15
28 | alien-hyper-module-16=异星超级插件 16
29 | alien-hyper-module-17=异星超级插件 17
30 | alien-hyper-module-18=异星超级插件 18
31 | alien-hyper-module-19=异星超级插件 19
32 | alien-hyper-module-20=异星超级插件 20
33 | alien-hyper-module-21=异星超级插件 21
34 | alien-hyper-module-22=异星超级插件 22
35 | alien-hyper-module-23=异星超级插件 23
36 | alien-hyper-module-24=异星超级插件 24
37 | alien-hyper-module-25=异星超级插件 25
38 | alien-hyper-module-26=异星超级插件 26
39 | alien-hyper-module-27=异星超级插件 27
40 | alien-hyper-module-28=异星超级插件 28
41 | alien-hyper-module-29=异星超级插件 29
42 | alien-hyper-module-30=异星超级插件 30
43 | alien-hyper-module-31=异星超级插件 31
44 | alien-hyper-module-32=异星超级插件 32
45 | alien-hyper-module-33=异星超级插件 33
46 | alien-hyper-module-34=异星超级插件 34
47 | alien-hyper-module-35=异星超级插件 35
48 | alien-hyper-module-36=异星超级插件 36
49 | alien-hyper-module-37=异星超级插件 37
50 | alien-hyper-module-38=异星超级插件 38
51 | alien-hyper-module-39=异星超级插件 39
52 | alien-hyper-module-40=异星超级插件 40
53 | alien-hyper-module-41=异星超级插件 41
54 | alien-hyper-module-42=异星超级插件 42
55 | alien-hyper-module-43=异星超级插件 43
56 | alien-hyper-module-44=异星超级插件 44
57 | alien-hyper-module-45=异星超级插件 45
58 | alien-hyper-module-46=异星超级插件 46
59 | alien-hyper-module-47=异星超级插件 47
60 | alien-hyper-module-48=异星超级插件 48
61 | alien-hyper-module-49=异星超级插件 49
62 | alien-hyper-module-50=异星超级插件 50
63 | alien-hyper-module-51=异星超级插件 51
64 | alien-hyper-module-52=异星超级插件 52
65 | alien-hyper-module-53=异星超级插件 53
66 | alien-hyper-module-54=异星超级插件 54
67 | alien-hyper-module-55=异星超级插件 55
68 | alien-hyper-module-56=异星超级插件 56
69 | alien-hyper-module-57=异星超级插件 57
70 | alien-hyper-module-58=异星超级插件 58
71 | alien-hyper-module-59=异星超级插件 59
72 | alien-hyper-module-60=异星超级插件 60
73 | alien-hyper-module-61=异星超级插件 61
74 | alien-hyper-module-62=异星超级插件 62
75 | alien-hyper-module-63=异星超级插件 63
76 | alien-hyper-module-64=异星超级插件 64
77 | alien-hyper-module-65=异星超级插件 65
78 | alien-hyper-module-66=异星超级插件 66
79 | alien-hyper-module-67=异星超级插件 67
80 | alien-hyper-module-68=异星超级插件 68
81 | alien-hyper-module-69=异星超级插件 69
82 | alien-hyper-module-70=异星超级插件 70
83 | alien-hyper-module-71=异星超级插件 71
84 | alien-hyper-module-72=异星超级插件 72
85 | alien-hyper-module-73=异星超级插件 73
86 | alien-hyper-module-74=异星超级插件 74
87 | alien-hyper-module-75=异星超级插件 75
88 | alien-hyper-module-76=异星超级插件 76
89 | alien-hyper-module-77=异星超级插件 77
90 | alien-hyper-module-78=异星超级插件 78
91 | alien-hyper-module-79=异星超级插件 79
92 | alien-hyper-module-80=异星超级插件 80
93 | alien-hyper-module-81=异星超级插件 81
94 | alien-hyper-module-82=异星超级插件 82
95 | alien-hyper-module-83=异星超级插件 83
96 | alien-hyper-module-84=异星超级插件 84
97 | alien-hyper-module-85=异星超级插件 85
98 | alien-hyper-module-86=异星超级插件 86
99 | alien-hyper-module-87=异星超级插件 87
100 | alien-hyper-module-88=异星超级插件 88
101 | alien-hyper-module-89=异星超级插件 89
102 | alien-hyper-module-90=异星超级插件 90
103 | alien-hyper-module-91=异星超级插件 91
104 | alien-hyper-module-92=异星超级插件 92
105 | alien-hyper-module-93=异星超级插件 93
106 | alien-hyper-module-94=异星超级插件 94
107 | alien-hyper-module-95=异星超级插件 95
108 | alien-hyper-module-96=异星超级插件 96
109 | alien-hyper-module-97=异星超级插件 97
110 | alien-hyper-module-98=异星超级插件 98
111 | alien-hyper-module-99=异星超级插件 99
112 | alien-hyper-module-100=异星超级插件 100
113 |
114 |
115 | alien-magazine=异星弹匣
116 |
117 | [item-group-name]
118 |
119 | alien-module=异星物品
120 |
121 | [entity-name]
122 |
123 | alien-solarpanel=异星太阳能板
124 | alien-accumulator=异星蓄电器
125 | alien-mining-drill=异星采矿机
126 |
127 | [mod-name]
128 |
129 | alien-module=异星经济
130 |
131 | [mod-description]
132 |
133 | alien-module=虫子现在会掉落异星矿石,可以加工成一些新产品.
134 |
135 | [gui]
136 |
137 | module-upgraded=异星超级插件提升至: __1__级
138 | label=异星超级插件等级: __1__ 消灭异虫数量: __2__
139 |
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_0.1.5.json:
--------------------------------------------------------------------------------
1 | {
2 | "item": [
3 | [
4 | "alien-ore",
5 | "artifact-ore"
6 | ]
7 | ]
8 | }
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_0.2.0.lua:
--------------------------------------------------------------------------------
1 | for i, force in pairs(game.forces) do
2 | if force.technologies["automation"].researched then
3 | force.recipes["alien-hyper-module-1"].enabled = true
4 | end
5 | end
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_0.2.2.lua:
--------------------------------------------------------------------------------
1 | for i, force in pairs(game.forces) do
2 | if force.technologies["electric-energy-accumulators"].researched then
3 | force.recipes["alien-accumulator"].enabled = true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_0.2.3.lua:
--------------------------------------------------------------------------------
1 | for i, force in pairs(game.forces) do
2 | if force.technologies["military"].researched then
3 | force.recipes["alien-plate"].enabled = true
4 | end
5 | end
6 |
7 | for i, force in pairs(game.forces) do
8 | if force.technologies["military"].researched then
9 | force.recipes["alien-magazine"].enabled = true
10 | end
11 | end
12 |
13 | for i, force in pairs(game.forces) do
14 | if force.technologies["automation"].researched then
15 | force.recipes["alien-module-1"].enabled = true
16 | end
17 | end
18 |
19 | for i, force in pairs(game.forces) do
20 | if force.technologies["solar-energy"].researched then
21 | force.recipes["alien-solarpanel"].enabled = true
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_0.4.5.lua:
--------------------------------------------------------------------------------
1 | for i, force in pairs(game.forces) do
2 | if force.technologies["military"].researched then
3 | force.recipes["alien-fuel"].enabled = true
4 | end
5 | end
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_1.0.9.lua:
--------------------------------------------------------------------------------
1 | for i, force in pairs(game.forces) do
2 | local modifier = 0
3 |
4 | if force.technologies["physical-projectile-damage-1"].researched then
5 | modifier = modifier + 0.1
6 | end
7 | if force.technologies["physical-projectile-damage-2"].researched then
8 | modifier = modifier + 0.1
9 | end
10 | if force.technologies["physical-projectile-damage-3"].researched then
11 | modifier = modifier + 0.2
12 | end
13 | if force.technologies["physical-projectile-damage-4"].researched then
14 | modifier = modifier + 0.2
15 | end
16 | if force.technologies["physical-projectile-damage-5"].researched then
17 | modifier = modifier + 0.2
18 | end
19 | if force.technologies["physical-projectile-damage-6"].researched then
20 | modifier = modifier + 0.4
21 | end
22 | if force.technologies["physical-projectile-damage-7"].researched then
23 | modifier = modifier + 0.7 * force.technologies["physical-projectile-damage-7"].level
24 | end
25 | end
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_1.4.4.lua:
--------------------------------------------------------------------------------
1 | if storage.ignoredalienmodulefactions == nil then
2 | storage.ignoredalienmodulefactions = { "enemy", "neutral", "_ABANDONED_", "_DESTROYED_" }
3 | end
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_1.4.5.lua:
--------------------------------------------------------------------------------
1 | storage.ignoredalienmodulefactions = { enemy = true, neutral = true, _ABANDONED_ = true, _DESTROYED_ = true }
--------------------------------------------------------------------------------
/alien-module/migrations/alien-module_1.4.9.lua:
--------------------------------------------------------------------------------
1 | if (tonumber(storage.killcount) ~= nil) then
2 | -- store counters from singleplayer
3 | local killcount_cache = storage.killcount
4 | local currentmodulelevel_cache = storage.currentmodulelevel
5 | local modulelevel_cache = storage.modulelevel
6 |
7 | -- make global counters lists
8 | storage.killcount = {}
9 | storage.currentmodulelevel = {}
10 | storage.modulelevel = {}
11 |
12 | storage.killcount["player"] = killcount_cache
13 | storage.currentmodulelevel["player"] = currentmodulelevel_cache
14 | storage.modulelevel["player"] = modulelevel_cache
15 | end
16 |
--------------------------------------------------------------------------------
/alien-module/prototypes/entity/entity.lua:
--------------------------------------------------------------------------------
1 | local alien_tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 }
2 |
3 | -- ### SOLAR PANEL ### --
4 |
5 | local alien_solarpanel = util.table.deepcopy(data.raw["solar-panel"]["solar-panel"])
6 |
7 | alien_solarpanel.name = "alien-solarpanel"
8 | alien_solarpanel.icons = { { icon = "__base__/graphics/icons/solar-panel.png", tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 } } }
9 | alien_solarpanel.minable.result = "alien-solarpanel"
10 | alien_solarpanel.fast_replaceable_group = "solar-panel"
11 | alien_solarpanel.production = "150kW"
12 | alien_solarpanel.picture.layers[1].tint = alien_tint
13 | alien_solarpanel.picture.layers[2].tint = alien_tint
14 |
15 | data:extend({ alien_solarpanel })
16 |
17 | -- ### MINING DRILL ### --
18 |
19 | local alien_drill = util.table.deepcopy(data.raw["mining-drill"]["electric-mining-drill"])
20 |
21 | alien_drill.name = "alien-mining-drill"
22 | alien_drill.icons = { { icon = "__base__/graphics/icons/electric-mining-drill.png", tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 } } }
23 | alien_drill.minable.result = "alien-mining-drill"
24 | alien_drill.fast_replaceable_group = "mining-drill"
25 | alien_drill.mining_speed = 1.5
26 | alien_drill.energy_usage = "200kW"
27 | alien_drill.resource_searching_radius = 3.49
28 | alien_drill.module_inventory_size = 4
29 | alien_drill.graphics_set.animation.north.layers[1].tint = alien_tint
30 | alien_drill.graphics_set.animation.east.layers[1].tint = alien_tint
31 | alien_drill.graphics_set.animation.south.layers[1].tint = alien_tint
32 | alien_drill.graphics_set.animation.west.layers[1].tint = alien_tint
33 | alien_drill.graphics_set.working_visualisations[3].north_animation.layers[1].tint = alien_tint
34 | alien_drill.graphics_set.working_visualisations[3].east_animation.layers[1].tint = alien_tint
35 | alien_drill.graphics_set.working_visualisations[3].south_animation.layers[1].tint = alien_tint
36 | alien_drill.graphics_set.working_visualisations[3].west_animation.layers[1].tint = alien_tint
37 | alien_drill.wet_mining_graphics_set.animation.north.layers[1].tint = alien_tint
38 | alien_drill.wet_mining_graphics_set.animation.east.layers[1].tint = alien_tint
39 | alien_drill.wet_mining_graphics_set.animation.south.layers[1].tint = alien_tint
40 | alien_drill.wet_mining_graphics_set.animation.west.layers[1].tint = alien_tint
41 | alien_drill.wet_mining_graphics_set.working_visualisations[3].north_animation.layers[1].tint = alien_tint
42 | alien_drill.wet_mining_graphics_set.working_visualisations[3].east_animation.layers[1].tint = alien_tint
43 | alien_drill.wet_mining_graphics_set.working_visualisations[3].south_animation.layers[1].tint = alien_tint
44 | alien_drill.wet_mining_graphics_set.working_visualisations[3].west_animation.layers[1].tint = alien_tint
45 |
46 | data:extend({ alien_drill })
47 |
48 | if not data.raw["solar-panel"]["solar-panel"].fast_replaceable_group then
49 | data.raw["solar-panel"]["solar-panel"].fast_replaceable_group = "solar-panel"
50 | else
51 | local group_name = data.raw["solar-panel"]["solar-panel"].fast_replaceable_group
52 | data.raw["solar-panel"]["alien-solarpanel"].fast_replaceable_group = group_name
53 | end
54 |
55 | if data.raw["solar-panel"]["solar-panel"].next_upgrade == nil then
56 | data.raw["solar-panel"]["solar-panel"].next_upgrade = "alien-solarpanel"
57 | end
58 |
59 | -- #### ALIEN ACCUMULATOR #### --
60 |
61 | local alien_accumulator = util.table.deepcopy(data.raw["accumulator"]["accumulator"])
62 |
63 | alien_accumulator.name = "alien-accumulator"
64 | alien_accumulator.icons = { { icon = "__base__/graphics/icons/accumulator.png", tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 } } }
65 | alien_accumulator.minable.result = "alien-accumulator"
66 | alien_accumulator.fast_replaceable_group = "accumulator"
67 | alien_accumulator.energy_source.buffer_capacity = "15MJ"
68 | alien_accumulator.energy_source.input_flow_limit = "1MW"
69 | alien_accumulator.energy_source.output_flow_limit = "1MW"
70 | alien_accumulator.chargable_graphics.charge_animation.layers[1].layers[1].tint = alien_tint
71 | alien_accumulator.chargable_graphics.discharge_animation.layers[1].layers[1].tint = alien_tint
72 |
73 | data:extend({ alien_accumulator })
74 |
75 | if not data.raw["accumulator"]["accumulator"].fast_replaceable_group then
76 | data.raw["accumulator"]["accumulator"].fast_replaceable_group = "accumulator"
77 | else
78 | local group_name = data.raw["accumulator"]["accumulator"].fast_replaceable_group
79 | data.raw["accumulator"]["alien-accumulator"].fast_replaceable_group = group_name
80 | end
81 |
82 | if data.raw["accumulator"]["accumulator"].next_upgrade == nil then
83 | data.raw["accumulator"]["accumulator"].next_upgrade = "alien-accumulator"
84 | end
85 |
--------------------------------------------------------------------------------
/alien-module/prototypes/item-group/item-groups-module.lua:
--------------------------------------------------------------------------------
1 | data:extend({
2 | {
3 | type = "module-category",
4 | name = "alien-module"
5 | }
6 | })
7 |
8 | data:extend({
9 | {
10 | type = "item-group",
11 | name = "alien-module",
12 | order = "ff",
13 | inventory_order = "gf",
14 | icon = "__alien-module__/graphics/item-group/module.png",
15 | icon_size = 32,
16 | },
17 | {
18 | type = "item-subgroup",
19 | name = "component",
20 | group = "alien-module",
21 | order = "1"
22 | },
23 | {
24 | type = "item-subgroup",
25 | name = "alien-hyper-module",
26 | group = "alien-module",
27 | order = "2"
28 | },
29 | {
30 | type = "item-subgroup",
31 | name = "alien-module",
32 | group = "alien-module",
33 | order = "3"
34 | },
35 | {
36 | type = "item-subgroup",
37 | name = "warfare",
38 | group = "alien-module",
39 | order = "5"
40 | },
41 | {
42 | type = "item-subgroup",
43 | name = "economy",
44 | group = "alien-module",
45 | order = "4"
46 | }
47 | })
48 |
49 |
--------------------------------------------------------------------------------
/alien-module/prototypes/item/alien-components.lua:
--------------------------------------------------------------------------------
1 | -- alien-ore and products --
2 |
3 | data:extend({
4 | {
5 | type = "item",
6 | name = "artifact-ore",
7 | icons = { { icon = "__alien-module__/graphics/artifact-ore.png" } },
8 | icon_size = 64,
9 | icon_mipmaps = 4,
10 | weight = 1000,
11 | subgroup = "component",
12 | category = "alien-module",
13 | tier = 0,
14 | order = "a-1",
15 | stack_size = 500,
16 | },
17 | })
18 |
19 | data:extend({
20 | {
21 | type = "item",
22 | name = "alien-plate",
23 | icons = { { icon = "__base__/graphics/icons/iron-plate.png", tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 } } },
24 | icon_size = 64,
25 | subgroup = "component",
26 | category = "alien-module",
27 | tier = 2,
28 | weight = 1000,
29 | order = "a-2",
30 | stack_size = 200,
31 | },
32 | })
33 |
34 | data:extend({
35 | {
36 | type = "item",
37 | name = "alien-fuel",
38 | icons = { { icon = "__base__/graphics/icons/solid-fuel.png", tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 } } },
39 | icon_size = 64,
40 | fuel_category = "chemical",
41 | fuel_value = "200MJ",
42 | fuel_acceleration_multiplier = 1.4,
43 | fuel_top_speed_multiplier = 1.5,
44 | subgroup = "component",
45 | category = "alien-module",
46 | tier = 2,
47 | weight = 10000,
48 | order = "a-4",
49 | stack_size = 500
50 | },
51 | })
52 |
--------------------------------------------------------------------------------
/alien-module/prototypes/item/alien-economy.lua:
--------------------------------------------------------------------------------
1 | -- alien economy --
2 |
3 | data:extend({
4 | {
5 | type = "item",
6 | name = "alien-solarpanel",
7 | icons = { { icon = "__base__/graphics/icons/solar-panel.png", tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 } } },
8 | icon_size = 64,
9 | subgroup = "economy",
10 | category = "alien-economy",
11 | place_result = "alien-solarpanel",
12 | order = "a",
13 | stack_size = 200
14 | },
15 | {
16 | type = "item",
17 | name = "alien-accumulator",
18 | icons = { { icon = "__base__/graphics/icons/accumulator.png", tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 } } },
19 | icon_size = 64,
20 | subgroup = "economy",
21 | category = "alien-economy",
22 | place_result = "alien-accumulator",
23 | order = "b",
24 | stack_size = 200
25 | },
26 | {
27 | type = "item",
28 | name = "alien-mining-drill",
29 | icons = { { icon = "__base__/graphics/icons/electric-mining-drill.png", tint = { r = 0.8, g = 0.4, b = 0.8, a = 0.8 } } },
30 | icon_size = 64,
31 | subgroup = "economy",
32 | category = "alien-economy",
33 | place_result = "alien-mining-drill",
34 | order = "c",
35 | stack_size = 200
36 | }
37 | })
38 |
39 |
40 |
--------------------------------------------------------------------------------
/alien-module/prototypes/item/alien-module.lua:
--------------------------------------------------------------------------------
1 | -- alien modules --
2 |
3 | data:extend({
4 | {
5 | type = "module",
6 | name = "alien-module-1",
7 | icon = "__alien-module__/graphics/alien-module-1.png",
8 | icon_size = 32,
9 | subgroup = "alien-module",
10 | category = "alien-module",
11 | tier = 1,
12 | order = "a-1",
13 | stack_size = 50,
14 | weight = 10000,
15 | effect = {
16 | consumption = 0.1,
17 | speed = 0.05,
18 | productivity = 0.025
19 | },
20 | },
21 | })
22 |
23 | local qualityenabled = settings.startup["alien-module-hyper-quality-enabled"].value
24 | local quality_base_bonus = 0
25 |
26 | if qualityenabled == true then
27 | quality_base_bonus = 1
28 | end
29 |
30 | log("Quality Base bonus is " .. quality_base_bonus)
31 |
32 | for i = 1, 100, 1 do
33 | local levelbonus = i * (settings.startup["alien-module-hyper-module-effect"].value + 0.00001)
34 |
35 | data:extend({
36 | {
37 | type = "module",
38 | name = "alien-hyper-module-" .. i,
39 | icons = {
40 | {
41 | icon = "__base__/graphics/icons/speed-module-3.png",
42 | tint = {
43 | r = 0.5 + 0.5 * i * 0.01,
44 | g = 0.55,
45 | b = 0.8,
46 | a = 1
47 | }
48 | }
49 | },
50 | icon_size = 64,
51 | subgroup = "alien-hyper-module",
52 | category = "alien-module",
53 | tier = i,
54 | order = "a-" .. i,
55 | stack_size = 50,
56 | weight = 20000,
57 | effect = {
58 | consumption = levelbonus * 2,
59 | speed = levelbonus,
60 | productivity = levelbonus,
61 | pollution = levelbonus * 2
62 | },
63 | },
64 | })
65 | -- adds the quality effect only if quality is enabled, this prevents quality from being a required dependency
66 | if mods["quality"] and qualityenabled == true then
67 | data.raw["module"]["alien-hyper-module-" .. i].effect = {
68 | consumption = levelbonus * 2,
69 | speed = levelbonus,
70 | productivity = levelbonus,
71 | pollution = levelbonus * 2,
72 | quality = levelbonus * quality_base_bonus
73 | }
74 | end
75 | end
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/alien-module/prototypes/item/alien-warfare.lua:
--------------------------------------------------------------------------------
1 | -- alien modules --
2 |
3 | data:extend({
4 | {
5 | type = "ammo",
6 | name = "alien-magazine",
7 | icon = "__alien-module__/graphics/alien-magazine.png",
8 | icon_size = 32,
9 | ammo_category = "bullet",
10 | ammo_type = {
11 | category = "bullet",
12 | action = {
13 | type = "direct",
14 | action_delivery = {
15 | type = "instant",
16 | max_range = 35,
17 | source_effects = {
18 | type = "create-explosion",
19 | entity_name = "explosion-gunshot"
20 | },
21 | target_effects = {
22 | {
23 | type = "create-entity",
24 | entity_name = "explosion-hit"
25 | },
26 | {
27 | type = "damage",
28 | damage = { amount = 10, type = "physical" }
29 | }
30 | }
31 | }
32 | }
33 | },
34 | magazine_size = 25,
35 | subgroup = "warfare",
36 | category = "alien-module",
37 | order = "ab",
38 | stack_size = 200
39 | }
40 | })
41 |
42 | if (settings.startup["alien-module-hyper-ammo-enabled"].value) then
43 | for i = 1, 100, 1 do
44 | data:extend({
45 | {
46 | type = "ammo",
47 | name = "alien-hyper-magazine-" .. i,
48 | icon = "__alien-module__/graphics/alien-hyper-magazine.png",
49 | icon_size = 64,
50 | ammo_category = "bullet",
51 | ammo_type = {
52 | category = "bullet",
53 | action = {
54 | type = "direct",
55 | action_delivery = {
56 | type = "instant",
57 | max_range = 35,
58 | source_effects = {
59 | type = "create-explosion",
60 | entity_name = "explosion-gunshot"
61 | },
62 | target_effects = {
63 | {
64 | type = "create-entity",
65 | entity_name = "explosion-hit"
66 | },
67 | {
68 | type = "damage",
69 | damage = { amount = 14 + 0.2 * i, type = "physical" }
70 | }
71 | }
72 | }
73 | }
74 | },
75 | magazine_size = 20,
76 | subgroup = "warfare",
77 | category = "alien-module",
78 | order = "ac",
79 | stack_size = 200
80 | }
81 | })
82 | end
83 | end
84 |
85 | data:extend({
86 | {
87 | type = "ammo",
88 | name = "alien-ore-magazine",
89 | icon = "__alien-module__/graphics/alien-ore-magazine.png",
90 | icon_size = 32,
91 | ammo_category = "bullet",
92 | ammo_type = {
93 | category = "bullet",
94 | action = {
95 | type = "direct",
96 | action_delivery = {
97 | type = "instant",
98 | source_effects = {
99 | type = "create-explosion",
100 | entity_name = "explosion-gunshot"
101 | },
102 | target_effects = {
103 | {
104 | type = "create-entity",
105 | entity_name = "explosion-hit"
106 | },
107 | {
108 | type = "damage",
109 | damage = { amount = 4, type = "physical" }
110 | }
111 | }
112 | }
113 | }
114 | },
115 | magazine_size = 35,
116 | subgroup = "warfare",
117 | category = "alien-module",
118 | order = "aa",
119 | stack_size = 100
120 | }
121 | })
122 |
--------------------------------------------------------------------------------
/alien-module/prototypes/recipe/alien-module.lua:
--------------------------------------------------------------------------------
1 | -- make alien plate from alien ore --
2 | data:extend({
3 | {
4 | type = "recipe",
5 | name = "alien-plate",
6 | category = "smelting",
7 | enabled = false,
8 | energy_required = 10,
9 | ingredients = { { type = "item", name = "artifact-ore", amount = 1 } },
10 | results = { { type = "item", name = "alien-plate", amount = 1 } },
11 | allowed_module_categories = { "productivity", "efficiency", "speed" }
12 | }
13 | })
14 |
15 | if (settings.startup["alien-module-ore-conversion"].value) then
16 | -- make iron ore from alien ore --
17 | data:extend({
18 | {
19 | type = "recipe",
20 | name = "alien-ore-to-iron-ore",
21 | enabled = true,
22 | energy_required = 10,
23 | ingredients = { { type = "item", name = "artifact-ore", amount = 1 } },
24 | results = { { type = "item", name = "iron-ore", amount = 5 } }
25 | }
26 | })
27 |
28 | -- make copper ore from alien ore --
29 | data:extend({
30 | {
31 | type = "recipe",
32 | name = "alien-ore-to-copper-ore",
33 | enabled = true,
34 | energy_required = 10,
35 | ingredients = { { type = "item", name = "artifact-ore", amount = 1 } },
36 | results = { { type = "item", name = "copper-ore", amount = 5 } }
37 | }
38 | })
39 |
40 | -- make stone ore from alien ore --
41 | data:extend({
42 | {
43 | type = "recipe",
44 | name = "alien-ore-to-stone",
45 | enabled = true,
46 | energy_required = 10,
47 | ingredients = { { type = "item", name = "artifact-ore", amount = 1 } },
48 | results = { { type = "item", name = "stone", amount = 5 } }
49 | }
50 | })
51 |
52 | -- make uranium ore from alien ore --
53 | data:extend({
54 | {
55 | type = "recipe",
56 | name = "alien-ore-to-uranium-ore",
57 | enabled = true,
58 | energy_required = 20,
59 | ingredients = { { type = "item", name = "artifact-ore", amount = 2 } },
60 | results = { { type = "item", name = "uranium-ore", amount = 1 } }
61 | }
62 | })
63 |
64 | -- make coal from alien ore --
65 | data:extend({
66 | {
67 | type = "recipe",
68 | name = "alien-ore-to-coal",
69 | enabled = true,
70 | energy_required = 10,
71 | ingredients = { { type = "item", name = "artifact-ore", amount = 1 } },
72 | results = { { type = "item", name = "coal", amount = 5 } }
73 | }
74 | })
75 | end
76 |
77 | -- if bobs enemies is enabled, make conversion of alien artifacts possible
78 | if data.raw["item"]["alien-artifact"] ~= nil then
79 | data:extend({
80 | {
81 | type = "recipe",
82 | name = "alien-artifact-to-ore",
83 | enabled = true,
84 | energy_required = 25,
85 | ingredients = { { type = "item", name = "alien-artifact", amount = 1 }, { type = "item", name = "stone", amount = 5 }, { type = "item", name = "iron-ore", amount = 5 } },
86 | results = { { type = "item", name = "artifact-ore", amount = 5 } }
87 | }
88 | })
89 | end
90 |
91 | data:extend({
92 | {
93 | type = "recipe",
94 | name = "alien-accumulator",
95 | energy_required = 10,
96 | enabled = false,
97 | ingredients = {
98 | { type = "item", name = "alien-plate", amount = 5 },
99 | { type = "item", name = "battery", amount = 10 }
100 | },
101 | results = { { type = "item", name = "alien-accumulator", amount = 1 } }
102 | }
103 | })
104 |
105 | data:extend({
106 | {
107 | type = "recipe",
108 | name = "alien-solarpanel",
109 | enabled = false,
110 | energy_required = 8,
111 | ingredients = { { type = "item", name = "alien-plate", amount = 10 }, { type = "item", name = "electronic-circuit", amount = 10 }, { type = "item", name = "steel-plate", amount = 5 } },
112 | results = { { type = "item", name = "alien-solarpanel", amount = 1 } }
113 | }
114 | })
115 |
116 | data:extend({
117 | {
118 | type = "recipe",
119 | name = "alien-mining-drill",
120 | enabled = true,
121 | energy_required = 8,
122 | ingredients = { { type = "item", name = "alien-plate", amount = 50 }, { type = "item", name = "electronic-circuit", amount = 10 }, { type = "item", name = "iron-gear-wheel", amount = 10 } },
123 | results = { { type = "item", name = "alien-mining-drill", amount = 1 } }
124 | }
125 | })
126 |
127 | -- alien-module-1 from alien-plate --
128 | data:extend({
129 | {
130 | type = "recipe",
131 | name = "alien-module-1",
132 | enabled = false,
133 | energy_required = 20,
134 | results = { { type = "item", name = "alien-module-1", amount = 1 } },
135 | ingredients = {
136 | { type = "item", name = "alien-plate", amount = 50 }
137 | }
138 | },
139 | })
140 |
141 | -- alien-fuel --
142 |
143 | data:extend({
144 | {
145 | type = "recipe",
146 | name = "alien-fuel",
147 | enabled = false,
148 | energy_required = 5,
149 | results = { { type = "item", name = "alien-fuel", amount = 1 } },
150 | ingredients = {
151 | { type = "item", name = "artifact-ore", amount = 2 },
152 | { type = "item", name = "coal", amount = 10 }
153 | },
154 | },
155 | })
156 |
157 | for i = 1, 100, 1 do
158 | data:extend({
159 | {
160 | type = "recipe",
161 | name = "alien-hyper-module-" .. i,
162 | enabled = false,
163 | hidden_in_factoriopedia = true,
164 | energy_required = i,
165 | results = { { type = "item", name = "alien-hyper-module-" .. i, amount = 1 } },
166 | ingredients = {
167 | { type = "item", name = "alien-plate", amount = 20 * i }
168 | },
169 | allowed_module_categories = { "productivity", "efficiency", "speed" }
170 | },
171 | })
172 |
173 | --adds the electronics catagory to modules if spaceage is installed
174 | if mods["space-age"] then
175 | data.raw["recipe"]["alien-hyper-module-" .. i].category = "electronics"
176 | end
177 |
178 | -- allows quality modules if quality is installed
179 | if mods["quality"] then
180 | data.raw["recipe"]["alien-hyper-module-" .. i].allowed_module_categories = { "productivity", "efficiency", "speed", "quality" }
181 | data.raw["recipe"]["alien-plate"].allowed_module_categories = { "productivity", "efficiency", "speed", "quality" }
182 | end
183 | end
184 |
--------------------------------------------------------------------------------
/alien-module/prototypes/recipe/alien-warfare.lua:
--------------------------------------------------------------------------------
1 | -- alien-magazine --
2 | data:extend({
3 | {
4 | type = "recipe",
5 | name = "alien-magazine",
6 | enabled = false,
7 | energy_required = 10,
8 | results = { { type = "item", name = "alien-magazine", amount = 1 } },
9 | ingredients = {
10 | { type = "item", name = "alien-plate", amount = 1 }, { type = "item", name = "iron-plate", amount = 2 }, { type = "item", name = "copper-plate", amount = 2 }
11 | },
12 | },
13 | })
14 |
15 | data:extend({
16 | {
17 | type = "recipe",
18 | name = "alien-ore-magazine",
19 | enabled = false,
20 | energy_required = 2,
21 | results = { { type = "item", name = "alien-ore-magazine", amount = 1 } },
22 | ingredients = {
23 | { type = "item", name = "artifact-ore", amount = 1 }
24 | },
25 | },
26 | })
27 |
28 | if (settings.startup["alien-module-hyper-ammo-enabled"].value) then
29 | for i = 1, 100, 1 do
30 | data:extend({
31 | {
32 | type = "recipe",
33 | name = "alien-hyper-magazine-" .. i,
34 | enabled = false,
35 | hidden_in_factoriopedia = true,
36 | energy_required = i,
37 | results = { { type = "item", name = "alien-hyper-magazine-" .. i, amount = 1 } },
38 | ingredients = {
39 | { type = "item", name = "alien-plate", amount = 2 }, { type = "item", name = "iron-plate", amount = 2 }, { type = "item", name = "copper-plate", amount = 2 }
40 | },
41 | },
42 | })
43 | end
44 | end
--------------------------------------------------------------------------------
/alien-module/prototypes/sounds.lua:
--------------------------------------------------------------------------------
1 | data:extend({
2 | {
3 | type = "sound",
4 | name = "alien-level-up",
5 | filename = "__alien-module__/sound/level_up.ogg",
6 | volume = 1
7 | }
8 | })
--------------------------------------------------------------------------------
/alien-module/prototypes/technology/technology.lua:
--------------------------------------------------------------------------------
1 | table.insert(data.raw["technology"]["military"].effects,
2 | {
3 | type = "unlock-recipe",
4 | recipe = "alien-plate"
5 | })
6 |
7 | table.insert(data.raw["technology"]["military"].effects,
8 | {
9 | type = "unlock-recipe",
10 | recipe = "alien-magazine"
11 | })
12 |
13 | if settings.startup["alien-module-hyper-ammo-enabled"].value then
14 | table.insert(data.raw["technology"]["military"].effects,
15 | {
16 | type = "unlock-recipe",
17 | recipe = "alien-hyper-magazine-1"
18 | })
19 | end
20 |
21 | table.insert(data.raw["technology"]["military"].effects,
22 | {
23 | type = "unlock-recipe",
24 | recipe = "alien-ore-magazine"
25 | })
26 |
27 | table.insert(data.raw["technology"]["military"].effects,
28 | {
29 | type = "unlock-recipe",
30 | recipe = "alien-fuel"
31 | })
32 |
33 | if data.raw["item"]["alien-artifact"] then
34 | table.insert(data.raw["technology"]["automation"].effects,
35 | {
36 | type = "unlock-recipe",
37 | recipe = "alien-artifact-to-ore"
38 | })
39 | end
40 |
41 | table.insert(data.raw["technology"]["automation"].effects,
42 | {
43 | type = "unlock-recipe",
44 | recipe = "alien-module-1"
45 | })
46 |
47 | table.insert(data.raw["technology"]["automation"].effects,
48 | {
49 | type = "unlock-recipe",
50 | recipe = "alien-hyper-module-1"
51 | })
52 |
53 | table.insert(data.raw["technology"]["automation"].effects,
54 | {
55 | type = "unlock-recipe",
56 | recipe = "alien-mining-drill"
57 | })
58 |
59 | table.insert(data.raw["technology"]["solar-energy"].effects,
60 | {
61 | type = "unlock-recipe",
62 | recipe = "alien-solarpanel"
63 | })
64 |
65 | table.insert(data.raw["technology"]["electric-energy-accumulators"].effects,
66 | {
67 | type = "unlock-recipe",
68 | recipe = "alien-accumulator"
69 | })
70 |
--------------------------------------------------------------------------------
/alien-module/settings.lua:
--------------------------------------------------------------------------------
1 | data:extend({
2 | {
3 | type = "bool-setting",
4 | name = "alien-module-ore-conversion",
5 | order = "a",
6 | setting_type = "startup",
7 | default_value = true
8 | },
9 | {
10 | type = "bool-setting",
11 | name = "alien-module-hyper-ammo-enabled",
12 | order = "aa",
13 | setting_type = "startup",
14 | default_value = true
15 | },
16 | {
17 | type = "double-setting",
18 | name = "alien-module-level-exponent",
19 | order = "b",
20 | minimum_value = 0.08, maximum_value = 0.20,
21 | setting_type = "startup",
22 | default_value = 0.10
23 | },
24 | {
25 | type = "double-setting",
26 | name = "alien-module-hyper-module-effect",
27 | order = "c",
28 | minimum_value = 0.001, maximum_value = 0.1,
29 | setting_type = "startup",
30 | default_value = 0.01
31 | },
32 | {
33 | type = "bool-setting",
34 | name = "alien-module-hyper-quality-enabled",
35 | order = "d",
36 | setting_type = "startup",
37 | default_value = true
38 | },
39 | {
40 | type = "int-setting",
41 | name = "alien-module-drop-amount",
42 | order = "d",
43 | minimum_value = 1, maximum_value = 10000,
44 | setting_type = "startup",
45 | default_value = 100
46 | },
47 | {
48 | type = "int-setting",
49 | name = "rampant-alienmodule-compat-max-count-turret",
50 | setting_type = "startup",
51 | order = "2count-2-2",
52 | default_value = 5,
53 | minimum_value = 0,
54 | maximum_value = 50
55 | },
56 | {
57 | type = "int-setting",
58 | name = "rampant-alienmodule-compat-max-count-spawner",
59 | setting_type = "startup",
60 | order = "2count-3-2",
61 | default_value = 10,
62 | minimum_value = 0,
63 | maximum_value = 100
64 | },
65 |
66 | })
--------------------------------------------------------------------------------
/alien-module/sound/level_up.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/sound/level_up.ogg
--------------------------------------------------------------------------------
/alien-module/thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renoth/factorio-alien-module/beb05f29fbf4c2b73e4e9395351c22308826f9db/alien-module/thumbnail.png
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | de.renoth
8 | alien-loot-economy
9 | 2.0.13
10 |
11 |
12 | UTF-8
13 |
14 |
15 |
16 | ${project.artifactId}
17 |
18 |
19 | maven-assembly-plugin
20 | 3.6.0
21 |
22 | alien-module_${project.version}
23 | false
24 |
25 | src/package.xml
26 |
27 | posix
28 |
29 |
30 |
31 |
32 | maven-resources-plugin
33 | 3.3.1
34 |
35 |
36 | copy-resource-one
37 | install
38 |
39 | copy-resources
40 |
41 |
42 |
43 | ${factorio.mod.path}
44 |
45 |
46 | ${project.build.directory}
47 |
48 | *.zip
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | org.codehaus.mojo
59 | properties-maven-plugin
60 | 1.2.0
61 |
62 |
63 | initialize
64 |
65 | read-project-properties
66 |
67 |
68 |
69 | src/config.properties
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/src/config.properties:
--------------------------------------------------------------------------------
1 | factorio.mod.path=C:\\Users\\johan\\AppData\\Roaming\\Factorio\\mods
--------------------------------------------------------------------------------
/src/package.xml:
--------------------------------------------------------------------------------
1 |
5 | alien-module
6 |
7 |
8 | zip
9 |
10 |
11 | false
12 |
13 |
14 | alien-module
15 | alien-module_${version}
16 |
17 |
18 |
--------------------------------------------------------------------------------