Page 2 of 3
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 5:25 pm
by eradicator
And you could pre-craft whichever of the two recipes is cheaper and then un-/install the mod :twisted:.
Apart from that, yea, might be a good idea. But who knows if the author of $any-particular-mod doesn't have different goals.
(And i didn't even try to remember if or not "landfill" was seperate in some earlier version :D. I just ask the engine / my text editor what it is *now*. It does use the exact same graphics file in any case.)
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 5:30 pm
by Qon
I'm saying that the Platforms and it's recipes could be removed. Just have [Platforms mod] make landfill minable just like platforms, that's it except maybe also reskin landfill. But there would be no platform recipe or platforms at all in the mod, landfill just gets that capability.
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 6:01 pm
by zOldBulldog
From the discussion it is now clear to me that the ability of being able to undo comes at a heavy price... having to use a landfill tile that is non-standard and therefore if you uninstall the mod you end up with a broken map or have to go through a number of difficult hoops to prevent it.
So perhaps I should reformulated the request as something simpler:
Is it feasible to make a mod that does nothing more than use regular blueprints (no landfill in them) and just adds landfill in whatever places your blueprint is trying to place objects but encounters water?
In other words, if I have landfill and necessary materials on hand us personal bots, when I place a blueprint it just gets built (all the hoops handled behind the scenes).
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 6:29 pm
by Qon
Being able to undo could fairly simply be added to Platforms mod, which I actually also posted as a
suggestion on that board. So it doesn't have to be pricy.
zOldBulldog wrote: Thu May 16, 2019 6:01 pm
Is it feasible to make a mod that does nothing more than use regular blueprints (no landfill in them) and just adds landfill in whatever places your blueprint is trying to place objects but encounters water?
In other words, if I have landfill and necessary materials on hand us personal bots, when I place a blueprint it just gets built (all the hoops handled behind the scenes).
Since it has already been made, yes it is feasible. It adds a button that is visible while placing a blueprint that adds landfill under all entities in the blueprint (or temporary cut-copy-paste blueprint) and also the ability to flip blueprints etc.
There's
another mod that just adds that button but it adds the button permanently even when not holding a blueprint and it lacks the other features so I wouldn't recommend it over BlueprintExtensions, which is a must have. But BP-E was broken a while back so then I used the worse mod as a temporary replacement.
But a vanilla bug is that you can't place ghosts on landfill ghosts so you have to place twice, again when the landfill has been placed. Same for both mods, not their fault. I haven't reported it yet though.
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 6:33 pm
by zOldBulldog
Qon wrote: Thu May 16, 2019 6:29 pm
Being able to undo could fairly simply be added to Platforms mod, which I actually also posted as a
suggestion on that board. So it doesn't have to be pricy.
zOldBulldog wrote: Thu May 16, 2019 6:01 pm
Is it feasible to make a mod that does nothing more than use regular blueprints (no landfill in them) and just adds landfill in whatever places your blueprint is trying to place objects but encounters water?
In other words, if I have landfill and necessary materials on hand us personal bots, when I place a blueprint it just gets built (all the hoops handled behind the scenes).
Since it has already been made, yes it is feasible. It adds a button that is visible while placing a blueprint that adds landfill under all entities in the blueprint (or temporary cut-copy-paste blueprint) and also the ability to flip blueprints etc.
There's
another mod that just adds that button but it adds the button permanently even when not holding a blueprint and it lacks the other features so I wouldn't recommend it over BlueprintExtensions, which is a must have. But BP-E was broken a while back so then I used the worse mod as a temporary replacement.
You have to press the button first though and you might have to double-click (a vanilla bug maybe?) to get entities placed on top of landfill ghosts to actually stick. But it's pretty much perfect and that's just a really minor inconvenience.
Ty, I was under the (apparently wrong impression) that BP-E updated the blueprint itself to include the landfill (which I didn't quite like) so I ignored it.
But if the button lets you add the landfill "as you place the blueprint" I'll definitely give it a try.
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 6:36 pm
by Qon
It does add it to the blueprint. But making a copy is fairly trivial (add to library and take from there) and if the blueprint is in the library I don't think the blueprint is updated, just the temporary copy in your hand. And removing the landfill tiles is just rightclick the blueprint and then rightclick the landfill in the entity list to filter them away.
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 7:01 pm
by eradicator
zOldBulldog wrote: Thu May 16, 2019 6:33 pm
But if the button lets you add the landfill "as you place the blueprint" I'll definitely give it a try.
To be able to do that the base game would have to raise an event when placing a blueprint *fails*. Which it doesn't, so it's not moddable.
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 9:32 pm
by Qon
zOldBulldog wrote: Thu May 16, 2019 6:01 pm
From the discussion it is now clear to me that the ability of being able to undo comes at a heavy price... having to use a landfill tile that is non-standard and therefore if you uninstall the mod you end up with a broken map or have to go through a number of difficult hoops to prevent it.
Mod change request
and response:
micromario wrote:
I didn't know about the changes to landfill in .17
This sounds like a great idea, actually I can't think of any reason not to make this change.
Let me see what I can do
So get Platforms because soon they will be undoable landfill with no drawback.

Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 9:50 pm
by zOldBulldog
Qon wrote: Thu May 16, 2019 9:32 pm
zOldBulldog wrote: Thu May 16, 2019 6:01 pm
From the discussion it is now clear to me that the ability of being able to undo comes at a heavy price... having to use a landfill tile that is non-standard and therefore if you uninstall the mod you end up with a broken map or have to go through a number of difficult hoops to prevent it.
Mod change request
and response:
micromario wrote:
I didn't know about the changes to landfill in .17
This sounds like a great idea, actually I can't think of any reason not to make this change.
Let me see what I can do
So get Platforms because soon they will be undoable landfill with no drawback.
Indeed. Very nice. Sounds like the perfect solution.
Re: [0.17] Painless landfill
Posted: Thu May 16, 2019 10:05 pm
by Qon
zOldBulldog wrote: Thu May 16, 2019 9:50 pm
Indeed. Very nice. Sounds like the perfect solution.
Of course it's perfect, it was my idea!
I mean.... thanks, and thanks to micromario for the excellent idea to make minable platforms in the first place and now keeping it up to date with the latest tech!

Re: [0.17] Painless landfill
Posted: Fri May 17, 2019 8:32 am
by Qon
Qon wrote: Thu May 16, 2019 9:32 pm
So get Platforms because soon they will be undoable landfill with no drawback.
micromario decided to release the update as a separate mod:
Breakable Landfill
Re: [0.17] Painless landfill
Posted: Fri May 17, 2019 9:38 pm
by micromario
Reading through this thread, I'm going to start working on an update to automatically landfill blueprints if you are holding shift, and then un-landfill them after the key is released
Re: [0.17] Painless landfill
Posted: Fri May 17, 2019 10:07 pm
by Qon
micromario wrote: Fri May 17, 2019 9:38 pm
Reading through this thread, I'm going to start working on an update to automatically landfill blueprints if you are holding shift, and then un-landfill them after the key is released
Sounds great, if you succeed! Hope it goes well.
Re: [0.17] Painless landfill
Posted: Sat May 18, 2019 7:12 am
by eradicator
micromario wrote: Fri May 17, 2019 9:38 pm
automatically landfill blueprints if you are holding shift
how do you intend to detect "
holding shift", i'm not aware the engine supports anything other than "pressed down once"?
Re: [0.17] Painless landfill
Posted: Mon May 20, 2019 9:13 pm
by micromario
eradicator wrote: Sat May 18, 2019 7:12 am
micromario wrote: Fri May 17, 2019 9:38 pm
automatically landfill blueprints if you are holding shift
how do you intend to detect "
holding shift", i'm not aware the engine supports anything other than "pressed down once"?
You're right, can't be done. A shame
Re: [0.17] Painless landfill
Posted: Mon May 20, 2019 9:38 pm
by Qon
micromario wrote: Mon May 20, 2019 9:13 pm
eradicator wrote: Sat May 18, 2019 7:12 am
micromario wrote: Fri May 17, 2019 9:38 pm
automatically landfill blueprints if you are holding shift
how do you intend to detect "
holding shift", i'm not aware the engine supports anything other than "pressed down once"?
You're right, can't be done. A shame
Do you need to? on_put_item gives you a blueprint placement event (might not happen when not forced but then it doesn't matter really in this case). So instead of adding it when you press shift, do it when you place the item. And you don't even have to modify the actual blueprint. You can modify a copy that you swap in and then back out on placement instead. Check out how BlueprintAlignment mod does it. You can't undo (not added to the undo stack) when a blueprint is aligned. But I think BlueprintAlignment could avoid that issue by not calling build_blueprint and instead swap in a modified blueprint in hand (it swaps in a dummy object to avoid regular placement completely and builds it by itself instead, which is bad with the way build_blueprint currently works). So you could make it work too

Re: [0.17] Painless landfill
Posted: Tue May 21, 2019 3:00 am
by micromario
Qon wrote: Mon May 20, 2019 9:38 pm
micromario wrote: Mon May 20, 2019 9:13 pm
eradicator wrote: Sat May 18, 2019 7:12 am
micromario wrote: Fri May 17, 2019 9:38 pm
automatically landfill blueprints if you are holding shift
how do you intend to detect "
holding shift", i'm not aware the engine supports anything other than "pressed down once"?
You're right, can't be done. A shame
Do you need to? on_put_item gives you a blueprint placement event (might not happen when not forced but then it doesn't matter really in this case). So instead of adding it when you press shift, do it when you place the item. And you don't even have to modify the actual blueprint. You can modify a copy that you swap in and then back out on placement instead. Check out how BlueprintAlignment mod does it. You can't undo (not added to the undo stack) when a blueprint is aligned. But I think BlueprintAlignment could avoid that issue by not calling build_blueprint and instead swap in a modified blueprint in hand (it swaps in a dummy object to avoid regular placement completely and builds it by itself instead, which is bad with the way build_blueprint currently works). So you could make it work too
Wow, had no idea that callback worked on blueprints. I feel so powerful now
Re: [0.17] Painless landfill
Posted: Tue May 21, 2019 3:29 am
by micromario
on_put_item
shift_build :: boolean: Item was placed using shift building.
Re: [0.17] Painless landfill
Posted: Tue May 21, 2019 7:00 am
by eradicator
micromario wrote: Tue May 21, 2019 3:29 am
on_put_item
shift_build :: boolean: Item was placed using shift building.
I thought i observed the other day that this doen't fire at all if none of the blueprint content can be placed (i.e. all is over water). Maybe i'm remembering that wrong?
Re: [0.17] Painless landfill
Posted: Tue May 21, 2019 10:26 am
by Qon
eradicator wrote: Tue May 21, 2019 7:00 am
micromario wrote: Tue May 21, 2019 3:29 am
on_put_item
shift_build :: boolean: Item was placed using shift building.
I thought i observed the other day that this doen't fire at all if none of the blueprint content can be placed (i.e. all is over water). Maybe i'm remembering that wrong?
That is probably right :/
For me, it is kind of rare that no part at all is on the ground so it's not a huge problem. But for those cases, I would use the "Fill under entities with Landfill" button from BlueprintExtensions. I already have over 100 mods so why not a few more?
Maybe someone can make a mod interface request/bug report so that we can get on_put_item even when it fails to place all things?