Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"

Post by Boogieman14 »

TL;DR
Extend the numerical input parser/validator to also accept hexadecimal values (using the 0x prefix). No changes are requested in the display of these numbers (and internally, a number is just a number anyway)

Detail
Say I have a map with a lot of outposts. I want to provide all these outposts with supplies, but I don't want to have an excess number of trains running around. So I assign each outpost a number and put the outpost's number onto a circuit when supplies run low. My main base then automatically sends a train to the requesting outpost (assume for the moment, there's a mod that provides this exact functionality - it isn't there yet, but it's been hinted at). However, just using sequential numbers will lead to problems. Say both outpost 3 and 5 are requesting supplies: wire values add up, so the base sees an 8. How is the base supposed to know where to send the supplies?

Enter bitmapped fields.
Instead of assigning values 3 and 5 to these outposts they get assigned bits 3 (1000 binary, 8 decimal) and 5 (100000 binary, 32 decimal). Now when both outposts request materials, the circuit sees 40 (101000 binary) and there's no room for confusion.

Why hexadecimal inputs?
Small numbers are easy enough, anyone familiar with computer programming will know the sequence of powers of 2 for the first 10 to 16 bits by heart (in a distant past, even Factorio used powers of 2 for stacksizes! :o ). It gets a bit more difficult beyond that, when you're up to the 28th outpost or so. Remembering and accurately entering 134,217,728 is a lot harder than entering 0x800 0000 (and the steady sequence of 0x1, 0x2, 0x4, 0x8 followed by a number of 0's makes it easier still)

Why no changes to display of numbers?
I realize this suggestion is probably only interesting for a rather niche audience and this niche audience will likely be perfectly capable of recognizing what bit a displayed decimal value corresponds to.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Accept hexadecimal input for numbers

Post by ratchetfreak »

Or you use a address line (on signal 0 for example) and a reply line and cycle over all outposts.

at the outpost you use a combinator signal 0 = Outpost ID output everything input-count and transmit that output over the reply line.

then when there is a train ready to depart you cycle over all outposts and you can check each individually and put the train sending logic at the departure station

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Accept hexadecimal input for numbers

Post by MF- »

I think hexadecimal input would be useful in many other applications of combinators.

User avatar
TuckJohn
Filter Inserter
Filter Inserter
Posts: 335
Joined: Sat Jul 04, 2015 4:11 pm
Contact:

Re: Accept hexadecimal input for numbers

Post by TuckJohn »

Agree with you that it is a very specialized need. I think that it would add complexity that would not nessisarily be needed.
As for your outpost 'problem', I would've recommend having the outposts on separate circuits, so the values do not get mixed up.
~1200+ hours clocked in factorio. Avid KSP and Factorio player

Tinyboss
Fast Inserter
Fast Inserter
Posts: 205
Joined: Sun Nov 16, 2014 12:11 pm
Contact:

Re: Accept hexadecimal input for numbers

Post by Tinyboss »

TuckJohn wrote:Agree with you that it is a very specialized need. I think that it would add complexity that would not nessisarily be needed.
As for your outpost 'problem', I would've recommend having the outposts on separate circuits, so the values do not get mixed up.
Does it add any complexity, though? If you don't know that hexadecimal numbers are written with a "0x" prefix, then you would literally never know the feature existed at all.

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: Accept hexadecimal input for numbers

Post by Boogieman14 »

Exactly, it changes nothing for players that don't know/need/use it.

And the outpost problem is just one example that made me think of this, I'm fairly certain minds far smarter than me can come up with lots of other ways to leverage a feature like this.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

Tinyboss
Fast Inserter
Fast Inserter
Posts: 205
Joined: Sun Nov 16, 2014 12:11 pm
Contact:

Re: Accept hexadecimal input for numbers

Post by Tinyboss »

Boogieman14 wrote:Exactly, it changes nothing for players that don't know/need/use it.

And the outpost problem is just one example that made me think of this, I'm fairly certain minds far smarter than me can come up with lots of other ways to leverage a feature like this.
Yeah, bitmasking is kind of a big deal.

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Accept hexadecimal input for numbers

Post by ratchetfreak »

Tinyboss wrote:
Yeah, bitmasking is kind of a big deal.
but useless without bit-wise operators

With the current operators doing bitwise operations give no advantage to binary over tertiary or decimal.

OADINC
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Jun 02, 2021 6:20 am
Contact:

Add the ability to type "16k" so it autocompletes to "16000".

Post by OADINC »

TL;DR
When entering a number for a constant value (circuit network or logistics for example) make it so "k" autocompletes it to "000".
What ?
This is very useful when entering a lot of values, I mess it up myself a lot.
The game already displays values with K & M to show thousand and million, so please let us use it ourself when entering values. It should be fairly easy to implement, but it is never as simple as you think.
This could be seen as an accessibility feature I'm dyslexic so trying to figure out how many zero's I've typed is always a slight challenge.

I would suggest using the SI-Prefixes: https://en.wikipedia.org/wiki/Metric_prefix
-Definetly: k (E3) & m (E6)
-Possibly: da (E1) & h (E2)

I've made a post on the sub-reddit about this idea, people seem to like it a lot!
At the time of writing it has gotten 2.5K upvotes in one day, with lots of positive comments. https://www.reddit.com/r/factorio/comme ... &context=3

Note:
In the comments of this post people also want to be able to type in calculations and have it calculate it and use the result value, I to would like that too but I can see why you would not want to implement that part.

EDIT: Grammatical Error
Last edited by OADINC on Sat Mar 02, 2024 9:36 am, edited 1 time in total.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add the ability to type "16k" so it autocompletes to "16000".

Post by ssilk »

High gameplay value, not so much work for implementation. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"

Post by ssilk »

Merged because if you implement Hexadecimal input, you can easily add iso-input
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

OADINC
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Jun 02, 2021 6:20 am
Contact:

Re: Add the ability to type "16k" so it autocompletes to "16000".

Post by OADINC »

ssilk wrote:
Thu Jun 03, 2021 12:14 am
High gameplay value, not so much work for implementation. :)
Thanks, I'm glad you like the idea!
Train go brrrrr

OADINC
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Jun 02, 2021 6:20 am
Contact:

Re: Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"

Post by OADINC »

It only took 2 years, but according to FFF-388 it is going to be implemented!
Train go brrrrr

Freddy404
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Nov 10, 2023 3:54 pm
Contact:

Re: Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"

Post by Freddy404 »

Not to seem ungrateful, but hexadecimal input seems to be still missing. Which was mentioned in the original suggestion here, and several times in the FFF thread. Because it would make bit masks and similar computation-related constants a lot easier to input.

Post Reply

Return to “Ideas and Suggestions”