Skip to content

Commit 817c9b6

Browse files
committed
Locale. Readme. Bugfixes. Balance-changes.
1 parent d9e9443 commit 817c9b6

File tree

7 files changed

+57
-28
lines changed

7 files changed

+57
-28
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
Factorio Tower Defense Scenario
22
===============================
33

4-
The map file is not in the repository so don't try pulling from here at this stage.
4+
What is this?
5+
-------------
6+
This is factorio in a tower defense style scenario. It is faster paced than sandbox mode and the campaign levels and you will be entirely focused on building your defenses and holding off waves. The closest analogon is the wave defense scenario in vanilla, though this one has a few twists on its own. It will take about an hour if you can live through it. The difficulty is somewhere between hard and very hard but not insane. Playing in multiplayer may make things easier.
7+
8+
This is an early version of the scenario that is playable but not entirely polished. Balancing could definitely use work, it's missing a few features and there are still some bugs, the most visible ones are related to biters. Nevertheless I think it is enjoyable in its current state. I would like to add difficulty levels eventually but I'd like to get the one difficulty that exists currently balanced first. At this point I'd like to see feedback on pretty much everything in the scenario.
9+

data/rocket-turret.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Table.merge_into_first{entity, {
8383
{
8484
type = "projectile",
8585
ammo_category = "rocket",
86-
cooldown = 75,
86+
cooldown = 90,
8787
projectile_creation_distance = 1.39375,
8888
projectile_center = {0.0625, -0.0875}, -- same as rocket_turret_attack shift
8989
damage_modifier = 1, --1.2

locale/en/en.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[entity-name]
2+
rocket-turret=Rocket turret
3+
artillery-turret-medium-range=Artillery Turret
4+
5+
[technology-name]
6+
rocket-turret=Rocket Turret
7+
rocket-turret-damage=Rocket Turret Damage
8+
9+
[technology-description]
10+
rocket-turret=Advanced defensive buildings that fire rockets. They might damage your own buildings if you are not careful.
11+
rocket-turret-damage=Increases the damage of rocket turrets.
12+
13+
[modifier-description]
14+
rocket.turret-attack-bonus=Rocket Turret Shooting Speed: +__1__

scenarios/towerdefense_basic/Utils

Submodule Utils updated 1 file

scenarios/towerdefense_basic/control.lua

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,18 @@ local mod_gui = require("mod-gui")
2424
-- TODO
2525
-------------------------------------------------------------------------------
2626

27-
-- Cliff in SE
2827
-- License
29-
-- Testing
3028

3129
-- Testing round 2
3230

3331
-- Voting UI
3432
-- Difficulty ui
3533
-- Difficulties
36-
37-
-- Outside game system
38-
-- Reset surface
34+
-- Lobby
3935

4036
-- Determine Wave Group movement ticks in advance so they are timed evenly
4137

4238
-- Sort upgrade ui.
43-
-- Table UI is buggy again.
4439

4540
-- Multiplayer Debugging
4641
-- Player Name
@@ -57,14 +52,19 @@ local mod_gui = require("mod-gui")
5752
-- Wave System
5853
-- Upgrade and Money System
5954
-- Upgrade Data
60-
-- inventory and equipment data
55+
-- Forces, players set up
6156
-- Starting inventory and equipment system
57+
-- inventory and equipment data
58+
-- Cliff Tools
6259
-- Map
6360
-- Loot on map
6461
-- Map script data
65-
-- Forces, players set up
6662
-- Rocket Turret
6763
-- System Sounds
64+
-- Upgrade UI
65+
-- Wave UI
66+
-- Hints
67+
6868

6969

7070

@@ -88,7 +88,7 @@ local mod_gui = require("mod-gui")
8888
-- Game Constants
8989
-------------------------------------------------------------------------------
9090

91-
-- TODO: {x = 217.5, y = 72.5} causes bugs
91+
-- TODO: {x = 217.5, y = 72.5} causes bugs but it's still on the map.
9292
local buffers = {{x = 180.5, y = 57.5}, {x = 186.5, y = 41.5}, {x = 187.5, y = 51.5}, {x = 187.5, y = 64.5}, {x = 177.5, y = 73.5}, {x = 181.5, y = 90.5}, {x = 187.5, y = 83.5}, {x = 199.5, y = 57.5}, {x = 207.5, y = 52.5}, {x = 214.5, y = 45.5}, {x = 217.5, y = 53.5}, {x = 195.5, y = 95.5}, {x = 197.5, y = 81.5}, {x = 204.5, y = 87.5}, {x = 221.5, y = 84.5}, {x = 225.5, y = 42.5}, {x = 226.5, y = 59.5}, {x = 233.5, y = 52.5}, {x = 240.5, y = 58.5}, {x = 231.5, y = 83.5}, {x = 233.5, y = 65.5}, {x = 237.5, y = 75.5}}
9393
local buffers_1 = {}
9494
local buffers_2 = {}
@@ -102,15 +102,15 @@ end
102102

103103
local scenario_constants = {
104104
spawner_money = 3,
105-
wave_money = 8,
105+
wave_money = 10,
106106
initial_money = 15,
107107
player_spawn_position = {105, -75},
108108
artillery_initial_ammo = 3,
109109
initial_wait = 10 * 60 * 60,
110110
wave_delay = 5 * 60 * 60,
111111
lane1 = {
112112
weight = 1,
113-
path = {{206, 66}, {165, 40}, {121, 0}, {121, -50}, {128, -90}},
113+
path = {{206, 66}, {165, 40}, {121, 0}, {120, -37}, {128, -90}},
114114
buffers = buffers_1
115115
},
116116
lane2 = {
@@ -274,22 +274,22 @@ local scenario_constants = {
274274
{
275275
name = "Bullet Upgrade",
276276
description = "Upgrades bullet damage and shooting speed.",
277-
cost = 8,
278-
cost_increase = 2,
277+
cost = 6,
278+
cost_increase = 1,
279279
icon = "item/piercing-rounds-magazine",
280280
unlock = {
281281
"bullet-damage",
282282
"bullet-speed"
283283
},
284-
level_max = 3,
284+
level_max = 4,
285285
},
286286
{
287-
name = "Turret Upgrade",
288-
description = "Upgrades turret damage.",
289-
cost = 6,
287+
name = "Gun Turret Upgrade",
288+
description = "Upgrades gun turret damage.",
289+
cost = 4,
290290
icon = "item/gun-turret",
291291
unlock = "gun-turret-damage",
292-
level_max = 3,
292+
level_max = 4,
293293
},
294294
{
295295
name = "Laser Turret Upgrade",
@@ -372,7 +372,7 @@ local scenario_constants = {
372372
},
373373
{
374374
name = "Nuclear Technology",
375-
description = "Unlocks uranium ammo and nuclear bombs (by the way, there is no friendly fire in this mode). \n\nYou will need sulfuric acid and uranium.",
375+
description = "Unlocks uranium ammo. \n\nYou will need sulfuric acid and uranium.",
376376
cost = 20,
377377
icon = "item/uranium-rounds-magazine",
378378
unlock = {
@@ -403,12 +403,12 @@ local scenario_constants = {
403403
},
404404
{
405405
name = "Faster Movement",
406-
description = "Increases running speed by 80% of vanilla speed.",
406+
description = "Increases running speed by 50% of current.",
407407
cost = 12,
408408
icon = "item/exoskeleton-equipment",
409409
max_level = 2,
410410
action = function(game_control, upgrade_data)
411-
game_control.player_force.character_running_speed_modifier = game_control.player_force.character_running_speed_modifier + 0.8
411+
game_control.player_force.character_running_speed_modifier = game_control.player_force.character_running_speed_modifier + 1
412412
end
413413
},
414414
-- {
@@ -462,6 +462,7 @@ local scenario_constants = {
462462
duration_factor = 1,
463463
}
464464
},
465+
-- Unused
465466
lobby_positions = { -- Available positions on lobby surface
466467
{17, -50},
467468
-- {5, 90},
@@ -499,7 +500,7 @@ scenario_constants.hints = {
499500
[9] = "Final wave. Good luck. "
500501
}
501502

502-
scenario_constants.ending_message = "Credits: This scenario uses \n - factorio stdlib. \n - predictabowl's rocket turret. \n\n Made by unique_2. Thanks for playing!"
503+
scenario_constants.ending_message = "Made by unique_2.\n This scenario uses \n - factorio stdlib. \n - predictabowl's rocket turret. \n\n Thanks for playing!"
503504

504505

505506

@@ -771,9 +772,11 @@ local function reset_surface(game_control)
771772
if ent.get_inventory(defines.inventory.chest) then
772773
for name, count in pairs(loot_category.items) do
773774
ent.insert{name=name, count=count}
775+
ent.destructible = false
774776
end
775777
else
776-
ScenarioUtils.create_item_chests(surface, ent.position, game_control.neutral_force, loot_category.items)
778+
local chests = ScenarioUtils.create_item_chests(surface, ent.position, game_control.neutral_force, loot_category.items)
779+
for _, chest in pairs(chests or {}) do chest.destructible = false end
777780
end
778781
end
779782
end

scenarios/towerdefense_basic/wave_control.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,14 @@ Event.register(defines.events.on_entity_died, function(event)
416416
if not next(group.units) then
417417
lane.groups[group_ind] = nil
418418

419-
if not next(lane.groups) and wave.to_spawn.total <= 0 then
419+
local no_units = true
420+
for _, other_lane in pairs(wave.lanes) do
421+
if next(other_lane.groups) ~= nil then
422+
no_units = false
423+
end
424+
end
425+
426+
if no_units and wave.to_spawn.total <= 0 then
420427
wave_ended(wave_control, wave_ind)
421428
end
422429
end

0 commit comments

Comments
 (0)