Scripting Tutorials for Space Engineers - Ep1 - Hello World
ฝัง
- เผยแพร่เมื่อ 2 ม.ค. 2025
- In this series I plan to detail how to write amazing scripts for Space Engineers. The first episode will cover the basics and show you how to output text to an LCD screen.
Scripts in Space Engineers are written in C# and executed on Programmable Blocks. Timers allow them to run repeatedly.
Music by Argofox Creative Commons
/ @argofox
Intro: Labisch - Passion
Outro: DOCTOR VOX - Level Up
11:53 In case you never found out what "hacking" is, it's what you call it when you're grinding a block with terminal functionality. you grind it below the functional line and then weld it back together and you've "hacked" it. They were going to expand it but never did :)
This was interesting, I'm learning Java in high school right now so it should be fun to mess around with scripting stuff in Space Engineers using your tutorials!
just a word of warning, so much as changed. Tons of info he provided is just wrong nowadays. Some key things about queuing up items in production tab, and ANYTHING that outputs on an LCD is done differently nowadays.
skip to 3:00 to avoid "the tour"
I like the way you explain everything like it is. Not "dumbed down". Keep it up. I can't wait to see where you go from here. Thanks.
You made a tutorial about scripting(something conceptually advanced) and then after giving a three minute tour, you started explaining some of the most basic concepts about blocks. Someone looking for a scripting tutorial would be kinda already very familiar with that
You know, I've never actually tried to do something with scripts in this game because I somehow thought the ingame programming language would be lua like it is with computercraft. I didn't even look it up. A friend just told me "it's just like that minecraft mod thing" and I thought to myself "fuck it, I don't like lua". I feel so stupid now for not looking it up. I worked with Java before and I love it, so c# shouldn't be that difficult to get into. I'm looking forward to more of this series.
1:15 "If you don't know how to code, go learn and come back"
Me: Trial by *FIRE*
So 'hacking' in Space Engineers, is when you use your grinder to grind down a block--such as door, pilot seat, or cargo container--until it is at a previous stage of assembly. Once you've done this, you can weld the block back up to 100% and now you are the owner of that block. If you do any in game piracy, this allows you to breach exterior doors on ships, loot cargo, and commandeer ships.
I'm really enjoying the video, btw.
+Will Cole Also, I'm very interested in scripts I could use to for a space dock, using merge blocks. I've already designed a docking port where I can go from the ship to the station without having to do a space walk, but I'd like to set it up so that when the ship is docked, all of the doors are unlocked (turned on) and opened between the ship and the station, and when a program is initiated to separate the ship from the station all of the doors are closed and then locked (powered off), and then the ship's merge block is powered off for separation.
thanks for this tutorial! I love c# coding and your tutorial has been very helpful
Great idea for a video series. Love it.
I can’t believe I forgot that Space Engineers used to look like that
they should add an option to load the game with "classic" graphics, maybe even tie it to the dulux dlc. I myself would definantly use that as it would help my GPU (I can run the game as is now at 60fps but it still ags sometimes, never used to have that problem in the past when it game to gpu load)
thank you dude . this is an amazing idea keep it up ...
BTW I suggest the next game series will be (BANISHED) its a cool game u should try it
You can’t do mouse input but you can override gyros, you can control a ship with a remote control though or if your stupid enough thrust overide
so it would be impossible to make a current to target a ships cockpit block over other blocks with the camera build in the turrent that would detect the glass color
how would I make a code that will make my grides kill any spider within 7 meters of my gride to keep them from damaging my base
I've never learned C#, but modified some code C# about five years ago. It looked similar to Javascript.
Also, there doesn't appear to be a "show text on screen" option in the LCD I'm using.
EDIT: It took a while, but I finally found out that you now have to use the following line to get the text to showup on the screen:
display.ShowPublicTextOnScreen();
You should build an automated quarry. Perhaps with a delivery system and few sensors to make sure it won't hit rock with its side and break.
I'm digging up old, dead things and zombieieing them. But if you had a rig that you wanted to be able to move around, you could just retract all the drills before moving. It would be slower but safer without having side-facing drills to try to accommodate.
I keep having a problem where it tells me I need a get or set accessor.
I have not used scripting in Space Engineers, but I am fluent in C#.
A set/get accessor on a variable is basically a way to more precisely define what happens whenever that variable is set to a new value. or when something somewhere else tries to "get" its value by referencing it.
An example of a set (a.k.a. setting that variable to a new value, OR overriding what was previously in it with something new:
string TestString = "just a test, bitch, move along."
TestString = "hey now, we are a family channel"
An example of a get (a.k.a. referencing that variable somewhere else so that way its contents can be read & used)
string TestString = "sorry for being rude last time"
SomeRandomMethod(TestString)
According to my own thinking, it sounds like you are getting that error from a variable that has not had a get/set accessor declared.
Since lights don't natively support the necessary function, and a lot of timer blocks would be bulky, I would like to learn how to make a looping sequence for a flashing light sequence. Like how light bars on emergency vehicles operate. I don't want a simple solid back-and-fourth basic pattern.
I want a script that tells me how many and what components I need to build a ship/station that is being projected. Do you know if it exists?
Is hungarian notation used?
Will someone teach me how to make simple scripts that will allow lights to turn off/on depending on various things such as: Status of air vents, whether a weapon is firing or not, etc?
very well explained FunshineX :-)
Actually, in newer versions, you can effect production. People have been doing this.
"Published on Dec 16, 2015"
In 2021 we just do the ----- display.WriteText("Hello World"); ---- Public is obsolote. Thanks for the tutorial though.
If you still look for ideas for scripts: I want a script that activates a beacon if a turret starts firing. That way I could make CHEAP scouting drones.
It sucks there are no up to date tutorials as now we have self running scripts and auto crafting and disassembling
Nice tutorial, keep it up :)
I love this :D
Coming to xbox soon. So with no steam workshop, we'll be writing these from scratch.
Nice explained, learned about that grid shizzle, didnt know that, but the hello world is not a big deal, I have so much idea's I want to make, but yeah I have only a little bit experience with java, not even all the basic just a start :/
thanks lets get this done first tutorial i found that i could follow be sure to hear ideas from me soon
help. my editing screen is just a blank screen, i cant even add and save scripts
You need to enable "experimental mode" in the options.
My apologies, it does indeed work. It's GridTerminalSystem I wrote it the wrong way in my code. Thanks for the tutorial.
how do i walk ? do i use wasd?
Arrow keys
8:44
I was looking to find an anti air autopilot script (The one type of script that does not exist in the workshop of course)
My idea was to create a base with automatically starts shooting with guns that is not turrets
Scripting tutorial starts at 8:29... Really pushing to ten minutes huh?
FTWGaming yeah but he is explaining terminology and how the mechanics work
I cannot wrap my head around Lua but i could quite easily wrap it around JavaScript
have you tried assembly??
it's harder to learn than c++ and c# combined
programing gods injecting social skills one hello world programing tutorial at a time...lol
G O O E Y
7:56 you just said ass
edit: fix it in the subtitles
Seems outdated, TerminalGridSystem doesnt exist now, or at least thats why my compiler says. But a great guide.
I never in my life heard someone pronounce G-U-I in gaming as the "Gooey"
If you ever get into programming, that’s just the standard pronunciation.
It’s silly to me, but I’ve had teachers make fun of people who spell it out so keep that in mind
@@June-sv4ie Interesting... I would have assumed that it would be pronounced by spelling as it is an abbreviation. Still seems strange to me.
Oliver Yeah, personally I like to say the letters, but it’s pretty inconsequential most of the time. GUIs have been around for decades now, so it makes sense that there are some traditions that programmers like to hold
I've been programming since the monochrome monitor, pre-mouse era, where Graphical User Interfaces did not exist. I don't know when a GUI first started being pronounced Gooey, but it is at least 25 years for me. I went back to school in 2008 to bring my antiquated skills up to date and Gooey was the preferred pronunciation, but I'd equally understand either and not really bat an eye. What I cannot abide is how people say the initialism for Jraphical Interface Format. Hard G like _give_ and _get_ is the way I say it (contrary to the official doctrine). _Jiff_ is a brand of peanut butter.
@@blacksmith67 I just pronounce the .GIF as whatever I heard last. Because I hear both too often to know how I’d actually say it if I never heard of the debate.
The problem with your reasoning though is that acronyms don’t work like that. I’m sure this argument gets used a ton(I don’t really participate in the debate), but I refuse to pronounce SCUBA as “Scuh - bah” because of the U in underwater and the A in apparatus.
Not here to change your opinion, mind you. Just something to consider when defending your side ;)
Well the totally basic things with IMyTerminalBlock would be helpfull.
I just want to turn on light god(clang) dammit! Besides that good tutorial.
this didnt work in the 2021 version and half the GUI you have seems to be non-existent
Obsolete and deprecated! Not my words.. They came straight from the editor!
12:05
everybody who is watching right now: *th-cam.com/video/3O8J2locx5o/w-d-xo.html*
and this is very old... so this wont work
My schools C# course is a year old and still works
oo out dated nvm
THERE IS A WAY EASIER WAY TO DO THAT!
An*
Shouting that there is an easier way is useless without telling us what that easier way is.
isectoid simple,
all you need to do is go into the settings of it and press "Public" then press "enter Public Text"
DogsBody That's not the point. You might be able to explicitly tell it to say stuff, but you'll never have a screen that _adapts_ by hard-setting the title.
With programmable blocks and timer blocks, you could get it to say "(amount of uranium) uranium left." so you didn't have to sit down in the captains chair to know,
Or even have to bother going up to a control panel and searching for reactors. It saves time.
isectoid not really, all you need to do is that, IT'S WAY EASIER
DogsBody Lets say you want a screen that always has the amount of uranium you have in base.
You could keep checking the amount and changing it, but that'd get annoying and tedious.
If you had the proper skills you could use programming to make a programmable block update it automatically.