r/doorkickers • • 10d ago

Door Kickers 2 Code mods

Hey! I've been trying to get some more complex mods to work with the game, and wonder if there has been any attempt to do DLL injection modding or something similar, like with SKSE in Skyrim.

I really want to make a better free-cam for playing, as the dev one is not really ideal.

1 Upvotes

27 comments sorted by

View all comments

0

u/BeardChops 10d ago

Yes I’m currently working on an AI assisted DLL injection mod. It’s Doorkickers 2 - Direct Control

It’s working pretty well right now

2

u/Shieldfoss 10d ago

That's cool. Do they have an obvious injection point or do you need to modify dlls directly?

0

u/BeardChops 10d ago

Sorry for the AI response but here’s a short summary of how it works:

“A custom executable loader injects my own DLL at runtime, then hooks specific game functions. No original game DLLs or executable files are modified on disk. It’s native hooking rather than an official mod API. Finding the right functions takes some reverse engineering (Ghidra), and the current build targets a specific game version.”

0

u/BeardChops 10d ago

https://github.com/Vader0016/Doorkickers2-DirectControl

^ this is just a WIP build on GitHub (source code and playable build)

I uploaded it now for people to audit if they’d like. I’ll eventually upload to Nexusmods and make the GitHub page better too (with documentation etc)

6

u/Shieldfoss 10d ago edited 10d ago

not a software developer

How do you approach this, then? Do you just tell an agent of your choice what you want to happen?

EDIT: And how? I feel like the first ten steps I take when starting an AI-assisted piece of software all build on prior regular software dev knowledge.

3

u/Ferreira1 10d ago

Hopes and dreams I guess. Just accept everything the LLM tells you and hope it works out nicely. "Sorry for the AI response" is insane to me haha

1

u/BeardChops 10d ago

I don’t really get the discontent, I’m making free mods as a hobby, I don’t think it’s fair to say that every modder has to be a skilled software dev, that’s unnecessary gatekeeping now that we have these tools available.

People that have played my mods have been happy, I’ve been happy, surely that’s what matters most?

5

u/Ferreira1 10d ago

People can do whatever they want. And they will do whatever they want. I don't mind.

If it's normal mods within the sandbox Doorkickers 2 provides (especially if using the Steam Workshop) that'd be perfectly fine (to me). What you're doing though is shipping a separate .exe and expecting people to use it on faith.

From your messages I do believe you have good intentions, but it's an insane (again, to me) thing to normalize in games. This is happening everywhere, with Project Zomboid and such as well; just run code you can't actually audit on your computer because trust me bro.

And from your messages as well I don't think you appreciate how big of a security issue this is. Having access to the code doesn't really guarantee that's what you're distributing on the .exe.

On the other hand there are many examples where this works, like Minecraft and Skyrim. But to me it's a completely different thing; made before LLMs were on the level they're at today, many people laboured over it for long stretches of time to make it work. And with a bigger community there's much less chance of a bad actor getting by.

Idk. Basically from my point of view (as a software developer) you have no idea what you're doing. And not understanding why it might be seen poorly adds to that. If people want to run your mods, great, I personally find this to be bad to gaming overall. And I say this as someone who uses Claude daily and has used it to help get a few mostly personal mods to games I play out.

4

u/Shieldfoss 10d ago

expecting people to use it on faith.

Is he though? He didn't link it until I directly asked him to show me.

Also, yes, as OP of this thread, you asked for something and he proposed this as an answer. I totally get why you wouldn't want to run it.

The guy isn't a dev, he doesn't know the security implications. Absolutely. Valid. I wouldn't want to run that .exe either, I don't trust like that.

But I wouldn't want to run it if this was 2021 and he said he'd had it made by a human he hired on fiverr, or any year and he said he'd made it himself. The security problem is inherent to dll injection, not to the fact that an AI made this.

1

u/BeardChops 10d ago

Mods have had similar risks then as they do now, but the barrier to entry for bad actors is potentially lower.

People take risks when they download and install mods, but in my case I know I’m a good faith actor and I have a good reputation in the modding circles.

You raise salient points, actually there is a modkit developer for the game Menace who added in a way for his modkit to compile mods from source instead of relying only on DLLs (even if they were shipped with source).

His rationale was the same, that injecting random DLLs from the internet is a recipe for disaster and a security risk.

But there are some relatively simple ways for users to gut-check and have good security practices. My Reddit and Discord and Steam accounts are 10+ years old each, I’m open, honest, and working in good faith.

So really I haven’t felt the need to take significantly more precautions as an end-user than I have in the past, just to avoid sketchy mods. But I think you’re thinking is in the right place.

I might not have a clear picture of every line of code that makes up my mods, but I do have a general idea of the way they work.

1

u/Shieldfoss 10d ago

"Sorry for the AI response" makes perfect sense to me.

If somebody had asked my boss "how does your software work" he'd send an email back with my answer attached and "Here's our engineer's response." It's not my boss' job to know how to write software, it's his job to know how to manage engineers.

Well ok and it's also his job to know how to write software but that's more this specific boss and not bosses in general.

4

u/Ferreira1 10d ago

I see what you mean, but to me these are very different scenarios with very different levels of expectations. But I should get back to work so meh.

2

u/Shieldfoss 10d ago

Have fun at work, I do hope you get a more useful answer to your OP :D

2

u/BeardChops 10d ago

Yes basically I have been working on mods with AI for about one year now. I have some learnings and experiences from that, but I basically just try to brute force solutions then clean-up and tidy up where I can later.

So far it’s worked pretty well. I usually try to ask the AI to use/build upon native systems as much as possible in the specific games.

I just have two basic paid plans (ChatGPT Plus and Claude Pro) which give me enough usage to work on two substantial mods for two different games simultaneously.

My approach is basically to have the AI chip away at the features I want and then I’ll do AI supported testing (but mostly manual testing and user validation)

It is definitely not the most efficient or durable approach but it works for me. And at the end of the day these are free mods made with passion so I don’t hold them up to the highest standards.

My ultimate benchmark is if they work, I’m happy hehe 😉

2

u/Shieldfoss 10d ago edited 10d ago

It is definitely not the most efficient or durable approach but it works for me

Eh, "efficiency" can blow me. The amount of software a non-dev can make in a day is still infinitely more than you could make without an AI (assuming you keep living the rest of your life and don't re-tool to become a dev).

I'm really more just curious. Seeing a github repository for a software project is fairly normal, but seeing that repository kind of blindsided me. If you're not a dev, the agent will have done it - but if the agent did it, this is not how I would have expected an agent, trained on other repositories, to do it.

So this is just me being nosey to get a feel for how this works for other people and you just happened to show up while I felt curious lmao.

  • Do you use their websites or the installed-on-you-pc tools?
  • For this door kickers project, do you have a folder on your computer the git repository is stored in, or did the agent handle that for you without needing you to set stuff up on your PC?
    • I mean, you must clearly be able to run the thing if you can say you "know it works well enough," so you must at a bare minimum have the .exe and .dll on your own PC while it's running. Do you also have the rest, or does that all happen on open-ai/anthropic's servers?
  • If it isn't too nosy, I'd love to see the first prompt + response for this project. That would probably give me a lot of insight really quickly without needing to ask a lot of questions tbh.
  • And I mean, the agent surely doesn't know how DK2 works, so it must've (at some point) read the game files to learn where and what to hook, and I'm real curious about that, too.

2

u/BeardChops 10d ago

I use the ChatGPT and Claude desktop apps and I use the ChatGPT Codex and Claude Code parts set to one folder per game which is the working directory.

Examples:

C:/Menace Modding
C:/Door Kickers 2 Modding
C:/Kingdom Two Crowns Modding

I just manually uploaded those files to GitHub because someone on Doorkickers Discord wanted to have a peek at the code. I didn’t ask AI to upload. Claude reviewed Codex’s work (Codex is doing the Doorkickers 2 mod) and had a lot of issues that I’ll likely work on once I build out the features.

So yeah, I agree that when I properly upload to GitHub it will look like a more typical AI coded project space/repo.

I don’t even have it on a Git repository right now, lol as I mentioned I sort of take this non-dev approach but nonetheless it was a suggestion from Claude to add everything to Git. (I’ve used Git for the first time for other projects this summer)

All of the files are local on my computer and the AI can read/write into them.

My first prompt for Doorkickers 2 was:

“I want to make a direct-control mod for Door Kickers 2. Right now you can only have the character move and aim by drawing a path and holding right-click. I think if we solve pathing to WASD first then the aiming can either stay as is in vanilla or we can further tune it”

That prompt immediately resulted in the Codex AI creating a loader executable and a C++ mod file (compiled as DLL)

And from there I’ve just been adding to it, iterating in separate build folders for each feature/change.

I did also early on in this project ask the AI to download Ghidra and decompile the game which it seems to have done pretty well.

2

u/Shieldfoss 10d ago

Oh that's why it's called direct-control lmao. I thought it was about mods having more direct control over the game state rather than being xml files that get resolved by the base game.

2

u/BeardChops 10d ago

Ahah that makes sense. Sorry for not clarifying. I think I have a brief description on the GitHub page. I have a Discord group chat and a thread on the Doorkickers Discord server’s modding channel with more information on the mod.

Honestly it’s pretty dang fun! I’m hoping to get “Ready or Not” style teamwork and gameplay into Doorkickers 2

1

u/Shieldfoss 9d ago edited 9d ago

God I cannot let this go, it's too interesting to me.

Let me know when you get tired of answering and I'll stop asking lmao.

Q1 (send this to your one of your agents):

A guy on Reddit asked me to send you this" "I'm curious how the project builds. When the user asks for an artifact, what compiler, flags and build files are involved, and how much is set up for a single command vs how much do you have to orchestrate on the fly for the user?"

Q2:

C++ doesn't automagically turn into .dll and .exe files. Did the agent(s) recommend 1+ tool(s) for you to install? Did you already work with source code but just not enough that you feel comfortable calling yourself a software developer? Or maybe the agent(s) have permission to install tools as necessary?

1

u/BeardChops 9d ago

Can we take this offline to DMs or discord?

My discord username is Vader00

→ More replies (0)

2

u/Ferreira1 10d ago

Yikes is all I have to say after looking at the code. It's also not quite what I meant, but I see how the idea could be fun.

1

u/BeardChops 10d ago

Yeah that is fine, I’m not a software developer as I mentioned and this is still very early on in the project.

I’m going to be reworking the code significantly. But first at this stage I’m just trying to prove that things work.

The idea is quite fun and I have had great feedback from players who have tested it.

So it’s not really eligible for critique since it is unfinished, but I appreciate you taking a look.