Page 1 of 1

Configure length of programmable speaker alert message

Posted: Fri May 03, 2019 4:35 pm
by 321freddy
TL;DR
Provide a way to set the maximum length of programmable speakers alert message or remove the limit completely (like it was in 0.16).
What ?
Either set the limit in a programmable speakers prototype definition, in control.lua or remove it completely (doesn't really matter).
Why ?
In 0.16 there was no limit on the length of the alert message. Since programmable speakers are blueprintable, I utilized this in my Attach Notes mod to save arbitrary user notes (strings) + metadata like text font/color inside blueprints, which worked like a charm.

I currently recieve a lot of requests to update the mod to 0.17 but now the length of the notes are capped, which makes an update near impossible. :(

Re: Configure length of programmable speaker alert message

Posted: Mon May 20, 2019 2:36 pm
by sidelia
Oh yes please!

Re: Configure length of programmable speaker alert message

Posted: Wed Jul 24, 2019 1:56 pm
by slippycheeze
Also posted in another similar request

I got annoyed by my AttachNotes data not carrying over, so I point you to this post with a library to save arbitrary and unlimited data in blueprints. It uses the msgpack binary format to encode (a limited subset of) data compactly with bit swizzling, and then stores it 32 bits at a time in a constant combinator with signals.

This allows a reasonably unlimited amount of data storage - it defines a 500 slot combinator, or 2000 bytes of data. msgpack overhead is pretty close to zero - 1-2 bytes for a single string - and this allows arbitrary tables, not just strings. Trivially extensible to unlimited data with the addition of a "sequence" and/or "entity" label in signals.

If you wanted to make regrettable life choices you could apply the same thing to simply encode a string in one-or-more combinators.

Also potentially applicable is the fact you can export an item stack entity (eg: blueprint, item-with-tags) as a blueprint string (ie: zlib compressed, base64 encoded) so you could use that to pack your arbitrary (or string) data prior to injecting it into the signal fields.

Re: Configure length of programmable speaker alert message

Posted: Wed Jul 24, 2019 5:05 pm
by Rseding91
The message limit isn't going to be removed.

Re: Configure length of programmable speaker alert message

Posted: Sat Mar 23, 2024 11:36 am
by vvv444
Dear Factorio Staff,

Clearly this mod is very useful (thousands of downloads speak for themselves). Annotating factory designs is a very reasonable and natural need for the players and simple map tags aren't flexible enough. On the other hand, as a software developer, I can understand the problems that might arise from having unlimited message size.

Obviously, "unlimited" storage approach through abuse of combinators that was suggested in the previous comment is an ugly workaround.

Thus, might we as community ask you to either increase the message size limit to something more reasonable (no need for unlimited one), or could you please suggest/provide an alternative way to implement the same mod functionality through other API means?

Many thanks!

Re: Configure length of programmable speaker alert message

Posted: Sat Mar 23, 2024 12:24 pm
by curiosity
vvv444 wrote:
Sat Mar 23, 2024 11:36 am
or could you please suggest/provide an alternative way to implement the same mod functionality through other API means?
From what I can tell looking at the mod page, blueprint notes is the only problematic feature. And that already exists in base game as blueprint description (although it doesn't seem to be accessible from script).