Scrap Mechanic

Scrap Mechanic

评价数不足
ScrapVM
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
506.172 KB
2022 年 4 月 9 日 下午 1:18
2022 年 6 月 2 日 下午 2:18
4 项改动说明 ( 查看 )

订阅以下载
ScrapVM

描述

ScrapVM - Finally makes it possible to run any lua string as code!

  • Send dynamic payloads from client -> server and vice-versa!
  • Make a lua executor entirely from within the game!
  • Execute code that's read from JSON files!

There are so many new possibilities, please show off your mods that make use of this!



How To Use:

dofile '$CONTENT_5a081817-b141-4439-987f-a25162d125fd/Scripts/scrapvm.lua' Example = class() function Example.server_onCreate(self) if not sm.luavm then return end -- Run arbitrary lua code! local code = [[ print('Hello from ScrapVM!') ]] -- Compiles the code local hello_world = sm.luavm.loadstring(code) -- Run the code! hello_world() end




Credits:
Prime - dev support with making scrap mechanic mods!


Post any bugs / suggestions in comments below :)
If you do post a bug, please post some way to reproduce it
7 条留言
You CCh While I 0xCC  [作者] 2024 年 1 月 29 日 下午 12:07 
Yeah, went from one hiatus to another real fast
SeveringHams 2024 年 1 月 20 日 下午 7:22 
this did not age well
You CCh While I 0xCC  [作者] 2023 年 3 月 22 日 下午 4:20 
@TheFattestCat I'll address that in the next update, came back from hiatus recently so hopefully this issue will be no more soon :)
TheFattestCat 2022 年 7 月 3 日 下午 3:24 
Well, it's the best, I also tried https://github.com/vladimirdabic/lua-in-lua , but this lbi much faster... But I found a problem: I can't set env for this function (I don't know how). I'm triying to make scriptable computer and i need to define some functions in local env. And also good feature wiil be make interation limit (i don't know if it exists now), because of recuresion or eternal cycle....
afdelta01 2022 年 4 月 22 日 下午 12:48 
Well... Can only hope I guess.
You CCh While I 0xCC  [作者] 2022 年 4 月 22 日 上午 3:47 
This doesn't escape any protections setup by the game. If someone wants to be malicious, this mod won't give them any more options than they already had, this is just a tool for running generic code.
afdelta01 2022 年 4 月 21 日 下午 3:49 
This...... is potential for very bad things tho.