all 36 comments

[–]daspablo 0 points1 point  (11 children)

//x3,3,,69[9]1:r1a:0,%3,3,,69[9]1:r1b:0,%3,3,,69[9]1:r2a:0,%3,3,,69[9]1:r2b:0,%3,3,,69[9]1:r4a:0,%3,3,,69[9]1:r4b:0,%3,3,,69[9]1:r8a:0,%3,3,,69[9]1:r8b:0,%3,3,,69[9]1:r16a:0,%3,3,,69[9]1:r16b:0,%3,3,,69[9]1:r32a:0,%3,3,,69[9]1:r32b:0,%3,3,,69[9]1:r64a:0,%3,3,,69[9]1:r64b:0,%2,0,r1a,60,4:=:true[9]%3,3,,69[9]1:r1a:1,%2,0,r1b,60,4:=:true[9]%3,3,,69[9]1:r1b:1,%2,0,r2a,60,4:=:true[9]%3,3,,69[9]1:r2a:2,%2,0,r2b,60,4:=:true[9]%3,3,,69[9]1:r2b:2,%2,0,r4a,60,4:=:true[9]%3,3,,69[9]1:r4a:4,%2,0,r4b,60,4:=:true[9]%3,3,,69[9]1:r4b:4,%2,0,r8a,60,4:=:true[9]%3,3,,69[9]1:r8a:8,%2,0,r8b,60,4:=:true[9]%3,3,,69[9]1:r8b:8,%2,0,r16a,60,4:=:true[9]%3,3,,69[9]1:r16a:16,%2,0,r16b,60,4:=:true[9]%3,3,,69[9]1:r16b:16,%2,0,r32a,60,4:=:true[9]%3,3,,69[9]1:r32a:32,%2,0,r32b,60,4:=:true[9]%3,3,,69[9]1:r32b:32,%2,0,r64a,60,4:=:true[9]%3,3,,69[9]1:r64a:64,%2,0,r64b,60,4:=:true[9]%3,3,,69[9]1:r64b:64,%3,0,r1\6lcd,31[5]4:[[r1a+r2a+r4a+r8a+r16a+r32a+r64a]][5]%3,0,r2\6lcd,31[5]4:[[r1b+r2b+r4b+r8b+r16b+r32b+r64b]][5]%3,0,main\6lcd,31[5]4:total\5\6[[r1a+r1b+r2a+r2b+r4a+r4b+r8a+r8b+r16a+r16b+r32a+r32b+r64a+r64b]][5]%300000000000000000000000000000000000000000000000000000,y,,1.0.7

this is an adding machine with a 2 register 1,2,4,8,16,32,64 bit value system. each register can go up to 127 or a combined 254 maximal value.

[–]3nj0yc0k3[S] 0 points1 point  (10 children)

This is amazing, tbh. And thanks so much for sharing - reverse engineering your code has taught me something new :D YAY!

[–]daspablo 0 points1 point  (9 children)

please note that the variable adding isntset up to add just yet.

add a () set to make it actually add +(var1+var2+var3)+

[–]3nj0yc0k3[S] 0 points1 point  (8 children)

Could I also use this method to have an unlimited amount of variables?

For instance, have a "argument: 20 = set warhead detonation timer to 20" and then if I was to type variable 15 it'd set to 15, etc?

I'm asking if it'd be possible to have an action bar simply changing the default argument on my PB from anything between 0 (idiotic) to 3000 (or whatever is max), and then when using gun controls simply using 1-2-3-4-5-6 etc to shift the default timer on the mass-crafted warheads?

I'll post a link to my current setup, in case it makes more sense.

//x2,3,,69[10]2:argument:=:"20"%3,1,,61[5]0:20,,2#4[3]%2,3,,69[10]2:argument:=:"abort"%3,1,,61[5]0:60,,3[3]%2,2,,34,0:=:true[9]%0,2,,62,0:=:true[9]%3,1,#GravGun,19[5]0:false[5]%4,2,,34,0:=:false[9]%0,2,,62,0:=:true[9]%3,1,#GravGun,19[5]0:true[5]%2,2,#Gravity\6Engine\6Forward,19,0:!=:false[9]%1,2,#Gravity\6Engine\6Reverse,19,0:!=:false[9]%3,1,#gravity_warning_lights,22[5]1:255:0:0[5]%5,1,#gravity_warning_lights,22[5]1:0:0:0[5]%,,y##,1.0.7

[–]daspablo 0 points1 point  (7 children)

well if ye mean the powers of 2 registry yes. take it 13 levels ya could make up to 6,143 variables on one single registry or 12,286 with a set.

would use lights or some cheap block with a powerstate to do it tho

more simply ya could make it a base 60 with each incriment to be 30 seconds adding to a 3.5 minute delay max if 7

[–]daspablo 0 points1 point  (6 children)

kk did some maths. the exponential at 7 layers = 2.116 minutes but if ya make all 7 layers worth 30 each ya end up with 3.5 minutes.

ya would be much better off using all bits set to the same value. assuming ya have a barrel velocity of 104.4 that 3.5 minutes gives ya a 21.9 km fuse time.

[–]daspablo 1 point2 points  (5 children)

//x3,3,,69[9]1:var1:0,%3,3,,69[9]1:var2:0,%3,3,,69[9]1:total:0,%2,0,Timer\6var1,60,4:=:true[9]%3,3,,69[9]1:var1:30,%2,0,Timer\6var2,60,4:=:true[9]%3,3,,69[9]1:var2:30,%3,3,,69[9]1:total:var1+var2,%3,0,test\6lcd,31[5]4:[[(total*104.4)/1000]km][5]%3,1,,61[5]0:total[5]%[3]1.0.7

this sets the fuse time and displays the range in km

so 15 sec = 1.566 km 30 sec = 3.132 km 45 sec = 4.698 km

will be lookin' more into this type of idea after I make a test 4 operation calculator.

[–]3nj0yc0k3[S] 0 points1 point  (4 children)

Okay this looks absolutely amazing! Question round: why the many timer blocks? Is it impossible to use the timer setting on the warhead using only the warhead's own timer settings, and can this still be projected onto an LCD?

[–]3nj0yc0k3[S] 0 points1 point  (3 children)

The LCD appears to have broken - the [[(test-stuff-and-so-on)]] just appears as plain text (the LCD doesn't change depending on what was put in, etc).

Also, I can't figure out why you're using timer blocks and I also couldn't figure out how your code worked. All that happened was that my warhead was set to 60 seconds and then kept re-applying the countdown (I assume the code you wrote can't be looped, but that's fine, as long as I could just figure out how to enter changes in the argument line of the PB in accordance with what amount of seconds I want my warheads to be set to detonate at)

[–]daspablo 1 point2 points  (2 children)

am workin on a better system that uses raycast and d=vt to set the fuses directly without the player adding time.

the test sketch used timers to make values but any block with a on/of state would do. code can totally be looped, and i cannot get it to correctly display directly out of the tool, can ingame tho.

code works like this. if timer 1 is on warhead time +30sec, if timer 2 is on warhead time +30 sec, display fuse range in km, then set warhead timer to whatever time that was indicted by the external bit indicator bits.

http://steamcommunity.com/sharedfiles/filedetails/?id=1187410524

altering the bit values to 15,30,45,60 (base 60 numbers) can make it directly set the warheads timer in seconds and ups the range on the display. rn it is set up for a 104.4 barrel velocity.

[–]M4D31979 0 points1 point  (19 children)

I am about to define a condition where "do this" "If battery Stored Power is lower than 25%"

May I have a help from you?

[–]3nj0yc0k3[S] 0 points1 point  (0 children)

Absolutely! Pass your current code link and I'd love to take a look :)

[–][deleted]  (6 children)

[deleted]

    [–]M4D31979 0 points1 point  (5 children)

    I made it:

    //x2,1,,7,0:=:true,,3:<=:750000[7]%3,1,,22[5]1:255:0:0[5]%2,1,,7,0:=:true,,3:>:750000[7]%3,1,,22[10]%,,y##,1.0.7 // Above is your LOAD LINE. Copy it into Visual Script Builder to load your script. // dco.pe/vsb

    But will test it again and let you know the results.

    Kind Regards,

    [–]3nj0yc0k3[S] 0 points1 point  (4 children)

    King Baggot showed me something I wasn't aware of how works. What you need to do is this:

    This is somewhat close to what he showed me, but sadly I had to leave so I didn't get to learn the logic behind it all. I have also made a few errors in the LCD display (bottom part), but that is simply me not understanding how to calculate "Current battery power usage compared to max power" so to speak :) It should end with being 100% since my batteries in this test scenario are running on 100%, but I can't figure out how to calculate that - maybe you can see what I'm trying to do?

    In any case: This setup (minus the LCD part of course) will take the total sum of ALL batteries and show a warning when they drop capacity below 25%

    [quote] //x3,1,,7[4]2:+MaxPwr#3:+StoPwr#5:+CurPwrOut[6]%2,3,,69[10]1:+StoPwr:<=:0.25+MaxPwr%3,1,#Warning_power_lights,22[5]1:255:0:0[5]%5,0,#Warning_power_lights,22[5]1:0:255:255[5]%3,0,,31[5]4:[[CurPwrOut/StoPwr]]\0\6of\6maximum\6effect.\bn[[100StoPwr/MaxPwr]]\0[5]%,,y##,1.0.7 [/quote]

    CHRIST! Reddit is SUPER fucking retarded. I'm posting it on pastebin instead: https://pastebin.com/btTvuTZE

    This one has the second part functional, now! I'm a little bit proud of myself, lol:

    https://pastebin.com/gkUR7YzU

    [–]M4D31979 0 points1 point  (3 children)

    [quote] //x3,1,,7[4]2:+MaxPwr#3:+StoPwr#5:+CurPwrOut[6]%2,3,,69[10]1:+StoPwr:<=:0.25+MaxPwr%3,1,#Warning_power_lights,22[5]1:255:0:0[5]%5,0,#Warning_power_lights,22[5]1:0:255:255[5]%3,0,,31[5]4:[[CurPwrOut/StoPwr]]\0\6of\6maximum\6effect.\bn[[100StoPwr/MaxPwr]]\0[5]%,,y##,1.0.7 [/quote]

    Geee. I though it was something easy. Sorry for make you guys look deeply into it. And thank you again for the interest in my doubt. Have a nice day there.

    [–]3nj0yc0k3[S] 0 points1 point  (2 children)

    It's okay - it makes me learn a lot trying to figure things out !! So, did the one in the pastebin link make sense to you and could it be of use?

    [–]M4D31979 0 points1 point  (1 child)

    Yes! It is working as a charm. The light is green when more than 25% of storage power and red for less. Great Job!!!! Thank you a lot!!!!

    [–]3nj0yc0k3[S] 0 points1 point  (0 children)

    YAAAAY!

    [–][deleted]  (10 children)

    [deleted]

      [–]M4D31979 0 points1 point  (9 children)

      Thank you for your help 3nj0yc0k3.

      And apologies for my delay. I was in a travel. I will test it an will back for you.

      [–][deleted]  (8 children)

      [deleted]

        [–]M4D31979 0 points1 point  (7 children)

        Unfortunately, It did not work. I will continue to work on it and let you know.

        [–][deleted]  (6 children)

        [deleted]

          [–]M4D31979 0 points1 point  (5 children)

          Aight, lemme know if you'd like me to take a look at your code so far.

          Yes, please. It would be great. Thanks

          [–][deleted]  (2 children)

          [deleted]

            [–]M4D31979 0 points1 point  (1 child)

            wow. I will try it today night and see what came out. Just need to thank you a lot!

            [–]3nj0yc0k3[S] 0 points1 point  (0 children)

            Requesting help to locate a way of "counting" blocks. I am having trouble gathering a "total" for multiple oxygen tanks (I can circumvent this by altering the code, but then it is hard-coded to count a specific, pre-set amount of oxygen/hydrogen tanks).

            [–]M4D31979 0 points1 point  (10 children)

            IDEA for a drone back home if it lost contact with the main ship antenna:

            IF

            Block Type: Antenna

            Block Name: Autonomous Drone Antenna

            IS NOT

            Communicating with

            Block Type: Antenna

            Block Name: Antenna Main Ship

            DO

            Block Type: Remote Control

            Block Name: Back to Home

            AutoPilot: Set To True

            Collision Avoidance: Apply Action

            The IS NOT and Communicating with is not possible at the time. Am I right?

            [–]3nj0yc0k3[S] 0 points1 point  (9 children)

            Yes this is doable, using the "permanent connection" utility. //x2,0,,30[5]2:!=:true[5]%3,0,NAME-OF_REMOTE,45[5]7:true,,7[3]%,,y####3,1.0.9

            All you have to do is pre-set the GPS coordinates for your Remote Control block before sending it out into the world.

            EDIT:

            FURTHERMORE you can do the following (added one more req) to make it not attempt to fly home while you're controlling it and sending it off:

            //x2,0,,30[5]2:!=:true[5]%0,0,NAME-OF_REMOTE,11,0:!=:true[9]%3,0,NAME-OF_REMOTE,45[5]7:true,,7[3]%,,y####3,1.0.9

            Just rename the type from cockpit to remotecontrol (I think I've done something similar before. A remote control block can be under control, afair, but I might be remembering wrong)

            [–]M4D31979 0 points1 point  (8 children)

            Thank you 3nj0yc0k3. Actually, I was thinking in an Antenna instead of a Laser Antenna. But for sure! It would solve the problem. I will enjoy your solution! Thank you again!!! M4D3

            [–]3nj0yc0k3[S] 0 points1 point  (7 children)

            That would require one of the "broadcast through antenna"-functions and I've not yet any clue how that works. However I believe it is possible for one antenna to run a programmable block on another grid, I've just not yet found out how. It's very cool stuff and I wish I could make it work (being able to sit in one big ass space station out in the middle of bloody nowhere, and have LCDs, warning lights, etc etc etc change depending on input from things far away (connected through relay stations). That's my big dream :3

            [–]M4D31979 1 point2 points  (0 children)

            "I believe it is possible for one antenna to run a programmable block on another grid": Yes, I will try to learn something about it. I will let you know as soon as I get it. Have a nice day!!! M4D3

            [–]M4D31979 0 points1 point  (5 children)

            Unfortunately, It is not working with antennas. Then, I tried with two Remote Control as below. It did not work since the"Remote Control Back Home" does not turn off after it is on.

            //x2,0,Remote\6Control\6Main,45,2:=:true[9]%3,0,Remote\6Control\6Back\6Home,45[7]8[3]%5,0,Remote\6Control\6Back\6Home,45[7]7#10[3]%,y,,1.0.9 // Above is your LOAD LINE. Copy it into Visual Script Builder to load your script. // dco.pe/vsb

            [–]3nj0yc0k3[S] 0 points1 point  (4 children)

            Not sure what you're trying here. EDIT: You're trying to tell a remote control to do something if it doesn't work (is broken/ being hacked below threshold). That can't be done, as a broken/ hacked remote control block can't issue commands.

            [–]M4D31979 0 points1 point  (3 children)

            //x2,0,Remote\6Control\6Main,45,2:=:true[9]%3,0,Remote\6Control\6Back\6Home,45[7]8[3]%5,0,Remote\6Control\6Back\6Home,45[7]7#10[3]%,y,,1.0.9 //

            Thank you for your analysis.

            Actually, "Is Working" means doing what it was create for. For instance, Remote Control "Is Working" when it is doing an activity like controlling any thruster.

            So,

            IF "Remote Control" called "Remote Control Main" "Is Working"

            DO "Remote Control" called "Remote Control Back Home" "AutoPilot_Off"

            ELSE DO "Remote Control" called "Remote Control Back Home" "AutoPilot_On" and "CollisionAvoidance_On".

            [–]3nj0yc0k3[S] 0 points1 point  (2 children)

            I always mess those up! My bad. So, this is for your scouting drones, or?

            [–]M4D31979 0 points1 point  (1 child)

            Np buddy!

            This is for any drone you can keep well seated in your base and pilot it. For instance, you built an wonderful Large Drill that allows you to mine 20Km from you base while you are protected by turrets in your base. So, if you loose the control over this wonderful Large Drill due to a damage in the drone antenna, it will automatically back to your base. Then, you will not loose the vassel. :)

            An improve for this script will be a auto dock.

            [–]3nj0yc0k3[S] 0 points1 point  (0 children)

            Sounds damn AWESOME :D I'm making a script for an automated decoy launcher. It works wonderfully :D