Page 1 of 4
[MOD 0.16.x] NiceFill
Posted: Tue Jan 30, 2018 1:17 pm
by staviq
NiceFill
Landfill has the same texture as the surrounding tiles, instead of the default grass.
https://mods.factorio.com/mod/nicefill
Since people were asking, this thread is now the official way to report bugs.
When reporting a bug, ALWAYS post your log file, and if possible, your latest game save file too.
Re: [MOD 0.16.x] NiceFill
Posted: Thu Mar 01, 2018 8:28 pm
by nbrpg
Thanks for the mod! My landfilled world looks much nicer.
I don't have any bugs to report, but I have a question if another feature could be implemented.
FARL allows you to automatically place landfill when water is in your path while laying track. Unfortunately, FARL places the normal landfill that doesn't match the terrain so it is best to stop the train and manually place landfill before continuing, if you want it to look good. Is it possible for this mod to make FARL use the NiceFill method of placing landfill instead? It would provide a little more time savings and enhance the landscape when lazy players like me use FARL to lay their train tracks.
Thanks for reading, and thanks again for the great mod!
Re: [MOD 0.16.x] NiceFill
Posted: Thu Mar 01, 2018 8:50 pm
by staviq
nbrpg wrote:Thanks for the mod! My landfilled world looks much nicer.
I don't have any bugs to report, but I have a question if another feature could be implemented.
FARL allows you to automatically place landfill when water is in your path while laying track. Unfortunately, FARL places the normal landfill that doesn't match the terrain so it is best to stop the train and manually place landfill before continuing, if you want it to look good. Is it possible for this mod to make FARL use the NiceFill method of placing landfill instead? It would provide a little more time savings and enhance the landscape when lazy players like me use FARL to lay their train tracks.
Thanks for reading, and thanks again for the great mod!
Hi.
FARL doesn't seem to properly notify the game it has used the landfill, so it's not really a landfill it uses, it just forces tile to have ground tile.
I have messaged FARL author with a request to add on_player_built_tile event tho FARL, this would make NiceFill automatically compatible with FARL.
I supose if FARL author does add my proposed modification, the only thing you would need to do is to update FARL, so just check the mod portal periodically for updates.
Re: [MOD 0.16.x] NiceFill
Posted: Sat Apr 07, 2018 10:26 pm
by steinio
Hi,
i get this error on placing landfill:
Code: Select all
204.353 Error MainLoop.cpp:1029: Exception at tick 12495134: Error while running event nicefill::on_player_built_tile (ID 45)
"infinite-clowns-ore1" is not a valid autoplace control name.
stack traceback:
__nicefill__/control.lua:135: in function 'do_nicefill'
__nicefill__/control.lua:179: in function <__nicefill__/control.lua:178>
infinite-clowns-ore1 is from
https://mods.factorio.com/mod/Clowns-Extended-Minerals
Cu, steinio.
Re: [MOD 0.16.x] NiceFill
Posted: Sun Apr 08, 2018 3:37 am
by staviq
steinio wrote:Hi,
i get this error on placing landfill:
Code: Select all
204.353 Error MainLoop.cpp:1029: Exception at tick 12495134: Error while running event nicefill::on_player_built_tile (ID 45)
"infinite-clowns-ore1" is not a valid autoplace control name.
stack traceback:
__nicefill__/control.lua:135: in function 'do_nicefill'
__nicefill__/control.lua:179: in function <__nicefill__/control.lua:178>
infinite-clowns-ore1 is from
https://mods.factorio.com/mod/Clowns-Extended-Minerals
Cu, steinio.
Hi.
Couple of questions:
1. Multiplayer or singe player ?
2. Did you add "Clowns Extended Minerals" to an existing game or was it a fresh start ?
EDIT:
I think i know what's going on, i had this problem once before but were unable to reproduce since.
The problem seems to be as follows. When factorio creates new game, it reads all possible ores and tiles and decorations that mods add to the game, and builds this "autoplace_controls" object-thingy. Now, NiceFill duplicates the game map with changed settings ( like disabled water ) so it can check what would be on given tile if there was no water on the map. This is achieved by creating a copy of autoplace_controls from the main surface, disabling a few things and using it to generate surface copy.
The thing is, if you disable or enable a mod, mid-game, that adds or changes any tile ore or decorative, autoplace_controls of the main surface becomes sort of invalid, it still contains old data. If NiceFill tries to create a surface copy from those invalid autoplace_controlls, the exact problem You described happens.
I have honestly never been able to sort this thing out, there is no way of validating autoplace_controls other that using it and this soft crashes the game if they are incorrect.
I think I'll post this as a Factorio bug, see what the devs have to say about it.
Re: [MOD 0.16.x] NiceFill
Posted: Sun Apr 08, 2018 4:54 am
by Nexela
It might be possible (until the outcome of your bug report) in the meantime for you to use the on_config_changed event rewrite the map_gen_settings by removing invalid ones yourself. (iterate the table and remove anything with no data.raw["auto-place-controls"] etc etc)
Re: [MOD 0.16.x] NiceFill
Posted: Sun Apr 08, 2018 5:01 am
by staviq
Nexela wrote:It might be possible (until the outcome of your bug report) in the meantime for you to use the on_config_changed event rewrite the map_gen_settings by removing invalid ones yourself. (iterate the table and remove anything with no data.raw["auto-place-controls"] etc etc)
Thanks for the suggestion, I'll try that.
Re: [MOD 0.16.x] NiceFill
Posted: Sun Apr 08, 2018 7:42 am
by steinio
Well sounds like a game bug if the data is not revalidated on mod change.
I added the mod into an existing game.
Can't you add sanity checks on placing landfill that it not crashes?
Re: [MOD 0.16.x] NiceFill
Posted: Sun Apr 08, 2018 8:31 am
by staviq
steinio wrote:Can't you add sanity checks on placing landfill that it not crashes?
I have added a pcall wrapper for creating surface copy, and it seems to be stable workaround.
Now, when the bug happens, you'll get a message and landfill will revert back to the default texture without soft crashing the game.
0.1.4 should be available on mod portal.
Re: [MOD 0.16.x] NiceFill
Posted: Sun Apr 08, 2018 8:54 am
by steinio
staviq wrote:steinio wrote:Can't you add sanity checks on placing landfill that it not crashes?
I have added a pcall wrapper for creating surface copy, and it seems to be stable workaround.
Now, when the bug happens, you'll get a message and landfill will revert back to the default texture without soft crashing the game.
0.1.4 should be available on mod portal.
Thank you.
Re: [MOD 0.16.x] NiceFill
Posted: Mon Apr 16, 2018 7:57 pm
by steinio
Hey hey hey,
i worked on an own mod today and crashed also with map_gen_settings.
I got so annoyed until i made a quick fix:
Code: Select all
function validate_map_gen_settings(map_gen_settings)
if map_gen_settings ~= nil then
for s, t in pairs(map_gen_settings.autoplace_controls) do
local found = false
for u, v in pairs(game.autoplace_control_prototypes) do
if s == u then found = true end
end
if found == false then
map_gen_settings.autoplace_controls[s] = nil
end
end
end
return map_gen_settings
end
This function removes all autoplace_controls with no autoplace_control_prototype.
Change line 146 in your control.lua to:
Code: Select all
if pcall( game.create_surface,"NiceFill", validate_map_gen_settings(map_gen_settings) ) then
and add the function to the end of this file or use this:
Happy NiceFilling again.
Re: [MOD 0.16.x] NiceFill
Posted: Thu May 24, 2018 10:33 am
by Graydee
Hello, i have some weird interactions with New Islands mod, if i have both enabled(just test right now, just 2 mods), if i place landfill on rivers from NI, it don't change anything, just retextrured grass, and that's it, without NiceFill, it pop out grass, as usual.
Re: [MOD 0.16.x] NiceFill
Posted: Thu May 24, 2018 6:53 pm
by staviq
Graydee wrote:Hello, i have some weird interactions with New Islands mod, if i have both enabled(just test right now, just 2 mods), if i place landfill on rivers from NI, it don't change anything, just retextrured grass, and that's it, without NiceFill, it pop out grass, as usual.
I'll check this when i get back home.
Re: [MOD 0.16.x] NiceFill
Posted: Fri May 25, 2018 9:47 pm
by staviq
Graydee wrote:Hello, i have some weird interactions with New Islands mod, if i have both enabled(just test right now, just 2 mods), if i place landfill on rivers from NI, it don't change anything, just retextrured grass, and that's it, without NiceFill, it pop out grass, as usual.
New Islands mod now supports NiceFill, please update New Islands to the latest version.
Re: [MOD 0.16.x] NiceFill
Posted: Sat May 26, 2018 9:55 am
by Graydee
Yeah, i just wrote both of you XD , and he do update faster. lol
Re: [MOD 0.16.x] NiceFill
Posted: Sat May 26, 2018 3:09 pm
by staviq
Graydee wrote:Yeah, i just wrote both of you XD , and he do update faster. lol
He updated because the bug was impossible to fix on my side
NI overrides water placement, so when NF tried to generate a hidden map chunk with no water to copy textures from, NI stealthily added water there anyway.
So the solution was for the NI mod to add exception that ignores NiceFill hidden surface, therefore the fix is in the NI mod.
Re: [MOD 0.16.x] NiceFill
Posted: Wed Jun 13, 2018 8:47 am
by Game4Lols
Does the mod decrease performance if it makes a second surface? I haven't noticed a drop in us or anything, just curious.
Re: [MOD 0.16.x] NiceFill
Posted: Wed Jun 13, 2018 8:56 am
by staviq
Game4Lols wrote:Does the mod decrease performance if it makes a second surface? I haven't noticed a drop in us or anything, just curious.
It will slightly increase the save size, and have a tiny lag only while actually placing landfill, besides that, the mod is completely inactive and does not have any background tasks.
For what i understand, having a second surface won't impact performance because there will never be any biters or buildings there, and no player will ever visit it, so there are no chunks to be processed by Factorio.
There is a slight possibility that some other mods might increase their ups impact when additional surfaces are present but i have no influence over this, and have never had such issues.
Re: [MOD 0.16.x] NiceFill
Posted: Wed Aug 29, 2018 4:03 am
by Reika
I am having an issue where this mod causes landfill to place water, which makes landfill completely useless - and kills the player if standing too close.
ChokePoint might be involved; does this mod refire the on_chunk_generated?
EDIT: It appears you use a second surface, which ChokePoint is going to carve up as it does the main one. Thus, Nicefill appears to be placing water from its second surface.
Re: [MOD 0.16.x] NiceFill
Posted: Wed Aug 29, 2018 8:39 am
by staviq
Reika wrote:I am having an issue where this mod causes landfill to place water, which makes landfill completely useless - and kills the player if standing too close.
ChokePoint might be involved; does this mod refire the on_chunk_generated?
EDIT: It appears you use a second surface, which ChokePoint is going to carve up as it does the main one. Thus, Nicefill appears to be placing water from its second surface.
I'm gonna look at this when I go back from work, but generally the hidden surface is sacred, and if a mod tried to modify it it will break things. Not to worry, I'll try to persuade the other mods dev to exclude nicefill surface