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

User avatar
Proxy
Fast Inserter
Fast Inserter
Posts: 165
Joined: Mon Mar 30, 2015 11:10 am
Contact:

Allow for Math to be used in Number Fields

Post by Proxy »

A lot of productivity programs like Kicad, GIMP (or even games like Satisfactory) allow you to do math inside of text certain fields.
example from GIMP:


And when you're used to programs that have it, you'll start to notice it being missing. so i thought i'd suggest the idea here!
one example i can think of for Factorio is:
you have 4 assemblers feeding of a requester chest, using SHIFT+LMB to set the requester's item would only request enough for a single assembler. so it would be convenient if you could just click on the item in the requester, and in the number field next to the slider, enter "*4" (multiply by 4), then click the confirm button to have it automatically evaluate that and save it as the new item count.
Factoruser
Fast Inserter
Fast Inserter
Posts: 229
Joined: Tue Sep 16, 2014 5:48 pm
Contact:

Re: Allow for Math to be used in Number Fields

Post by Factoruser »

Extremely smart idea, although not THAT much useful for Factorio...
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 »

that was similar enough for me to join it with this topic…

I think the idea can be quite useful.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
DarkShadow44
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Combinators: Allow more way to input numbers

Post by DarkShadow44 »

TL;DR
Give the number box the ability to parse simple math equations and hex numbers.

What ?
When using combinators you often need to add some constant:
Image

It would be useful if we could set numbers like "80*8+4", press enter and have the game automatically convert it to 644.
Same thing for hex numbers, would be nice to just write 0xFFFF and have it converted to 65535. Would be very useful for bit operations.
BaggyK
Inserter
Inserter
Posts: 43
Joined: Fri Mar 01, 2019 12:22 pm
Contact:

Re: Combinators: Allow more way to input numbers

Post by BaggyK »

Related suggestion threads:

viewtopic.php?f=6&t=50305 Allow hexadecimal entry for constant values in combinators
viewtopic.php?f=6&t=14686 Accept hexadecimal input for numbers
viewtopic.php?f=6&t=53999 Suggetion: Binary combinator variables
aka13
Filter Inserter
Filter Inserter
Posts: 867
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: Combinators: Allow more way to input numbers

Post by aka13 »

That would be very cool, especially the bit keyboard.
I use helper excel tables for input otherwise, which is pretty cumbersome.
Pony/Furfag avatar? Opinion discarded.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 863
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Combinators: Allow more way to input numbers

Post by Hares »

+1 on that
Fulgora is the best planet. Vulcanus needs rework. Feel free to prove me wrong.
Roxor128
Fast Inserter
Fast Inserter
Posts: 168
Joined: Sun Oct 02, 2016 9:48 am
Contact:

Re: Combinators: Allow more way to input numbers

Post by Roxor128 »

Adding onto this, an option to view as hexadecimal would be useful as well. Much easier to pick out your packed values from hexadecimal than decimal.
Illiander42
Filter Inserter
Filter Inserter
Posts: 543
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: Combinators: Allow more way to input numbers

Post by Illiander42 »

Another +1.

Helmod does this with it's "how much do you want" field.
DarkShadow44
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Combinators: Allow more way to input numbers

Post by DarkShadow44 »

With FFF 388 this is confirmed part of the expansion. Anyone knows if Hex is a thing as well?
OADINC
Burner Inserter
Burner Inserter
Posts: 14
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.
OADINC
Burner Inserter
Burner Inserter
Posts: 14
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 »

Good news I just confirmed that both features are now in the game! As of 2.0
Train go brrrrr
Koub
Global Moderator
Global Moderator
Posts: 8001
Joined: Fri May 30, 2014 8:54 am
Contact:

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

Post by Koub »

[Koub] Thanks for the catch, moved to implemented
Koub - Please consider English is not my native language.
HeliGungir
Inserter
Inserter
Posts: 42
Joined: Thu Oct 31, 2024 4:43 am
Contact:

Add hexadecimal support to number fields

Post by HeliGungir »

TL;DR
hex.png
hex.png (621.92 KiB) Viewed 157 times
What?
Please add hexadecimal support to number fields. Particularly in logistic groups, combinators, and machine controls.
  • One option would be a "0x" prefix, eg: 0x7FFFFFFF
  • Another option would be an "h" postfix, eg: 7FFFFFFFh
The second option is one less keystroke, but it collides with the "h" SI prefix (hecto). Factorio currently supports the larger SI prefixes k, M, and G; but not h. So for an end-user, there would ambiguity about whether h should mean "hecto" or "hexadecimal"
Why?
When working with signals and control logic, it's a lot easier to remember the largest positive number and smallest negative number are 7FFFFFFF and 80000000 (in hexadecimal) than 2147483647 and -2147483648 (in decimal).

Hexadecimal is also helpful for typing out bitwise masks. More helpful than decimal, anyway...
eugenekay
Filter Inserter
Filter Inserter
Posts: 761
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Add hexadecimal support to number fields

Post by eugenekay »

eugenekay
Filter Inserter
Filter Inserter
Posts: 761
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Add hexadecimal support to number fields

Post by eugenekay »

Also, feature exists?
10-01-2025, 23-44-21.png
10-01-2025, 23-44-21.png (22.78 KiB) Viewed 147 times
10-01-2025, 23-44-42.png
10-01-2025, 23-44-42.png (16.95 KiB) Viewed 147 times
The expression is computed after de-selecting the Input field. It even works with addition/subtraction:
10-01-2025, 23-46-15.png
10-01-2025, 23-46-15.png (16.83 KiB) Viewed 147 times
10-01-2025, 23-46-32.png
10-01-2025, 23-46-32.png (14.57 KiB) Viewed 147 times
Related: MathExpression


Good Luck!
User avatar
BrainGamer_
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Nov 14, 2021 9:52 pm
Contact:

Re: Add hexadecimal support to number fields

Post by BrainGamer_ »

The important thing to note is that hex numbers must be in lowercase, so 0xff instead of 0xFF.
Koub
Global Moderator
Global Moderator
Posts: 8001
Joined: Fri May 30, 2014 8:54 am
Contact:

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

Post by Koub »

[Koub] Merged several threads with the same (already implemented) suggestion.
Koub - Please consider English is not my native language.
Post Reply

Return to “Implemented Suggestions”