Page 1 of 1
Disabling vanilla ore generation
Posted: Thu Oct 11, 2018 11:39 am
by Prapor
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
Re: Disabling vanilla ore generation
Posted: Thu Oct 11, 2018 5:48 pm
by orzelek
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.
Re: Disabling vanilla ore generation
Posted: Fri Oct 12, 2018 7:08 am
by darkfrei
Just 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
Re: Disabling vanilla ore generation
Posted: Fri Oct 12, 2018 7:59 am
by eradicator
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.
Re: Disabling vanilla ore generation
Posted: Fri Oct 12, 2018 8:28 am
by bobingabout
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.
Re: Disabling vanilla ore generation
Posted: Tue Oct 16, 2018 8:40 am
by Prapor
Thanks 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
Re: Disabling vanilla ore generation
Posted: Tue Oct 16, 2018 10:28 am
by darkfrei
Prapor wrote: Tue Oct 16, 2018 8:40 am
Thanks 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
If
resource.autoplace is nil, then all inside of it is also nil, you MUST delete
resource.autoplace.control = nil from your code.
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
Posted: Tue Oct 16, 2018 10:47 am
by Prapor
darkfrei wrote: Fri Oct 12, 2018 7:08 am
Just 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
Posted: Tue Oct 16, 2018 10:57 am
by darkfrei
Prapor wrote: Tue Oct 16, 2018 10:47 am
I tried, but it doesn't work. I've tried putting this code in data.lua and data-update.lua-no effect.
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
Posted: Tue Oct 16, 2018 11:22 am
by Prapor
darkfrei wrote: Tue Oct 16, 2018 10:57 am
Prapor wrote: Tue Oct 16, 2018 10:47 am
I tried, but it doesn't work. I've tried putting this code in data.lua and data-update.lua-no effect.
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++.
I forget changing a game version in info...
but now it give me a error

- error.JPG (22.29 KiB) Viewed 4779 times
Re: Disabling vanilla ore generation
Posted: Tue Oct 16, 2018 11:57 am
by Prapor
I solve it. Typo detection

))
how do I remove deleted resources from the start menu?
Re: Disabling vanilla ore generation
Posted: Tue Oct 16, 2018 12:17 pm
by eradicator
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
Re: Disabling vanilla ore generation
Posted: Tue Oct 16, 2018 12:55 pm
by darkfrei
Prapor wrote: Tue Oct 16, 2018 11:22 am
but now it give me a error
error.JPG
Sorry, here is plural:
Code: Select all
for i, resource in pairs (data.raw.resources) do
resource.autoplace = nil
end
Just one "s" more.
Re: Disabling vanilla ore generation
Posted: Wed Oct 17, 2018 8:11 am
by bobingabout
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.
Re: Disabling vanilla ore generation
Posted: Wed Oct 17, 2018 6:39 pm
by Arch666Angel
bobingabout wrote: Wed Oct 17, 2018 8:11 am
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.
