Accept hexadecimal input for numbers / Add the ability to type "16k" so it autocompletes to "16000"
Posted: Mon Aug 10, 2015 10:47 am
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.