As Kromster says, supporting mods requires adopting a data-driven method to your sport programming. Basically, you need (elements of) your sport to depend upon exterior recordsdata for loading sure sport knowledge, relatively than embedding such knowledge in your sport binary.
Such recordsdata must be straightforward to entry and edit, permitting anybody to learn their content material, change it (manually or by way of instruments) and see their impact in-game. The info I am speaking about is any little bit of your sport that:
- Yields fascinating outcomes when its properties change:
- Character well being, assault, or motion velocity.
- Object location, effectiveness, availability, and attributes.
- Gravity, friction, mass, and so forth.
- Lends itself to creativity and expression:
- Character customisation.
- Degree enhancing.
- In-game scripting.
In accordance with the modding tag description:
[Modding] can typically be carried out with SDKs or different instruments supplied by the developer.
As a developer, you have to be the primary to learn from this: gamers mod your sport with the identical instruments you already built-in into your workflow, equivalent to a degree editor or a sport pores and skin generator. Aside from documenting the usage of these instruments, the supply of precise tutorials, guides and pattern initiatives is tremendously appreciated in each neighborhood.
These instruments could also be difficult to make within the first place; you create them as a result of they make your improvement cycle simpler, not tougher. When authoring a brand new degree, it is at all times good to inform your editor the place to export the ultimate file, relatively than must browse to that folder manually each time! Then, you could wish to launch them to the general public and have gamers create their very own content material and cargo it in-game.
Godot helps UGC, sport mods and patches within the type of PCK recordsdata. The thought is that your sport scans for extra recordsdata to load at runtime, and masses and saves sport settings by assuming they are often modified exterior of execution. Alternatively, one can inject user-generated content material into your sport utilizing the Godot Common Mod Supervisor, provided that your sport supplies help to this workflow and also you doc the method correctly.
Your sport and SDKs must be strong sufficient to cope with errors and malformed/lacking recordsdata whereas additionally being informative in the direction of the customers: human-readable messages equivalent to “Degree is lacking spawn level” or “Mods folder is empty” are far more helpful than a plain stack hint to non-programmers.