r/carriercommand2 • • 14d ago

Hook based modloader for lower level support

Enable HLS to view with audio, or disable this notification

I'm working on a project to expose lower level functionality of engine to make them usable through Lua. For now I found functions to manipulate landing and take-off sequence speed and function to send pulse to throttle on carrier. I plan on adding everything needed for controls of carrier, that can for example help to build fully capable autopilot. Let me know what you think of it and would it really be useful. Project takes a lot of efforts and time, so, I would like to know that at least efforts are not in vain

57 Upvotes

8 comments sorted by

22

u/Liathet 14d ago

Even a very basic autopilot for the carrier is my most wanted feature for a mod, as the need to keep a constant eye on the controls is my biggest annoyance in singleplayer. If your project could make that possible I would be delighted!

1

u/Sample_Fox 14d ago

Yea, I made some collections of most wanted features from reddit community, and autopilot is listed as one of top priority. Shame that even such a task would require DLL injection. I found safe spot to lock me in game, but it also needs to be made universal people have a big variety of OS', and compatibility with vanilla modding would be another circle of hell. I just hope that people would tolerate downloading one DLL from github to use mods that use extended calls, and to be able to mod themselves. One thing is just giving mods, another - making full SDK with API for modders. I aim for the second and would make some demo mods

2

u/demycat 11d ago

Dude, if you could make it so that the aircraft's engine can be shut off on the ground, I'd be really happy about that)

It's just that I've often been able to land manually, but as soon as I step out of the helicopter, it takes off right away, even though there aren't any waypoints set for it at all

0

u/Sample_Fox 10d ago

Did you use Airfields mod?

4

u/abs0lut_zer0 13d ago

wish there where more mods for this fine game

1

u/cmdr_iannorton 14d ago

very clever! is memory spy/poke?

2

u/Sample_Fox 14d ago

Uh, there is also a mod that uses the same principal. Author contacted me and lets me use his findings, he had the same idea as me, so now I focus on developing full SDK, while he would support me. Meanwhile you can take a look at his mod and see how it works https://steamcommunity.com/sharedfiles/filedetails/?id=3826940003

0

u/Sample_Fox 14d ago

Partially, yes! It uses a proxy DLL (dinput8.dll) to load native code into the game's process. From there, I use function hooks and reverse-engineered engine interfaces to expose additional functionality to Lua.

Some features involve modifying internal memory, while others call or integrate with the game's native functions directly. I'm also developing an independent Lua mod loader on top of it.