Plz add a way to stop map gen algo from generating stones. (2024)

Post Reply

  • Print view

7 posts• Page 1 of 1

yagaodirac
Fast Inserter
Plz add a way to stop map gen algo from generating stones. (1)
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Contact yagaodirac

Send private message

Plz add a way to stop map gen algo from generating stones.

  • Quote

Postby yagaodirac »

stone = {
frequency = 1,
richness = 1,
size = 0}
I still see stones around.
Could you plz add fields to stop the auto map gen from generating water and stones. It helps when making way different game mode. For now, I have to gen a new surface as empty, and remove stones and water. Or I have to copy tile information from a source while ignore all the others.

Top

eradicator
Smart Inserter
Plz add a way to stop map gen algo from generating stones. (3)
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Contact eradicator

Send private message

Re: Plz add a way to stop map gen algo from generating stones.

  • Quote

Postby eradicator »

The code looks like it's for stone-ore, but what you're saying sounds like you're talking about those decorative stone-rock entities.

Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

yagaodirac
Fast Inserter
Plz add a way to stop map gen algo from generating stones. (4)
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Contact yagaodirac

Send private message

Re: Plz add a way to stop map gen algo from generating stones.

  • Quote

Postby yagaodirac »

eradicator wrote:

Thu Dec 03, 2020 2:10 pm

The code looks like it's for stone-ore, but what you're saying sounds like you're talking about those decorative stone-rock entities.

My code for now is something like

--Removing water
if event.x>-5 and event.x<5 and (-5<y<)
then surface.get_tile(...).name == "water" or "deepwater"
surface.set_tiles(set to grass-2 or something)
end
--Removing rocks.
local results = surface.find_entities_filtered{area = event.area, type = "simple-entity"}
for k,v in pairs(results)
if v.name == "rock" or big rock or any rock.
v.destroy()
end
end

I saw another way to stop rocks from being generated is in Singistics Mod. The method is inside data.lua. But water is still generated. And it affect the prototypes, so it's not very flexible. If people prefer to mix my mod with others, they would probably encounter some issue.

Top

PFQNiet
Filter Inserter
Plz add a way to stop map gen algo from generating stones. (5)
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Contact PFQNiet

Send private message

Re: Plz add a way to stop map gen algo from generating stones.

  • Quote

Postby PFQNiet »

Code: Select all

for _,rock in pairs(data.raw['simple-entity']) do rock.autoplace = nilend

Should remove all rocks, including those added by other mods, but when other mods are involved just be careful they don't actually use simple-entity with autoplace for stuff other than rocks.

Top

yagaodirac
Fast Inserter
Plz add a way to stop map gen algo from generating stones. (6)
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Contact yagaodirac

Send private message

Re: Plz add a way to stop map gen algo from generating stones.

  • Quote

Postby yagaodirac »

PFQNiet wrote:

Fri Dec 04, 2020 4:46 am

Code: Select all

for _,rock in pairs(data.raw['simple-entity']) do rock.autoplace = nilend

Should remove all rocks, including those added by other mods, but when other mods are involved just be careful they don't actually use simple-entity with autoplace for stuff other than rocks.

Yeah, this is the reason I prefer a per-surface method. People are always inspired by tons of wired ideas and try combining different things from all corners of this planet. Any way, thank you for this idea. I'll look into it later.

Top

eradicator
Smart Inserter
Plz add a way to stop map gen algo from generating stones. (8)
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Contact eradicator

Send private message

Re: Plz add a way to stop map gen algo from generating stones.

  • Quote

Postby eradicator »

You need to look into MapGenSettings.

Here's some old code (not tested in 1.1) i once used to create a completely empty map preset. But if you don't need it selectable in the NewGame menu you should be able to just apply it in i.e. on_init.

Code: Select all

 local autoplace_controls = {} for _,control in pairs(data.raw['autoplace-control']) do autoplace_controls[control.name] = { frequency=0.01, richness=50, size=0 } end local autoplace_settings = { ['decorative'] = { treat_missing_as_default = false, }, ['entity'] = { treat_missing_as_default = false, }, ['tile'] = { treat_missing_as_default = true, }, } data.raw['map-gen-presets'].default['er:empty-map'] = { order = 'zzz', basic_settings = { autoplace_controls = autoplace_controls, -- default_enable_all_autoplace_controls = false, --prevents desert autoplace_settings = autoplace_settings, cliff_settings={ -- cliff_elevation_0=10, -- cliff_elevation_interval=40, -- name="cliff", richness=0 }, property_expression_names={ --red desert ["control-setting:aux:bias"]="0.500000", ["control-setting:aux:frequency:multiplier"]="0.166667", ["control-setting:moisture:bias"]="-0.500000", ["control-setting:moisture:frequency:multiplier"]="0.166667" }, terrain_segmentation=1, water=0, starting_area = 0, seed=553780354, } }

Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Top

yagaodirac
Fast Inserter
Plz add a way to stop map gen algo from generating stones. (9)
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Contact yagaodirac

Send private message

Re: Plz add a way to stop map gen algo from generating stones.

  • Quote

Postby yagaodirac »

eradicator wrote:

Fri Dec 04, 2020 9:51 am

Thank you. I'll look into it tomorrow.
By the way, I planned to write a Factorio tool kit. Something like get_random_point("nauvis"). And already a branch of simple prototypes like projectile prototype without graphics. Or assemblers which don't consume power.
Any idea?

Top

Post Reply

  • Print view

7 posts• Page 1 of 1

Return to “Already exists”

Jump to

  • General
  • ↳ Releases
  • ↳ News
  • ↳ General discussion
  • ↳ Multiplayer
  • ↳ Find Servers / Tools / Guides
  • ↳ Show your Creations
  • ↳ Videos
  • ↳ Combinator Creations
  • ↳ Mechanical Throughput Magic (circuit-free)
  • ↳ Railway Setups
  • ↳ Energy Production
  • ↳ Medium/Big/Gigantic Sized Structures
  • ↳ Fan Art
  • ↳ Gameplay Help
  • ↳ Spread the Word
  • ↳ Off topic
  • ↳ This Forum
  • ↳ Celebration Party
  • Support
  • ↳ Gameplay Help
  • ↳ Discover Factorio Wiki
  • ↳ Discover Others Creations
  • ↳ Discover Mods
  • ↳ Discover Tools Around Factorio
  • ↳ Technical Help
  • ↳ Bug Reports
  • ↳ Resolved for the next release
  • ↳ Fixed for 2.0
  • ↳ Assigned
  • ↳ Not a bug
  • ↳ Pending
  • ↳ 1 / 0 magic
  • ↳ Duplicates
  • ↳ Minor issues
  • ↳ Desyncs with mods
  • ↳ Won't fix.
  • ↳ Resolved Problems and Bugs
  • Factorio Direction
  • ↳ Ideas and Suggestions
  • ↳ Outdated/Not implemented
  • ↳ Frequently Suggested / Link Collections
  • ↳ Implemented Suggestions
  • ↳ Implemented in 2.0
  • ↳ Development Proposals
  • ↳ Balancing
  • Contributions
  • ↳ Mods
  • ↳ Download mods
  • ↳ Mod portal Discussion
  • ↳ Mods
  • ↳ Mod Packs / Libs / Special Interest
  • ↳ 5dim's mod
  • ↳ Angels Mods
  • ↳ Atomic Power
  • ↳ Bob's mods
  • ↳ DyWorld
  • ↳ F.A.R.L
  • ↳ Logistic Train Network
  • ↳ MoMods
  • ↳ Reika's Mods
  • ↳ Resource Spawner Overhaul
  • ↳ Yuoki Industries
  • ↳ PyMods
  • ↳ Questions, reviews and ratings
  • ↳ Modding Discussions
  • ↳ Modding discussion
  • ↳ Modding help
  • ↳ Ideas and Requests For Mods
  • ↳ Modding interface requests
  • ↳ Implemented mod requests
  • ↳ Implemented for 2.0
  • ↳ Already exists
  • ↳ Won't implement
  • ↳ Documentation Improvement Requests
  • ↳ Resolved Requests
  • ↳ Development tools
  • ↳ Tools
  • ↳ Mod and installation managers
  • ↳ Cheatsheets / Calculators / Viewers
  • ↳ Development tools
  • ↳ Special interest mods and libraries
  • ↳ Modding Development
  • ↳ Multiplayer / Dedicated Server
  • ↳ Multiplayer Board
  • ↳ Archive
  • ↳ Maps and Scenarios
  • ↳ Translations
  • ↳ Texture Packs
  • ↳ Fan Art
  • ↳ Wiki Talk
  • ↳ To be sorted
  • ↳ Campaign / Scenario suggestions
Plz add a way to stop map gen algo from generating stones. (2024)

References

Top Articles
Latest Posts
Article information

Author: Carmelo Roob

Last Updated:

Views: 6344

Rating: 4.4 / 5 (45 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Carmelo Roob

Birthday: 1995-01-09

Address: Apt. 915 481 Sipes Cliff, New Gonzalobury, CO 80176

Phone: +6773780339780

Job: Sales Executive

Hobby: Gaming, Jogging, Rugby, Video gaming, Handball, Ice skating, Web surfing

Introduction: My name is Carmelo Roob, I am a modern, handsome, delightful, comfortable, attractive, vast, good person who loves writing and wants to share my knowledge and understanding with you.