[MOD 0.16.x] NiceFill

Topics and discussion about specific mods
OhMods
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Jun 09, 2017 7:48 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by OhMods »

Karoschl wrote: Thu Apr 09, 2020 6:48 pm Hi,
it seems to me like there is an isse in the interaction with Klonan's Construction Drones:
Looks like it's the same error that Nilaus's play hit.

https://youtu.be/Hqgidyhi8TI?t=1842

If you continue on his next video he says Klonan fixed it right away for him. I don't know if the author is still active as it doesn't look like he's posted here in almost a year.
blahfasel2000
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Sat Mar 28, 2020 2:10 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by blahfasel2000 »

Nope, that's a different crash.

Until NiceFill gets fixed (Klonan already wrote in the bug report that it's not a problem with his mod but with NiceFill), as a workaround you can unpack the mod in your mod folder and edit control.lua to add the following lines at the beginning of the "on_robot_built_tile" event handler (just search for the string, it only appears once in the file), right after the lines that start with "if DEBUG":

Code: Select all

                -- avoid crash when Klonan's Construction Drones place
                -- tiles
                if event.robot == nil then
                        return
                end
It means that NiceFill won't work if a construction drone places landfill (it simply skips the event), but AFAIK and according to my quick tests they won't do that anyway, so nothing is actually lost.
Amunidae
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue May 30, 2017 8:34 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Amunidae »

Aaaaaaaaaaaand another one.
But i don't know if it's really "Construction Drones 0.5.5" or "NiceFill 0.1.17"
I'll report it to the second Mod, too.
I was placing stone bricks on the ground with "Construction Drones 0.5.5"

Die Mod Construction Drones (0.5.5) hat einen Fehler verursacht, der nicht behoben werden kann.
Bitte informiere den Autor der Mod über diesen Fehler.

Error while running event Construction_Drones::on_ai_command_completed (ID 113)
Die Mod NiceFill (0.1.17) hat einen Fehler verursacht, der nicht behoben werden kann.
Bitte informiere den Autor der Mod über diesen Fehler.

Error while running event nicefill::on_robot_built_tile (ID 47)
__nicefill__/control.lua:312: attempt to index field 'robot' (a nil value)
stack traceback:
__nicefill__/control.lua:312: in function <__nicefill__/control.lua:298>
stack traceback:
__Construction_Drones__/script/construction_drone.lua:2180: in function <__Construction_Drones__/script/construction_drone.lua:2125>
(...tail calls...)
__core__/lualib/event_handler.lua:47: in function <__core__/lualib/event_handler.lua:45>
stack traceback:
[C]: in function 'raise_event'
__Construction_Drones__/script/construction_drone.lua:2180: in function <__Construction_Drones__/script/construction_drone.lua:2125>
(...tail calls...)
__core__/lualib/event_handler.lua:47: in function <__core__/lualib/event_handler.lua:45>
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by steinio »

Yeah me too:

Code: Select all

Error while running event nicefill::on_robot_built_tile (ID 47)
__nicefill__/control.lua:312: attempt to index field 'robot' (a nil value)
stack traceback:
	__nicefill__/control.lua:312: in function <__nicefill__/control.lua:298>
stack traceback:
	__Construction_Drones__/script/construction_drone.lua:2182: in function <__Construction_Drones__/script/construction_drone.lua:2127>
	(...tail calls...)
	__core__/lualib/event_handler.lua:47: in function <__core__/lualib/event_handler.lua:45>
stack traceback:
	[C]: in function 'raise_event'
	__Construction_Drones__/script/construction_drone.lua:2182: in function <__Construction_Drones__/script/construction_drone.lua:2127>
	(...tail calls...)
	__core__/lualib/event_handler.lua:47: in function <__core__/lualib/event_handler.lua:45>
Encapsulating lines 312-326 with if event.robot ~= nil then end solved it for me.
I get a message nicefill failed but i don't understand why building tiles interact with nicefill as it is only needed for landfill.
Image

Transport Belt Repair Man

View unread Posts
FritzHugo3
Fast Inserter
Fast Inserter
Posts: 125
Joined: Tue Jan 09, 2018 4:30 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by FritzHugo3 »

Hi, many thx for this Mod (i hope Factorio insert this feature in the maingame. Dont understand why its not in and why he chance the color from green to this incredible agly brown-gray color).

If i use landfill per hand it works wonderfull. But if i use a blueprint for filling the Nanobots fills the land with the defasult agly dirt texture.

Is there a way that youre mod can use her function than robots/nanobots place the landfil? This will be realy great.

Thx and best wishes.


PS: is it mable that the Land become the normal land decorations like the original land? (Little vegetation).
Matrix_V
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 08, 2018 1:46 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Matrix_V »

Hi - would you make a much-appreciated update for 1.1 compatibility? :)
FritzHugo3
Fast Inserter
Fast Inserter
Posts: 125
Joined: Tue Jan 09, 2018 4:30 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by FritzHugo3 »

Matrix_V wrote: Fri Nov 27, 2020 3:25 am Hi - would you make a much-appreciated update for 1.1 compatibility? :)
Have you test it on 1.1. Is it dont work?

(Many Mods for 0.8 are work for 1.0 too)
jdrexler75
Inserter
Inserter
Posts: 39
Joined: Sat Nov 28, 2020 5:27 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by jdrexler75 »

Is there a way to have NiceFill applied to existing landfill tiles? I already placed a lot of them and always thought they looked ugly.

It would also help with Krastorio2 mod, that places landfill when removing its biter creep.
Tsuranuki
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sun May 02, 2021 11:52 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Tsuranuki »

Please add the following code snippet for compatibility with mods that place tiles, like Klonan's Repair Turret or when using Instant Blueprint from Creative mod

Code: Select all

script.on_event(defines.events.script_raised_set_tiles,
	function(event)
		if DEBUG then log( "NiceFill script_raised_set_tiles" ) end
		if DEBUG then log( serpent.block(event) ) end

		event.item = game.item_prototypes[event.tiles[1].name]

		if not pcall(do_nicefill, game, event ) then
			log( "NiceFill failed." )
		end
	end
)
------
jdrexler75 wrote: Sat Jan 02, 2021 11:06 am It would also help with Krastorio2 mod, that places landfill when removing its biter creep.
Although I haven't tested with Krastorio, this code snippet might also help with this issue.
Last edited by Tsuranuki on Sun May 02, 2021 12:53 pm, edited 1 time in total.
Post Reply

Return to “Mods”