Deadlock's Stacking Beltboxes compressed stacksize override

by Zaflis

Overrides stacksize of stacked items for Deadlock's Stacking Beltboxes.

Content
1 year, 9 months ago
1.1
1.34K
Logistics Storage

i Option to disable name change

1 year, 9 months ago

Could you add an option to enable/disable the localized name change? This mod adds an extra set of parentheses to every stacked item's name (ex. 'Iron Plate (Stack of 50) (Stack of 100)').

1 year, 9 months ago

It doesn't come from this mod but the base Deadlocks.

1 year, 9 months ago

When I comment out line 14 in data-final-fixes.lua, all stacked items revert to their original '[item name] (stack of [x])' name. It seems like this mod applies the localization format a second time, on top of the already localized name.

1 year, 9 months ago
(updated 1 year, 9 months ago)

I see, it seems i'd have to do some brute force string handling; replace the number between last " " and ")". With different locales i can't even assume the "of" with so many languages. But even that wouldn't work with japanese... something between number and ")". So just try to find the number alone i guess.

deadlock-stacking-stack=__1__ (stack of __2__)
deadlock-stacking-stack=__1__ (пачка из __2__)
deadlock-stacking-stack=__1__ (__2__個のスタック)
deadlock-stacking-stack=__1__ (pila di __2__)
deadlock-stacking-stack=__1__ (pile de __2__)

I mean the way deadlocks mod looks up the base item name is exactly the same way as i use, but yes at that point it's already modified.

Or if i can find a way to recreate the base localized name, it's probably possible too.

1 year, 9 months ago

Problem solved with help of JanSharp in Discord, new version is out.

1 year, 9 months ago

Sorry for the late reply, would it still be possible to add an option to disable this? The number in parenthesis was originally the compression ratio (ex. 50 items : 1 stacked item "Iron Plate (Stack of 50)"), and this mod changes the meaning of that number.

1 year, 9 months ago

Sorry it looks like i should be doing no locale changes at all at this rate (clearly i wasn't paying attention to locale when making the mod initially :/ ), then it would keep the meaning right? If so is there still reason to have option to disable it? I understand a lot more about locales since today so it is doable.

I went in a creative save without my mod to see what it's showing, was (Stack of 5) while actual stacks in chests were 10. So what the tooltip should still be is (Stack of 5) but in chest the stack be how much my mod changes it.

1 year, 9 months ago

There is an option now in new release and number should finally be as it should be:
https://assets-mod.factorio.com/assets/2aefef45ceb24db2c881ef94e05a58b782b5e8d2.png

1 year, 9 months ago

That's perfect, thanks a ton!

New response