[MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Replaces resource spawning system, so that the distances between resources are much bigger. Railway is needed then.

Moderators: orzelek, Dark

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by SHiRKiT »

Can we have support for Uranium Power mod?

Chester
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jan 19, 2015 4:44 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Chester »

Why is config.lua so messy? o.o
I decided to play a pack od mods that includes new DyTech and RSO but as far as i see RSO still checks for old versions of DyTech mod ("DyTech-Metallurgy"). I wonder if it is possible to play with RSO'd vanilla resources and default DyTech resources? It would still do the job I guess. Can I just delete whole "MOD SUPPORT" part of config.lua or there is something more to be done in order to make that mod pack playable?

gnz
Inserter
Inserter
Posts: 46
Joined: Wed Jan 14, 2015 5:19 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by gnz »

AnodeCathode wrote:
fishlips13 wrote: AnodeCathode, if you wish to use the changes I've made and update your GitHub, by all means do. The files I've changed (config.lua and control.lua) are in a separate zip file attached to this post.
Done. Excellent changes. I've put together an updated archive on the releases page:

https://github.com/AnodeCathode/Resourc ... s/releases

You can also see any changes made from 1.0.5 to 1.0.6 here:

https://github.com/AnodeCathode/Resourc ... 7a30f9535d
Since you have a github up for this mod ( it be nice if all mods did this ) would you mind if I push some support for MoMods?

AnodeCathode
Inserter
Inserter
Posts: 29
Joined: Wed Dec 10, 2014 8:56 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by AnodeCathode »

gnz wrote: Since you have a github up for this mod ( it be nice if all mods did this ) would you mind if I push some support for MoMods?
I wouldn't mind at all. That was the idea of throwing it up on Github, so we can track the changes and easily fold in PRs for new features.

MNorman
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Jan 31, 2015 12:06 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by MNorman »

I have been trying to make this mod work with PeaceMod (v 0.1.0). I have added the following code to config.lua in RSO:

Code: Select all

if remote.interfaces["peacemod"] then
  config["alien-ore"] = {
    type="resource-ore",
    allotment=30,
    spawns_per_region={min=0, max=1},
    richness={min=300, max=1000},
    size={min=5, max=10},
    multi_resource_chance=0.2,
    multi_resource={
      ['copper-ore'] = 1,
    }
  }
end  
However, I get a crash on loading the game, with the following log:

Code: Select all

33536.417519  Info Logger.cpp:149: 2015-01-30 23:40:55; Factorio 0.11.13 (Build 13133, linux64)
33536.417601  Info Logger.cpp:153: Operating system: Linux
33536.417626  Info Paths.cpp:202: Read data path: /home/mnorman/factorio/data
33536.417647  Info Paths.cpp:203: Write data path: /home/mnorman/factorio
33536.417665  Info Paths.cpp:204: Binaries path: /home/mnorman/factorio/bin
33536.737921  Info ModManager.cpp:204: Loading mod core 0.0.0 (data.lua)
33536.759761  Info ModManager.cpp:204: Loading mod base 0.11.13 (data.lua)
33537.032673  Info ModManager.cpp:204: Loading mod peacemod 0.1.0 (data.lua)
33537.277859  Info ModManager.cpp:204: Loading mod rso-mod 1.0.6 (data.lua)
33537.298135  Error Util.cpp:43: __rso-mod__/data.lua:3: __rso-mod__/prototypes/prototype_utils.lua:8: attempt to index field 'autoplace' (a nil value)
This crash is not seen if override_normal_spawn=false, but setting disable_RSO_biter_spawning = true does not prevent the crash.

I think that this means that the crash is due to RSO trying to override the biter spawner placement code after peacemod has prevented biters from spawning by setting the autoplace for this equal to null.

What would be the best approach to preventing RSO from overriding the biter spawner code when peacemod is installed without altering the spawning of other items?

User avatar
Animar
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sat Dec 21, 2013 8:06 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Animar »

Hi guys, I having the weird issue that spiter spawner nests created by RSO spawn normal biters ?
- I first used the 1.0.2 self modified for spiter spawner. Spiter nests where created but after a while i noticed that there are only normal biter mobs running at me.
- Then I used the 1.0.5 from this thread, still same problem.
- Lastly I tried the 1.0.6 version but again both nest types but only normal biters
so what the hell went wrong ????

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Choumiko »

MNorman wrote: This crash is not seen if override_normal_spawn=false, but setting disable_RSO_biter_spawning = true does not prevent the crash.

I think that this means that the crash is due to RSO trying to override the biter spawner placement code after peacemod has prevented biters from spawning by setting the autoplace for this equal to null.

What would be the best approach to preventing RSO from overriding the biter spawner code when peacemod is installed without altering the spawning of other items?
Try removing lines 24 to 43 from peacemods data.lua and use
override_normal_spawn=true
disable_RSO_biter_spawning = true
override_type = 'full'

This should prevent any biters from spawning, haven't tested though
Animar wrote:Hi guys, I having the weird issue that spiter spawner nests created by RSO spawn normal biters ?
- I first used the 1.0.2 self modified for spiter spawner. Spiter nests where created but after a while i noticed that there are only normal biter mobs running at me.
- Then I used the 1.0.5 from this thread, still same problem.
- Lastly I tried the 1.0.6 version but again both nest types but only normal biters
so what the hell went wrong ????
Are you sure your evolution is high enough for spitters to spawn? I know they need a certain evolution (0.3 according to the release notes) to spawn, and guess below that they will spawn biters?
try using
/c game.player.print(game.evolutionfactor)
/c game.evolutionfactor = 0.31
If i am right they should spawn after using the second command (first one is only to show your current value)

User avatar
Animar
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sat Dec 21, 2013 8:06 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Animar »

Man I'm feeling dumb right now, I totaly forgot hat. I should had play on instead of freaking out and starting permanently new test maps ...

iGi
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Nov 22, 2014 2:50 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by iGi »

I've fixed the crash with peacemod and added alien-ore to the config (copied from MNorman's post)

Also made a pull request on github for the changes.
I think there will be a new zip up whenever AnodeCathode sees it.

Berserker55
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Sat Jan 31, 2015 7:36 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Berserker55 »

Hi, using Factorio 0.11.14, bobores 0.6.3 (and other bob mods), rso-mod 1.0.6 as well as a few small other ones;

I have the problem of not finding cobalite (bob ore) anywhere. I've searched a ridiculous amount of land and even found 7 large oil fields by now - but not a single cobalite to found.

Is there a bug preventing it from spawning or is it just that rare?

Edit: turns out it doesn't spawn by default.

gnz
Inserter
Inserter
Posts: 46
Joined: Wed Jan 14, 2015 5:19 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by gnz »

MNorman wrote: However, I get a crash on loading the game, with the following log:

Code: Select all

33536.417519  Info Logger.cpp:149: 2015-01-30 23:40:55; Factorio 0.11.13 (Build 13133, linux64)
33536.417601  Info Logger.cpp:153: Operating system: Linux
33536.417626  Info Paths.cpp:202: Read data path: /home/mnorman/factorio/data
33536.417647  Info Paths.cpp:203: Write data path: /home/mnorman/factorio
33536.417665  Info Paths.cpp:204: Binaries path: /home/mnorman/factorio/bin
33536.737921  Info ModManager.cpp:204: Loading mod core 0.0.0 (data.lua)
33536.759761  Info ModManager.cpp:204: Loading mod base 0.11.13 (data.lua)
33537.032673  Info ModManager.cpp:204: Loading mod peacemod 0.1.0 (data.lua)
33537.277859  Info ModManager.cpp:204: Loading mod rso-mod 1.0.6 (data.lua)
33537.298135  Error Util.cpp:43: __rso-mod__/data.lua:3: __rso-mod__/prototypes/prototype_utils.lua:8: attempt to index field 'autoplace' (a nil value)
This crash is not seen if override_normal_spawn=false, but setting disable_RSO_biter_spawning = true does not prevent the crash.

I think that this means that the crash is due to RSO trying to override the biter spawner placement code after peacemod has prevented biters from spawning by setting the autoplace for this equal to null.

What would be the best approach to preventing RSO from overriding the biter spawner code when peacemod is installed without altering the spawning of other items?
This is probably a bit late since it's been a couple of days, but here is the reason:
Peacemod disables the autoplace by removing the instance. Since RSO then assumes it exists it will crash. The solution is to change the code in prototype_utils to:

Code: Select all

function add_peak(ent, peak)
	if (ent.autoplace ~= null) then
	  ent.autoplace.peaks[#ent.autoplace.peaks+1] = peak
  	end
end
I'm pushing this to the github but in the meantime you can just add that if you want.

Liquid5n0w
Inserter
Inserter
Posts: 40
Joined: Thu Feb 05, 2015 4:10 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Liquid5n0w »

It seems this mod doesn't work with the latest dytech version, doesn't seem to affect how those resources are generated.

JackGruff
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Oct 15, 2013 4:44 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by JackGruff »

0.11.15

No other mods.

I downloaded https://github.com/AnodeCathode/Resourc ... cial.1.0.6

Did not touch any world gen settings.

Pretty sure it's not suppose to look like this.
Attachments
Screenshot 2015-02-11 16.46.53.png
Screenshot 2015-02-11 16.46.53.png (339.68 KiB) Viewed 9018 times

AnodeCathode
Inserter
Inserter
Posts: 29
Joined: Wed Dec 10, 2014 8:56 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by AnodeCathode »

JackGruff wrote:0.11.15

No other mods.

I downloaded https://github.com/AnodeCathode/Resourc ... cial.1.0.6

Did not touch any world gen settings.

Pretty sure it's not suppose to look like this.
My modified version is set to not do complete replacement by default. This means you do need to set the vanilla worldgen settings to 'none'. I changed it so I can allow some vanilla worldgen if desired. You can also go into the config.lua and change:

Code: Select all

override_normal_spawn = false
to:

Code: Select all

override_normal_spawn = true
I did this mostly so I could have additional alien nests without drastically messing with the RSO distributions for it.

katyal
Fast Inserter
Fast Inserter
Posts: 208
Joined: Wed Nov 12, 2014 8:42 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by katyal »

I have "min_amount = 350" in config.lua If I understood correctly this should mean that the smallest pile of ore should have 350 ore in it. Except that I most piles have only 50 ore in the game I am playing. Is there anything I'm missing? Just in case here is the whole file (I've made other changes to it to try and suit my play style):

Code: Select all

require 'defines'
debug_enabled = false


region_size=8 -- alternative mean to control how further away resources would be, default - 256 tiles or 8 chunks
              -- each region is region_size*region_size chunks
              -- each chunk is 32*32 tiles

override_normal_spawn = true   -- if false then the standard spawner can also spawn full grown resources/entities, 
                               -- set resources you want to control through this config to "None" in worldgen "Size" settings when starting a new game
                               -- changing of this setting requires game restart, i.e. close game and start it again, not actally a new game
                               
override_type = 'full'   	   -- 'full' - no spawns by game are allowed, 'partially' - very small patches are spawned by world gen
                               -- changing of this setting requires game restart

starting_area_size=1           -- starting area in regions, safe from random nonsense

absolute_resource_chance=0.30  -- chance to spawn an resource in a region
global_richness_mult = 1.2      -- multiply richness all resources

multi_resource_richness_factor=0.60 -- any additional resource is multiplied by this value times resources-1
multi_resource_size_factor=0.60
multi_resource_chance_diminish=0.8    -- diminishing effect factor on multi_resource_chance

min_amount=350 -- default value for minimum amount of resource in single pile

richness_distance_factor=1.050 -- 3.0 relative % per region distance ~ 2.1x mult @ 25 regions distance

deterministic = true           -- set to false to use system for all decisions  math.random

endless_resource_mode = false   -- if true, the size of each resource is modified by the following modifier. Use with the endless resources mod.
endless_resource_mode_sizeModifier = 0.30

disable_RSO_biter_spawning = false		-- if true, no biters will be spawned by RSO. Do not use with override_normal_spawn = true, because then no biters will be spawned at all.

biter_ratio_segment=1      --the ratio components determining how many biters to spitters will be spawned
spitter_ratio_segment=1    --eg. 1 and 1 -> equal number of biters and spitters,  10 and 1 -> 10 times as many biters to spitters

config={
  ["iron-ore"] = {
    type="resource-ore",

    -- general spawn params
    allotment=120, -- how common resource is
    spawns_per_region={min=1, max=2}, --number of chunks
    richness=9000,
    
    size={min=10, max=60}, -- rough radius of area, too high value can produce square shaped areas
    
    -- resource provided at starting location
    -- probability: 1 = 100% chance to be in starting area
    --				0 = resource is not in starting area
    starting={richness=3000, size=20, probability=1},
    
    multi_resource_chance=0.13, -- absolute value
    multi_resource={
      ["iron-ore"] = 2, -- ["resource_name"] = allotment
      ['copper-ore'] = 4, 
      ["coal"] = 8,
      ["stone"] = 8,
      ["crude-oil"] = 1,
    }
  },
  ["copper-ore"] = {
    type="resource-ore",

    allotment=120,
    spawns_per_region={min=1, max=2},
    richness=11000,
    size={min=10, max=50},

    starting={richness=2500, size=15, probability=1},
    
    multi_resource_chance=0.13,
    multi_resource={
      ["iron-ore"] = 4,
      ['copper-ore'] = 2, 
      ["coal"] = 8,
      ["stone"] = 8,
      ["crude-oil"] = 1, 
    }
  },
  ["coal"] = {
    type="resource-ore",

    allotment=100,

    spawns_per_region={min=1, max=3},
    size={min=5, max=40},
    richness=14000,

    starting={richness=2750, size=15, probability=1},
    
    multi_resource_chance=0.13,
    multi_resource={
      ["iron-ore"] = 2,
      ['copper-ore'] = 2, 
      ["coal"] = 8,
      ["stone"] = 8,
      ["crude-oil"] = 1, 
    }
  },
  ["stone"] = {
    type="resource-ore",

    allotment=80,
    spawns_per_region={min=1, max=2},
    richness=9000,
    size={min=15, max=25},

    starting={richness=2000, size=8, probability=1},
    
    multi_resource_chance=0.13,
    multi_resource={
      ["iron-ore"] = 2,
      ['copper-ore'] = 2, 
      ["coal"] = 8,
      ["stone"] = 8,
      ["crude-oil"] = 3, 
    }
  },
  
  ["crude-oil"] = {
    type="resource-liquid",
    minimum_amount=750, 
    
    allotment=45,
    spawns_per_region={min=1, max=2},
    richness={min=20000, max=100000}, -- total richness of site 
    size={min=2, max=10}, -- richness devided by this number
    
    starting={richness=4000, size=1, probability=0.5}
  },
  
  ["biter-spawner"] = {
    type="entity",
    force="enemy",
    clear_range = {3, 3},
    
    spawns_per_region={min=1,max=3},
    size={min=2,max=6},
    size_per_region_factor=1.05,
    richness=1,
    
    absolute_probability=0.15, -- chance to spawn in region
    probability_distance_factor=1, -- relative incress per region
    max_probability_distance_factor=2.0, -- absolute value

    along_resource_probability=0.30, -- chance to spawn in resource chunk anyway, absolute value. Can happen once per resource.
    
    sub_spawn_probability=0.4,     -- chance for this entity to spawn anything from sub_spawns table, absolute value
    sub_spawn_size={min=1, max=2}, -- in same chunk
    sub_spawn_distance_factor=1.02,
    sub_spawn_max_distance_factor=2,
    sub_spawns={
      ["small-worm-turret"]={
        min_distance=2,
        allotment=2000,
        allotment_distance_factor=0.9,
        clear_range = {1, 1},
      },
      ["medium-worm-turret"]={
        min_distance=5,
        allotment=1000,
        allotment_distance_factor=1.05,
        clear_range = {1, 1},
      },
      ["big-worm-turret"]={
        min_distance=7,
        allotment=500,
        allotment_distance_factor=1.15,
        clear_range = {1, 1},
      }
    }
  }
}

--[[ MODS SUPPORT ]]--
-- Endless resources mod
-- reduce the starting area size of resources (Note: only done for vanilla resources)
-- The size will additionally be modified with endless_resource_mode_sizeModifier
if endless_resource_mode then
	config["iron-ore"].starting = {richness=2000, size=22, probability=1}
	config["copper-ore"].starting = {richness=1800, size=20, probability=1}
	config["coal"].starting = {richness=2500, size=15, probability=1}
	config["stone"].starting = {richness=1000, size=10, probability=1}
end


-- Roadworks mod
if remote and game then
if game.entityprototypes["RW-limestone"] then
  config["RW-limestone"] = {
    type="resource-ore",

    allotment=85,
    spawns_per_region={min=1, max=2},
    richness=11000,
    size={min=10, max=17},

    starting={richness=1000, size=4, probability=0.9},
    
    multi_resource_chance=0.15,
    multi_resource={
      ["coal"] = 2,
      ["stone"] = 8,
      ["crude-oil"] = 1, 
    }
  }
  
  config["stone"].multi_resource["RW-limestone"] = 12
  config["iron-ore"].multi_resource["RW-limestone"] = 3
  config["copper-ore"].multi_resource["RW-limestone"] = 3
  config["coal"].multi_resource["RW-limestone"] = 3
end

-- DyTech

if remote.interfaces["DyTech-Core"] then
  config["stone"].allotment = 100
  config["stone"].richness = 25000
  config["stone"].starting.richness = 10000
end

if remote.interfaces["DyTech-Metallurgy"] then
-- exotic ores
  config["gold-ore"] = {
    type="resource-ore",

    allotment=25,
    spawns_per_region={min=2, max=5},
    richness=175,
    size={min=2, max=5},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["tin-ore"] = 3,
      ["tungsten-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  } 
  config["silver-ore"] = {
    type="resource-ore",

    allotment=25,
    spawns_per_region={min=2, max=5},
    richness=220,
    size={min=2, max=5},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["tungsten-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  }
  
  config["lead-ore"] = {
    type="resource-ore",

    allotment=25,
    spawns_per_region={min=2, max=5},
    richness=220,
    size={min=2, max=5},
    min_amount = 15,

    starting={richness=50, size=3, probability=0.2},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["tungsten-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  }
  
  config["tin-ore"] = {
    type="resource-ore",

    allotment=25,
    spawns_per_region={min=2, max=5},
    richness=220,
    size={min=2, max=5},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tungsten-ore"] = 3,
      ["zinc-ore"] = 3,
      ["copper-ore"] = 2,
    }
  }
  
  config["tungsten-ore"] = {
    type="resource-ore",

    allotment=25,
    spawns_per_region={min=2, max=5},
    richness=220,
    size={min=2, max=5},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  }
  
  config["zinc-ore"] = {
    type="resource-ore",

    allotment=25,
    spawns_per_region={min=2, max=5},
    richness=220,
    size={min=2, max=5},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["tungsten-ore"] = 3,
    }
  }
  
-- moltensomethin
  config["lava-2800"] = {
    type="resource-liquid",
    minimum_amount=1000, 
    
    allotment=17,
    spawns_per_region={min=1, max=3},
    richness={min=40000, max=120000},
    size={min=2, max=7},
    
    absolute_probability=0.01,
    
    multi_resource_chance=0.25,
    multi_resource={
      ["lava-2800"] = 1,
      ["lava-1400"] = 2,
      ["lava-600"] = 4
    }
  } 
  config["lava-1400"] = {
    type="resource-liquid",
    minimum_amount=1000, 
    
    allotment=22,
    spawns_per_region={min=1, max=3},
    richness={min=40000, max=120000},
    size={min=2, max=7},
    
    absolute_probability=0.01,
    
    multi_resource_chance=0.25,
    multi_resource={
      ["lava-2800"] = 1,
      ["lava-1400"] = 2,
      ["lava-600"] = 4
    }
  } 
  config["lava-600"] = {
    type="resource-liquid",
    minimum_amount=1000, 
    
    allotment=25,
    spawns_per_region={min=1, max=3},
    richness={min=40000, max=120000}, -- total richness of site 
    size={min=2, max=7}, -- richness devided by this number
    
    absolute_probability=0.01,
    
    starting={richness=10500, size=3, probability=0.4},
    multi_resource_chance=0.25,
    multi_resource={
      ["lava-2800"] = 1,
      ["lava-1400"] = 2,
      ["lava-600"] = 4
    }
  }
  
end

if remote.interfaces["DyTech-Warfare"] then
  config["gems"] = {
    type="resource-ore",

    allotment=50,
    spawns_per_region={min=2, max=5},
    richness=125,
    size={min=2, max=5},
    min_amount = 15,
    starting={richness=40, size=3, probability=0},
    
    multi_resource_chance=0.20,
    multi_resource={
      ["stone"] = 1
    }
  }
  
  if config["zinc"] then
    config["gems"].multi_resource["lead-ore"] = 3
    config["gems"].multi_resource["silver-ore"] = 3
    config["gems"].multi_resource["gold-ore"] = 3
    config["gems"].multi_resource["tin-ore"] = 3
    config["gems"].multi_resource["tungsten-ore"] = 3
    config["gems"].multi_resource["zinc-ore"] = 3
    config["gems"].multi_resource_chance = 0.50
    
    config["lead-ore"].multi_resource["gems"] = 2
    config["silver-ore"].multi_resource["gems"] = 2
    config["gold-ore"].multi_resource["gems"] = 2
    config["tin-ore"].multi_resource["gems"] = 2
    config["tungsten-ore"].multi_resource["gems"] = 2
    config["zinc-ore"].multi_resource["gems"] = 2
  end
  
end

-- BobOres
-- up the stone at start
if remote.interfaces["bobores"] then
  config["stone"].allotment = 100
  config["stone"].starting.richness = 10000
end

-- bobores
if remote.interfaces["bobores"] then

  config["gold-ore"] = {
    type="resource-ore",

    allotment=80,
    spawns_per_region={min=2, max=5},
    richness=6000,
    size={min=10, max=19},
    min_amount = 15,

    starting={richness=500, size=3, probability=0.1},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["tin-ore"] = 3,
      ["tungsten-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  } 
  config["silver-ore"] = {
    type="resource-ore",

    allotment=60,
    spawns_per_region={min=2, max=5},
    richness=4000,
    size={min=8, max=10},
    min_amount = 15,

    starting={richness=500, size=3, probability=0.5},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["tungsten-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  }
  
  config["lead-ore"] = {
    type="resource-ore",

    allotment=80,
    spawns_per_region={min=2, max=5},
    richness=5000,
    size={min=6, max=15},
    min_amount = 15,

    starting={richness=500, size=6, probability=1},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["tungsten-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  }
  
  config["tin-ore"] = {
    type="resource-ore",

    allotment=90,
    spawns_per_region={min=2, max=5},
    richness=5000,
    size={min=18, max=27},
    min_amount = 15,

    starting={richness=1000, size=6, probability=1},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tungsten-ore"] = 3,
      ["zinc-ore"] = 3,
      ["copper-ore"] = 2,
    }
  }
  
  config["tungsten-ore"] = {
    type="resource-ore",

    allotment=40,
    spawns_per_region={min=2, max=5},
    richness=2000,
    size={min=6, max=9},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["zinc-ore"] = 3
    }
  }
  config["bauxite-ore"] = {
    type="resource-ore",

    allotment=90,
    spawns_per_region={min=2, max=5},
    richness=4000,
    size={min=9, max=15},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.0,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  }
  config["rutile-ore"] = {
    type="resource-ore",

    allotment=40,
    spawns_per_region={min=2, max=5},
    richness=2000,
    size={min=6, max=9},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.0,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  }
  
  config["quartz"] = {
    type="resource-ore",

    allotment=90,
    spawns_per_region={min=2, max=5},
    richness=5000,
    size={min=5, max=12},
    min_amount = 15,

    starting={richness=500, size=4, probability=0.0},
    
    multi_resource_chance=0.0,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["zinc-ore"] = 3,
    }
  }
  
  config["zinc-ore"] = {
    type="resource-ore",

    allotment=60,
    spawns_per_region={min=2, max=5},
    richness=3000,
    size={min=6, max=15},
    min_amount = 15,

    starting={richness=50, size=3, probability=0},
    
    multi_resource_chance=0.60,
    multi_resource={
      ["lead-ore"] = 3,
      ["silver-ore"] = 3,
      ["gold-ore"] = 3,
      ["tin-ore"] = 3,
      ["tungsten-ore"] = 3,
    }
  }
end

--[[ commented due to absence in current version of F-Mod
if remote.interfaces["F-Mod"] then
  -- geyser left as is for now
  config["geyser"] = {
    type="resource-liquid",
    minimum_amount=750000000, 
    
    allotment=0,
    spawns_per_region={min=1, max=2},
    richness={min=7500000000, max=7500000000}, -- total richness of site 
    size={min=1, max=2}, -- richness devided by this number
  }
  if config["lava-600"] then
    config["lava-600"].multi_resource["geyser"] = 8
    config["lava-1400"].multi_resource["geyser"] = 8
    config["lava-2000"].multi_resource["geyser"] = 8
  end
end
]]--
end

AnodeCathode
Inserter
Inserter
Posts: 29
Joined: Wed Dec 10, 2014 8:56 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by AnodeCathode »

katyal wrote:I have "min_amount = 350" in config.lua If I understood correctly this should mean that the smallest pile of ore should have 350 ore in it. Except that I most piles have only 50 ore in the game I am playing. Is there anything I'm missing? Just in case here is the whole file (I've made other changes to it to try and suit my play style):
Well I'll be the first to admit I don't totally understand the generator functions. From going through it I do see that it divides the min_amount by 3 for some reason when doing a full 4 chunk resource generation. Also, if the ore has a min_amount defined, that overrides the global min_amount.

Is this for vanilla ores? I see they don't have the min_amount defined so it's not the latter. In which case I'm unsure why it then chops that amount by 3.

I tended to focus on the richness and size parameters and left the min_amount alone. I may dig in and try and understand it better.

JackGruff
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Oct 15, 2013 4:44 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by JackGruff »

AnodeCathode wrote: This means you do need to set the vanilla worldgen settings to 'none'.
OK, thanks.

Does this look normal to you, then?
Attachments
Screenshot 2015-02-12 18.08.09.png
Screenshot 2015-02-12 18.08.09.png (290.3 KiB) Viewed 8971 times

AnodeCathode
Inserter
Inserter
Posts: 29
Joined: Wed Dec 10, 2014 8:56 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by AnodeCathode »

Okay, thanks for all the PR's. Updated the unofficial RSO to version 1.0.7. Release available here:
https://github.com/AnodeCathode/Resourc ... tag/v1.0.7

As I'm not using the new DyTech, Roadworks or Peacemod I hope those that do can let me know if it's all good. I'm maintaining support for the older DyTech as I'm still using it currently.

AnodeCathode
Inserter
Inserter
Posts: 29
Joined: Wed Dec 10, 2014 8:56 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by AnodeCathode »

JackGruff wrote: OK, thanks.

Does this look normal to you, then?
Looks like RSO is doing it's thing, yes.

MNorman
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Jan 31, 2015 12:06 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by MNorman »

I am getting random crashes with peacemod, both with my hacked version and v1.0.7
this seems to be linked to the line

Code: Select all

richness={min=300, max=1000},
If this is changed to

Code: Select all

richness=300,
there are less crashes (I have run a game lasting 25 hours with this modification to my original block of code and have had no problems)

The default parameters for v1.0.7 also re-adds the biter spawners removed for peacemod, and seems to result in extremely large amounts of Alien ore (far more than copper ore or iron ore). Edit: I have not managed to reliably replicate this.

Post Reply

Return to “Resource Spawner Overhaul”