-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodpack_number_stuff.txt
312 lines (228 loc) · 11.9 KB
/
modpack_number_stuff.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
Number Logic Tutorial/Reference:
best used in combination with the examples: https://steamcommunity.com/sharedfiles/filedetails/?id=1443517322
BINARY color sheme:
orange: 1 , left from orange:2, left from that: 8 , this for 8 colors,
BOTTOM row orange: 256, left from that 512, also for another 8 colors.
total of 16 colors
DECIMAL color sheme:
orange: 1st digit, left from that 2nd digit, this for 8 colors,
BOTTOM row orange: 9th digit, left from that 10th digit, also for another 8 colors.
TOP row orange digit 0.1, left from it 0.01, and so on for 8 colors.
total of 24 colors
Number Block:
1)
INPUT: logic(switches, gates, buttons,...)
= Binary -> number
logic inputs have binary weights based on the binary color sheme.
INPUT: one number block
= split number into digits
gets digit from input number based on own color (decimal color sheme)
exception: white/black(colors not in the color sheme)
when the current block is white(/..) it'll get the full value from the input(it'll carry the '-' too)
INPUT: multiple number blocks
= combine digits into number
input numbers get combined into 1 number based on their colors (decimal color sheme)
OUTPUT: number block(colored)
= split number into digits
colored output number blocks get the digit based on the decimal color sheme from the current block.
exception: white/black(colors not in the color sheme)
when the destination is white(/..) it'll get the full value (it'll carry the '-' too)
OUTPUT: logic (gate, light, ...)
= number -> binary
current block will get the bit from the input number based on color (binary color sheme) to the logic
5)
(from example) (from binary 0101 0101 to number, back to binary)
binary numbers to digits, these digits colored combined into a block give a bigger number,
this bigger number can be split into 2 digits using number blocks,
number blocks with logic as output connected to these 2 digits will convert the digits into binary again
6)
(from example) (showing carrying values)
any value gets carried over number blocks colored white/black/not in colorsheme,
digits hold the digit value, not the full input number value.
7)
(example!)
multiple colored number blocks to one will combine the digits into a value based on color
one colored number block to one other number blocks will not set the value based on color (that would be a random * 10 or *100 or...)
8)
(example!)
negative values get carried over white(/..),
a number split into digits will not carry a '-'
9)
(example!)
using the top row colors to show digits after the decimal point
//END of number block
Counter Block:
1)
INPUTS: 2 , same color
= count up, count down
first input will count up, 2nd will count down (plz don't use, use color values (next one))
pressing 'e' on the counter will reset it!
2)
INPUTS: 2, one top row, one bottom row
= count up, count down
for the counter it uses the decimal color sheme but with a slight twist,
the bottom row is the negative of the 2nd row
> use orange and dark orange to count up and down
> pressing 'e' on the counter will reset it!
3)
INPUTS: lots, colored
= count up , count down, fast
the decimal color sheme but with a slight twist,
the bottom row is the negative of the 2nd row
> white is reset
> pressing 'e' on the counter will reset it!
INPUTS: NUMBER inputs
= count up/down based on value of number input, color of input number block is also important!
> **RED** input number '2' , count up by 20 every tick
// END of counter block
Tick Button:
1)
the tick button behaves exactly like a normal button.
but will only output one tick, even when pressed for a longer time.
2)
the tick button can be activated by logic input to 'convert' the input to a single tick
multiple inputs: any input on triggers it, any input held down will block other inputs from reactivation.
3)
the tick button can be configured to stay activated for longer than a tick by hooking a number input to it.
//END of tick button
Smart sensor:
1)
the smart sensor will give extreme accurate number reading of how far an object is. (digits behind decimal point too!)
2)
the smart sensor has 2 modes: THIN (like vanilla sensor) and WIDE, wide is more accurate as shown in the example.
> there are 2 more modes added: color mode, it'll output the color it detects (range 0 - 16581375)
//END of smart sensor
Math Block:
1)
Math block takes mainly number inputs, (logic inputs count as a '1')
> can press 'e' on it and ctrl+'e' to cycle through its functions.
function: +, -, x, ÷, modulus, powers, roots, white >, white <, inputs are =,
white > or =, white < or =, sin, cos, tan, pi, random, absolute,
floor, round, ceiling, min, max, log, exp, arcsin, arccos, arctan, hypotenuse, # seated, A/D, W/S, bitmemory.
functions that only take 2 inputs (or less): -, ÷, modulus, powers, roots, white >, white <,
white > or =, white < or =, log, exp, hypotenuse,
functions that only take 1 input: sin, cos, tan, absolute, floor, round, ceiling, min, max, arcsin, arccos, arctan
functions that only take 0 inputs: pi
+ adds all inputs
- subtract white input and black input (only one has to be colored for it to work... (same for all the others))
÷ divide white input and black input
modulus rest after division white input and black input
powers white to the power of black input, if only one input it'll do squared
roots white to the root of black input, if only one input it'll do square root
> is white bigger than black input, 1 or 0, can be hooked to logic and number
< is white smalle than black input, 1 or 0
= are all inputs the same value, 1 or 0
>= is white bigger than or equal to black input, 1 or 0
<= is white bigger than or equal to black input, 1 or 0
sin take the sinus of the input(degrees) , 1 input!
cos take the cosinus of the input(degrees) , 1 input!
tan take the tangens of the input(degrees) , 1 input!
2)
pi NO inputs, will output PI
3)
random no inputs: will output a random number between 0 and 1
> logic input will let it generate a new random number ()
1 number input: generate a random integer number between 1 and the input
2 number inputs: generate a random integer number between the inputs
> when the input numbers change , so will the output random number.
4)
absolute 1 input! will make the input positive
5)
floor will floor the value down, 0.99 => 0, -0.00001 => -1
round will round the input value, 0.499999 => 0, 0.5 => 1
ceiling will floor the value UP, 0.000001 => 1, -0.00001 => 0
6)
min take the smallest of all input values
max take the biggest of all the input values
7)
log 1 input: perform a logarithmic function with base e
2 inputs: perform a logarithmic function with base white input
8)
exp 0 inputs: output the value of the number e
1 input: e to the power of input number
()
arcsin take the arcsinus of the input(degrees) , 1 input!
arccos take the arccosinus of the input(degrees) , 1 input!
arctan take the arctangens of the input(degrees) , 1 input!
9)
hypotenuse do the hypotenuse of both inputs, used to calculate the length of a diagonal line in a triangle.
10)
#seated count the amount of occupied seats on input
A/D take the average of all A/D input seats, you steering left, friend steering right results in 0,
both steering right results in 1, one of the 2 steering right results in 0.5
> 1 input: range between -1 and 1
W/S take the average of all W/S input seats
> 1 input: (-1, 0, 1)
11)
bitmemory if all inputs are on the bit memory will activate
12) a WHITE number input will define the action it'll perform upon activation
white value 0: FLIP bit when input on, 1: SET bit, 2: RESET bit
13) non white number inputs count as normal inputs that need to be on, they need to be different from 0 to count as 'on'
//END of MATH Block
Time Block (unix - ish)
1)
will output the gmt time, only the seconds of the current GMT day, as days/months/years is not possible through lua
2)
(example!)
using math blocks to show the current time in hours, minutes, seconds, with switch inputs to set the timezone
> 2nd mode added! can now also output number of days since the year 2000, calculating the current date is hard but possible!
//END of time block
Memory Block:
will save the number input when any logic input is on.
when there is a white input it'll be considered the ADDRESS
once values are written an address can be read without any other number or logic inputs.
> multiple value or address inputs will be counted together (white 2 + white 6 = address 8)
> black logic(switch, button, logicgates, ) will reset all values to 0
//END of memory block
ASCII Block:
can be cycled through using 'e' and ctrl+'e' or buttons.
logic inputs (except buttons(->cycles)) will follow the binary color sheme to set a value.
number input will also set a value, 11 = 'a'
input 0 is an empty surface , to show up 0-9 upon 0-9 number input you'll need a orange logic input which is on.
outputs current value. (can be chained to other ascii blocks!)
//END of ASCII Block:
Color Block:
Random color upon shot.
number input range 0 - 16581375, will set a color based on input.
3 number inputs: red, green, blue
will set the amount of red green blue , each with a range of 0-255
can also be colored by paint tool when there are no inputs
outputs current color value (can be chained!)
//END of color block
Smart Thruster:
output thrust power default: 100, can be changed by number input.
> negative number value will make the thrust go in reverse.
can be turned on/off by logic.
it'll read W/S from a seat to go forward/reverse!
//END of smart thruster
gimball thruster & wasd thruster:
output thrust power default: 100, can be changed by number input.
can be turned on/off by logic
it can be angled by seat, or WS/AD convertor inputs (mathblock!)
//END of thrusters
Wireless block:
can be set to send or receive with 'e'
sender and receiver have to be the same color and on the same frequency
anything can send over wireless
white number input defines frequency
//END of wireless
x-o-meter:
has 6 modes: (scroll through using 'e' and ctrl+'e')
speed in any direction (blocks/second)
acceleration (blocks/second²)
the current height in blocks
current x pos in blocks
current y pos in blocks
rotation relative to north (+Y)
speed in direction (the 'normal' through the meter)
angular speed in degrees/second (use it as a 'wheel')
can display any input number on the display, white number input defines 'max'(default:100)
//END of x-o-meter
gravity modulators:
can take a number input to define the gravity
logic input or 'e' to turn on/off
multiple world gravity modulators are synced across the world, can be turned on/off anywhere
world gravity modulator allows for player flight when gravity is lower than 1/100
//END of gravity modulators
dynamite: can be activated by pressing 'e' on it or shooting it, logic input instantly detonates it, can be chained.
>>> everything is subject to change, functions can be added in the future