[MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Topics and discussion about specific mods
chrisdec
Fast Inserter
Fast Inserter
Posts: 193
Joined: Fri May 27, 2016 7:50 pm
Contact:

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

Post by chrisdec »

Deadlock989 wrote:
Sun Feb 16, 2020 11:53 pm
recall2000 wrote:
Sun Feb 16, 2020 10:48 pm
Add in Deadlock's Stacking for Pyanodon 0.2.0 and it errors as with the message already reported.
Leave both of your mods in and remove Pyanodons AlienLife 1.1.5 (and the 3 associated graphics mods) and it works fine.
Thanks for the detail. I think this is likely a minor flaw in DSB that only comes to light in a very specific circumstance, and that circumstance may or may not be triggered by an item called "fawogae" when PyAlienLife is running.

I will investigate a bit further, this might not be something we can "fix" exactly, but at least DSB should be able to handle this more gracefully.

Edited to add: it seems that there is no such item as "fawogae" at the time DSB runs its deferred updates pass, but the item did exist at the time that Deadlock's Stacking for Pyanodon asked DSB to stack it, and some other mod deleted it in the meantime. I have made a pull request to shane to handle this without crashing, but it is up to the third party stacking mod (Stacking for Pyanodon in this case) to make sure that it is asking for the right stuff to be stacked. (I also note that Stacking for Pyanodon is still using legacy DSB functions and the log spam is horrendous.)
you are correct deadlock, i have looked closely when Pyalienlife is running then fawogea substrate uses a different name (basic substrate)
also bone meal is appearing in 2 mods of pyanodon (Py Alien Life and Py Coal Processing)
as for deadlocks stacking for pyanodon The Ghost has removed the latest version (0.2.0) , i had uploaded this version assuming it would fix the error above i posted earlyer,when i testplayed 0.2.0 it worked very good but soon after pyanodon released a new version for Alien Life it crashed
The Gost has send a message to Pyanodon iff we could use his icons to create a stacked icon (he changed the licence for using his work)

billbo99
Long Handed Inserter
Long Handed Inserter
Posts: 77
Joined: Fri Nov 02, 2018 9:19 am
Contact:

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

Post by billbo99 »

Deadlock989 wrote:
Mon Feb 17, 2020 1:06 pm

Very nice. You could generate, say, 4-6 of these randomly, and then use the belt variants feature for disordered stacking on belts.
I was going to use it to visually pick a single icon that looked the best for in-game icons I wanted to stack. I had not thought about belt variants like used for ores.

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

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

Post by mrvn »

Deadlock989 wrote:
Mon Feb 17, 2020 1:06 pm
billbo99 wrote:
Mon Feb 17, 2020 12:26 pm
Thanks for the code example, sorry it took me a while to investigate further.

I worked out there were 44 combinations that 3 icons could be placed. Different in-game icons look better using different permutations.
Very nice. You could generate, say, 4-6 of these randomly, and then use the belt variants feature for disordered stacking on belts.

However - I tested that kind of thing for IR, and there is something viscerally horrifying about things like plates being randomly positioned on belts. It works fine for things like ore and raw products, it just screams wrong for nice "finished" things like circuits and plates.
You couldn't use just any random stacking from those 44, obviously. And maybe you would even have to use a single configuration but vary the placement of each icon a bit to generate a variety of stacks. It might still be viscerally horrifying but I would have to see that before agreeing. In all cases I think it would have to be a entity by entity choice. What looks good for one will be horrible for another.

Note: But wouldn't it be a good thing if those automatic icons look viscerally horrifying? You want moders to make better images, right?

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

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

Post by Deadlock989 »

I made an attempt to update the beltbox and loader textures with new techniques I picked up while doing IR.

It was mostly a failure and I hate it, especially the loaders.

The problem is the "new" belts-on-wheels and the way they violate the isometric perspective and break the tile boundary. There is absolutely no tolerance at all for the walls of the loader - they have to be a maximum of 1/32th of a tile thick, ie. 2 pixels in high res, 1 pixel in low res, the same as undergrounds; and they have to be positioned just inside the tile boundary, or it breaks something somewhere. If they are thicker and outside the tile boundary then loaders clip each other. If they are thicker and inside the tile boundary then they clip the belt. It is also impossible to simultaneously have (a) the beltbox looking actually cubic, (b) have the proportions of the loader match the beltbox, (c) get any kind of slope on the loader entrance, and (d) not have the stark innards of the north-facing loader revealed to all and sundry (this isn't a problem for undergrounds because they curve down to the ground, but you can't also do that for loaders because then they look like undergrounds). You can have two or three of those at once but not all.

I give up. The only nice design I can think of that fixes this would be to have the beltboxes be a composite loader/furnace entity, loader > furnace > loader, and occupy 3x3 tiles so they fit around the space-warping belts, but can't mash into each other as a result. I might try doing that for a separate mod sometime.
ugh.png
ugh.png (35.92 KiB) Viewed 509 times

shanemadden
Fast Inserter
Fast Inserter
Posts: 123
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

Deadlock989 wrote:
Mon Feb 17, 2020 9:04 pm
I made an attempt to update the beltbox and loader textures with new techniques I picked up while doing IR.

It was mostly a failure and I hate it, especially the loaders.
Ugh indeed. Thanks for making the attempt.

nOObe
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Oct 17, 2017 11:30 pm
Contact:

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

Post by nOObe »

Is there an Angel's Smelting bridge? https://mods.factorio.com/mod/angelssmelting
angels-plate-nickel=Nickel Plate does not stack.

If I wanted to hack things in, in this post viewtopic.php?p=390302#p390302 it is shown how to add stacking.

Is the code given valid? Where would one add this code?

Using with seablock

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

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

Post by Deadlock989 »

nOObe wrote:
Thu Feb 27, 2020 4:59 pm
Is there an Angel's Smelting bridge? https://mods.factorio.com/mod/angelssmelting
angels-plate-nickel=Nickel Plate does not stack.

If I wanted to hack things in, in this post viewtopic.php?p=390302#p390302 it is shown how to add stacking.

Is the code given valid? Where would one add this code?

Using with seablock
There are/were more than one, I haven't kept track, I don't know if they are updated, and anyway Angel's is going through some changes by the sound of it.

The code given in that post is deprecated (for like a year) but should still work. The current API is described on the github page.

nOObe
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Oct 17, 2017 11:30 pm
Contact:

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

Post by nOObe »

Thanks!

I searched the mod list, and could find no such bridge. If anyone knows one that would be great. Actually a Sea Block .18 bridge would be ideal.

I looked at the API, to just hack it into angles smelting, but I worry about not having icons, and that effecting performance?

Your API will automatically stack three of the icons, but it does that on the fly, right? Could not that fake rendering be saved as a proper icon, for performance? Or do I misunderstand the problem?

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

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

Post by Deadlock989 »

nOObe wrote:
Thu Feb 27, 2020 8:24 pm
Thanks!

I searched the mod list, and could find no such bridge. If anyone knows one that would be great. Actually a Sea Block .18 bridge would be ideal.

I looked at the API, to just hack it into angles smelting, but I worry about not having icons, and that effecting performance?

Your API will automatically stack three of the icons, but it does that on the fly, right? Could not that fake rendering be saved as a proper icon, for performance? Or do I misunderstand the problem?
I reckon about 15-25% of the discussion in the previous 36 pages is about that ...

User avatar
MasterZenII
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Apr 24, 2018 12:32 am
Contact:

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

Post by MasterZenII »

I found an interesting little quirk. Doesn't affect gameplay or function of the mod in the slightest but has really been sending my OCD for a loop...and an all nighter trying to fix...

Anyways, I've been working on a mod that reskins and colors Ultimate belts and I've been adjusting the stacking beltboxes and compact loaders as I go, too. Recalling the add_tier function for the same belt in two different mods (Ultimate Belts calls it once and I'm running it again to change colors) makes the loader and beltbox appear multiple times in the research window...and the research icon is locked at the color of whichever called the function first. They only appear multiple times in that window that I've been able to find. I was able to fix beltboxes by setting their recipe and the respective technology as being equal to nil right above the code that calls the function. ...so basically I delete them right before remaking them, and them being reconstructed by the function is the only reason I considered this as a possible solution. However, this method just doesn't seem to work for loaders. I've tried this process of deleting for the item, entity, recipe, and technology before remaking the belts, undergrounds, and splitters too thinking that maybe I accidentally created a duplicate but it just isn't working. The perfectionist in me wants to fix it...but as I said at the beginning it is just a weird quirk and doesn't bother anything aside from my OCD so I'm currently running with it...but if there's any insight or words of wisdom I'd greatly appreciate it. XD

I'm working with the 0.17 version if there's a difference in the scripting.

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

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

Post by Deadlock989 »

From memory, we added logic to handle that kind of thing for add_stack() ... or I may be mis-remembering and that was why we put in an explicit destroy_stack().

But we probably forgot it for belt tiers ... I don't think we predicted that people would use that function to reskin tiers already added by other mods.

I guess a "remove tier" function would be useful, that tidies up the way destroy_stack() does for stacks.

User avatar
MasterZenII
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Apr 24, 2018 12:32 am
Contact:

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

Post by MasterZenII »

I saw destroy_stack() which gave me hope that I was just blind and missing destroy_tier(). I wish I could follow what was going on a bit better in those functions of yours to where I could just substitute the new color and be done with it. You and shane are wizards. XD

I'm not new to scripting, but I'm relatively noobish with lua and I struggle putting things together forwards let alone working backwards to figure out what a single beltbox / loader looks like were you to code it a-la non-function-using pleb-style.

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

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

Post by Deadlock989 »

shane is the wizard ... I just mess about.

I saw your other thread about struggles with sheet structures for loaders. To be honest if I were doing what you're doing (not that I'd go near bonkers belt speeds like that) I'd go straight for replacing the sprites on the existing loaders.

You can dump a prototype to the log with serpent.block():

Code: Select all

log(serpent.block(data.raw["loader"]["bonkers-loader"]))
From that you can see what the sheet structure ends up as. You can then replace just the sprite definition in the prototype:

Code: Select all

data.raw["loader"]["bonkers-loader"].structure = {
	direction_in = {
		...
	},
	direction_out = {
		...
	},
	... etc.
}

User avatar
MasterZenII
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Apr 24, 2018 12:32 am
Contact:

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

Post by MasterZenII »

And just like that I have a new toy to play with! No sleep anytime soon it looks like. XD

I've already started tweaking belt speeds. The fastest belt appears to have had decompression issues which is ridiculous. This has been less an adventure in wanting to use near-instant transport speed belts and more do I have enough know-how to make these belts match the others...and then tint masks...and I just kept making it more complicated. XD

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

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

Post by Deadlock989 »

MasterZenII wrote:
Fri Feb 28, 2020 2:09 pm
And just like that I have a new toy to play with! No sleep anytime soon it looks like. XD

I've already started tweaking belt speeds. The fastest belt appears to have had decompression issues which is ridiculous. This has been less an adventure in wanting to use near-instant transport speed belts and more do I have enough know-how to make these belts match the others...and then tint masks...and I just kept making it more complicated. XD
Those belts are really pushing the limits of the game engine to be honest. Essentially any belt faster than 60 item/s is going to have slightly unexpected behaviour, ramping up to fully glitched at beyond 120 item/s. There are multiple reasons why the vanilla game caps belts at 45 item/s and balance is just one of them, anything beyond that I consider "unsupported".

This was the entire point of this mod in the first place - increasing the throughput of belts without increasing their speed.

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

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

Post by Deadlock989 »

@shanemadden @bilbo99

This follows up on some of the things discussed in the last year or so.

Post Reply

Return to “Mods”

Who is online

Users browsing this forum: Bing [Bot]