Oxygen Not Included

Oxygen Not Included

Lua Scripting Engine
24 Comments
Rainbow  [author] 17 May, 2021 @ 3:34pm 
I did update it now. Check if it works.
ViperActual 17 May, 2021 @ 10:37am 
Hello, I keep running into the following error, even when this mod is the only one enabled. I do have the DLC enabled when trying to start the game.

Exception while loading mod 1812965265.Steam at C:/Users/viper/Documents/Klei/OxygenNotIncluded/mods/Steam/1812965265.
System.ArgumentException: No target method specified for class LuaCore.EntryPoints+__loadworlds (declaringType=CustomGameSettings, methodName =LoadWorlds, methodType=, argumentTypes=NULL)
at Harmony.PatchProcessor.PrepareType () [0x001de] in <1b23547042994e96b8b6361dbe3791d9>:0
Rainbow  [author] 9 May, 2020 @ 2:20pm 
I think it may have troubles when two lua mods are installed, it might have a bug there, when you release a mod please notify me, i will look into it again.
blueweapon 9 May, 2020 @ 8:39am 
Now it works~ Thanks~
Rainbow  [author] 9 May, 2020 @ 8:07am 
Check the new version and tell me if it works for you
blueweapon 8 May, 2020 @ 10:42pm 
"suggest you to delete the folder and reinstall the mod" -> Typical~ I've already done it and more~ I've checked your github for up to date binary but no release there~. I've even cleared steam download cache~
LuaCore.LuaFunctions+crashandler crashes by at Harmony.HarmonyInstance.PatchAll (System.Reflection.Assembly assembly)
Rainbow  [author] 8 May, 2020 @ 5:31pm 
On the fly i would suggest you to delete the folder and reinstall the mod, maybe you have an old file there.
The example stuff more or less has moved to the first full lua mod that is working:

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2014940545
blueweapon 8 May, 2020 @ 11:54am 
Error log
null Exception while loading mod 1812965265.Steam at .../Documents/Klei/OxygenNotIncluded/mods/Steam/1812965265.
System.ArgumentException: No target method specified for class LuaCore.LuaFunctions+crashandler (declaringType=KMod.Manager, methodName =HandleCrash, methodType=, argumentTypes=NULL)
at Harmony.PatchProcessor.PrepareType () [0x001de] in <1b23547042994e96b8b6361dbe3791d9>:0
at Harmony.PatchProcessor..ctor (Harmony.HarmonyInstance instance, System.Type type, Harmony.HarmonyMethod attributes) [0x00065] in <1b23547042994e96b8b6361dbe3791d9>:0
at Harmony.HarmonyInstance.<PatchAll>b__9_0 (System.Type type) [0x00023] in etc etc...
And examples are not anymore (I remember there was examples in previous versions)
LuaEntryPoint.dll has changed name to LuaEntryPoint-blueprint.dll is it correct?
Rainbow  [author] 8 May, 2020 @ 10:31am 
Why do you think it does not work? This mod does nothing on its own only with other mods.
If you get it disabled standalone or the game crashes please send the log in the forum topic.
blueweapon 7 May, 2020 @ 12:41pm 
Is it work after update? Mine can not load~
Rainbow  [author] 26 Aug, 2019 @ 10:21am 
It now works with entry points so you dont need to copy the files.
Rainbow  [author] 26 Aug, 2019 @ 10:20am 
I uploaded the new version to steam and github
Rainbow  [author] 22 Aug, 2019 @ 5:41pm 
Fixing stuff is appreciated, but indeed the code is outdated and i fixed that error in the new version, it so far finished now however i need to get it running smoothly. I will upload the new code to github then too.
Please make sure to keep backups of your lua files, i want to rename the folder with the next version which might delete stuff inside.
CosmicDan 20 Aug, 2019 @ 10:17pm 
Oh btw, I was going to work on a mod that just acts as a stub/loader for lua scripts, more friendly for other modders to copy-paste for their own mod. It would have a dependency on your mod ofc, and I may add more functions to it too.

It would just cut down on maintenance and distribution size if this were the case. The mod still needs to appear in ONI somehow, and I guess a simple DLL with dependency on this seems the best way if we want to have load order and all that native mod loading capability.
CosmicDan 20 Aug, 2019 @ 10:12pm 
Howdy, I see that another mod - Super Building Extension - includes a copy of your Lua extension. It causes a mod conflict error and disables all mods. I made an issue and references a line on your GitHub that I believe is the culprit (seems to checking the wrong collection before registering). Didn't go too far though as the GitHub seems out of date, at least with your Commons library.
Rainbow  [author] 20 Aug, 2019 @ 11:46am 
Right now not because there is only one basefolder, right now you would have to include the files.
however i will add that feature with the next update.
CosmicDan 19 Aug, 2019 @ 9:46pm 
So is it possible to, with this mod, publish another Steam Workshop mod that has this as a dependency? Might give it a go :)
Rainbow  [author] 11 Aug, 2019 @ 7:52am 
I added some more infos to the mod.
Please follow the new documentation to find out where it fails.
forsakennydoseth 10 Aug, 2019 @ 1:14am 
@RainbowDesign can i private message you about it on discord? or steam

it doesnt work , i created a file console.lua in the folder and pasted what u told me into it but it didnt work , do i have to do something when i get into the game or ?
Rainbow  [author] 8 Aug, 2019 @ 7:07am 
If you want to do it for yourself only, the easiest way is to create console.lua in the luascriptingengine folder and insert you need add a tab before the middle line:

function start()
GetBuildingDef("SteamTurbine").Floodable = false
end
Rainbow  [author] 8 Aug, 2019 @ 6:44am 
there are some examples in the files how to make things nonfloodable have you tried them?
forsakennydoseth 6 Aug, 2019 @ 10:45am 
ok so how do i make a steam turbine non floodable with this? help
Chastomber 29 Jul, 2019 @ 6:28pm 
Make mods using lua scripting
Travisplo 29 Jul, 2019 @ 5:53pm 
So, what exactly does this mean? What can you do with this?