Blank Surface?

Place to get help with not working mods / modding interface.
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Blank Surface?

Post by vzybilly »

I was trying to hack together how to spawn a surface and I finally got it to work, but, the wiki says I can use "none" for the frequency but the game won't run the command to build the surface, can I get any help on this? I would like to make a all desert (most wanted to be dirt or stone ground but settling for desert) that has no trees (desert is the only place that doesn't?) no ores, no enemies, nothing.

So far I've been able to get it to work with:

Code: Select all

game.create_surface("Custom",{terrain_segmentation="normal",water="very-small",autoplace_controls={["coal"]={frequency="very-low",size="medium",richness="regular"},["copper-ore"]={frequency="very-low",size="medium",richness="regular"},["crude-oil"]={frequency="very-low",size="medium",richness="regular"},["enemy-base"]={frequency="very-low",size="medium",richness="regular"},["iron-ore"]={frequency="very-low",size="medium",richness="regular"},["stone"]={frequency="very-low",size="medium",richness="regular"}},seed="83",shift={x=24327,y=37422},width=0,height=0,starting_area="medium",peaceful_mode=true})
The more cleaned up non-one-liner is:

Code: Select all

{terrain_segmentation="normal",
water="very-low",
autoplace_controls={
	["coal"]={frequency="very-low",size="medium",richness="regular"},
	["copper-ore"]={frequency="very-low",size="medium",richness="regular"},
	["crude-oil"]={frequency="very-low",size="medium",richness="regular"},
	["enemy-base"]={frequency="very-low",size="medium",richness="regular"},
	["iron-ore"]={frequency="very-low",size="medium",richness="regular"},
	["stone"]={frequency="very-low",size="medium",richness="regular"}},
seed="83",
shift={x=24327,y=37422},
width=0,
height=0,
starting_area="medium",
peaceful_mode=true}
and if the wiki is true, I should be able to put in something like:

Code: Select all

{terrain_segmentation="normal",
water="none",
autoplace_controls={
	["coal"]={frequency="none",size="medium",richness="regular"},
	["copper-ore"]={frequency="none",size="medium",richness="regular"},
	["crude-oil"]={frequency="none",size="medium",richness="regular"},
	["enemy-base"]={frequency="none",size="medium",richness="regular"},
	["iron-ore"]={frequency="none",size="medium",richness="regular"},
	["stone"]={frequency="none",size="medium",richness="regular"}},
seed="83",
shift={x=24327,y=37422},
width=0,
height=0,
starting_area="medium",
peaceful_mode=true}
but as stated, game hates it.

Thanks for the help on this, it seems like there isn't many people working with the surfaces yet... (from what I can tell atleast)
Will code for Food. I also have 11+ mods!
GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: Blank Surface?

Post by GopherAtl »

Not sure why none isn't working, but several settings seem to be outdated on the wiki now for autoplace_controls based on my poking at it.

It's a bit brute-force, but you could use this handler for on_chunk_generated to obliterate all entities in the chunk...

Code: Select all

game.on_event(defines.events.on_chunk_generated,function(event) local e=event.surface.find_entities(event.area) for i=1,#e do if not (e[1].valid and e[1].name=="player") then e[i].destroy() end end  end)
You could also loop over the area calling set_tile to change the tiles to desert, or grass, or whatever you wanted.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections
jorgenRe
Filter Inserter
Filter Inserter
Posts: 535
Joined: Wed Apr 09, 2014 3:32 pm
Contact:

Re: Blank Surface?

Post by jorgenRe »

If you wish to you could "rob" my code for tile changing ;)! Mod the underground
Then you can ask me for help if you need.
Edit:
It also includes the removal of entities ;)!
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^
Thanks for listening to our suggestions, devs :D!
I would jump of joy if we could specify which tiles spawned in a surfaces
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: Blank Surface?

Post by vzybilly »

I've noticed that changing the time in one place effects the other, is there a way to not have that happen?

Also, I've gotten it working, abit more... poorly then I hoped but it works. thanks for the help
Will code for Food. I also have 11+ mods!
orzelek
Smart Inserter
Smart Inserter
Posts: 3928
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Blank Surface?

Post by orzelek »

If you want you can find full list of currently used map settings near beginning of control.lua in RSO mod.
And to drop the resource you need to use size none not the frequency.
Last edited by orzelek on Mon Aug 17, 2015 6:28 pm, edited 1 time in total.
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: Blank Surface?

Post by vzybilly »

it looks like size none seemed to help but it still gave few trees and rocks, I'll run with this as it's less work for the game, thanks for the input
Will code for Food. I also have 11+ mods!
jorgenRe
Filter Inserter
Filter Inserter
Posts: 535
Joined: Wed Apr 09, 2014 3:32 pm
Contact:

Re: Blank Surface?

Post by jorgenRe »

vzybilly wrote:it looks like size none seemed to help but it still gave few trees and rocks, I'll run with this as it's less work for the game, thanks for the input
It wont be that bad on the CPU if you remove the trees ;)!
game.surfaces[yoursurface].find_entities_filtered(area, type = "tree") ;)!
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^
Thanks for listening to our suggestions, devs :D!
I would jump of joy if we could specify which tiles spawned in a surfaces
Rseding91
Factorio Staff
Factorio Staff
Posts: 15876
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Blank Surface?

Post by Rseding91 »

GopherAtl wrote:Not sure why none isn't working, but several settings seem to be outdated on the wiki now for autoplace_controls based on my poking at it.

It's a bit brute-force, but you could use this handler for on_chunk_generated to obliterate all entities in the chunk...

Code: Select all

game.on_event(defines.events.on_chunk_generated,function(event) local e=event.surface.find_entities(event.area) for i=1,#e do if not (e[1].valid and e[1].name=="player") then e[i].destroy() end end  end)
You could also loop over the area calling set_tile to change the tiles to desert, or grass, or whatever you wanted.
The wiki's accurate for autoplace_controls however the values may not be used as expected during map generation. It would probably be worth a bug report mentioning that the "none" option for autoplace controls doesn't actually work. It should.
If you want to get ahold of me I'm almost always on Discord.
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: Blank Surface?

Post by vzybilly »

None in the size worked but not in the frequency, I forgot to mention that in the post about things working. right now it seems like everything is moving along nicely and my blank surface is nicely done.
Will code for Food. I also have 11+ mods!
GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: Blank Surface?

Post by GopherAtl »

Rseding91 wrote: The wiki's accurate for autoplace_controls however the values may not be used as expected during map generation. It would probably be worth a bug report mentioning that the "none" option for autoplace controls doesn't actually work. It should.
what @vzybilly said; I didn't double-check the wiki before my post earlier, I just knew there was a "none" option somewhere that ought to work. I played with it once back in 0.12.0 and remember getting "none" to work then, just forgot it was size and not frequency (which would make more sense, semantically, tbh - frequency=none vs size=none) Not played with it enough to have any idea if anything else does or doesn't work as expected.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: Blank Surface?

Post by vzybilly »

None works in size and not frequency but in the wiki it's listed as an option in both. a controller for trees and rocks would be nice as well...
Will code for Food. I also have 11+ mods!
Post Reply

Return to “Modding help”