[MOD 0.16.x] NiceFill

Topics and discussion about specific mods
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by staviq »

Phantum wrote: Mon May 13, 2019 9:00 am
staviq wrote: Sun May 12, 2019 10:37 pm
Phantum wrote: Tue May 07, 2019 4:34 pm So apparently if I try to use the click and drag feature on a large selection of landfill, it murders the stack of it exponentially faster the bigger the area you have.

I killed 3,000 landfill in less than a second on an 8x8 selection just by trying to click and drag.
I need some details, is landfill not being placed at all or is the texture wrong ? Are you using rso ? Are you getting any errors in the chat ?
So it was using land fill on every block, No to RSO, I am using alien biomes, so basically if I made a 20 x 20 square to click and drag the landfill, it tries to replace every single block it can, every single time I click and drag, so 400 landfill each time I move in any direction is gone, it just keeps replacing itself. Texture is fine for the most part when I was using it, and I wasn't getting any errors in the chat.

I'm thinking that it might be trying to replace the alien biomes ground.


https://docs.google.com/spreadsheets/d/ ... edit#gid=0
BA Megabase is my modlist for what I have running.
Hmmm... The thing is, NiceFill does not manipulate landfill itself, in fact, it activates only after the landfill is placed, and then just sets the proper texture for the changed tiles, it does not even "use" landfill.

Can you disable water blending in the settings and see if it changes anything ?
Phantum
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Jun 11, 2016 12:20 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Phantum »

staviq wrote: Mon May 13, 2019 10:39 am Hmmm... The thing is, NiceFill does not manipulate landfill itself, in fact, it activates only after the landfill is placed, and then just sets the proper texture for the changed tiles, it does not even "use" landfill.

Can you disable water blending in the settings and see if it changes anything ?


I can add it back in tonight and try to see if that fixes it, If it doesn't I'll also grab a twitch clip for you to see what happens. I'm guessing it's related to alien biomes though as it changes the landfill to Grass among other things.

Have to head back to work though so I'll keep ya posted and give you more information :)
---
I am a Streamer,
Fallen Sun Gaming by Name,
Factorio is Sometimes my Game.
For Some Goodness
Join me
on http://www.twitch.tv/fallensungaming

FSG may or may not be subliminally implanted in this signature
Phantum
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Jun 11, 2016 12:20 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Phantum »

https://www.dropbox.com/s/xup58g00qss8w ... H.mp4?dl=0

There's what's happening, with Alien Biomes Landfill is called Grass, it lets you replace regular terrain, but without nicefill it functions normally, with nicefill it burns through the landfill as fast as you click and drag.

It still functions properly if you click and place, but if you click and drag, bye bye landfill. (and still does it without the water blend mode on.)

If you want I can send you a copy of the save, along with the mods and settings I've been using?
---
I am a Streamer,
Fallen Sun Gaming by Name,
Factorio is Sometimes my Game.
For Some Goodness
Join me
on http://www.twitch.tv/fallensungaming

FSG may or may not be subliminally implanted in this signature
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by staviq »

Phantum wrote: Tue May 14, 2019 1:09 am https://www.dropbox.com/s/xup58g00qss8w ... H.mp4?dl=0

There's what's happening, with Alien Biomes Landfill is called Grass, it lets you replace regular terrain, but without nicefill it functions normally, with nicefill it burns through the landfill as fast as you click and drag.

It still functions properly if you click and place, but if you click and drag, bye bye landfill. (and still does it without the water blend mode on.)

If you want I can send you a copy of the save, along with the mods and settings I've been using?
Oh, now i understand :)

I'll check this when i get back from work.
Phantum
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Jun 11, 2016 12:20 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Phantum »

staviq wrote: Tue May 14, 2019 11:51 am
Phantum wrote: Tue May 14, 2019 1:09 am https://www.dropbox.com/s/xup58g00qss8w ... H.mp4?dl=0

There's what's happening, with Alien Biomes Landfill is called Grass, it lets you replace regular terrain, but without nicefill it functions normally, with nicefill it burns through the landfill as fast as you click and drag.

It still functions properly if you click and place, but if you click and drag, bye bye landfill. (and still does it without the water blend mode on.)

If you want I can send you a copy of the save, along with the mods and settings I've been using?
Oh, now i understand :)

I'll check this when i get back from work.
Yup, there's a few other types of landfill as well with alien biomes they are:

Sand, Desert, Grass, Dry Dirt, and Dirt
---
I am a Streamer,
Fallen Sun Gaming by Name,
Factorio is Sometimes my Game.
For Some Goodness
Join me
on http://www.twitch.tv/fallensungaming

FSG may or may not be subliminally implanted in this signature
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by staviq »

Phantum wrote: Tue May 14, 2019 7:58 pm
Yup, there's a few other types of landfill as well with alien biomes they are:

Sand, Desert, Grass, Dry Dirt, and Dirt
I cannot reproduce the problem.

Also, Alien biomes only has one type of landfill. If you have more than one, then you are using mods that modify landfill.

The problem you have is not that NiceFill "burns" trough the landfill, it's that one of your mods makes it so you can place landfill over existing landfill, therefore if you click and drag, you endlesly palce landfill in the same spot.

If you mouse over the stack of the landfill you are using, it should tell you in the hint what mods are modifying this item:

Image
Phantum
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Jun 11, 2016 12:20 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Phantum »

Ah, I have landfill painting on, and so that combined with your mod is what's doing it, I missed that one, if I remove either of the two, it fixes the whole thing!

I'm guessing the problem is something along the lines of:

Nicefill makes pretty
landfill painting sees pretty, and has to replace it
Nicefill replaces placed landfill to pretty,


Rinse and repeat! :P
---
I am a Streamer,
Fallen Sun Gaming by Name,
Factorio is Sometimes my Game.
For Some Goodness
Join me
on http://www.twitch.tv/fallensungaming

FSG may or may not be subliminally implanted in this signature
EmberQuill
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu May 30, 2019 8:02 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by EmberQuill »

Seems to be incompatible with Basic Sea Block. When I try to place landfill, it uses up the landfill but doesn't place anything in the world.
Dulap32
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Apr 21, 2018 12:10 am
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Dulap32 »

Hello, I wanted to point out that there is a bug currently with the alien biomes mod. There was some discussion about this to which the author stated that it wasn't the mod's fault but might be caused by something else.

Basically there is a type of land "shallow water" which can't be filled up.

So while having the Nicefill mod disabled the landfill does it's job and fills up the shallow water but once it's enabled when you try to fill it up the game reads it as being filled up but the texture is still water and won't let you build anything on top of it.

What i think it's that the mod takes the texture of shallow water and just replaces it on top of water because that was the biome present in that area which pretty much breaks everything about it. Game reads that the shallow water was filled up but the Nicefill mod just adds the same type of block on top of it.

Many people asked about this and would be great if it could be fixed since nicefill and alien biomes are 2 amazing mods together for visual aesthetics
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by staviq »

I'll check this when I get home, but generally, NiceFill creates a copy of a surface with mapgen settings having all water disabled. If any mod ignores mapgen settings for water, water appears on the copy surface and NF copies this water texture.

There really is no way around this if a mod does not allow creating a surface with absolutely no water since water is not placed over the existing map, it's a part of the biome the same way a sand or grass is, and information about correct texture for a tile does not exist in the game.

Perhaps mod creator of AlienBiomes provides some sort of remote call that would disable water, I'll try to verify this.
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by slippycheeze »

staviq wrote: Fri Jun 07, 2019 5:25 pm I'll check this when I get home, but generally, NiceFill creates a copy of a surface with mapgen settings having all water disabled. If any mod ignores mapgen settings for water, water appears on the copy surface and NF copies this water texture.
Hrm. I came here because of the same issue. I'm happy to throw a copy of the save your way, if that is helpful, of whatever. Otherwise, good luck. :)

It looks like the only tile with issues is `shallow-water-2`, so far, in my testing.

On a related note, would you consider adding a keybinding to enable and disable NiceFill on landfill placement? Clearly, not a solution, but as you describe it this could reoccur if another mod messes with water generation or something, ignoring the instruction not to. That would at least hurt less than disabling and enabling the entire mod ... :)
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by staviq »

slippycheeze wrote: Sat Jul 06, 2019 8:59 pm
staviq wrote: Fri Jun 07, 2019 5:25 pm I'll check this when I get home, but generally, NiceFill creates a copy of a surface with mapgen settings having all water disabled. If any mod ignores mapgen settings for water, water appears on the copy surface and NF copies this water texture.
Hrm. I came here because of the same issue. I'm happy to throw a copy of the save your way, if that is helpful, of whatever. Otherwise, good luck. :)

It looks like the only tile with issues is `shallow-water-2`, so far, in my testing.

On a related note, would you consider adding a keybinding to enable and disable NiceFill on landfill placement? Clearly, not a solution, but as you describe it this could reoccur if another mod messes with water generation or something, ignoring the instruction not to. That would at least hurt less than disabling and enabling the entire mod ... :)

Could you possibly send me a game save where you are standing somewhere close to the area where it's not working ?
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by staviq »

I was trying to avoid this lazy solution but is appears to be necessary.

I can't fix compatibility with all mods, so i just made compatibility problems less severe.


From now on, whenever a mod tampers with NF hidden surfaces, default landfill texture will be used.

Note, this does NOT mean, NF will just stop working. This solution is implemented per tile, meaning if texture is correct for a given tile, NF will work as intended, but if a tile has screwed up texture, NF will place default landfill there ( actually it will just not place anything there, so the game decides the texture ).

When i was testing this change with Alien Biomes, i'd say 95% of the map works correctly, and only "mud-water" gets the default texture:

On the left, NF works fine, on the right NF used fallback texture:

Image Image
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by slippycheeze »

staviq wrote: Sun Jul 07, 2019 8:41 pm I was trying to avoid this lazy solution but is appears to be necessary.
I can't fix compatibility with all mods, so i just made compatibility problems less severe.
...and here I was, just about to drop a bit of code that says "do not ever use these tiles, specifically", which also fixes the Alien Biomes issue, and should cover any case that places water with the map generator.

Your code is still valuable, because mods can, and apparently do, ignore those instructions more than I expected - several decoratives from different mods were present on the nicefill surface despite instructions - but this should also improve the situation:

Code: Select all

            -- I think this can be generated when control.lua is loaded safely, but i did it in the nicefill function
            for name, _ in pairs(game.tile_prototypes) do
                if name:find("water") then
                    map_gen_settings.property_expression_names["tile:"..name..":probability"] = -1000
                end
            end
That sets the probably to -1000 which is apparently the value for "never", just as 1000 is the value for "always".

In the AB case, no more water-mud spawning where inland shallows are enabled on the NiceFill surface.


Finally, I can definitely send you a map, or the scenario version I was using for testing, with the problem demonstrated, but ... how about instead I tell you that code above added to the control.lua made all the water on the nicefill surface go away in my testing. :)


Between the two this should fix the well behaved (if annoying) mods that use an expression where setting water frequency to none does not prevent placement of water tiles, such as AB, and also when they just whack them down regardless of map generator settings - your workaround.

AB, for reference, has a complex noise expression that references the variable "water", but apparently still gives non-zero results in some cases for inland areas at or below the waterline. As far as I can tell this is technically correct, just annoying, because the default setting of water to never show up isn't taking effect ... but only for that one specific tile type, and expression. -_-

Anyway, point is: I'd be very happy if you push one more release adding the above, and we get nice nicefill everywhere, and acceptable nicefill anywhere that my change isn't sufficient. :)

edit to add: hah! I think I started beating my head against the pain of map generator placement settings about ten minutes before your posts, and didn't see them until I had finished. such timing.

edit to add: also, demo of the effect of my changes, here you come.
nicefill surface before our fixes
nicefill surface before our fixes
nicefill surface created before our fixes.png (5.04 MiB) Viewed 7111 times
nicefill surface after our fixes
nicefill surface after our fixes
nicefill surface created after our fixes.png (5.61 MiB) Viewed 7111 times
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by staviq »

slippycheeze wrote: Sun Jul 07, 2019 9:43 pm
staviq wrote: Sun Jul 07, 2019 8:41 pm I was trying to avoid this lazy solution but is appears to be necessary.
I can't fix compatibility with all mods, so i just made compatibility problems less severe.
...and here I was, just about to drop a bit of code that says "do not ever use these tiles, specifically", which also fixes the Alien Biomes issue, and should cover any case that places water with the map generator.

Your code is still valuable, because mods can, and apparently do, ignore those instructions more than I expected - several decoratives from different mods were present on the nicefill surface despite instructions - but this should also improve the situation:
Done :)

Existing maps will auto regenerate NF surfaces on first use of landfill on problematic tile.

If you want to avoid having default landfill texture on first use, you can use this console command:

Code: Select all

/c game.delete_surface("NiceFill_nauvis")
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by slippycheeze »

staviq wrote: Mon Jul 08, 2019 2:54 pm
slippycheeze wrote: Sun Jul 07, 2019 9:43 pm
staviq wrote: Sun Jul 07, 2019 8:41 pm I was trying to avoid this lazy solution but is appears to be necessary.
I can't fix compatibility with all mods, so i just made compatibility problems less severe.
...and here I was, just about to drop a bit of code that says "do not ever use these tiles, specifically", which also fixes the Alien Biomes issue, and should cover any case that places water with the map generator.

Your code is still valuable, because mods can, and apparently do, ignore those instructions more than I expected - several decoratives from different mods were present on the nicefill surface despite instructions - but this should also improve the situation:
Done :)

Existing maps will auto regenerate NF surfaces on first use of landfill on problematic tile.

If you want to avoid having default landfill texture on first use, you can use this console command:

Code: Select all

/c game.delete_surface("NiceFill_nauvis")
Thanks! Nice stuff. My current game already has the good surface, thankfully, since I wanted to test it “in production” not just the editor. :)

Appreciate the work you did on fixing this, too, and on building it. Quick check: I am 99.9 percent sure from the code this’ll work with mods that add extra surfaces. Is that correct? (eg: Space Exploration creating non nativus surfaces)
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by staviq »

slippycheeze wrote: Mon Jul 08, 2019 8:42 pm Thanks! Nice stuff. My current game already has the good surface, thankfully, since I wanted to test it “in production” not just the editor. :)

Appreciate the work you did on fixing this, too, and on building it. Quick check: I am 99.9 percent sure from the code this’ll work with mods that add extra surfaces. Is that correct? (eg: Space Exploration creating non nativus surfaces)
I left the fallback check in the code, so just in case of the 0.1 % where water is still forced NF will no longer replace water with water, like when a mod places water that is not called "water".

Also every non default surface has it's own NF hidden surface, so that takes care of the mods that use multiple surfaces.
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by slippycheeze »

staviq wrote: Mon Jul 08, 2019 10:05 pm
slippycheeze wrote: Mon Jul 08, 2019 8:42 pm Thanks! Nice stuff. My current game already has the good surface, thankfully, since I wanted to test it “in production” not just the editor. :)

Appreciate the work you did on fixing this, too, and on building it. Quick check: I am 99.9 percent sure from the code this’ll work with mods that add extra surfaces. Is that correct? (eg: Space Exploration creating non nativus surfaces)
I left the fallback check in the code, so just in case of the 0.1 % where water is still forced NF will no longer replace water with water, like when a mod places water that is not called "water".

Also every non default surface has it's own NF hidden surface, so that takes care of the mods that use multiple surfaces.
Wonderful. ...and yeah, I think your fallback code absolutely should stay. Next time something doesn't turn off whatever liquid when water is zero in the noise generator, or when it places it via lua script, it'll handle the problem. I almost didn't send that update when you published your fix, but I figured it was worth it because, hey, if I'm paying for pretty... haha.

Thanks. Glad to confirm my understanding there, and again, thanks for NiceFill. So nice.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by darkfrei »

Is it possible to replace all ground tiles with tiles from hidden surface?
Karoschl
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Oct 05, 2019 3:37 pm
Contact:

Re: [MOD 0.16.x] NiceFill

Post by Karoschl »

Hi,
it seems to me like there is an isse in the interaction with Klonan's Construction Drones:

Code: Select all

The mod Construction Drones (0.4.9) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Construction_Drones::on_script_path_request_finished (ID 112)
The mod NiceFill (0.1.17) caused a non-recoverable error.
Please report this error to the mod author.

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:2102: in function <__Construction_Drones__/script/construction_drone.lua:2047>
	(...tail calls...)
	__Construction_Drones__/script/construction_drone.lua:2601: in function 'handler'
	__core__/lualib/event_handler.lua:44: in function <__core__/lualib/event_handler.lua:42>
stack traceback:
	[C]: in function 'raise_event'
	__Construction_Drones__/script/construction_drone.lua:2102: in function <__Construction_Drones__/script/construction_drone.lua:2047>
	(...tail calls...)
	__Construction_Drones__/script/construction_drone.lua:2601: in function 'handler'
	__core__/lualib/event_handler.lua:44: in function <__core__/lualib/event_handler.lua:42>
not sure if it is nicefill or the drones....

The crash happens whenever i built tiles (using simple brick-tiles for testing) using the drones

let me know if you need logs or saves

also posted in https://mods.factorio.com/mod/Construct ... 000ddae37f
Post Reply

Return to “Mods”