require "util" require "story" script.on_init(function() global.story = story_init() game.players[1].force.disable_all_prototypes() game.players[1].force.clear_chart() game.map_settings.enemy_expansion.enabled = false game.forces.enemy.evolution_factor = .2 game.map_settings.pollution.enabled = true game.map_settings.enemy_evolution.enabled = true local recipe_list = game.players[1].force.recipes recipe_list["iron-plate"].enabled = true recipe_list["copper-plate"].enabled = true recipe_list["stone-brick"].enabled = true recipe_list["stone-wall"].enabled = true recipe_list["gate"].enabled = true recipe_list["wood"].enabled = true recipe_list["stone-furnace"].enabled = true recipe_list["iron-stick"].enabled = true recipe_list["iron-axe"].enabled = true recipe_list["wooden-chest"].enabled = true recipe_list["iron-gear-wheel"].enabled = true recipe_list["burner-mining-drill"].enabled = true recipe_list["transport-belt"].enabled = true recipe_list["burner-inserter"].enabled = true recipe_list["offshore-pump"].enabled = true recipe_list["pipe"].enabled = true recipe_list["pipe-to-ground"].enabled = true recipe_list["boiler"].enabled = true recipe_list["steam-engine"].enabled = true recipe_list["electronic-circuit"].enabled = true recipe_list["copper-cable"].enabled = true recipe_list["pistol"].enabled = true recipe_list["submachine-gun"].enabled = true recipe_list["firearm-magazine"].enabled = true recipe_list["light-armor"].enabled = true recipe_list["electric-mining-drill"].enabled = true recipe_list["inserter"].enabled = true recipe_list["small-electric-pole"].enabled = true recipe_list["lab"].enabled = true recipe_list["science-pack-1"].enabled = true recipe_list["science-pack-2"].enabled = true recipe_list["iron-chest"].enabled = true recipe_list["repair-pack"].enabled = true local technology_list = game.players[1].force.technologies technology_list["laser"].enabled = true technology_list["logistics-3"].enabled = true technology_list["flamethrower"].enabled = true technology_list["flammables"].enabled = true technology_list["modules"].enabled = true technology_list["speed-module"].enabled = true technology_list["speed-module-2"].enabled = true technology_list["effectivity-module"].enabled = true technology_list["effectivity-module-2"].enabled = true technology_list["productivity-module"].enabled = true technology_list["productivity-module-2"].enabled = true technology_list["rocket-speed-1"].enabled = true technology_list["rocket-speed-2"].enabled = true technology_list["electric-energy-distribution-2"].enabled = true technology_list["oil-processing"].enabled = true technology_list["fluid-handling"].enabled = true technology_list["bullet-speed-3"].enabled = true technology_list["bullet-speed-4"].enabled = true technology_list["bullet-speed-5"].enabled = true technology_list["bullet-damage-3"].enabled = true technology_list["bullet-damage-4"].enabled = true technology_list["bullet-damage-5"].enabled = true technology_list["sulfur-processing"].enabled = true technology_list["plastics"].enabled = true technology_list["electric-engine"].enabled = true technology_list["toolbelt"].enabled = true technology_list["advanced-electronics"].enabled = true technology_list["explosives"].enabled = true technology_list["land-mine"].enabled = true technology_list["shotgun-shell-damage-1"].enabled = true technology_list["shotgun-shell-damage-2"].enabled = true technology_list["shotgun-shell-damage-3"].enabled = true technology_list["shotgun-shell-damage-4"].enabled = true technology_list["shotgun-shell-damage-5"].enabled = true technology_list["shotgun-shell-speed-1"].enabled = true technology_list["shotgun-shell-speed-2"].enabled = true technology_list["shotgun-shell-speed-3"].enabled = true technology_list["shotgun-shell-speed-4"].enabled = true technology_list["shotgun-shell-speed-5"].enabled = true technology_list["electric-energy-accumulators-1"].enabled = true technology_list["automation-3"].enabled = true technology_list["laser-turrets"].enabled = true technology_list["laser-turret-damage-1"].enabled = true technology_list["laser-turret-damage-2"].enabled = true technology_list["laser-turret-damage-3"].enabled = true technology_list["laser-turret-speed-1"].enabled = true technology_list["laser-turret-speed-2"].enabled = true technology_list["laser-turret-speed-3"].enabled = true technology_list["steel-processing"].researched = true technology_list["optics"].researched = true technology_list["logistics"].researched = true technology_list["logistics-2"].researched = true technology_list["automation"].researched = true technology_list["automation-2"].researched = true technology_list["electronics"].researched = true technology_list["military"].researched = true technology_list["military-2"].researched = true technology_list["military-3"].researched = true technology_list["turrets"].researched = true technology_list["heavy-armor"].researched = true technology_list["bullet-damage-1"].researched = true technology_list["bullet-damage-2"].researched = true technology_list["bullet-speed-1"].researched = true technology_list["bullet-speed-2"].researched = true technology_list["automobilism"].researched = true technology_list["railway"].researched = true technology_list["automated-rail-transportation"].researched = true technology_list["rail-signals"].researched = true technology_list["advanced-material-processing"].researched = true technology_list["advanced-material-processing-2"].researched = true technology_list["solar-energy"].researched = true technology_list["electric-energy-distribution-1"].researched = true technology_list["engine"].researched = true technology_list["combat-robotics"].researched = true technology_list["follower-robot-count-4"].researched = true technology_list["battery"].researched = true technology_list["rocketry"].researched = true technology_list["stone-walls"].researched = true technology_list["gates"].researched = true local character = game.players[1].character character.insert{name = "transport-belt", count = 150} character.insert{name = "fast-transport-belt", count = 50} character.insert{name = "inserter", count = 40} character.insert{name = "fast-inserter", count = 20} character.insert{name = "medium-electric-pole", count = 10} character.insert{name = "small-electric-pole", count = 15} character.insert{name = "electric-mining-drill", count = 20} character.insert{name = "underground-belt", count = 20} character.insert{name = "long-handed-inserter", count = 20} character.insert{name = "assembling-machine-1", count = 5} character.insert{name = "assembling-machine-2", count = 5} character.insert{name = "stone-wall", count = 100} character.insert{name = "gun-turret", count = 20} character.insert{name = "pipe", count = 20} character.insert{name = "boiler", count = 10} character.insert{name = "offshore-pump", count = 2} character.insert{name = "electric-furnace", count = 20} character.insert{name = "lab", count = 5} character.insert{name = "steam-engine", count = 5} character.insert{name = "iron-plate", count = 250} character.insert{name = "copper-plate", count = 250} character.insert{name = "submachine-gun", count = 1} character.insert{name = "piercing-rounds-magazine", count = 200} character.insert{name = "rocket-launcher", count = 1} character.insert{name = "rocket", count = 50} character.insert{name = "steel-axe", count = 1} character.insert{name = "heavy-armor", count = 2} character.insert{name = "small-lamp", count = 20} character.selected_gun_index = 1 local ldswagon1 = game.get_entity_by_tag("ldswagon1") ldswagon1.insert{name = "low-density-structure", count = 250} local ldswagon2 = game.get_entity_by_tag("ldswagon2") ldswagon2.insert{name = "low-density-structure", count = 250} local ldswagon3 = game.get_entity_by_tag("ldswagon3") ldswagon3.insert{name = "low-density-structure", count = 250} local ldswagon4 = game.get_entity_by_tag("ldswagon4") ldswagon4.insert{name = "low-density-structure", count = 250} local rcuwagon1 = game.get_entity_by_tag("rcuwagon1") rcuwagon1.insert{name = "rocket-control-unit", count = 250} local rcuwagon2 = game.get_entity_by_tag("rcuwagon2") rcuwagon2.insert{name = "rocket-control-unit", count = 250} local rcuwagon3 = game.get_entity_by_tag("rcuwagon3") rcuwagon3.insert{name = "rocket-control-unit", count = 250} local rcuwagon4 = game.get_entity_by_tag("rcuwagon4") rcuwagon4.insert{name = "rocket-control-unit", count = 250} local rfwagon1 = game.get_entity_by_tag("rfwagon1") rfwagon1.insert{name = "rocket-fuel", count = 250} local rfwagon2 = game.get_entity_by_tag("rfwagon2") rfwagon2.insert{name = "rocket-fuel", count = 250} local rfwagon3 = game.get_entity_by_tag("rfwagon3") rfwagon3.insert{name = "rocket-fuel", count = 250} local rfwagon4 = game.get_entity_by_tag("rfwagon4") rfwagon4.insert{name = "rocket-fuel", count = 250} local prometheuschest = game.get_entity_by_tag("prometheuschest") prometheuschest.insert{name = "rocket-launcher", count = 1} prometheuschest.insert{name = "rocket", count = 50} prometheuschest.insert{name = "artillery-shell", count = 25} prometheuschest.insert{name = "laser-turret", count = 20} end) story_table = { { { condition = story_elapsed_check(2) }, { action = function () story_show_message_dialog{text = {"msg-breaking-through"}} story_show_message_dialog{text = {"msg-secure-perimeter"}} end }, { condition = story_elapsed_check(5) }, { action = function () set_goal("goal-research") end }, { condition = function(event) return game.players[1].force.technologies["tanks"].researched and game.players[1].force.technologies["gates"].researched and game.players[1].force.technologies["flamethrower"].researched end }, { action = function() set_goal("") game.players[1].print({"msg-heavy-art"}) game.players[1].print({"msg-secure-art"}) end }, { condition = story_elapsed_check(5), }, { action = function() set_goal({"goal-secure-station"}) end }, { condition = function(event) return game.players[1].get_item_count("artillery-shell") >= 1 end }, { action = function() set_goal("") game.players[1].print({"msg-art-turret"}) game.players[1].print({"msg-cargo-wagon"}) game.players[1].print({"msg-atlas-silo"}) end }, { condition = story_elapsed_check(5) }, { action = function() set_goal({"goal-launch-turret"}) end }, } } story_init_helpers(story_table)