science overhaul WIP

This commit is contained in:
PreLeyZero 2022-05-27 17:47:17 +02:00
parent 9026578fea
commit 41fc61168f
30 changed files with 243 additions and 2 deletions

View file

@ -1,8 +1,10 @@
--insert tech --insert tech
if data.raw.lab['lab'] then if data.raw.lab['lab'] then
table.insert(data.raw.lab['lab'].inputs, 'fu_space_probe_science_item')
table.insert(data.raw.lab['lab'].inputs, 'fi_ki_science') table.insert(data.raw.lab['lab'].inputs, 'fi_ki_science')
table.insert(data.raw.lab['lab'].inputs, 'fu_ki_science') table.insert(data.raw.lab['lab'].inputs, 'fu_ki_science')
if not settings.startup['overhaul_science'].value then
table.insert(data.raw.lab['lab'].inputs, 'fu_space_probe_science_item')
end
end end
--krastorio2 --krastorio2
if mods["Krastorio2"] then if mods["Krastorio2"] then

View file

@ -61,6 +61,7 @@ require('prototypes/fusion/fu_materials')
require('prototypes/fusion/fu_magnet') require('prototypes/fusion/fu_magnet')
require('prototypes/fusion/fu_miner') require('prototypes/fusion/fu_miner')
require('prototypes/fusion/fu_turbine') require('prototypes/fusion/fu_turbine')
require('prototypes/fusion/fu_lab')
require('prototypes/gravitation/gr_crafter') require('prototypes/gravitation/gr_crafter')
require('prototypes/gravitation/gr_materials') require('prototypes/gravitation/gr_materials')
@ -140,4 +141,7 @@ require('scripts/gravitation/gr_make_white_hole_recipes')
--make item vent recipes --make item vent recipes
require('scripts/electronic/el_burner') require('scripts/electronic/el_burner')
--science overhaul
require('scripts/science_overhaul')

View file

@ -426,6 +426,8 @@ gr_black_hole_energy_entity=Black hole generator
gr_white_hole_entity=White hole generator gr_white_hole_entity=White hole generator
gr_lab_entity=S-lab gr_lab_entity=S-lab
fu_lab_entity=T-lab
#equipment #equipment
[equipment-name] [equipment-name]
el_train_equipment_generator_item=Train electricity generator el_train_equipment_generator_item=Train electricity generator
@ -579,6 +581,8 @@ el_grenade_tech=Charged grenades
fi_grenade_tech=Overcharged grenades fi_grenade_tech=Overcharged grenades
fu_grenade_tech=Hypercharged grenades fu_grenade_tech=Hypercharged grenades
fu_lab_tech=T-lab
#effects #effects
[description] [description]
x2_ki_tech_eff=Double the module effects of all your KI cores! (Only works on KI3 beacon) x2_ki_tech_eff=Double the module effects of all your KI cores! (Only works on KI3 beacon)
@ -624,12 +628,17 @@ el_ki_core_energy_usage_3=KI3 core power usage
el_ki_core_energy_usage_input_2=KI2 core power input maximum el_ki_core_energy_usage_input_2=KI2 core power input maximum
el_ki_core_energy_usage_input_3=KI3 core power input maximum el_ki_core_energy_usage_input_3=KI3 core power input maximum
overhaul_science=Enable [color=#880fb4]science overhaul[/color].
retexture_science=Enable [color=green]science re-texturing[/color].
[mod-setting-description] [mod-setting-description]
el_ki_core_productivity=Allows to achieve very high productivity values in f.e. crafting machines, so use with caution. el_ki_core_productivity=Allows to achieve very high productivity values in f.e. crafting machines, so use with caution.
overhaul_mode=Overaul vanilla/Krastorio2 by inserting 248k in progression, aswell as in techs and recipes. \n[color=red]NOTE: When 248k is added in already existing save this may cause problems. For best gameplay use this on new world.[/color] overhaul_mode=Overaul vanilla/Krastorio2 by inserting 248k in progression, aswell as in techs and recipes. \n[color=red]NOTE: When 248k is added in already existing save this may cause problems. For best gameplay use this on new world.[/color]
overhaul_realistic_reactors=248ks nuclear reactor will become a research reactor to guide towards the realistic reactors. \nNuclear Fuel and other are integrated in 248k progression.[color=red] Only possible in Overaul mode.[/color] overhaul_realistic_reactors=248ks nuclear reactor will become a research reactor to guide towards the realistic reactors. \nNuclear Fuel and other are integrated in 248k progression.[color=red] Only possible in Overaul mode.[/color]
override_krastorio_endgame=Adjust Krastorio2 recipes for Anti-matter reactor, Intergalactic transreciever to require late game items of 248k. Intergalactic transceiver will require 1 [color=purple]248k element[/color]. override_krastorio_endgame=Adjust Krastorio2 recipes for Anti-matter reactor, Intergalactic transreciever to require late game items of 248k. Intergalactic transceiver will require 1 [color=purple]248k element[/color].
overhaul_science=[color=red][WIP][/color]. Change science by adding additional lab for exotic science. Will include more ways to make science and simulation methods in the future. \n[color=red]Will not work with Krastorio2. [/color]
retexture_science=Re-textures science packs with 248k icons. \n[color=red]Will not work with Krastorio2. [/color]
[item-limitation] [item-limitation]
limitation_message=This module can not be used here. limitation_message=This module can not be used here.

View file

@ -2890,6 +2890,30 @@ data:extend({
time = 100, time = 100,
}, },
}, },
{
name = 'fu_lab_tech',
type = 'technology',
icon = sprite('fu_lab_tech.png'),
icon_size = 128,
enabled = false,
prerequisites = {'fu_energy_tech'},
effects = {
{
type = 'unlock-recipe',
recipe = 'fu_lab_recipe',
},
},
unit = {
count = '200',
ingredients = {
{'chemical-science-pack',1},
{'automation-science-pack',1},
{'logistic-science-pack',1},
{'utility-science-pack',1}
},
time = 100,
},
},
--============================================================================================================================================================ --============================================================================================================================================================
--gravitational --gravitational
{ {

View file

@ -1891,4 +1891,24 @@ data:extend({
result_count = 1, result_count = 1,
energy_required = 4, energy_required = 4,
}, },
{
name = 'fu_lab_recipe',
type = 'recipe',
enabled = 'false',
category = 'crafting',
main_product = 'fu_lab_item',
ingredients = {
{type="item", name="concrete", amount=100},
{type="item", name="lab", amount=10},
{type="item", name="fu_materials_energy_charged_crystal", amount=10},
{type="item", name="fu_materials_KFK", amount=40},
{type="item", name="fu_materials_TIM", amount=40},
{type="item", name="fu_materials_magnet", amount=10},
},
results = {
{type="item", name="fu_lab_item", amount=1},
},
result_count = 1,
energy_required = 10,
},
}) })

View file

@ -0,0 +1,107 @@
--local functions
local function config(name)
return settings.startup['fu_fusor_'..name].value
end
local function sprite(name)
return '__248k__/ressources/fusion/fu_lab/fu_lab_'..name..".png"
end
--item
data:extend({
{
name = 'fu_lab_item',
type = 'item',
icon = sprite('icon'),
icon_size = 64,
place_result = 'fu_lab_entity',
stack_size = 20,
subgroup = 'fu_item_subgroup_c',
order = 'a-a',
},
})
--entity
data:extend({
{
name = "fu_lab_entity",
type = "lab",
icon = sprite("icon"),
icon_size = 64,
flags = {"player-creation","placeable-neutral"},
max_health = 1000,
corpse = "big-remnants",
collision_box = {{-5,-5},{5,5}},
selection_box = {{-5,-5},{5,5}},
map_color = {r=0, g=0, b=1, a=1},
minable = {
mining_time = 1,
result = "fu_lab_item",
},
researching_speed = 10,
energy_source = {
type = "electric",
usage_priority = "secondary-input"
},
energy_usage = "20MW",
inputs = {
"automation-science-pack",
"chemical-science-pack",
"logistic-science-pack",
"military-science-pack",
"production-science-pack",
"space-science-pack",
"utility-science-pack",
"fu_space_probe_science_item",
"fi_ki_science",
"fu_ki_science"
},
allowed_effects = {"speed", "productivity", "consumption", "pollution"},
module_specification = {
module_info_icon_shift = {
0,
0.8
},
module_slots = 4
},
off_animation = {
filename = sprite("off"),
size = {512*2,512*2},
scale = 0.41,
line_length = 1,
frame_count = 1,
animation_speed = 1,
shift = {1.5,-0.4}
},
on_animation = {
layers = {
{
filename = sprite("off"),
size = {512*2,512*2},
scale = 0.41,
line_length = 1,
frame_count = 1,
animation_speed = 0.4,
shift = {1.5,-0.4},
repeat_count = 16
},
{
filename = sprite("animation"),
size = {512*2,512*2},
scale = 0.41,
line_length = 4,
lines_per_file = 4,
frame_count = 16,
animation_speed = 0.4,
shift = {1.5,-0.4}
}
}
},
working_sound = {
sound = { filename = "__base__/sound/lab.ogg"},
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
apparent_volume = 0.7,
},
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -0,0 +1,61 @@
--===================================================================================================================
-- util
--===================================================================================================================
local function sprite(name)
return '__248k__/ressources/science/'..name..'.png'
end
local function retexture_science(table_in)
for i,v in ipairs(table_in) do
data.raw.tool[v[1]].icon_size = 64
data.raw.tool[v[1]].icon = sprite(v[2])
data.raw.technology[v[1]].icon_size = 128
data.raw.technology[v[1]].icon = sprite(v[2].."_tech")
end
end
--===================================================================================================================
-- tables
--===================================================================================================================
retexture_table = {
{"logistic-science-pack", "green_science"},
{"chemical-science-pack", "blue_science"},
{"military-science-pack", "grey_science"},
{"production-science-pack", "purple_science"},
{"utility-science-pack", "yellow_science"},
{"space-science-pack", "white_science"},
}
--===================================================================================================================
-- structures and adding
--===================================================================================================================
if settings.startup['retexture_science'].value then
-- indent ignored
--only retexture if no k2
if not mods["Krastorio2"] then
retexture_science(retexture_table)
data.raw.tool["automation-science-pack"].icon = sprite("red_science")
data.raw.tool["fu_space_probe_science_item"].icon = sprite("exotic_science")
end
end --indent ignored
if settings.startup['overhaul_science'].value then
-- indent ignored
--only overhaul if no k2
if not mods["Krastorio2"] then
data.raw.technology["fu_lab_tech"].enabled = true
table.insert(data.raw.technology["fu_space_probe_3_tech"].prerequisites, "fu_lab_tech")
end
end --indent ignored

View file

@ -124,4 +124,18 @@ data:extend({
default_value = true, default_value = true,
order = 'i-c', order = 'i-c',
}, },
{
name = 'retexture_science',
type = 'bool-setting',
setting_type = 'startup',
default_value = true,
order = 'i-d',
},
{
name = 'overhaul_science',
type = 'bool-setting',
setting_type = 'startup',
default_value = false,
order = 'i-d',
},
}) })