Surviving Mars

Surviving Mars

评价数不足
Lua Console
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
277.271 KB
2018 年 3 月 19 日 上午 6:35
2018 年 4 月 8 日 上午 5:03
10 项改动说明 ( 查看 )

订阅以下载
Lua Console

描述
Adds a Lua console to the game that lets you run lua code.

Evaluate, trace, or watch lua expressions. Write your own helper functions and put them in your scratch pad. Reload your mod code directly inside the game, we'll even do a syntax check for you first!

Additional options are available if Waywocket's Mod Config mod is installed, including window transparency and a bundled monospace font (Inconsolata Regular).

Github page: https://github.com/thatfool/SMars-Lua-Console
18 条留言
akarnokd 2018 年 8 月 12 日 上午 9:42 
Hi, could you update this mod to support the Da Vinci patch of the game?
SkiRich 2018 年 4 月 21 日 上午 2:11 
Is there a how to or help/example faq included to show how to use the console?
akarnokd 2018 年 4 月 8 日 上午 5:30 
Thanks, the history is working. I was trying to call UICity:OutsourceResearch but apparently with the wrong arguments - my mistake.
special_snowcat  [作者] 2018 年 4 月 8 日 上午 5:08 
@akamokd I fixed the history. Could you give an example of a command that doesn't print a result? Note that statements don't have results in lua so e.g. "a=3" will show no result, and that's normal.
akarnokd 2018 年 4 月 6 日 上午 8:50 
Hi. The mod stopped working since the official patch. Pressing the up key does not bring up older commands and looks like some (?) commands do not work (no result is printed).
special_snowcat  [作者] 2018 年 4 月 3 日 上午 3:54 
@Browneyes the mod installs its own TTF font file into the "Fonts" folder in the game's install location. Check out the source code on github (linked above), search for "function LuaConsoleWindow:UseBundledFont" for the code that installs it. I'm not sure what exactly you have to do to make the game use different fonts for some parts of the UI though.
Browneyes 2018 年 3 月 30 日 上午 3:41 
How did you change font? I made Korean Localization MOD but I'm not modder, so I don't know how to use Lua. Anyway, My localization is not nice because game has only one Korean font. All texts have same appearance. But your Lua Console MOD has your own font even applied. I need your advise. thank you :) I'm not good at English. sorry.

* I tried with this code but there's no change. not applied. T_T
===============================================
function OnMsg.ModsLoaded()

Unmount("Fonts")

MountPack("Fonts", Mods["bpoUrm4"].path .. "Fonts/Nfonts.hpk")


end
Waywocket 2018 年 3 月 27 日 下午 1:39 
Now I have to add a "button" data type to Mod Config, for the "Reset Window Position" option...
special_snowcat  [作者] 2018 年 3 月 27 日 上午 7:57 
@William this is because of table.sort(). You can't call that on tables that contain multiple different types of elements, but you'll inevitably find some in _G.

This being said I would not recommend reverse engineering on feet like this. Check out the Modding discord (https://discord.gg/gZtkVSv) , in particular the #resources thread has a bunch of pinned stuff including decompiled Lua code from the game.