I can understand that if you obtain the source code for a game (for example, if you cloned it from GitHub), then you could edit the code yourself, and have a working copy of the original game with your edits incorporated (a 'mod').

But I'm not sure how mods can exist for games whose code isn't publicly available. How is it possible?

  • 1
    \$\begingroup\$ Thanks a lot for the comments/help. Actually, I wouldn't know where to begin making a mod, and I won't be doing it any time soon. I just relate it back to coding that I know bits about (web, data science), and I cannot envisage how people make mods without already having the source code. (on youtube I've seen mods which I'm 99% sure wouldn't have publicly available source code, so I just wonder how they do that, because that would not be possible with many other forms of software) \$\endgroup\$
    – stevec
    Commented Mar 17, 2022 at 14:03
  • 2
    \$\begingroup\$ I've turned this into a Community Wiki because it's not a "perfect fit" for our model, as it's quite broad and I don't think one answer by one user could cover all the aspects of the question, but it could prove interesting for other visitors, and the answer can be easily expanded. \$\endgroup\$
    – Vaillancourt
    Commented Mar 17, 2022 at 16:43
  • 1
    \$\begingroup\$ For what it's worth, early id Software games were "moddable" long before they released the source code. The data were simply zip files with structured content, where users could just create their own content and drop it in the game data folder. \$\endgroup\$
    – Vaillancourt
    Commented Mar 17, 2022 at 16:47
  • \$\begingroup\$ @Vaillancourt thanks very much. That was a great idea. \$\endgroup\$
    – stevec
    Commented Mar 17, 2022 at 22:40

1 Answer 1


This question/answer is designed to be a community effort. Feel free to improve some aspects of it.

How a game can be modded when the source code is not available is a really broad topic.

It will depend on a lot of factors, including the type of modification you want to make to the game, and how the game is built.

What type of mod are you looking for? Different kinds of mods have different implementations.

  • A simple reskinning?
  • New level, enemy behaviour?
  • Quality of life improvements?

Some games are made in such a way that modding can be done by:

  • adding/swapping data/asset files or plaintext scripts without affecting compiled code
  • decompiling the game and reverse engineering pars of it, then recompiling your own modified version
  • allowing separate programs to modify the runtime behaviour of the original unaltered code, eg. via DLL injection, network packet sniffing, or manipulating the game's internal data states in RAM

Further resources:

  • 1
    \$\begingroup\$ Example: I remember some of the older games having no human-readable files, except for 1 .ini. That file contained all the modifiers of the game. Modifying that file in Notepad was already a modification, a mod. Most mods available touched that file as well, only some of the purely visual modifications wouldn't. \$\endgroup\$
    – Mast
    Commented Mar 17, 2022 at 22:13
  • 1
    \$\begingroup\$ @Mast I recall the same for Red Alert 2. Do you think the .ini file was to allow a degree of modding? \$\endgroup\$
    – stevec
    Commented Mar 17, 2022 at 22:39
  • 3
    \$\begingroup\$ @stevec: It most likely was used as a means of internal playtesting modifications - instead of recompiling the source code every time you make a change, you can close the program, make a change in Notepad, save it, and re-launch the game - with the new values being used immediately. \$\endgroup\$ Commented Mar 17, 2022 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .