Stormworks: Build and Rescue

Stormworks: Build and Rescue

26 oy
Using VSCode for Lua with the Stormworks Extension
Leg Sponger tarafından
How to download and setup VSCode for Stormworks.
Allows you to write better Microcontrollers, far more easily, with a full debugger and error checking.
2
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
Why Use VSCode
Stormworks Lua is an extension to provide proper build processes to the Stormworks community.

Key Features:
Do you hate trying to figure out why a certain value is wrong in a calculation?
Do you hate writing all your code in one big, disorganised file?
Do you hate the 4000 character limit?
Do you wish you could make well-structured code libraries, and use that code on multiple projects without copy/pasting?

The extension solves these by providing:
An extremely powerful Minimizer, that can remove redudant code and shrink files massively
A Combiner, that can trace the "require(...)" keyword so you can write code across multiple files
A full Debugger that can show you the memory values of your Microcontroller
A Simulator that support multiple screens simultaneously
Full type hinting and error checking to avoid typos
A solid library of code, the LifeBoatAPI, to simplify writing Stormworks code.

How to Download It?
Download VSCode here for free (official microsoft download): https://code.visualstudio.com/download

Inside VSCode, search "Extensions" for "Stormworks" and install the extension.
It's also available here: https://marketplace.visualstudio.com/items?itemName=NameousChangey.lifeboatapi


If you find any issues, just comment here or add a new bug on the issues tracker:
https://github.com/nameouschangey/STORMWORKS_VSCodeExtension/issues

11 Yorum
PweeDos 26 Ağu @ 15:29 
Thank you V-1Missile!
V-1missile 6 Nis @ 11:20 
Hello, OddlyTugs. I think You have a problem with the Lua Debug extension.
I believe that pulling down the version of the Lua Debug extension to 1.6.x will solve the problem.

Translated by DeepL
OddlyTugs 6 Nis @ 3:27 
no runtime (c:/users/user/.vscode/extensions/actboy168.lua-debug-2.0.5-win32-x64/win32... is found you need to compile it yourself

please help
Kiritsu 29 Ağu 2022 @ 12:39 
Thank you for the quick reply
Leg Sponger  [yaratıcı] 29 Ağu 2022 @ 4:08 
There could definitely be better docs,
In VSCode you can view the "Details" page for the extension, from the extensions tab - and it lists the things it can do *generally* (although might now be a bit out of date/some new stuff added)

For the actual code library - the MC one is nice and small, just have a look through the code and use bits you like.

For the Addon library, it's in development, and because it's more of a paradigm shift - I'll write up better docs soon to explain the main ideas behind it.

Thanks!
Kiritsu 28 Ağu 2022 @ 7:53 
Is there a tutorial or official doc of all lifeboatApi features?
Leg Sponger  [yaratıcı] 12 Haz 2022 @ 15:53 
Major update just released - added ability to create and use git libraries easily.
So now you can share your code with others, and use code from others without any stress - just right click "Add Library From URL" and enter any git repo, it'll pull it into the libs folder and setup all your paths.

Then just `require` the files you want from your code as normal
Leg Sponger  [yaratıcı] 19 Ara 2021 @ 16:49 
@pieter Hey, apologies if it's not clear.
If you want to set the inputs; you can look in the file _build/_simulator_config.lua
You'll call __simulator.config:addNumberHandler or ...addBoolHandler

and the arguments it takes are addNumberHandler(inputIndex, functionThatProvidesANumberEachTick)

You can use the LBSimulatorInputHelpers class to get some useful functions quickly, and pass that in to the parameter.

If it still doesn't make sense, can come onto Discord and find me (nameous) there. I'm happy to help explain it.
pieter.1992 18 Ara 2021 @ 23:44 
how do i change the values of the inputs in debug mode
Leg Sponger  [yaratıcı] 17 Ara 2021 @ 6:44 
@joecaptain Thanks! I hope you find it helpful! Will be releasing an update that supports multi-mc simulation shortly!