Thoughts on Modding

Hello friends!

I am working on a game and would love to implement modding. However, this is an extremely complex topic. I think it would be cool to start a discussion on it, perhaps get some viewpoints. Here are my thoughts on the topic. Note my type of game is sort of like Elder Scrolls, so a single world and such.

Modding via Custom Scripting
One way to get modding working would be to have a sort of custom scripting language, loadable from file. For example, there is the Jurassic Javascript Runtime Interpreter. However, this means any moddable feature would need to be implemented into the interpreter. I am currently looking into a way to actually make this automatic! (Aka having an attribute over classes, functions, and variables that are accessable to the javascript engine).

What this would allow is when the game loads, being able to modify different values - for example, being able to modify scriptable objects would make anything instantiated from them modified as well. (I believe). This of course would require a lookup table for all modifiable objects, but that’s totally doable. (Already have this)

This mixed with a system like my parameter override system could allow for some more interesting systems as well. Also, assuming your game has a save system, one could imagine sorta highjacking that to make custom content.

Modding Unity Scenes
This one is a toughy. Like, very hard to imagine. Since modding scenes would mean editing in Unity, that would mean one would need both Unity as well as all of the meshes / components. Oof. Of course one way to fix this is to not use Unity’s Scene editor / file type at all, and instead just make your own. This however greatly weakens Unity’s greatest strength, and I personally am way too much into the project to consider this.

Modding using an Addon
There are addons such as UMod, however these are pretty simple: it doesn’t look like it supports editing of already existing scenes (Something I need to be able to do). However it looks like an amazing start, since it really embraces the idea of modding in the editor.

Modding Daggerfall Unity Style
If you haven’t heard of it, Daggerfall Unity is an AMAZING project that seeks to recreate the game Daggerfall from ā€œscratchā€ using Unity. How it does this is it actually reads the original daggerfall’s data, and creates the world from that. The result of this has actually meant making mods is incredibly easy to support (compared to most games at least): since all assets are automatically generated by reading data, it is then possible to create one’s own data for the system to read instead. It’s AWESOME.

Modding Bethesda Style
Bethesda’s creation engine was very clearly designed for modding in mind, and it is incredible. In basic terms, from what I gather, pretty much all data is in nice datables. This makes it super easy to look at data, from stat values to animation values, as well as saving (just save any values that have been modded), and of course, modding (Just override values that have been modified). This also allows for super easy stacking of mods as well. It isn’t perfect, (lists override lists, so a leveled item list mod will completely override another leveled item list mod) but it is for sure the best system I’ve seen involving modding. It makes nearly EVERYTHING accessible, especially due to the custom script engine (which is basically what I explained above)

Any thoughts? A lot of these ideas have been bouncing around in my head, I’m wondering if anyone else is trying to implement modding, or if you have any examples of games that have done it. Thanks!
Josh

Note - the ā€˜discussion’ of modding and how to implement it has been had multiple times. So if you want to have a generic discussion on the matter, you may want to start by searching for existing discussions on the topic.

Furthermore, if it’s to be more a discussion… I’d like to point out by starting out with the caveat of what your game is specifically readjusts the topic back towards being in the context of what you need… not as an open discussion.

Yes scripting environments can work. There are others like lua and even custom ones.

Scripting comes with downsides like speed issues. It also may or may not be allowed on some platforms.

You could also just directly load .net libraries into the assembly workspace (dll’s). Which will run faster. But then also come with issues like not running on any platform that uses AOT/il2cpp (mobile?).

Not sure what you’re asking or opening up here. This is a very broad topic, there’s a lot of places to start, what sort of discussion do you want to have on this?

Uhhh… ok, so here you uncover really your end goal is you want to be able to edit scenes. OK… we could have opened the conversation with this. Clearly this isn’t an open discussion about modding, but rather you want to discuss how to specifically allow modding scenes for your specific game.

I will point out such 3rd party options come with the caveat that if it allows something you want to block… then you need to either patch out that feature set.

Just like if you want it to do things it can’t, you have to patch them in.

Well, if you’re making a Daggerfall clone that works great then.

Otherwise well… you can define your own standard/format.

Well, this sounds like an even more robust version of the daggerfall style. And again could be accomplished by defining your own standard/format.

…

I’m failing to understand what your question is.

It sounds to me like you want a way to create a data container for scene creation, a scripting engine, and what not.

OK?

Are you looking for an existing one? Well you found UMod… have you searched for others?

Are you asking if you should build one? Sure, that’ll ensure that it meets your requirements… as well ensure that it restricts players from modding in a manner you don’t want them.

…

I will point out… a robust modding system that does all this isn’t exactly simple to design.

What you should probably start with is sit down and write up your requirements.

Scene editing? - ok, what sort of scene editing? Do they get FULL access? They can insert any and all art assets they’d like? They can create a whole new world? All that remains is the basic gameplay mechanics of your game? Or do they get to pick from just art assets you’ve made available?

Scripting? - what can they do with scripting? Can they alter game mechanics? What limitations do you want to put on them? Should they not be able to break your game?

If you want to have a discussion about what you want for your game.

OK…

What do you need?

Lets get more specific than ā€œscripting & scene editingā€.

I guess I mostly wanted to get other people’s stories, to see how they’ve done it, or if they know how other games have done it… I guess I should have written this in the general forum instead of script, my apologies

Daggerfall Unity? oh, I am so there… one of my first bosses Chris Greene (awesome lovely smart person) did the weather effects in Arena… and some other stuff in Daggerfall

1 Like

Woah, that’s awesome!