Skip to content

Commit 4f498df

Browse files
ukezi1ThoreMehrKiwiHawk
authored
2.0 compatibility for bobsenemies (#276)
* compatiblity for 2.0 * added fire-flame-13 from 1.1 base game * Removing unused properties * Adding missing localisations --------- Co-authored-by: Thore Mehr <thore.mehr@gmail.com> Co-authored-by: KiwiHawk <59639+KiwiHawk@users.noreply.github.com>
1 parent 2e4d1cb commit 4f498df

File tree

9 files changed

+140
-327
lines changed

9 files changed

+140
-327
lines changed
196 KB
Loading

bobenemies/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"contact": "robertagius@hotmail.com",
88
"homepage": "https://forums.factorio.com/viewforum.php?f=51",
99
"dependencies": [
10-
"base >= 1.2.0",
10+
"base >= 2.0",
1111
"boblibrary >= 1.3.0"
1212
],
1313
"description": "Re-adds Alien artifacts to the game.\nAdds 6 different coloured versions of artifacts to the game, each based on a different damage type.\nAdds small versions of artifacts dropped by biters and spitters.\nAdds extra damage type versions of big worm\nAdds a new Elemental nest that spawns the new biters and spitters\nAdds a big piercing biter and big electric spitter\nAdds Huge enemies of Acid and Explosive types\nAdds Giant enemies of Poison and Fire types\nAdds multi-type Titan type enemies\nAdds multi-type Badass behemoth enemies\nAdds multi-type Leviathan enemies, a real end-game threat."

bobenemies/prototypes/alien-artifact.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
2727
{
2828
type = "recipe",
2929
name = "alien-artifact-from-small",
30+
localised_name = { "item-name.alien-artifact" },
3031
results = { { type = "item", name = "alien-artifact", amount = 1 } },
3132
ingredients = {
3233
{ type = "item", name = "small-alien-artifact", amount = 25 },
@@ -52,6 +53,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
5253
{
5354
type = "recipe",
5455
name = "alien-artifact-red-from-basic",
56+
localised_name = { "item-name.alien-artifact-red" },
5557
results = {
5658
{ type = "item", name = "alien-artifact-red", amount = 5, ignored_by_productivity = 1, ignored_by_stats = 1 },
5759
},
@@ -76,6 +78,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
7678
{
7779
type = "recipe",
7880
name = "alien-artifact-orange-from-basic",
81+
localised_name = { "item-name.alien-artifact-orange" },
7982
results = {
8083
{
8184
type = "item",
@@ -106,6 +109,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
106109
{
107110
type = "recipe",
108111
name = "alien-artifact-yellow-from-basic",
112+
localised_name = { "item-name.alien-artifact-yellow" },
109113
results = {
110114
{
111115
type = "item",
@@ -136,6 +140,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
136140
{
137141
type = "recipe",
138142
name = "alien-artifact-green-from-basic",
143+
localised_name = { "item-name.alien-artifact-green" },
139144
results = {
140145
{
141146
type = "item",
@@ -166,6 +171,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
166171
{
167172
type = "recipe",
168173
name = "alien-artifact-blue-from-basic",
174+
localised_name = { "item-name.alien-artifact-blue" },
169175
results = {
170176
{
171177
type = "item",
@@ -196,6 +202,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
196202
{
197203
type = "recipe",
198204
name = "alien-artifact-purple-from-basic",
205+
localised_name = { "item-name.alien-artifact-purple" },
199206
results = {
200207
{
201208
type = "item",
@@ -229,6 +236,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
229236
{
230237
type = "recipe",
231238
name = "alien-artifact-red-from-small",
239+
localised_name = { "item-name.alien-artifact-red" },
232240
results = { { type = "item", name = "alien-artifact-red", amount = 1 } },
233241
ingredients = {
234242
{ type = "item", name = "small-alien-artifact-red", amount = 25 },
@@ -252,6 +260,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
252260
{
253261
type = "recipe",
254262
name = "alien-artifact-orange-from-small",
263+
localised_name = { "item-name.alien-artifact-orange" },
255264
results = { { type = "item", name = "alien-artifact-orange", amount = 1 } },
256265
ingredients = {
257266
{ type = "item", name = "small-alien-artifact-orange", amount = 25 },
@@ -275,6 +284,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
275284
{
276285
type = "recipe",
277286
name = "alien-artifact-yellow-from-small",
287+
localised_name = { "item-name.alien-artifact-yellow" },
278288
results = { { type = "item", name = "alien-artifact-yellow", amount = 1 } },
279289
ingredients = {
280290
{ type = "item", name = "small-alien-artifact-yellow", amount = 25 },
@@ -298,6 +308,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
298308
{
299309
type = "recipe",
300310
name = "alien-artifact-green-from-small",
311+
localised_name = { "item-name.alien-artifact-green" },
301312
results = { { type = "item", name = "alien-artifact-green", amount = 1 } },
302313
ingredients = {
303314
{ type = "item", name = "small-alien-artifact-green", amount = 25 },
@@ -321,6 +332,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
321332
{
322333
type = "recipe",
323334
name = "alien-artifact-blue-from-small",
335+
localised_name = { "item-name.alien-artifact-blue" },
324336
results = { { type = "item", name = "alien-artifact-blue", amount = 1 } },
325337
ingredients = {
326338
{ type = "item", name = "small-alien-artifact-blue", amount = 25 },
@@ -344,6 +356,7 @@ if settings.startup["bobmods-enemies-enableartifacts"].value == true then
344356
{
345357
type = "recipe",
346358
name = "alien-artifact-purple-from-small",
359+
localised_name = { "item-name.alien-artifact-purple" },
347360
results = { { type = "item", name = "alien-artifact-purple", amount = 1 } },
348361
ingredients = {
349362
{ type = "item", name = "small-alien-artifact-purple", amount = 25 },

bobenemies/prototypes/biters.lua

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ data:extend({
3737
type = "laser",
3838
percent = 5,
3939
},
40-
4140
{
4241
type = "bob-pierce",
4342
decrease = 2,
@@ -64,7 +63,6 @@ data:extend({
6463
type = "projectile",
6564
ammo_category = "melee",
6665
ammo_type = {
67-
category = "melee",
6866
target_type = "entity",
6967
action = {
7068
type = "direct",
@@ -96,7 +94,7 @@ data:extend({
9694
movement_speed = 0.17,
9795
distance_per_frame = 0.2,
9896
-- in pu
99-
pollution_to_join_attack = 100,
97+
absorptions_to_join_attack = { pollution = 100},
10098
corpse = "bob-big-piercing-biter-corpse",
10199
dying_explosion = "blood-explosion-big",
102100
working_sound = sounds.biter_calls_big(0.9),
@@ -188,7 +186,6 @@ data:extend({
188186
type = "projectile",
189187
ammo_category = "melee",
190188
ammo_type = {
191-
category = "melee",
192189
target_type = "entity",
193190
action = {
194191
type = "direct",
@@ -220,7 +217,7 @@ data:extend({
220217
movement_speed = 0.16,
221218
distance_per_frame = 0.15,
222219
-- in pu
223-
pollution_to_join_attack = 125,
220+
absorptions_to_join_attack = { pollution = 125},
224221
corpse = "bob-huge-acid-biter-corpse",
225222
dying_explosion = "blood-explosion-big",
226223
working_sound = sounds.biter_calls_big(1.2),
@@ -312,7 +309,6 @@ data:extend({
312309
type = "projectile",
313310
ammo_category = "melee",
314311
ammo_type = {
315-
category = "melee",
316312
target_type = "entity",
317313
action = {
318314
type = "direct",
@@ -344,7 +340,7 @@ data:extend({
344340
movement_speed = 0.16,
345341
distance_per_frame = 0.15,
346342
-- in pu
347-
pollution_to_join_attack = 125,
343+
absorptions_to_join_attack = { pollution = 125},
348344
corpse = "bob-huge-explosive-biter-corpse",
349345
dying_explosion = "blood-explosion-big",
350346
working_sound = sounds.biter_calls_big(1.2),
@@ -443,7 +439,6 @@ data:extend({
443439
cooldown = 35,
444440
ammo_category = "melee",
445441
ammo_type = {
446-
category = "melee",
447442
target_type = "entity",
448443
action = {
449444
type = "direct",
@@ -480,7 +475,7 @@ data:extend({
480475
movement_speed = 0.12,
481476
distance_per_frame = 0.2,
482477
-- in pu
483-
pollution_to_join_attack = 200,
478+
absorptions_to_join_attack = { pollution = 200},
484479
corpse = "bob-giant-poison-biter-corpse",
485480
dying_explosion = "blood-explosion-big",
486481
working_sound = sounds.biter_calls_big(1.5),
@@ -574,7 +569,6 @@ data:extend({
574569
cooldown = 35,
575570
ammo_category = "melee",
576571
ammo_type = {
577-
category = "melee",
578572
target_type = "entity",
579573
action = {
580574
type = "direct",
@@ -611,7 +605,7 @@ data:extend({
611605
movement_speed = 0.12,
612606
distance_per_frame = 0.2,
613607
-- in pu
614-
pollution_to_join_attack = 200,
608+
absorptions_to_join_attack = { pollution = 200},
615609
corpse = "bob-giant-fire-biter-corpse",
616610
dying_explosion = "blood-explosion-big",
617611
working_sound = sounds.biter_calls_big(1.5),
@@ -708,7 +702,6 @@ data:extend({
708702
cooldown = 35,
709703
ammo_category = "melee",
710704
ammo_type = {
711-
category = "melee",
712705
target_type = "entity",
713706
action = {
714707
type = "direct",
@@ -750,7 +743,7 @@ data:extend({
750743
movement_speed = 0.15,
751744
distance_per_frame = 0.2,
752745
-- in pu
753-
pollution_to_join_attack = 300,
746+
absorptions_to_join_attack = { pollution = 300},
754747
corpse = "bob-titan-biter-corpse",
755748
dying_explosion = "blood-explosion-big",
756749
working_sound = sounds.biter_calls_big(1.5),
@@ -849,7 +842,6 @@ data:extend({
849842
cooldown = 35,
850843
ammo_category = "melee",
851844
ammo_type = {
852-
category = "melee",
853845
target_type = "entity",
854846
action = {
855847
type = "direct",
@@ -895,7 +887,7 @@ data:extend({
895887
movement_speed = 0.2,
896888
distance_per_frame = 0.2,
897889
-- in pu
898-
pollution_to_join_attack = 500,
890+
absorptions_to_join_attack = { pollution = 500},
899891
corpse = "bob-behemoth-biter-corpse",
900892
dying_explosion = "blood-explosion-big",
901893
working_sound = sounds.biter_calls_big(1.5),
@@ -1000,7 +992,6 @@ data:extend({
1000992
cooldown = 35,
1001993
ammo_category = "melee",
1002994
ammo_type = {
1003-
category = "melee",
1004995
target_type = "entity",
1005996
action = {
1006997
type = "direct",
@@ -1058,7 +1049,7 @@ data:extend({
10581049
movement_speed = 0.2,
10591050
distance_per_frame = 0.2,
10601051
-- in pu
1061-
pollution_to_join_attack = 1000,
1052+
absorptions_to_join_attack = { pollution = 1000},
10621053
corpse = "bob-leviathan-biter-corpse",
10631054
dying_explosion = "blood-explosion-big",
10641055
working_sound = sounds.biter_calls_big(1.5),

bobenemies/prototypes/entities.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@ data:extend({
7878
name = "poison-sticker",
7979
flags = { "not-on-map" },
8080
animation = {
81-
filename = "__base__/graphics/entity/fire-flame/fire-flame-13.png",
81+
filename = "__bobenemies__/graphics/entity/fire-flame/fire-flame-13.png",
8282
line_length = 8,
8383
width = 60,
8484
height = 118,
8585
frame_count = 25,
86-
direction_count = 1,
8786
blend_mode = "additive",
8887
animation_speed = 1,
8988
scale = 0.4,

bobenemies/prototypes/functions.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ function bobmods.enemies.spitter_attack_parameters(data)
175175
use_shooter_direction = true,
176176
lead_target_for_projectile_speed = 0.2 * 0.75 * 1.5 * 1.5, -- this is same as particle horizontal speed of flamethrower fire stream
177177
ammo_type = {
178-
category = "biological",
179178
action = {
180179
type = "direct",
181180
action_delivery = {

bobenemies/prototypes/spawners.lua

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,19 @@ data:extend({
6969
collision_box = { { -3.2, -2.2 }, { 2.2, 2.2 } },
7070
selection_box = { { -3.5, -2.5 }, { 2.5, 2.5 } },
7171
map_generator_bounding_box = { { -4.2, -3.2 }, { 3.2, 3.2 } },
72-
pollution_absorption_absolute = 80,
73-
pollution_absorption_proportional = 0.03,
72+
absorptions_per_second = { pollution = { absolute = 80, proportional = 0.03 } },
7473
corpse = "bob-biter-spawner-corpse",
7574
dying_explosion = "blood-explosion-huge",
7675
loot = {},
7776
max_count_of_owned_units = 10,
7877
max_friends_around_to_spawn = 5,
79-
animations = {
80-
spawner_idle_animation(0, bobmods.enemies.biter_spawner_tint),
81-
spawner_idle_animation(1, bobmods.enemies.biter_spawner_tint),
82-
spawner_idle_animation(2, bobmods.enemies.biter_spawner_tint),
83-
spawner_idle_animation(3, bobmods.enemies.biter_spawner_tint),
78+
graphics_set = {
79+
animations = {
80+
spawner_idle_animation(0, bobmods.enemies.biter_spawner_tint),
81+
spawner_idle_animation(1, bobmods.enemies.biter_spawner_tint),
82+
spawner_idle_animation(2, bobmods.enemies.biter_spawner_tint),
83+
spawner_idle_animation(3, bobmods.enemies.biter_spawner_tint),
84+
},
8485
},
8586
result_units = {
8687
{ "small-biter", { { 0.0, 0.3 }, { 0.5, 0.3 }, { 0.6, 0.0 } } },
@@ -102,9 +103,10 @@ data:extend({
102103
spawning_spacing = 3,
103104
max_spawn_shift = 0,
104105
max_richness_for_spawn_shift = 100,
105-
autoplace = enemy_autoplace.enemy_spawner_autoplace(5),
106+
autoplace = enemy_autoplace.enemy_spawner_autoplace("enemy_autoplace_base(5, 8)"),
106107
build_base_evolution_requirement = 0.5,
107108
call_for_help_radius = 50,
109+
time_to_capture = 60 * 20,
108110
},
109111

110112
{
@@ -192,18 +194,19 @@ data:extend({
192194
collision_box = { { -3.2, -2.2 }, { 2.2, 2.2 } },
193195
selection_box = { { -3.5, -2.5 }, { 2.5, 2.5 } },
194196
map_generator_bounding_box = { { -4.2, -3.2 }, { 3.2, 3.2 } },
195-
pollution_absorption_absolute = 80,
196-
pollution_absorption_proportional = 0.03,
197+
absorptions_per_second = { pollution = { absolute = 80, proportional = 0.03 } },
197198
corpse = "bob-spitter-spawner-corpse",
198199
dying_explosion = "blood-explosion-huge",
199200
loot = {},
200201
max_count_of_owned_units = 10,
201202
max_friends_around_to_spawn = 5,
202-
animations = {
203-
spawner_idle_animation(0, bobmods.enemies.spitter_spawner_tint),
204-
spawner_idle_animation(1, bobmods.enemies.spitter_spawner_tint),
205-
spawner_idle_animation(2, bobmods.enemies.spitter_spawner_tint),
206-
spawner_idle_animation(3, bobmods.enemies.spitter_spawner_tint),
203+
graphics_set = {
204+
animations = {
205+
spawner_idle_animation(0, bobmods.enemies.biter_spawner_tint),
206+
spawner_idle_animation(1, bobmods.enemies.biter_spawner_tint),
207+
spawner_idle_animation(2, bobmods.enemies.biter_spawner_tint),
208+
spawner_idle_animation(3, bobmods.enemies.biter_spawner_tint),
209+
},
207210
},
208211
result_units = {
209212
{ "small-biter", { { 0.0, 0.3 }, { 0.2, 0.3 }, { 0.4, 0.0 } } },
@@ -226,7 +229,7 @@ data:extend({
226229
spawning_spacing = 3,
227230
max_spawn_shift = 0,
228231
max_richness_for_spawn_shift = 100,
229-
autoplace = enemy_autoplace.enemy_spawner_autoplace(5),
232+
autoplace = enemy_autoplace.enemy_spawner_autoplace("enemy_autoplace_base(5, 9)"),
230233
build_base_evolution_requirement = 0.5,
231234
call_for_help_radius = 50,
232235
},
@@ -331,18 +334,19 @@ if settings.startup["bobmods-enemies-superspawner"].value == true then
331334
collision_box = { { -3.2, -2.2 }, { 2.2, 2.2 } },
332335
selection_box = { { -3.5, -2.5 }, { 2.5, 2.5 } },
333336
map_generator_bounding_box = { { -4.2, -3.2 }, { 3.2, 3.2 } },
334-
pollution_absorption_absolute = 200,
335-
pollution_absorption_proportional = 0.1,
337+
absorptions_per_second = { pollution = { absolute = 20, proportional = 0.1 } },
336338
corpse = "bob-super-spawner-corpse",
337339
dying_explosion = "blood-explosion-huge",
338340
loot = {},
339341
max_count_of_owned_units = 20,
340342
max_friends_around_to_spawn = 10,
341-
animations = {
342-
spawner_idle_animation(0, bobmods.enemies.super_spawner_tint),
343-
spawner_idle_animation(1, bobmods.enemies.super_spawner_tint),
344-
spawner_idle_animation(2, bobmods.enemies.super_spawner_tint),
345-
spawner_idle_animation(3, bobmods.enemies.super_spawner_tint),
343+
graphics_set = {
344+
animations = {
345+
spawner_idle_animation(0, bobmods.enemies.biter_spawner_tint),
346+
spawner_idle_animation(1, bobmods.enemies.biter_spawner_tint),
347+
spawner_idle_animation(2, bobmods.enemies.biter_spawner_tint),
348+
spawner_idle_animation(3, bobmods.enemies.biter_spawner_tint),
349+
},
346350
},
347351
result_units = {
348352
{ "small-biter", { { 0.0, 0.3 }, { 0.5, 0.3 }, { 0.6, 0.0 } } },
@@ -368,7 +372,7 @@ if settings.startup["bobmods-enemies-superspawner"].value == true then
368372
spawning_spacing = 3,
369373
max_spawn_shift = 0,
370374
max_richness_for_spawn_shift = 100,
371-
autoplace = enemy_autoplace.enemy_spawner_autoplace(10),
375+
autoplace = enemy_autoplace.enemy_spawner_autoplace("enemy_autoplace_base(10, 11)"),
372376
build_base_evolution_requirement = 0.8,
373377
call_for_help_radius = 50,
374378
},

0 commit comments

Comments
 (0)