Archived

This topic is now archived and is closed to further replies.

Mods?

This topic is 5577 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 =).

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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 ]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites