Disabling vanilla ore generation
Disabling vanilla ore generation
What are some ways to remove vanilla ore from the game? I tried to figure out how Arch666Angel does it, but his LUA kung fu is better than mine. I basically understand how to do it, but this is only in principle, how to implement it at LUA, I don’t understand (especially considering that LUA I know is lousy)
P.S. Maybe I will come back with the question of how to turn off vanilla technologies and recipes, but I hope I will deal with it myself
P.S. Maybe I will come back with the question of how to turn off vanilla technologies and recipes, but I hope I will deal with it myself
Re: Disabling vanilla ore generation
You can find it in data-final-fixes.lua in RSO. It disables spawning but leaves ore items etc.
There are few potential ways to do it tho - it depends if you want the resourcecs to still show up in map setup menu for example.
There are few potential ways to do it tho - it depends if you want the resourcecs to still show up in map setup menu for example.
Re: Disabling vanilla ore generation
Just look into data.raw: here is data.raw.resource, you can just delete autoplace from it.
Something like that (not tested):
Something like that (not tested):
Code: Select all
for i, resource in pairs (data.raw.resource) do
resource.autoplace = nil
end
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Disabling vanilla ore generation
Also be sure to only remove the autoplace (placement rules) for vanilla ores, and not the ores themselfs. Removing the ore (entity/item) itself would cause problems with many other mods.
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Disabling vanilla ore generation
And if you remove the autoplace, don't forget to remove the autoplace control too. There's no point in it showing up on the map if you can't place it.
Though, that may require removing those controls from the difficulty presets.
Though, that may require removing those controls from the difficulty presets.
Re: Disabling vanilla ore generation
Thanks ta all...
This, as I understand it, should be placed in data_update.lua?
This, as I understand it, should be placed in data_update.lua?
Code: Select all
for i, resource in pairs (data.raw.resource) do
resource.autoplace = nil
resource.autoplace.control = nil
end
Re: Disabling vanilla ore generation
If resource.autoplace is nil, then all inside of it is also nil, you MUST delete resource.autoplace.control = nil from your code.Prapor wrote: ↑Tue Oct 16, 2018 8:40 amThanks ta all...
This, as I understand it, should be placed in data_update.lua?Code: Select all
for i, resource in pairs (data.raw.resource) do resource.autoplace = nil resource.autoplace.control = nil end
First will be run all data.lua, then data-updates.lua, then data-final-fixes.lua. You cannot write it with "_".
https://lua-api.factorio.com/latest/Data-Lifecycle.html
Re: Disabling vanilla ore generation
darkfrei wrote: ↑Fri Oct 12, 2018 7:08 amJust look into data.raw: here is data.raw.resource, you can just delete autoplace from it.
Something like that (not tested):Code: Select all
for i, resource in pairs (data.raw.resource) do resource.autoplace = nil end
I tried, but it doesn't work. I've tried putting this code in data.lua and data-update.lua-no effect.
Re: Disabling vanilla ore generation
You are need to restart the game after every data changing.
You can also start the game with this mod viewtopic.php?f=135&t=45107 and just open log file with Notepad++.
Re: Disabling vanilla ore generation
I forget changing a game version in info...darkfrei wrote: ↑Tue Oct 16, 2018 10:57 amYou are need to restart the game after every data changing.
You can also start the game with this mod viewtopic.php?f=135&t=45107 and just open log file with Notepad++.
but now it give me a error
Re: Disabling vanilla ore generation
I solve it. Typo detection ))
how do I remove deleted resources from the start menu?
how do I remove deleted resources from the start menu?
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Disabling vanilla ore generation
By removing the autoplace control
Code: Select all
for i, resource in pairs (data.raw.resource) do
resource.autoplace = nil
data.raw["autoplace-control"][resource.name] = nil
end
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Disabling vanilla ore generation
Sorry, here is plural:
Code: Select all
for i, resource in pairs (data.raw.resources) do
resource.autoplace = nil
end
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Disabling vanilla ore generation
Yes, I did say to remove the autoplace control. It is it's own thing, not part of the resource.
All the information has already been said in replies since my last message, but I can see why you got confused.
All the information has already been said in replies since my last message, but I can see why you got confused.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: Disabling vanilla ore generation
bobingabout wrote: ↑Wed Oct 17, 2018 8:11 amYes, I did say to remove the autoplace control. It is it's own thing, not part of the resource.
All the information has already been said in replies since my last message, but I can see why you got confused.
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"