From Brotato Wiki
Modding Effects (New Version, WIP)
The Modding Effects page is very out of date, and the data is scattered. On this page I'll try to update it all.
---
This page documents the various effects in the vanilla game. Modders can apply these effects to their custom content.
For more info on specific effects, please search the code for their keys, and view the code and .tres files for the listed items/characters/weapons.
---
Note: Despite the folder names, most of these effects can used by characters, weapons or items. They're only split into Global/Items/Weapons here to make it easier to find the associated files.
Global Effects
effect.gd
Location: res://items/global/effect.gd
The file that is used the most for applying effects. If you want to apply an effect, there's a very strong chance you'll do it with this file.
Here's an overview of what the various properties of effect.gd do. We'll use acid_effect_1.tres as a reference, which grants "+8 Max HP".
Property | Value for Acid | Description |
---|---|---|
Key | stat_max_hp | Has two uses:
|
Text Key | n/a | If an effect key is specified, it's retrieved from the translation file.
|
Value | 8 | Sets the strength of the effect.
For stats, this determines how much of a stat should be increased. The number can also be negative, which means a stat should be decreased. Sometimes the Value is used as a boolean, where 0 means FALSE/OFF/DISABLED, and 1 means TRUE/ON/ENABLED. Examples:
|
Custom Key | n/a | Custom Key can be used instead of Key, to determine a special effect.
This allows you to use the Key to specify, in most cases, the stat that the effect should act upon, while also using a custom effect. Example:
|
Storage Method | Sum | Determines how the value should be saved/applied:
|
Effect Sign | From Value | Determines how to get the sign ("+" or "-") of the value.
|
Custom Args | n/a | Allows you to determine the formatting of any and all args that this effect uses. See below for more details. |
custom_arg.gd
Location: res://items/global/custom_arg.gd
Not an effect file, but it used by many effects. Applied to the `custom_args` property, this allows you to format additional args.
For example, open estys_couch_effect_1.tres in Godot's Inspector. We know that this effect gives "+2 HP Regeneration for every -1% Speed you have.". The effect_sign is set to positive,
Item Effects
Stored in res://effects/items/*.gd
burn_chance_effect.gd | |
chance_stat_damage_effect.gd | |
class_bonus_effect.gd | |
convert_stat_effect.gd | |
gain_stat_for_every_stat_effect.gd | |
healing_effect.gd | |
item_exploding_effect.gd | |
projectile_effect.gd | |
stat_cap_effect.gd | |
stat_gains_modification_effect.gd | |
stat_with_max_effect.gd | |
structure_effect.gd | |
turret_effect.gd | |
weapon_bonus_effect.gd |
Weapon Effects
Stored in res://effects/weapons/*.gd
Filename | Info |
---|---|
burning_effect.gd | |
exploding_effect.gd | |
gain_stat_every_killed_enemies_effect.gd | |
null_effect.gd | |
projectiles_on_hit_effect.gd | |
slow_in_zone_effect.gd | |
weapon_stack_effect.gd |