[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

callmewoof
Inserter
Inserter
Posts: 27
Joined: Fri Apr 24, 2015 3:46 am
Contact:

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

Post by callmewoof »

Thanks again to both of you for your replies. Trying out the new .11 one now. Thanks Cheeta for looking into that oil thing, thanks orzalek for the bob's thing and for the other, things? I dunno. THANKS :-)

Trev_lite
Inserter
Inserter
Posts: 43
Joined: Sat Mar 28, 2015 9:20 pm
Contact:

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

Post by Trev_lite »

orzelek wrote:
Trev_lite wrote:Could there be an option for peace mod with biters. I want to use peace mod for the alien ore but configured so that biters and military are still there. Could this be added as an option to the config file.
I'm affraid you'd need to go to peace mod thread to get answer for this one.
Peace mod already has this, it has an option to allow biters and military. What I want is an option that will allow biters to still spawn even if peace mod or alien ore is detected in RSO. I read the config file and saw some code that will not require the biter code if alien ore is detected. I want a config option that will override this and allow biters to spawn.

Code: Select all

	if not game.entityprototypes["alien-ore"] then  -- if the user has peacemod installed he probably doesn't want that RSO spawns them either. remote.interfaces["peacemod"]
		require("modsupport.vanilla_enemies")  
	end
could be changed to something like

Code: Select all

	if not game.entityprototypes["alien-ore"] or peacemod-with-enemies then  -- if the user has peacemod installed he might want RSO to also not spawns them. remote.interfaces["peacemod"]
		require("modsupport.vanilla_enemies")  
	end
and change any other files that might check for peacemod to prevent the spawning for enemies.

my peacemod config

Code: Select all

...

-- Removes some military techs that have no use in a peace mod. The shotgun is kept for its tree clearing abilities. Rocket defense is also kept to keep endgame possible.
removeMilitaryTech=false

-- Allows enemies to spawn. But this is a peace mod no?
enemiesSpawn=true
A way to read this config from another mod might be a good idea but I am not sure it is possible without load order bugs.

I hope that this explains what I am asking for.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post by orzelek »

@Trev_lite
Thanks for the explanation. Reading of other mod config file is not possible without interface published by that mod.

New version of mod attached.
Changes:
  • added configuration option useEnemiesInPeaceMod to override disabling of spawners with peace mod - defaults to false
  • added configuration option disableEnemyExpansion to disable biter expansion - defaults to true (breaks the idea of long distances and separated bases with lots of space around)
  • added multi-rolling to prevent being handicapped by rng if mod is used with lots of other mods (roll number is based on amount of ores handled)
Attachments
rso-mod_1.0.12.zip
(23.55 KiB) Downloaded 298 times

callmewoof
Inserter
Inserter
Posts: 27
Joined: Fri Apr 24, 2015 3:46 am
Contact:

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

Post by callmewoof »

Hey again. Just wanted to post that I've been playing on the previous RSO (1.0.11) and it has been great. I'm using it with bob's full suite of mods plus some others, and so far haven't run into any issues. Further, resource spawn has been fantastic. Distance, size, it all feels great! Now, I will admit, probably because of bob's extra ores, I did have to re-roll a few maps before finding one to start on, because sometimes I'd have a starting patch of iron that was about 6 "pieces" in size (a.k.a could only host 2 burner drills for the entire field). I found a good map to start on so other than that, I'm finding it to be very balanced. Perhaps the new .12 reroll dice thing you updated fixes that, I'm not sure. I'm not ready to start a new map yet :D Thanks again to you all and the community and etc etc for doing what you do!

Trev_lite
Inserter
Inserter
Posts: 43
Joined: Sat Mar 28, 2015 9:20 pm
Contact:

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

Post by Trev_lite »

orzelek wrote:@Trev_lite
Thanks for the explanation. Reading of other mod config file is not possible without interface published by that mod.

New version of mod attached.
Changes:
  • added configuration option useEnemiesInPeaceMod to override disabling of spawners with peace mod - defaults to false
  • added configuration option disableEnemyExpansion to disable biter expansion - defaults to true (breaks the idea of long distances and separated bases with lots of space around)
  • added multi-rolling to prevent being handicapped by rng if mod is used with lots of other mods (roll number is based on amount of ores handled)
Thank you.
I like defending from biters but killing them for alien artifacts is too much work.

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 »

orzelek wrote:
  • added configuration option disableEnemyExpansion to disable biter expansion - defaults to true (breaks the idea of long distances and separated bases with lots of space around)
I could be completely wrong, since i have no clue about modding map-settings/generation, but the following lines look like your configvalue may be doing the opposite of what the name suggests?

Code: Select all

config.lua:
disableEnemyExpansion = true -- allows for disabling of in-game biter base building
data-updates.lua:
data.raw["map-settings"]["map-settings"].enemy_expansion.enabled = disableEnemyExpansion
As i understand it enemy_expansion.enabled should be set to false if you don't want it, but the name in config.lua suggests to set it to true for no expansion :?:

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post by orzelek »

Choumiko wrote:
orzelek wrote:
  • added configuration option disableEnemyExpansion to disable biter expansion - defaults to true (breaks the idea of long distances and separated bases with lots of space around)
I could be completely wrong, since i have no clue about modding map-settings/generation, but the following lines look like your configvalue may be doing the opposite of what the name suggests?

Code: Select all

config.lua:
disableEnemyExpansion = true -- allows for disabling of in-game biter base building
data-updates.lua:
data.raw["map-settings"]["map-settings"].enemy_expansion.enabled = disableEnemyExpansion
As i understand it enemy_expansion.enabled should be set to false if you don't want it, but the name in config.lua suggests to set it to true for no expansion :?:
Yep you are right :D
Thanks for spotting this (and I was wondering why enemies are expanding in my current game :D)
Fixed version attached.
Attachments
rso-mod_1.0.13.zip
(23.55 KiB) Downloaded 301 times

Trev_lite
Inserter
Inserter
Posts: 43
Joined: Sat Mar 28, 2015 9:20 pm
Contact:

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

Post by Trev_lite »

i have found the recently updated version of the ground sulfur mod. could i have some help on how to get it to work with RSO?

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post by orzelek »

I'll try to take a look and add it tomorrow.

Trev_lite
Inserter
Inserter
Posts: 43
Joined: Sat Mar 28, 2015 9:20 pm
Contact:

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

Post by Trev_lite »

thank you.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post by orzelek »

New version attached - rebalanced basic resources a bit and added support for ground sulfur mod.
Attachments
rso-mod_1.0.14.zip
(24.02 KiB) Downloaded 273 times

Finndibaenn
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Feb 21, 2014 8:53 pm
Contact:

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

Post by Finndibaenn »

Hi

I've been using this mod together with Bob's suite with great pleasure.

However i've been struggling finding bob's rutile, with only a few thousand units available under 5 min running in any direction as far as I can tell.

SO ... this triggered a question : do you think it would be possible to create a "prospection" item using a mod ? it would indicate direction of the closer (or not ...) deposit of a given mineral to help with this kind of "issue".

User avatar
Cheata
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Sun Aug 17, 2014 6:46 am
Contact:

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

Post by Cheata »

Finndibaenn wrote:Hi

SO ... this triggered a question : do you think it would be possible to create a "prospection" item using a mod ? it would indicate direction of the closer (or not ...) deposit of a given mineral to help with this kind of "issue".

an interesting idea the main problem i see with it is that because the map is procedurally generated there is no way to tell if a deposit exists until you have "found" it.

working within the revealed/generated area of the map might work but as the map gets larger the script would start to slow the game

working within the visual radius of the player is fairly useless as the player can already see if the resource is there or not.

i would be interested to see what people can come up with :)

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post by orzelek »

I thought at some point about some kind of attempt to balance a bit the rng by trying to generate resources with a bit of history to increase chance of low presence resources appearing. Rutile is by design quite rare - I might have made it to rare. Cobalt is actually more rare even. Small hint - rutile is allowed as secondary resource to be paired with tungsten so you might find it near it's deposits.

As for prospector tool - I think it is possible - from my side main problem would be the UI for it. Mod doesn't need to generate tiles to potentially prepare what kind of resources will be in that general area. That could be done on demand when user is doing the scan. You would get an approximate resource composition without specifics then - those would be generated when tiles are actually populated.
Small problem could be that once resources are actually generated all generation records are removed currently.

On the other hand - 5 minutes of running is not that far with this mod. It's specifically aimed for big distances. 5 minutes with car at full speed might be a good area to search :D

Finndibaenn
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Feb 21, 2014 8:53 pm
Contact:

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

Post by Finndibaenn »

I actually didn't find any cobalt but as there is an alternate recipe for it it wasn't such an issue :)

And the 3K rutile i was able to find was indeed in the middle of a tungsten patch.

The issue may also be that i'm not sure what rutile looks like on the overhead map and there may be some lost in some of the big forests .

I'm not suggesting to increase likeliness to spawn , but it would give you another reason to stray further from your base and explore.

Regarding the mod UI, i was figuring that having some kind of compass displayed in a new "window" (something similar to ResourceMonitor one). it should be possible to have a set of images of a needle pointing in different directions and choose which one to display ?
While i was thinking about that i believe it would be a good idea to make this a new resource sink, so require some (pretty big) investment to display it, and likely work in a limited area/time. so ... maybe some kind of new "factory" that would allow tracking resoruces in a given range ?

Finndibaenn
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Feb 21, 2014 8:53 pm
Contact:

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

Post by Finndibaenn »

well ... i got down to it and was able to do this

Code: Select all

/c for _, entity in ipairs(game.findentitiesfiltered{area = {{game.player.position.x - 10000, game.player.position.y - 10000}, {game.player.position.x + 10000,game.player.position.y + 10000}}}) do 
	if entity.name and 'rutile-ore' == entity.name  then 
		game.player.print(entity.type .. ' ' .. entity.name .. ' ' .. entity.position.x ..' , ' .. entity.position.y)
	end 
end
this finds rutile ore in an area centered around the player of 10000 radius. Actually froze the game for about 10s , but it's pretty easy :)
still need to come up with a reasonable way to integrate this in the game

edit : proper format for the code
Last edited by Finndibaenn on Wed May 13, 2015 11:56 pm, edited 1 time in total.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post by orzelek »

I think with few small changes it could be possible to add remote call function to RSO that would try to give you nearest ore location of given type. It might get tricky in terms of checking if it wasn't mined already.

If rutile is that important then maybe it should be a bit more common or appear in larger amount when actually found. I'm usually using endless ores mod so first patch I find is good to go since materials like rutile don't need big throughput (at least for me).

Finndibaenn
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Feb 21, 2014 8:53 pm
Contact:

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

Post by Finndibaenn »

I actually would be happy with more reasons to expand :)

I have "finished" the game (eg, all research done, god V modules over abundant ...) but didn't have to expand that much in the end, (maybe 30s train distance for furthest mine) and only had to mine 2 different iron and copper deposits. Didn't even deplete the initial coal one

So ... what i have in mind is make every non - basic ore much more rare, but give the player the ability to build an _expensive_ building (using less rare resources) that gives him a hint as to where to find a deposit of a given type as I find that after a short while blind exploring is a bit boring.

I'll try to build on that later :)

User avatar
Cheata
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Sun Aug 17, 2014 6:46 am
Contact:

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

Post by Cheata »

Finndibaenn wrote:well ... i got down to it and was able to do this

/c for _, entity in ipairs(game.findentitiesfiltered{area = {{game.player.position.x - 10000, game.player.position.y - 10000}, {game.player.position.x + 10000,game.player.position.y + 10000}}}) do
if entity.name and 'rutile-ore' == entity.name then
game.player.print(entity.type .. ' ' .. entity.name .. ' ' .. entity.position.x ..' , ' .. entity.position.y)
end
end

this finds rutile ore in an area centered around the player of 10000 radius. Actually froze the game for about 10s , but it's pretty easy :)
still need to come up with a reasonable way to integrate this in the game
well done that man..

im thinking a "ping" button which does a search then displays a number of colored arrows round the player pointing to the nearest deposit of each (or selected) type. once the initial search is done its a fairly simple task to update the direction the arrows point as the player moves ... maybe include a distance value as well (ie 1 click per region)

Finndibaenn
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Feb 21, 2014 8:53 pm
Contact:

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

Post by Finndibaenn »

a better version , it widens the search progressively

Code: Select all

/c  
local found = false 
local searched = "rutile-ore"
for radius = 100, 10000, 100 do 
     for _, entity in ipairs(game.findentitiesfiltered{area = {{game.player.position.x - radius, game.player.position.y - radius}, {game.player.position.x + radius,game.player.position.y + radius}}, name=searched}) do       
		game.player.print('' .. entity.position.x ..' , ' .. entity.position.y)   
		found = true   
		break     
	end  
	if found then break  
	end  
end

Post Reply

Return to “Resource Spawner Overhaul”