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

Suggestions that have been added to the game.

Moderator: ickputzdirwech

foamy
Filter Inserter
Filter Inserter
Posts: 432
Joined: Mon Aug 26, 2019 4:14 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by foamy »

coppercoil wrote: Wed Jul 22, 2020 8:20 am I think the player cannot memorize sixteen representations if he uses them occasionally. Yes, he will know how to convert it using exernal tools, how about embedded tools? If we would have two display modes, why not to add the third one?

BTW every bit can be numbered, therefore no problems locating 15th bit.
I'd have no problems with a binary encode as well, but if I had to choose between hex and bin for a human-facing interface, it'd be hex every single time.
User avatar
bormand
Fast Inserter
Fast Inserter
Posts: 201
Joined: Fri Jun 05, 2020 9:59 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by bormand »

netmand wrote: Wed Jul 22, 2020 2:32 pm Is this not possible as a mod?
Sure. Modded combinator that can set and display values in any format is certainly possible, at least.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by Optera »

Having a combinator showing signals as bin or hex would already be a big qol improvement.

Entering numbers as hex though would make binary logic with circuits much simpler. I might even put windows calc away for generating overflow values.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by Hannu »

coppercoil wrote: Wed Jul 22, 2020 8:20 am I think the player cannot memorize sixteen representations if he uses them occasionally.
Probably significant part of Factorio players have some programming experience. In work, in studies or as a hobby. Programmers are familiar with hex system and can easily count bits. I prefer hex numbers over binaries if there is more than 8 bits, because it is somewhat difficult and very error prone to count for example 10 zeros before single set bit (10000000000 or 400). They need also less room to show. Factorio uses 32 bit integers and such binary number is very inconvenient compared to 8 number hexadecimal number.
If we would have two display modes, why not to add the third one?
This is true. It is good idea to include both if such modification is made. Additional work is small.
coppercoil
Filter Inserter
Filter Inserter
Posts: 504
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by coppercoil »

Hannu wrote: Fri Jul 24, 2020 9:56 am Programmers are familiar with hex system and can easily count bits.
Programmers are familiar with hex system - yes.
Can easily count bits - no. Most programmers don't use bits often, thereby have no need to memorize them.
foamy
Filter Inserter
Filter Inserter
Posts: 432
Joined: Mon Aug 26, 2019 4:14 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by foamy »

coppercoil wrote: Fri Jul 24, 2020 4:59 pm
Hannu wrote: Fri Jul 24, 2020 9:56 am Programmers are familiar with hex system and can easily count bits.
Programmers are familiar with hex system - yes.
Can easily count bits - no. Most programmers don't use bits often, thereby have no need to memorize them.
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1111

Twenty seconds, mostly for typing.
coppercoil
Filter Inserter
Filter Inserter
Posts: 504
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by coppercoil »

Opening the calculator is even faster. But why?
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by Hannu »

coppercoil wrote: Fri Jul 24, 2020 4:59 pm Can easily count bits - no. Most programmers don't use bits often, thereby have no need to memorize them.
You may be right. I began (hobby when I was a kid) at 80's and then everyone began learing binary and hexadecimal numbers on third day after getting first computer. I could disassemble 6510 code from hex dump on screen (not practical level, because I did not remember all rare instructions) and it was not unusual nerd skill on those days.

It may be better that I do not say my opinions of modern so called "programming languages" and so called "programmers". And especially their awful so called "commercial products" (I do not talk about Factorio now, it's quality is excellent). :)
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by ssilk »

When I read over this, I thought it would be much more useful and easier to implement to have each number input field added two buttons:

Button 1 switches the displays of numbers: decimal, hex, binary and so on. By default always at dec. You can input numbers in dec/hex/bin and the mode switches automatically to that format. If you can do calculation inline here (see OP), it should display current result somewhere in the choosen format.

Button 2 opens a calculator window. How the calculator works is open, but for the first implementation it should have basic operators in decimals.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by Qon »

ssilk wrote: Sat Jul 25, 2020 3:42 am How the calculator works is open, but for the first implementation it should have basic operators in decimals.
What is a decimal operator?
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
User avatar
jamiechi1
Filter Inserter
Filter Inserter
Posts: 289
Joined: Wed Jan 03, 2018 10:12 pm

Re: Hex signal view, hex and mathematical input in constants

Post by jamiechi1 »

I think unit conversions to various bases might be useful for some mods that provide a virtual processor that one can use in the game and write code for it. But in general, without mods, I don't see the need for it. Although if you add binary and hexadecimal, I want Octal conversions as well. :D
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by ssilk »

Qon wrote: Sat Jul 25, 2020 8:17 pm
ssilk wrote: Sat Jul 25, 2020 3:42 am How the calculator works is open, but for the first implementation it should have basic operators in decimals.
What is a decimal operator?
A decimal operator is if you do something 10 times in a row. For example
1 ++++++++++ 1 = 11
5 ++++++++++ 2 = 25
2 ********** 2 = 2048

You can abbreviate that by multiplying the number of repetitions to the operator:

1 +*10 1 = 11
5 +*10 2 = 25
2 **10 2 = 2048

Because you can leave out the multiplication operator you can write

1 +10 1 = 11
5 +10 2 = 25
2 10 2 = 2048

P.S.: I wrote „operators in decimal“ and I meant o fcourse decimal numbers, because anything else doesn’t make any sense - as I showed. ;)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by Qon »

ssilk wrote: Sun Jul 26, 2020 7:04 am
Qon wrote: Sat Jul 25, 2020 8:17 pm
ssilk wrote: Sat Jul 25, 2020 3:42 am How the calculator works is open, but for the first implementation it should have basic operators in decimals.
What is a decimal operator?
P.S.: I wrote „operators in decimal“ and I meant o fcourse decimal numbers, because anything else doesn’t make any sense - as I showed. ;)
So you are talking about operators that work on decimal number digit representation? A bit like bitwise operators but for decimal numbers, where the number represented is "ignored"? I've never heard of such a thing before, except for the rare divisibility tricks (a number is divisible by 3 if the sum of its digits is divisible by 3).

It sounded like you didn't know that the normal mathematical operations are not affected by the base of the number you choose to represent it with. Now I'm even more qonfused.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by ssilk »

:roll: I meant: Take the cheapest solar power driven calculator you can find and implement it it’s function into Factorio.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Hex signal view, hex and mathematical input in constants

Post by Hannu »

jamiechi1 wrote: Sun Jul 26, 2020 2:30 am Although if you add binary and hexadecimal, I want Octal conversions as well. :D
As far as I know, the octal system was used in 9 (18,36) bit computers. Octal number packs single 9 bit byte to 3 digits. Fortunately it would be very easy to add if devs made the options to choose base.

It is nice to know that Factorio seems to run also in little bit older computers. According to Wikipedia "36-bit computers were popular in the early mainframe computer era from the 1950s through the early 1970s."
User avatar
jamiechi1
Filter Inserter
Filter Inserter
Posts: 289
Joined: Wed Jan 03, 2018 10:12 pm

Re: Hex signal view, hex and mathematical input in constants

Post by jamiechi1 »

Hannu wrote: Mon Jul 27, 2020 9:25 am
jamiechi1 wrote: Sun Jul 26, 2020 2:30 am Although if you add binary and hexadecimal, I want Octal conversions as well. :D
As far as I know, the octal system was used in 9 (18,36) bit computers. Octal number packs single 9 bit byte to 3 digits. Fortunately it would be very easy to add if devs made the options to choose base.

It is nice to know that Factorio seems to run also in little bit older computers. According to Wikipedia "36-bit computers were popular in the early mainframe computer era from the 1950s through the early 1970s."
I used to own a Heathkit H8. Originally, with the 8080 board, it originally used Octal on the front panel. I believe it was later changed to Hexadecimal input. I later purchased a Tryonix Z80 board to replace the 8080 board and I think that may have included a new version of PAM8 (bios?) and a new sticker for the front panel for hexadecimal input.
I never saw another example of computers that used words that used a multiple of 9 bits, but I believe you when you say they existed. I remember one of the TI minicomputers I operated, but it used binary input switches on the front panel. (I don't remember the word size in bits for that one.) I also operated IBM mainframes but don't remember the details. (Other than using the Hollerith cards to enter the JCL.)
OADINC
Burner Inserter
Burner Inserter
Posts: 14
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: 12889
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: 12889
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: 14
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
Post Reply

Return to “Implemented Suggestions”