1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2025-03-05 14:45:19 +02:00

Messing around with resource generation default settings, and some other superificial gui stuff.

This commit is contained in:
Oarcinae 2019-02-28 21:08:25 -05:00
parent fb499bad0c
commit 07de8d1fe5
3 changed files with 75 additions and 38 deletions

View File

@ -1,5 +1,5 @@
-- config.lua
-- Apr 2017
-- Feb 2019
-- Configuration Options
--
-- You should be able to leave most of the settings here as defaults.
@ -13,8 +13,10 @@
-- This stuff is printed in the console. It's probably ignored most of the time.
WELCOME_MSG = "[INSERT SERVER OWNER MSG HERE!]"
GAME_MODE_MSG = "In the current game mode, a satellite must be launched from an existing far away rocket silo to win!"
MODULES_ENABLED = "Mods Enabled: Separate Spawns, RSO, Long-Reach, Autofill, Undecorator, Player List"
-- GAME_MODE_MSG = "In the current game mode, a satellite must be launched from an existing far away rocket silo to win!"
-- MODULES_ENABLED = "Mods Enabled: Separate Spawns, RSO, Long-Reach, Autofill, Undecorator, Player List"
GAME_MODE_MSG = "Game modes are a WIP."
MODULES_ENABLED = "Soft Mods Enabled: None"
-- This stuff is shown in the welcome GUI. Make sure it's valid.
WELCOME_MSG_TITLE = "[INSERT SERVER OWNER MSG HERE!]"
@ -22,7 +24,7 @@ SERVER_MSG = "Rules: Be polite. Ask before changing other players's stuff. Have
"This server is running a custom scenario that changes spawn locations."
SCENARIO_INFO_MSG = "Latest updates in this scenario version:\n"..
"0.16 experimental release. Tweaks to fix spawn issues / text / difficulty.\n"..
"0.17 experimental release. Lots of features removed, still WIP!\n"..
"This scenario gives you and/or your friends your own starting area.\n"..
"You can be on the main team or your own. All teams are friendly.\n"..
"If you leave in the first 15 minutes, your base and character will be deleted!"
@ -47,9 +49,9 @@ ENABLE_SEPARATE_SPAWNS = true
-- This allows 2 players to spawn next to each other in the wilderness,
-- each with their own starting point. It adds more GUI selection options.
ENABLE_BUDDY_SPAWN = false
ENABLE_BUDDY_SPAWN = true
-- RSO soft-mod (included in the scenario)
-- There's a good chance I will no longer be including RSO as a soft mod.
ENABLE_RSO = false
-- Frontier style rocket silo mode
@ -350,36 +352,57 @@ AUTOFILL_TURRET_AMMO_QUANTITY = 10
--------------------------------------------------------------------------------
-- Set this to true if you are creating the scenario at the cmd line.
CMD_LINE_MAP_GEN = false
CMD_LINE_MAP_GEN = true
-- Adjust settings here to set your map stuff.
-- "Sizes can be specified as none, very-low, low, normal, high, very-high"
global.clMapGen = {}
global.clMapGen.terrain_segmentation="normal"
global.clMapGen.water="normal"
global.clMapGen.starting_area="low"
global.clMapGen.terrain_segmentation=1
global.clMapGen.water = 1
global.clMapGen.starting_area=1
global.clMapGen.peaceful_mode=false
global.clMapGen.seed=nil;
global.clMapGen.seed=nil
global.clMapGen.height = 2000000
global.clMapGen.width = 2000000
-- These are my go to default vanilla settings, it's not RSO, but it's okay.
global.clMapGen.autoplace_controls = {
-- Resources and enemies only matter if you are NOT using RSO.
["coal"]={frequency="very-low", size= "low", richness= "high"},
["copper-ore"]={frequency= "very-low", size= "low", richness= "high"},
["crude-oil"]={frequency= "low", size= "low", richness= "high"},
["enemy-base"]={frequency= "low", size= "normal", richness= "normal"},
["iron-ore"]={frequency= "very-low", size= "low", richness= "high"},
["stone"]={frequency= "very-low", size= "low", richness= "high"},
["uranium-ore"]={frequency= "low", size= "low", richness= "high"},
["desert"]={frequency= "low", size= "low", richness= "low"},
["dirt"]={frequency= "low", size= "low", richness= "low"},
["grass"]={frequency= "normal", size= "normal", richness= "normal"},
["sand"]={frequency= "low", size= "low", richness= "low"},
["trees"]={frequency= "normal", size= "normal", richness= "normal"}
["coal"] = {frequency = 0.20, richness = 1.00, size = 1.50},
["copper-ore"] = {frequency = 0.20, richness = 1.00, size = 1.50},
["crude-oil"] = {frequency = 0.20, richness = 1.00, size = 1.50},
["enemy-base"] = {frequency = 0.20, richness = 1.00, size = 0.50},
["iron-ore"] = {frequency = 0.20, richness = 1.00, size = 1.50},
["stone"] = {frequency = 0.20, richness = 1.00, size = 1.50},
["trees"] = {frequency = 0.20, richness = 1.00, size = 1.50},
["uranium-ore"] = {frequency = 0.20, richness = 1.00, size = 1.50}
}
-- Cliff defaults are 10 and 10, set both to 0 to turn cliffs off I think?
global.clMapGen.cliff_settings={cliff_elevation_0=10, cliff_elevation_interval=10, name="cliff"}
global.clMapGen.cliff_settings = {
cliff_elevation_0 = 10,
cliff_elevation_interval = 10,
name = "cliff",
richness = 1
}
global.clMapGen.property_expression_names = {
["control-setting:aux:bias"] = "0.00",
["control-setting:aux:frequency:multiplier"] = "1.00",
["control-setting:moisture:bias"] = "0.00",
["control-setting:moisture:frequency:multiplier"] = "1.00",
elevation = "0_17-islands+continents"
}
-- starting_points = {
-- {
-- x = 0,
-- y = 0
-- }
-- }
--------------------------------------------------------------------------------
-- ANTI-Griefing stuff ( I don't personally maintain this as I don't care for it.)

View File

@ -1018,7 +1018,7 @@ function CreateMoat(surface, centerPos, chunkArea, tileRadius)
-- Create a circle of water
if ((distVar < tileRadSqr+(1500*MOAT_SIZE_MODIFIER)) and
(distVar > tileRadSqr)) then
table.insert(waterTiles, {name = "water", position ={i,j}})
table.insert(waterTiles, {name = "water-shallow", position ={i,j}})
end
-- Enforce land inside the edges of the circle to make sure it's
@ -1183,7 +1183,7 @@ end
RSO_MODE = 1
VANILLA_MODE = 2
function CreateGameSurface(mode)
function CreateGameSurface(dww)
local mapSettings = game.surfaces["nauvis"].map_gen_settings
if CMD_LINE_MAP_GEN then
@ -1192,8 +1192,11 @@ function CreateGameSurface(mode)
mapSettings.starting_area = global.clMapGen.starting_area
mapSettings.peaceful_mode = global.clMapGen.peaceful_mode
mapSettings.seed = global.clMapGen.seed
mapSettings.height = global.clMapGen.height
mapSettings.width = global.clMapGen.width
mapSettings.autoplace_controls = global.clMapGen.autoplace_controls
mapSettings.cliff_settings = global.clMapGen.cliff_settings
mapSettings.property_expression_names = global.clMapGen.property_expression_names
end
-- To use RSO resources, we have to disable vanilla ore generation

View File

@ -46,9 +46,15 @@ function DisplayWelcomeTextGui(player)
-- Warning about spawn creation time
AddLabel(wGui, "spawn_time_msg_lbl1", SPAWN_WARN_MSG, my_warning_style)
wGui.add{name = "welcome_okay_btn",
local button_flow = wGui.add{type = "flow"}
button_flow.style.horizontal_align = "right"
button_flow.style.horizontally_stretchable = true
button_flow.add{name = "welcome_okay_btn",
type = "button",
caption="I Understand"}
caption="I Understand",
style = "confirm_button"}
end
@ -137,12 +143,16 @@ function DisplaySpawnOptions(player)
local soloSpawnbuttons = soloSpawnFlow.add{name = "spawn_solo_flow",
type = "flow",
direction="horizontal"}
soloSpawnbuttons.style.horizontal_align = "center"
soloSpawnbuttons.style.horizontally_stretchable = true
soloSpawnbuttons.add{name = "isolated_spawn_near",
type = "button",
caption="Solo Spawn (Near)"}
caption="Solo Spawn (Near)",
style = "confirm_button"}
soloSpawnbuttons.add{name = "isolated_spawn_far",
type = "button",
caption="Solo Spawn (Far)"}
caption="Solo Spawn (Far)",
style = "confirm_button"}
AddLabel(soloSpawnFlow, "isolated_spawn_lbl1",
"You are spawned in a new area, with some starting resources.", my_label_style)
AddSpacerLine(soloSpawnFlow, "isolated_spawn_spacer")
@ -365,7 +375,8 @@ function DisplaySharedSpawnOptions(player)
shGui.add{name = "shared_spawn_cancel",
type = "button",
caption="Cancel (Return to Previous Options)"}
caption="Cancel (Return to Previous Options)",
style = "back_button"}
end
-- Handle the gui click of the shared spawn options
@ -437,7 +448,8 @@ function DisplaySharedSpawnJoinWaitMenu(player)
AddLabel(sGui, "warning_lbl1", "You will spawn once the host selects yes...", my_warning_style)
sGui.add{name = "cancel_shared_spawn_wait_menu",
type = "button",
caption="Cancel (Return to starting spawn options)"}
caption="Cancel (Return to starting spawn options)",
style = "back_button"}
end
-- Handle the gui click of the buddy wait menu
@ -535,8 +547,6 @@ function ExpandSpawnCtrlGui(player, tick)
spwnCtrls.add{type="checkbox", name="accessToggle",
caption="Allow others to join your base.",
state=IsSharedSpawnActive(player)}
spwnCtrls["accessToggle"].style.top_padding = 10
spwnCtrls["accessToggle"].style.bottom_padding = 10
ApplyStyle(spwnCtrls["accessToggle"], my_fixed_width_style)
end
end
@ -789,7 +799,8 @@ function DisplayBuddySpawnOptions(player)
buddyGui.add{name = "buddy_spawn_cancel",
type = "button",
caption="Cancel (Return to Previous Options)"}
caption="Cancel (Return to Previous Options)",
style = "back_button"}
-- Some final notes
AddSpacerLine(buddyGui, "note_spacer1")