Developer PeterA Posted April 30, 2015 Developer Share Posted April 30, 2015 Hey everyone, I pushed a minor update to the Mod Uploader today. The only change in this update is to include the standard math, string and table functions in the environment that your modinfo file is loaded into. This will allow you to do slightly more complex stuff when setting up your configuration tables. Please let me know if you have any questions! Link to comment Share on other sites More sharing options...
Mobbstar Posted April 30, 2015 Share Posted April 30, 2015 *slowly raises hand* Wh-What does the mod uploader deal with modinfo.lua, other than reading the description field for new objects in the workshop? Link to comment Share on other sites More sharing options...
Corrosive Posted April 30, 2015 Share Posted April 30, 2015 @Mobbstar, I'm not sure either... a diff of the old and new version of the tools shows that the mod uploader was in fact changed somehow, and that it was the only thing changed =o Link to comment Share on other sites More sharing options...
Developer PeterA Posted May 1, 2015 Author Developer Share Posted May 1, 2015 @Mobbstar and @Corrosive, the mod uploader loads modinfo.lua simply so that it can read the name, description and verify that the version details have changed. It's just a lua file, so the easiest way to read it and guarantee the same results between the game and the uploader is to actually load the modinfo file into a lua environment just like the game does.Previously the lua environment that modinfo was loaded into in the uploader didn't have all of the standard functions loaded, so you couldn't use things like string.sub and string.lower to build your configuration table. The game actually supported it, but the uploaders environment was more limited, so I added some of the basic string, math and table functions to the uploader. The uploader doesn't actually care about the configuration options, but it still needs to run all of modinfo.lua to be able to get the results. Link to comment Share on other sites More sharing options...
Corrosive Posted May 1, 2015 Share Posted May 1, 2015 @PeterA, I figured it was something along those lines but I didn't see the uploader importing any lua libraries, so I wasn't sure. Thanks for the info! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.