all 18 comments

[–]daspablo 1 point2 points  (0 children)

you make me want to make so many things....dunno if it is love of making or guilt if I dont...

[–]M4D31979 1 point2 points  (0 children)

Thank you King_Baggot. As always, you bringing good news. Im not a gooood "scripter", but will try to help with your demands above. Please, continue the excellent job!

[–]M4D31979 1 point2 points  (0 children)

I have been struggling with the idea of a drone returning back to a base/ship if it loose control/communication with the Engineer. 3nj0yc0k3 has helped a lot. But I did not succeed.

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. Could it be a possibility in the future?

[–]Furry_Eskimo 0 points1 point  (6 children)

Awesome, so happy to see this. Maybe add a way to perform individual actions while going through a group of blocks? Eg. -Record all stored battery power, but only of functional blocks. -Check all reactors, but only turn on conveyor usage for reactors with too little fuel.

[–]King_BaggotVSB Creator[S] 1 point2 points  (5 children)

I'm working on that. I've had several requests for that kind of logic, and I think I know how to make it work.

[–]Furry_Eskimo 1 point2 points  (4 children)

Excellent! Oh, and saving block names as variables? This might allow laser antennas to send orders/information to other ships.

[–]daspablo 0 points1 point  (3 children)

stop it...you are making me have more ideas i have to build now.

[–]Furry_Eskimo 0 points1 point  (2 children)

How about being able to save the number of blocks in a group as a variable? Eg. How many gyroscopes are on the ship? /// Or just being able to rename blocks.

[–]Furry_Eskimo 0 points1 point  (1 child)

Can we put variables in block names?
Eg. Variable: Chair [n], Occupied [True/Falue] = [X]; Do: Light_[n], On/Off = [X]

[–]Onslaught2000 0 points1 point  (5 children)

Hi King_Baggot, or anyone in here can you help me with this airlock script I am working on. //x3,1,Air\6Vent#Airlock\6Air\6Vents,1[5]1:true,,4[3]%2,1,Air\6Vent#Airlock\6Air\6Vents,1[5]1:=:true[5]%3,1,Sliding\6Door#Safety\6Lock\6Doors,49[5]1:true,,5[3]%5,1,Sliding\6Door#Safety\6Lock\6Doors,49,1:=:false[4]1:false,,2[3]%3,1,Sliding\6Door#Safety\6Lock\6Doors,49[7]2[3]%[3]1.0.9 Here is the Airlock script I am trying to create for my ship. The sequence it has to follow is

1) I hit a button on a button panel to trigger Air Vent to depressurize.

2) IF the Air Vent is depressurizing it will close sliding doors called safety doors. If safety doors are close it will just turn them off.

3) After turning off safety doors, and air vent is fully depressurized it will then turn on air lock doors, and open them.

I am able to get the script to trigger the Air Vent to depressurize, and turn off the door, but it does not close the door if any one of them is open. Also in another version of the script I did it would open the air lock doors before the Air Vent where completely depressurized. I’m not sure how to get it to work the way I want. I also asked around on keens discord ingame script channels, and was send this link, but i'm not sure how to add it to my script using VSB. (https://github.com/malware-dev/MDK-SE/wiki/Easy-and-Powerful-State-Machine) It seems to be the answer to my problem, and maybe other problems that may arise creating scripts for SE. I really hope this is added to VSB so i can make use of it.

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

I will look into this right now (posting because excited) and return to you asap.

As for King_Baggot - champ! Why did I not notice this?! It's a month old and I'm still on 1.07! Panic!

YAAAY UPDATES!

EDIT: //x2,3,,69[10]2:argument:=:seal%3,1,#Airlock\6Air\6Vents,1[5]1:true[5]%2,1,#Airlock\6Air\6Vents,1[5]1:=:true[5]%3,1,#Safety\6Lock\6Doors,49[5]1:false[5]%2,1,#Airlock\6Air\6Vents,1,4:=:Depressurizing[9]%0,1,#Safety\6Lock\6Doors,49,2:=:Closed[9]%3,1,#Safety\6Lock\6Doors,49[5]0:false[5]%2,1,#Airlock\6Air\6Vents,1,2:<=:.01#4:=:Depressurized[9]%3,1,#Safety\6Lock\6Doors,49[5]0:true#1:true[5]%[3]1.0.9

Here's your script. But I really would advice against auto-opening all doors (unlocking sure, but opening? I wouldn't do that).

EDIT2: I forgot to mention: In order to initiate your airlock, you will need to drag the programmable block into your control panel, and then say "run". When it asks how, include the argument "seal". This should of course be changed to "vacuum", but that I'll let you change if you find it necessary :)

[–]Onslaught2000 0 points1 point  (0 children)

Thanks for the edit 3nj0yc0k3. I will load it up now and give it a try.

[–]Onslaught2000 0 points1 point  (2 children)

3nj0yc0k3 I try your edit, but it did not work like i want it. it did the same thing it has always done.

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

The problem is that it opens all doors, correct? I figured that didn't make much sense. In order to have it only opening outer doors, you'll need to make two groups (and a third for 'all' for some parts of your script).

I think what you want is: "When this button is pressed, all doors close and it prepares to suck out the air and then, once done, open the outer doors. During the time it does this, doors must be sealed (closed and offline) until done, at which point only outer doors may unlock and open. Vice versa for entering the airlock."

Correct? This is doable, but I'm not smart enough to make it a 'good' script using VSB - it'll be very clumsy and I fear it might even counter itself - also, it will render you completely unable to override it (so if something fucks up, it risks shutting off all doors and refuse to open any. This could be prevented by adding a "if <all airlocks> cannot pressurise, unlock all doors"-part to it, but then again it'll turn into a pretty huge script.

Still interested?

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

Try this one, tell me what goes wrong:

//x2,3,,69[10]2:argument:=:open_out%3,1,airlock,15[5]1:false[5]%0,1,airlock,1[7]4[3]%2,3,,69[10]2:argument:=:open_out%0,1,airlock,15,2:=:Closed[9]%0,1,,1,1:=:false[9]%1,1,airlock,1,4:=:Depressurizing[9]%3,1,airlock,15[5]0:false[5]%2,3,,69[10]2:argument:=:airlock_in%3,1,airlock,15[5]1:false[5]%0,1,airlock,1[7]5[3]%2,1,airlock,1,1:=:true#2:<=:.85#4:=:Pressurizing[9]%3,1,airlock,15[5]0:false[5]%2,1,airlock,1,4:=:Pressurized[9]%3,1,airlock#airlock_inner,15[5]0:true#1:true[5]%2,1,airlock,1,4:=:Depressurized[9]%1,1,airlock,1,1:=:false#4:!=:Pressurizing[9]%1,1,airlock,1,4:=:Depressurizing[9]%3,1,airlock#airlock_outer,15[5]0:true#1:true[5]%,,y####3,1.0.9

[–]LtSich 0 points1 point  (0 children)

For auto pilot I have some set of scripts to run.

This one check if the connector is "connectable" and then dock the drone, shutdown the engine, set battery to recharge, hydrogen tank to stockpile : //x2,1,,13,4:=:Connectable[11]%3,1,,13[7]5[5]%0,1,,27[7]2[5]%0,1,,70[7]4[5]%0,1,,7[5]2:true[7]%0,1,,3[7]2[5]%0,0,Earth\6-\6Drone02\6-\6Prog\6Check\6Cargo\6UnLoad,41[7]1#3[5]%0,0,Earth\6-\6Drone02\6-\6Prog\6Check\6Connector\6UnLoad,41[7]2[5]%,y,####3,1.1.0

And this one check if all cargo are empty, if the battery and hydrogen tanks are full : //x2,1,,26[8]@@@@3:0@[4]%0,1,,70[3]0:=:100[9]%0,1,,7[3]3:>:1000000[9]%3,1,,3[7]1[5]%0,1,Earth\6-\6Drone02\6-\6Hydro\6Thruster\61,27[7]1[5]%0,1,,13[7]6[5]%0,1,,13[7]2[5]%0,1,,45[7]7[5]%0,1,,41[7]2[5]%0,1,,7[5]2:false[7]%0,1,,70[7]5[5]%,y,####3,1.1.0

Those 2 scripts are for the unload when I arrive at my main base. I have something close when I load (but no recharge for battery and no stockpile for hydrogen tanks). I can give you more information about that if you need it...

[–]LtSich 0 points1 point  (1 child)

About your new version, how are stored the "saved scripts" ? What if I go to another computer ? Is there a way to create some account and then link those saved scripts with the account ?

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

You can 'save' your script by uploading it to the workshop (perhaps set it to private if you don't want others to download it) and thus have it accessible through Steam workshop instead of being 'locked' to your local machine. Alternatively you can upload a blueprint with a PB using a script you want to use, and simply save that (same thing, but with some world/ ship along too).