Scrap Mechanic

Scrap Mechanic

ScrapComputers
replacement for os.execute
I understand everything, of course, but here I am looking at your LEGENDARY DOCUMENTATION where half of the functionality is not mentioned, yet it includes instructions on creating add-ons for your mod. I'm not sure how credible and detailed they are. I searched your site for how to use register and couldn't find it. By some miracle, with the help of a neural network, I figured out the function name to work with this element. Now I'm thinking, I need a replacement for os.execute since it doesn't work in your wonderful mod. Once again, I want to praise your extremely useful documentation.
< >
Showing 1-6 of 6 comments
VeraDev  [developer] 26 Aug, 2024 @ 12:42pm 
The website documentation is absolutely horrible, there's a planned rewrite as well to a switch to a new framework. Its also rushed so of course its garbage in some spots.

Registers? you use sc.getReg and sc.setReg. This is now a pattern, People are asking this more than normal. Doks (Our documentation framework) is such garbage that we will replace it entirly

And no, there's no replacement towards os.execute because SM does not have that at all. If your wondering if we are going to use DLM or BetterAPI, no. DLM is long gone and BetterAPI is horrible and violates copyright.

Search through the sidebar instead of the searchbar. if you cant find it, it's 100% in the pages so go through them.
_ygroman_1234 28 Aug, 2024 @ 4:29am 
Thank you, I was starting to think you just made a mod, told people not to copy it, and ignored the documentation, so I was very surprised by your response and the honesty in it. I want to support you in this challenging task—being pioneers in something is indeed very difficult. I wish you success.
_ygroman_1234 28 Aug, 2024 @ 4:32am 
I wanted to ask, why Lua specifically, and not Python or some C-like languages?
VeraDev  [developer] 28 Aug, 2024 @ 7:04am 
Our license is strict because, unfortunately, there are bad actors in the community, and SComputers's owner is one of them. so we didn't want him to steal our content at all. same for basicly every other person who does that.

We use Lua because to mod in Scrap Mechanic, you need to know Lua. Finding a good Lua interpreter is already quite challenging.

From what I’ve researched, there’s no Python interpreter for Lua, so using Python isn’t possible. Even if one exists, it’s unlikely we would implement it.

Compiled languages like C are not an option because we would need to write our own compiler, and frankly, we’re not skilled enough for that. Even if we did manage to create one, it would probably be slower than our LuaVM, making it not worth the effort.

There’s also a reason why we use a custom VM instead of ScrapVM or LuaInLua. LuaInLua (which the other two computer mods use) is incredibly slow. We have a benchmark script that tests the performance of for loops and addition operations. LuaInLua gave us a result of 0.30, while our LuaVM scored 0.01. The lower the number, the better the performance. ScrapVM is faster, but ours is even faster by 0.01.
Last edited by VeraDev; 29 Aug, 2024 @ 10:45am
_ygroman_1234 28 Aug, 2024 @ 12:13pm 
Thank you very much! I see you've worked hard on the virtual machine. I'm curious if there are people using this mod and writing scripts for it who started programming solely because of this mod.
VeraDev  [developer] 29 Aug, 2024 @ 10:44am 
No one said that they learned it via this mod, so who knows? (This mod is still kinda new, Released in June 17, 2024 around 21:00 (aka 9 PM for americans) so its been released for around 2-3 months. )
Last edited by VeraDev; 29 Aug, 2024 @ 10:47am
< >
Showing 1-6 of 6 comments
Per page: 1530 50