-
Notifications
You must be signed in to change notification settings - Fork 0
Best Practices
Dome Keeper's source code varies from the GDScript Style Guide in a few significant ways:
- Non-virtual functions utilize camelCase (beginning with a lowercase letter) rather than snake_case. (Example:
unlockGadgetinstead ofunlock_gadget) - Some signals employ camelCase, others use snake_case. Make your choice based on the existing convention relevant to your case, or opt for snake_case if unsure. For all other aspects, refer to the GDScript Style Guide.
Upon decompiling the project, you have several options for developing your mods.
Symbolic links offer an easy way to manage the development and version control of multiple mods. You can create symbolic links to your mod's directory within your decompiled project directory. Windows users can utilize an easy-to-use shell extension to set up such links. Alternatively, you can use the command-line tool mklink.
An efficient setup includes:
- Creating a
mods-unpackedfolder outside your Godot project. - Generating a symbolic link for each mod you intend to work on within the
mods-unpackedfolder. - Linking this
mods-unpackedfolder to the Godot project.
Why opt for this setup?
- It allows for easy version control of each mod individually.
- You can test and work on mods effortlessly inside the Godot project.
- Adding or removing mods in development becomes much simpler.
- Updating the project with a new version doesn't necessitate reconfiguring the entire
mods-unpackedsetup.
Aim to extend scripts and resources before overwriting existing ones. Overwriting crucial scripts or the vanilla game code could hinder the functioning of other mods or even the base game if an update modifies the section your mod overwrites.
Scripts can easily extend functions and still invoke the original function using a super call:
extends "res://stages/level/LevelStage.gd"
func landDome():
super() # this calls the base class function
# do additional mod stuffFor scenes, "extending" the scene by adding new child nodes or hiding original nodes is a preferable strategy.
Some mod use cases may require their overrides upon initialization, for instance, for icons. Other elements may only be needed at specific times, like a new game mode.
If you wish to minimize the impact on the base game, only load your extensions and overrides when needed and unload them when not needed.
For mods with a few translations, managing the translations.csv file might suffice.
However, as a project expands, it's common to add more text and languages. Storing your translations in a spreadsheet—preferably in a cloud storage provider like Google Sheets—can simplify tracking and adding new translations. Most spreadsheet tools support exporting to CSV format.
The Mod Loader Dev Tool can do some of the heavy lifting for you. It is recommended you download it just for that small decrease in tedium. For a complete listing of features, head over to the Asset Lib.
- Open the AssetLib Tab in the Godot Editor
- Search for Mod Loader Dev Tool
- Click on Download
- Click on Install
- Go to Project -> Project Settings -> Plugins
- Check the Enable checkbox
- Go to the Mod Tool tab and start modding
Source: https://github.com/GodotModding/godot-mod-tool/tree/4.x

