[MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Topics and discussion about specific mods
Thebri
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Aug 27, 2019 6:32 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Thebri »

Thank you for the reply!

It seem I will have to fix everything by hand...

Ickis
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Nov 19, 2018 12:31 pm
Contact:

Post by Ickis »

There is some problem with orientating a compact loader from a blueprint. Consider the following blueprint:
Blueprint.jpg
Blueprint.jpg (21.58 KiB) Viewed 459 times


It is displayed correctly within the preview window as shown above. However, upon placing the blueprint, the input/output side of the contact loader is not consistently preserved:
Placement.jpg
Placement.jpg (132.86 KiB) Viewed 459 times
This occurs both within the single player and within the scenario editor. I have tested this with the base game and only this mod running with the same results.

mrvn
Smart Inserter
Smart Inserter
Posts: 4284
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re:

Post by mrvn »

Ickis wrote:
Sun Sep 13, 2020 8:23 pm
There is some problem with orientating a compact loader from a blueprint. Consider the following blueprint:

Blueprint.jpg


It is displayed correctly within the preview window as shown above. However, upon placing the blueprint, the input/output side of the contact loader is not consistently preserved:

Placement.jpg

This occurs both within the single player and within the scenario editor. I have tested this with the base game and only this mod running with the same results.
It's because deadlock still doesn't check the rotation of ghosts when they are revived and adds his auto rotate logic on top of it to make the loaders face belts or inventories. So on blueprints when a ghost is revived by some mod like Bluebuild it is rotated twice and ends up facing the wrong way. Others and I have told him multiple times about the problem and I told him how to check the rotation so he doesn't double down. But the issue just gets ignored.

You have to turn off the options for loaders to face belts and inventories and it will work right. But then you have to rotate you place manually yourself.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 1982
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

We never cared about dodgy mods like Bluebuild that historically used player manual build events to simulate construction bot behaviours (I have no idea what that mod does now but I still don't actually care). As we've said about 50 times over the last couple of years, there are hard limits on what can be done to prevent mods getting screwed over by some other random mod off the portal, given a finite and rapidly dwindling allotment of actual fucks to give. And we're not going to code in any more contingency cases for anything that isn't in the game engine itself. The correct way to work around unwanted inter-mod interactions is indeed to use the provided option in DSB to turn off snapping and let those other mods handle blueprints in their own fascinating idiom, if that's what you want.

If there are literally no other mods loaded and you're getting unexpected snapping behaviour from construction bots reviving loader "ghosts" in regular (non-editor) play then I don't know what to tell you. Historically, no-one has ever been able to give us a list of steps that can reproduce these issues reliably. It has most often turned out to be some other mod like Bluebuild or Picker Tools, and the remaining cases have always been ones where the expectations were just plain wrong. shanemadden has in the past accepted tweaks submitted on github by other people to address specific preference-based issues that we couldn't ever reliably reproduce ourselves, I don't know (or care much) if those actually helped, or if they made things worse for other corner cases.

As for the scenario editor, the core of this mod was written long before the current scenario editor was even a thing. I don't know how the snapping options work out in editor mode. If editor mode breaks it and it is actually fixable and someone wants to do that work, you can submit documented changes to the repository. Or just turn snapping off if the majority of your play is being done in the editor.

mrvn
Smart Inserter
Smart Inserter
Posts: 4284
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by mrvn »

Deadlock989 wrote:
Wed Sep 16, 2020 2:57 pm
We never cared about dodgy mods like Bluebuild that historically used player manual build events to simulate construction bot behaviours (I have no idea what that mod does now but I still don't actually care). As we've said about 50 times over the last couple of years, there are hard limits on what can be done to prevent mods getting screwed over by some other random mod off the portal, given a finite and rapidly dwindling allotment of actual fucks to give. And we're not going to code in any more contingency cases for anything that isn't in the game engine itself. The correct way to work around unwanted inter-mod interactions is indeed to use the provided option in DSB to turn off snapping and let those other mods handle blueprints in their own fascinating idiom, if that's what you want.

If there are literally no other mods loaded and you're getting unexpected snapping behaviour from construction bots reviving loader "ghosts" in regular (non-editor) play then I don't know what to tell you. Historically, no-one has ever been able to give us a list of steps that can reproduce these issues reliably. It has most often turned out to be some other mod like Bluebuild or Picker Tools, and the remaining cases have always been ones where the expectations were just plain wrong. shanemadden has in the past accepted tweaks submitted on github by other people to address specific preference-based issues that we couldn't ever reliably reproduce ourselves, I don't know (or care much) if those actually helped, or if they made things worse for other corner cases.

As for the scenario editor, the core of this mod was written long before the current scenario editor was even a thing. I don't know how the snapping options work out in editor mode. If editor mode breaks it and it is actually fixable and someone wants to do that work, you can submit documented changes to the repository. Or just turn snapping off if the majority of your play is being done in the editor.
There is nothing dodgy going on. It's using the offical way to revive ghosts. And I showed you what fields to look at to detect that entities that get revived are rotate already.

The only dodgy thing going on is your code with the custom "don't mess with the entity build by mods" flag in the build event that some mods support for historical reasons.

As I showed you before with code and debug output a properly revived ghost will have the input/output direction set already. Go back in the thread and read again. I spelled it out for you exactly how to reproduce it, why it happens and how to fix your code so it doesn't need dodgy workarounds. Dodgy mods that create the loader instead of reviving ghost or player builds don't have a different direction from the default but revived ghosts can have it input or output because the direction is part of the data the ghost has. And that changes the rotation logic causing you to rotate the loader wrong so it suddenly faces the belt instead of the inventory opposite to what the ghost had.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 1982
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

We don't care about Bluebuild and will never support it.

Some people are just a relentless sucking pit of negativity. Endless whining and not a single word of thanks in 2 years after people spent hours of their lives trying to please other people. Well, that ship has sailed now. Go make your own mod instead.

mrvn
Smart Inserter
Smart Inserter
Posts: 4284
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by mrvn »

I'm sorry the truth is such a relentless sucking pit of negativity. You made such a good mod and it could be great if not for this one persistent bug. But instead of listening what the problem is you seem to prefer to badmouth other mods where people have spend just as much time of their live trying to please other people. I will make one more attempt explaining the problem and then I will go away again till the next person runs into the same problem.

Since you asked in
Deadlock989 wrote:
Wed Sep 16, 2020 2:57 pm
If there are literally no other mods loaded and you're getting unexpected snapping behaviour from construction bots reviving loader "ghosts" in regular (non-editor) play then I don't know what to tell you. Historically, no-one has ever been able to give us a list of steps that can reproduce these issues reliably. It has most often turned out to be some other mod like Bluebuild or Picker Tools, and the remaining cases have always been ones where the expectations were just plain wrong. shanemadden has in the past accepted tweaks submitted on github by other people to address specific preference-based issues that we couldn't ever reliably reproduce ourselves, I don't know (or care much) if those actually helped, or if they made things worse for other corner cases.
here is a easily reproducible case with ONLY the stacking mod loaded and NOTHING else. Just load the savegame:
deadlock.zip
(1.63 MiB) Downloaded 2 times
Turn on both snapping to inventory and snapping to belt. Then take a loader in your hand and place them over the ghosts and you get this:
deadlock-bug.png
deadlock-bug.png (569.87 KiB) Viewed 247 times
The explanation why this happens is in

viewtopic.php?f=190&t=57264&p=464266&hi ... on#p464266

The example back then was from Bluebuild and back then Bluebuild would manually raise an event. Nowadays Bluebuild uses ghost.revive{raise_revive=true} and has been for a while. With that the game raises the script_raised_revive event that you don't catch. So your code never tries to rotate the revived ghost and nothing bad happens. As it should. But when manually placing loaders over ghosts the game has the loader_type set to either input or output. For input loaders the meaning of rotation changes by 180°. Which is why the input loaders all end up turned around 180°.

So what your code has to do is look at loader_type. If it is input then simply do nothing. This case only happens when a loader is placed over a ghost and everything should stay as the ghost had it. This would still snap ghosts with loader_type == output to belts or inventories, which might differ from what the ghost had, but I see no easy way to catch that. That case at least isn't a big deal and rather uncommon. The input loaders are well over 50% of all loaders in blueprints though. It's really annoying to build blueprints before you have construction bots due to this bug.

So to sum it up:
- direct placing loaders: works
- construction bots placing loaders: works
- Bluebuild: works
- manually placing loaders over ghosts: fails
- mods that still raise on_built_entity manually: fails (and it's their own fault)

Fix:

Code: Select all

    if built.loader_type == "input" then return end

Post Reply

Return to “Mods”

Who is online

Users browsing this forum: No registered users