Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"
Moderator: ickputzdirwech
-
- 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"
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! ). 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.
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! ). 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.
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Accept hexadecimal input for numbers
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
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
Re: Accept hexadecimal input for numbers
I think hexadecimal input would be useful in many other applications of combinators.
Re: Accept hexadecimal input for numbers
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.
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
Re: Accept hexadecimal input for numbers
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.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.
-
- Filter Inserter
- Posts: 770
- Joined: Sun Sep 07, 2014 12:59 pm
- Contact:
Re: Accept hexadecimal input for numbers
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.
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.
Re: Accept hexadecimal input for numbers
Yeah, bitmasking is kind of a big deal.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.
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Accept hexadecimal input for numbers
but useless without bit-wise operatorsTinyboss wrote:
Yeah, bitmasking is kind of a big deal.
With the current operators doing bitwise operations give no advantage to binary over tertiary or decimal.
Add the ability to type "16k" so it autocompletes to "16000".
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.
Re: Add the ability to type "16k" so it autocompletes to "16000".
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...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"
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...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Add the ability to type "16k" so it autocompletes to "16000".
Thanks, I'm glad you like the idea!
Train go brrrrr
Re: Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"
It only took 2 years, but according to FFF-388 it is going to be implemented!
Train go brrrrr
Re: Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"
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.