!!
This repo has been deprecated. It is succeeded by ContentLoader, which is a re-working of this script to work with ModLoader.
!!
Created by dami. Makes it possible to play with multiple mods. The file needs to be added by a mod creator.
View the original thread on Discord here. It starts here.
To play with compatible mods, download the PCK, rename it to Brotato.pck and place it in your game folder. Then add a mods folder in your game folder and place all compatible mods in there (they should be .zip or .pck). You can launch Brotato and play with the mods.
First off, if you're new to brotato modding I strongly encourage you to check Jonuses video.
It's also worth downloading dami's example weapons to see how they're set up (download them here).
- Add a folder called mods to your project.
- Add mod_service.gd & mod_data.gd to that mods folder.
- Set mod_service.gd to autoload:
- Project > Project Settings > Autoload
- Click the folder icon at the top to choose the file
- Select mod_service.gd
- Leave the name as ModService
- Click the "Add" button on the right
- If you're adding DebugLoader too, make sure ModService is listed before it
Now you can export your project as PCK, as usual. Other modders will now be able to add their modded stuff via addon ZIPs, using the effects you've coded in the game.
To make a compatible mod, download the framework zip and place the mods folder inside it at the root of your existing project.
Follow the instructions above (adding the framework...) to autoload mod_service.
You can go ahead and mod some weapons, chars or items in.
when you're done, place all your modded stuff into the mods folder (I do recommend using subfolders). Then add a new ModData resource at the root of the mods folder (as a .tres file). Name it after your mod. Inside it, add all your modded weapons/items/chars data resources to the respective arrays (instead of putting them directly into the ItemService
arrays).
weapons_characters
is an array of arrays. It should contain, for each modded weapon, the list of characters that can start with it. It assigns them in the same order as the weapons array so it should have the same length.
For example, if your weapons
array looks like this:
weapons[0] = wpn_tier1_data.tres
weapons[1] = wpn_tier2_data.tres
Then weapons_characters
might look like this:
# Tier 1 (wpn_tier1_data)
weapons_characters[0] = [
res://items/characters/well_rounded/well_rounded_data.tres,
res://items/characters/brawler/brawler_data.tres,
]
# Tier 2 (wpn_tier2_data)
weapons_characters[1] = [
res://items/characters/knight/knight_data.tres,
]
Now you can pack your mod. I don't recommend exporting as PCK because the file will be quite large. Rather, copy your .import and mods folder somewhere else. Due to how godot does images and sounds, you'll need to include the files in .import that your mod uses. To know which ones to include, you should sort them by date in your explorer, and just delete the ones your mod doesn't use (most of the .import folder).
Zip these two folders together and name the .zip it after your mod. It's ready to be loaded along with other mods !!!
- dami's Arsenal - download individual weapons here
- Invasion - repo here, releases here
These mods have dami's script included, which means you can use any of the mod packs with them.
View the original thread on the Space Potatoes Discord here. It has a lot more information. The thread starts here.