Stormworks: Build and Rescue

Stormworks: Build and Rescue

XLjedi Aug 25, 2020 @ 2:59pm
Instrument Panel - Radial Segment
I'd like to use this little gadget to display 1/8 throttle increments.

In its "Display Mode" there are two options: On/Off and Number (bits)

Every single tutorial out there focuses on the On/Off but none seem to show an example using the Number (bits). If I feed it a straight value for throttle it only ever lights up the first segment.

What format is "Number (bits)" expecting?
< >
Showing 1-15 of 16 comments
Jerro Aug 25, 2020 @ 5:07pm 
Each number you can input represents a certain combination of bits being illuminated. It's a bit weird. Just try hooking up a keypad or throttle lever to a microcontroller that converts it to composite and see what happens.
XLjedi Aug 25, 2020 @ 5:25pm 
Originally posted by jerrj:
Each number you can input represents a certain combination of bits being illuminated. It's a bit weird. Just try hooking up a keypad or throttle lever to a microcontroller that converts it to composite and see what happens.

Well... I did, so far a throttle between 0-1 just illuminates the first bit. I'll see what happens if I try the range 0-255
XLjedi Aug 25, 2020 @ 6:56pm 
OK... it makes sense.

Each segment is a bit position for an 8-bit binary value. Numbered 1 thru 8 starting at the top and going clockwise. So if I wanted to turn on every other bit position with 10101010, it wants the decimal value 85.

If you just cycle values 0-255 through the thing it will show you all combinations, but the display order will make no sense whatsoever. So you have to figure out which bits you want to turn on for each 1/8 increment and then convert it to a decimal value.

So you have to create a little binary to decimal conversion table for the dial effect you want.

I imagine this might be a useful example table:
Dec Bitval
0.000 0
0.125 1
0.250 3
0.375 7
0.500 15
0.625 31
0.750 63
0.875 127
1.000 255



Last edited by XLjedi; Aug 25, 2020 @ 7:03pm
GrumpyOldMan Aug 25, 2020 @ 8:39pm 
Originally posted by XLjedi:
I'd like to use this little gadget to display 1/8 throttle increments.
In its "Display Mode" there are two options: On/Off and Number (bits)
What format is "Number (bits)" expecting?

Well "bit" alone is self explanatory, heh.
You'd need to convert your input into 8bit (8 segments) binary numbers.

Originally posted by XLjedi:
Every single tutorial out there focuses on the On/Off but none seem to show an example using the Number (bits). If I feed it a straight value for throttle it only ever lights up the first segment.

Ah ye good ole' 10min+ video ...30 seconds intro starts playing...tutorial, where a paragraph or two would ...hey folks if you like that video don't forget to hit the subscribe button... suffice instead.

Also math is hard.

There are 8 segments on both the radial and bar segments, so you need to divide that through your maximum input value, for example a lever set to 0-200 to simulate a fluid tank.

So your first step is:
round(8 / x * y,1)
x being your maximum value, in our example 200.
y is the input from the throttle lever.

This will normalize your input to 8 at full input, 4 at half input etc.
Rounding to nearest integer is important here, you can leave it out and watch the effect it has on the bar display, heh.

Now you want to use this as power for 2, to normalize it from 0-255:
(2 ^ x) - 1
x being the output from the snippet above.
This will put out 1-256, so the -1 puts it in place to 0-255.

That's all there is to it.

Condensed into a single formula:
(2 ^ round(8 / x * y,1)) - 1



XLjedi Aug 25, 2020 @ 9:14pm 


Originally posted by GrumpyOldMan:
Originally posted by XLjedi:
I'd like to use this little gadget to display 1/8 throttle increments.
In its "Display Mode" there are two options: On/Off and Number (bits)
What format is "Number (bits)" expecting?

Well "bit" alone is self explanatory, heh.
You'd need to convert your input into 8bit (8 segments) binary numbers.

Originally posted by XLjedi:
Every single tutorial out there focuses on the On/Off but none seem to show an example using the Number (bits). If I feed it a straight value for throttle it only ever lights up the first segment.

Ah ye good ole' 10min+ video ...30 seconds intro starts playing...tutorial, where a paragraph or two would ...hey folks if you like that video don't forget to hit the subscribe button... suffice instead.

Also math is hard.

There are 8 segments on both the radial and bar segments, so you need to divide that through your maximum input value, for example a lever set to 0-200 to simulate a fluid tank.

So your first step is:
round(8 / x * y,1)
x being your maximum value, in our example 200.
y is the input from the throttle lever.

This will normalize your input to 8 at full input, 4 at half input etc.
Rounding to nearest integer is important here, you can leave it out and watch the effect it has on the bar display, heh.

Now you want to use this as power for 2, to normalize it from 0-255:
(2 ^ x) - 1
x being the output from the snippet above.
This will put out 1-256, so the -1 puts it in place to 0-255.

That's all there is to it.

Condensed into a single formula:
(2 ^ round(8 / x * y,1)) - 1


Well, the formula does a clever job of producing the one example pattern I showed. I'll give you that. I do think I prefer the flexibility of a table-based solution in this case.

I just needed to know it was an 8-bit value in decimal form. ...and what the bits were relative to in the dial display.
GrumpyOldMan Aug 25, 2020 @ 9:32pm 
Originally posted by XLjedi:
I just needed to know it was an 8-bit value in decimal form. ...and what the bits were relative to in the dial display.
Yeah, just wanted to de-mystify it for others as well, figuring this stuff can be quite cryptic since devs seem to be adamant to hide info like that, heh.
XLjedi Aug 25, 2020 @ 9:45pm 
Originally posted by GrumpyOldMan:
Yeah, just wanted to de-mystify it for others as well, figuring this stuff can be quite cryptic since devs seem to be adamant to hide info like that, heh.

Yeah... some of these tool tips are a bit lacking. I was convinced the fuel filter clogged and was completely useless. A simple mention in the tooltip would've saved me there. And I still have no idea what they expect me to do with this constant torque value thing in who-knows-what base? ...metric-pound-meter-foot?


GrumpyOldMan Aug 25, 2020 @ 11:05pm 
Originally posted by XLjedi:
Yeah... some of these tool tips are a bit lacking. I was convinced the fuel filter clogged and was completely useless. A simple mention in the tooltip would've saved me there. And I still have no idea what they expect me to do with this constant torque value thing in who-knows-what base? ...metric-pound-meter-foot?
Found this ticket:
http://mcro.org/issues/view_issue/17623

Make of that what you will, it's in line with everything else in the game. Torque not being torque, charger not being a charger, Engines above 20RPS being borderline unusable (that's 1200RPM, barely above idle for most real engines). Reving like a 600cc inline 4 at 18k RPM would be 300RPS.
Go figure.
Shillelagh Sep 14, 2020 @ 9:42am 
May have already been posted but its a base 2 binary representation of the number lighting up every other segment, assuming it's 8 segment, looks like this: 01010101. I suggest learning base 2 binary. Its super fun to use
XLjedi Sep 14, 2020 @ 9:51am 
Originally posted by Shillelagh:
May have already been posted but its a base 2 binary representation of the number lighting up every other segment, assuming it's 8 segment, looks like this: 01010101. I suggest learning base 2 binary. Its super fun to use

Yeah, I got it... thanks

I now have radial dials that indicate direction and magnitude of fore/aft directional thrusters. So I get a visual cue as to whether or not I'm rotating or translating as the movement tends to lag a bit behind the application of thrust.
Last edited by XLjedi; Sep 14, 2020 @ 9:52am
Shillelagh Sep 14, 2020 @ 10:17am 
Nice
Ra-Ra-Rasputin Sep 14, 2020 @ 11:24am 
The torque meter that you mentioned is a resistive torque meter that measures the latent torque (the force required to be imparted to get something to move), but never the torque output.

This is very bizarre choice, considering that it's stuck to a rev counter.
Basically, unless you know the torque values by hand, there's little use for it, and for the past couple of months i've off and on tried to get a consistent read on those with little luck.
XLjedi Sep 14, 2020 @ 11:27am 
Originally posted by Ra-Ra-Rasputin:
The torque meter that you mentioned is a resistive torque meter that measures the latent torque (the force required to be imparted to get something to move), but never the torque output.

This is very bizarre choice, considering that it's stuck to a rev counter.
Basically, unless you know the torque values by hand, there's little use for it, and for the past couple of months i've off and on tried to get a consistent read on those with little luck.

We know... it's stoo-pid
Ra-Ra-Rasputin Sep 14, 2020 @ 11:30am 
Here's hoping it's one of the things in the update. It's not a high-priority important thing surely, but it would make life a lot easier for certain more demanding designs.
XLjedi Sep 14, 2020 @ 11:44am 
Originally posted by Ra-Ra-Rasputin:
Here's hoping it's one of the things in the update. It's not a high-priority important thing surely, but it would make life a lot easier for certain more demanding designs.

Agreement there... we can always hope for the best!
< >
Showing 1-15 of 16 comments
Per page: 1530 50

Date Posted: Aug 25, 2020 @ 2:59pm
Posts: 16