this post was submitted on 01 Aug 2026
58 points (100.0% liked)

No Stupid Questions

49219 readers
1366 users here now

No such thing. Ask away!

!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules (interactive)


Rule 1- All posts must be legitimate questions. All post titles must include a question.

All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.



Rule 2- Your question subject cannot be illegal or NSFW material.

Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.



Rule 3- Do not seek mental, medical and professional help here.

Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.



Rule 4- No self promotion or upvote-farming of any kind.

That's it.



Rule 5- No baiting or sealioning or promoting an agenda.

Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.



Rule 6- Regarding META posts and joke questions.

Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.

On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.

If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.



Rule 7- You can't intentionally annoy, mock, or harass other members.

If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.

Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.



Rule 8- All comments should try to stay relevant to their parent content.



Rule 9- Reposts from other platforms are not allowed.

Let everyone have their own content.



Rule 10- Majority of bots aren't allowed to participate here. This includes using AI responses and summaries.



Credits

Our breathtaking icon was bestowed upon us by @Cevilia!

The greatest banner of all time: by @TheOneWithTheHair!

founded 3 years ago
MODERATORS
 

I know some games will actually release modding tools, but if I had to guess I would think those are the exception, not the rule.

Thanks in advance!

you are viewing a single comment's thread
view the rest of the comments
[–] Nemo@slrpnk.net 47 points 2 days ago (2 children)

Sometimes they reverse engineer enough of the code to modify it.

Or sometimes they leave the code alone and just modify data files.

But often, even without tools, there's a modding API that tells would-be modders how to interact with the game as a black box.

[–] CallMeButtLove@lemmy.world 9 points 2 days ago (1 children)

Oh interesting, I never knew about modding APIs. I have almost 1,000 hours in Kerbal Space Program, all modded. But I just assumed it was so moddable because people are really familiar with Unity.

[–] cecilkorik@lemmy.ca 13 points 2 days ago

Yes, that's a big part of it. Unity-based games generally follow most if not all of the framework that Unity defines, and since Unity itself is very well understood mechanically, that makes it very easy to find the right places to inject mods directly in between the game itself and the Unity DLLs that the game calls to act as a middleman or even completely replace the functionality that one side or the other would otherwise be implementing, and with that you can either create a mod on your own, or create a reusable modding API/framework for other mods to connect to. It's not quite as straightforward as modding a game that is intentionally designed to be moddable, but in general, it's pretty trivial once the basic setup work has been done and it's almost the same for almost any Unity-based game so it's not hard work to repeat on new Unity-based games either.

[–] schipelblorp@sh.itjust.works 4 points 2 days ago (3 children)

Sometimes they reverse engineer enough of the code to modify it.

I guess this is the real question. What is this process exactly? I always imagined it was looking at what variables were in memory, manipulating them to see what changes, making an educated guess as to what the variable represents, and then creating a seperate EXE to constantly monitor and manipulate those values.... but this might be my fanciful imagination, but it would at least explain why so many anti-viruses HATE mods.

[–] TheKracken@lemmy.world 12 points 2 days ago (1 children)

All software breaks down to assembly so you can reverse engineer it. What's lost is function names, variables etc. https://github.com/mytechnotalent/Reverse-Engineering

[–] cecilkorik@lemmy.ca 6 points 2 days ago

That's possible in some cases but pretty rare realistically. DLL mods are much more common. Windows (and most operating systems) have the concept of what they call dynamic link libraries (DLLs) which are basically modules of reusable code that a program (like a game) can use. Now these are not the same as game mods, but its their inherent modularity that makes them useful for game mods. It's also a big part of what triggers anti-viruses, as this is also a very virus-like behavior.

The trick is, anyone can trivially look at any DLL and see what functions are in it, and you can easily trick the game into calling a different version of any DLL file you provide, and the game won't realize there's anything different about it, it's just expecting the same function names to be there but it doesn't know if they'll do anything different than it expects (this is often how viruses work too). There are many common well-known DLLs like Unity or DirectX or SDL that a game will often be connected to and calling into constantly in a very deep and profound way and this provides a great starting point for a modder to gain access to the game logic. Once you have identified a DLL like this for a particular game, you can replace that with your own DLL that either has the same functions, or (more practically) simply stands in front of the real DLL and hands all the functions directly to the real DLL as soon as they are called while also providing a branching point where modding code can start to develop.

Once you have direct access into the code paths that the game is calling, you can run your own code instead of, or in addition to, the real code it is calling, and from there it's pretty much open season for modding. Once you're changing or replacing the running game code in any form, that's a mod. And usually the first layer that gets built at the DLL level is not a mod itself but rather a mod loader that instead of making any significant changes on its own, it's only job is to intercept as much of the game's logic as it can, then load other mods/DLLs to activate each one and pass control to them when needed or requested. This way, you don't need every individual modder to be able to figure out the exact places to do all this DLL interception which would almost certainly conflict with each other since everyone would do it in a slightly different way and in different places. Instead modders can just follow the documentation of the initial mod loader/framework and have access to everything in the game that the mod loader is already intercepting for them.

This is what's involved in making a game moddable. Sometimes developers do this work themselves, designing these access points into the game itself and provide their own mod loader and modding API. Obviously this saves a lot of work on the part of the modding community, but either option leads to pretty much the same place. These are what we sometimes call "code mods" or "core mods".

There are also games where some or most of the game logic and graphics functions are modularized into datafiles. In this case, you don't even necessarily need code mods for many things, depending on how much has been modularized into data, and how easy to acess that data is (often defined in text, XML, json, or other easily modified formats). You can also have mods that are just "data mods" where no game code is even changed at all, only the data files like swapping a 3d Model for a different model, or changing a texture to look different, changing the stats of an enemy or a weapon, or even adding content and whole new levels or areas purely with game data, and completely reusing and building on top of the existing code without modifying it.

Code mods and data mods like this are by far the most common modes of modding games today, but which methods exactly depends on the game and what is most suitable for it. Memory-access mods like you're describing are typically the most challenging to develop, the most fragile to maintain, and usually the hardest to detect, which makes them most suitable for cheating but rarely suitable for genuine modding. Trainers, cheat engines, aimbots, overlays and other automations often take advantage of memory access, and likewise tend to flag on anti-viruses and anti-cheats for obvious reasons. It's definitely possible to use them for legitimate modding but it is uncommon.

[–] exist@sopuli.xyz 5 points 2 days ago* (last edited 2 days ago)

Basically yes, you find which values in memory are changing when you do actions ingame, and you can also figure out which functions run etc. Then you can for example replace the function call with your own function. I can't do this myself and it is very time consuming, you can watch tutorials on IDA or Ghidra to get a gist.

To be more exact, usually games additional dlls, and they will first try to load ones from the same folder as the exe, so you can modify or add a dll and whrn the game calls it make the modifications you need. So no need for a secondary process that monitors the game, but it is kind of hacking the game.

But often it is not that hard, c# or java dont get compiled into machine code and usually keep more metadata about the code, sometimes basically the original source code. Unity, Godot and UE all have some level of support (or reverse engined knowledge) for modding even if the game iteelf doesnt explicitly care about it. Of course it is much easier is the game is made with modding in mind though.