Mods?

Started by
5 comments, last by DarkHamster 21 years, 7 months ago
I was wondering how exactly mods work -- namely ones that are total conversion. Do you simply release most of the sourcecode and allow the user to rewrite the class derived off the base engine class (the engine specific to your game), or is their something I''m missing here? I ask because I am looking into the possibility of supporting mods for my game =).


"There is no dark side of the moon really,
As a matter of fact, its all dark."
Advertisement
Other members, feel free to correct me if I''m wrong, but the way I understand it is that you separate your game into two parts -- the engine and the "default mod". The engine has a well defined API and the rest of your game simply connects to your engine using this API. The only reason it''s not just a "mod" is that it''s the default using some special code in the engine to recognize that "default" mod and just load it at startup.

To make it moddable after that, all you do is release the API. It''s not really your source code, it''s just parts of the header files.

Total versus partial is just how much of the API that your game uses that you release to the public.(Usually, total means that you can change the models, skins, menus, scripts, and maps)
---New infokeeps brain running;must gas up!
It really all depends on the individual game. Some do it through scripting languages, some do it through allowing DLLs to be replaced, some do it by giving you the source and allowing you to change it directly, some might just provide property lists inside the game, and so on.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
Thanks. In my case what Flarelocke said applies more -- I want the player to be able to modify almost everything about the game, not just maps or models.


"There is no dark side of the moon really,
As a matter of fact, its all dark."
All my methods apply in that case too. Unreal derivatives can be almost entirely scripted, for example.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
Half-life, the most modded game ever, uses the replacable DLL method, plus some nifty code that will find the DLL''s so you don''t actually have to replace them on the hard-drive.(that''s not really what replacement means, but oh well)

Starcraft isn''t technically moddable, but the trigger system they use in their maps is very powerful, just short of scriptability. If they allowed embedding sprites and/or background and menu images into maps like they did sound files, it would have been essentially moddable.(come to think of it, they''d have to allow some way to replace the default campaign with a different one, but there''re hacks to do this) So you can see, neither makes a big difference. (and it would have been so cool to have a different mod for every map)



I''d probably use Half-life''s method, if I were l33t enough to write the code to do so, just because it seems to be the easiest. Writing a scripting language or even integrating Python would be way too much work.

Well, actually, I''d just give away the source code, because I wouldn''t be doing anything worthwhile anyway, but that''s probably not a good POV to espouse.
---New infokeeps brain running;must gas up!
I wrote an article on this somewhere in the GDNet Articles section

Skinnability is also a form of moddability. Simple replacement graphics and sounds...

Superpig
- saving pigs from untimely fates
- sleeps in a ham-mock at www.thebinaryrefinery.cjb.net

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement