About modding

General discussion about the game.
User avatar
stickthemantis
Posts: 37
Joined: Wed Jan 29, 2014 4:16 pm

About modding

Postby stickthemantis » Sun Mar 04, 2018 12:59 pm

So, this game uses Lua. And seeing as Lua works so well with modding I'm a little disappointed that the game's modding capabilities actually seem to be quite limited. Not as limited as FTL, but much more than Invisible, Inc., which uses Lua almost everywhere it's possible. And of course, I can't just ask someone to rewrite an engine written into C++ in Lua, but I thought I'd write down a few thoughts I had on the points that could be initially beneficial for the modding scene and might not require changing large amounts of code.

1. A Mod Loader
The thing is that there's not much point in using Lua for modding if there is no place to call your scripts from. If there isn't you might as well use the patching system that is used for FTL. So I did just that, I wrote a loader for loading Lua mods: viewtopic.php?f=26&t=32833
There are a few problems with it though. Right now it loads all mods upon opening the game. There is no way to turn off or configure mods. What we'd like is to be able to choose what mods we want to use before we start a new game and then have that information be saved until we load again. The tricky part is 'choose', since we can't modify anything about the GUI other than change the text, when we'd like this:
Image
You could add fancy features like changing the loading order or configuring the mods individually but really, that's fluff, it's not needed. Just a sign that the devs acknowledge the value of mods would be nice.
But you might think that you'd need quite a bit of time and effort to make the code that loads the mod, which the devs could spend better improving the actual game. If only there was someone familiar with Lua that'd be willing to help out: viewtopic.php?f=26&t=32833
Just saying :^)

2. Loading resources
Now that we have a way to load Lua scripts we also need a way to add new art and sounds. Now admittedly, I don't know much about this area, so it might not be as trivial as I think it is. I know that the game supposedly uses the same dat format for storing resources as FTL did, so you can use the FTL tools to repack those files. But what we'd really like is to add new dat files, not replace the one and only we currently have. So if there is some function on the C++ side that mounts content from a dat file, all we'd need is to make that function possible to call from the Lua side and we'd be good.

Edit: Apparently resources don't actually need to be packed to be used, so if that's correct this is no longer needed. Horray!
Edit 2: Hm, maybe not. I can't seem to get it to work with images, only fonts.
Edit 3: I managed to write a dat repacker in lua, so now you can actually add images through mods without packing them externally. Horray for real this time!

3. Unlimited slots for pilots and squads to select from
This one is a classic. It was an issue with ships in FTL and it still is. It can't be that hard to add a scrollbar or a 'Next Page' button.

Of course, I'm not expecting to get any of these things in the game soon. But I'd still like to hear the thoughts of the developers on this matter. Mods extend the lifespan of a game, and improvements like these could help set up for future updates and dlc, like how the Contingency Plan for Invisible, Inc. (can you imagine I almost went this entire post without mentioning that game?) actually uses the same API that mods use.

Anyways, that's what I wanted to say. Even without mods, it's an awesome game you've made. I just hope I, and everyone else, will be able to help make it even more awesome.
I'm Cyberboy2000, known as a modder and community leader of Invisible Inc.
I'm using this old account because I've been unable to get any verification email for a new account. Help with changing my name would be appreciated.
User avatar
stickthemantis
Posts: 37
Joined: Wed Jan 29, 2014 4:16 pm

Re: About modding

Postby stickthemantis » Tue Mar 06, 2018 8:51 am

I know it might sound like I'm asking for much but really I just want to hear that the devs would at least listen to the mod makers. If something is too difficult to do, say that, don't ignore us. :(
I'm Cyberboy2000, known as a modder and community leader of Invisible Inc.
I'm using this old account because I've been unable to get any verification email for a new account. Help with changing my name would be appreciated.
User avatar
isla
Posts: 350
Joined: Mon Mar 16, 2015 11:22 pm

Re: About modding

Postby isla » Tue Mar 06, 2018 4:44 pm

Not trying to ignore you at all! Sorry if it seems that way.
Right now we're still swamped with post-release emails but once things calm down again we'll be able to start doing things like player/modder-suggested improvements.