From Brotato Wiki
(Text: add lots of info on bbcode) |
(expand colors, add a bit more info to Image Icons section) |
||
Line 129: | Line 129: | ||
== DebugService == | == DebugService == | ||
You can use DebugService to | You can use DebugService to edit your items, weapons, starting materials, and much more: | ||
{| class="wikitable" | {| class="wikitable" | ||
!Option | !Option | ||
Line 171: | Line 171: | ||
|bool | |bool | ||
|<code>false</code> | |<code>false</code> | ||
|Waves only last 1 second | |Waves only last 1 second | ||
|Great for testing shops | |Great for testing shops | ||
|- | |- | ||
Line 186: | Line 186: | ||
|Can go over your character's weapon limit | |Can go over your character's weapon limit | ||
|- | |- | ||
|unlock_all_chars | | unlock_all_chars | ||
|bool | |bool | ||
|<code>false</code> | |<code>false</code> | ||
Line 208: | Line 208: | ||
|<code>false</code> | |<code>false</code> | ||
|Removes all weapons | |Removes all weapons | ||
|Triggers at the start of each wave | |Triggers at the start of each wave | ||
|} | |} | ||
''Note: [[Mod:DebugLoader|DebugLoader]] lets you edit these settings via JSON, which can be useful for testing outside of the Godot editor.'' | ''Note: [[Mod:DebugLoader|DebugLoader]] lets you edit these settings via JSON, which can be useful for testing outside of the Godot editor.'' | ||
Line 216: | Line 216: | ||
See [[Modding Effects]] for a list of all the effects available in vanilla. | See [[Modding Effects]] for a list of all the effects available in vanilla. | ||
==Text (BBCode) == | ==Text (BBCode)== | ||
You can use some BBCode in your item descriptions. View the available options in the [https://docs.godotengine.org/en/stable/tutorials/ui/bbcode_in_richtextlabel.html Godot docs]. | You can use some BBCode in your item descriptions. View the available options in the [https://docs.godotengine.org/en/stable/tutorials/ui/bbcode_in_richtextlabel.html Godot docs]. | ||
===Related Files=== | === Related Files=== | ||
These files are related to text, and mostly apply colors: | These files are related to text, and mostly apply colors: | ||
Line 235: | Line 235: | ||
!Color | !Color | ||
!Example | !Example | ||
!Notes | |||
|- | |- | ||
|<code>[color=#00ff00]TEXT[/color]</code> | |<code>[color=#00ff00]TEXT[/color]</code> | ||
|Green | |Green | ||
|{{Color|color=green|text=TEXT}} | |{{Color|color=green|text=TEXT}} | ||
| | |||
|- | |- | ||
|<code>[color=red]TEXT[/color]</code> | |<code>[color=red]TEXT[/color]</code> | ||
|Red | |Red | ||
|{{Color|color=red|text=TEXT}} | |{{Color|color=red|text=TEXT}} | ||
| | |||
|- | |- | ||
|<code>[color=white]TEXT[/color]</code> | |<code>[color=white]TEXT[/color]</code> | ||
|White | |White | ||
|TEXT | |<span color="white">TEXT</span> | ||
| | |||
|- | |||
|<code>[color=#555555]TEXT[/color]</code> | |||
|Grey | |||
|<span style="color: #555555">TEXT</span> | |||
| | |||
|- | |||
| <code>[color=#76FF76]TEXT[/color]</code> | |||
|Materials | |||
|<span style="color: #76FF76">TEXT</span> | |||
|Actually <code>rgb(118,255,118)</code> | |||
|- | |||
|<code>[color=#EAE2B0]TEXT[/color]</code> | |||
|Secondary | |||
|{{Color|color=cream|text=TEXT}} | |||
|Actually <code>rgb(234,226,176)</code> | |||
|- | |||
|<code>[color=#C8C8C8]TEXT[/color]</code> | |||
|Tier 1 | |||
|{{Color|tier1|TEXT}} | |||
|Actually <code>rgb(200,200,200)</code> | |||
|- | |||
|<code>[color=#4A9BD1]TEXT[/color]</code> | |||
|Tier 2 | |||
|{{Color|tier2|TEXT}} | |||
|Actually <code>rgb(74,155,209)</code> | |||
|- | |||
|<code>[color=#AD5AFF]TEXT[/color]</code> | |||
|Tier 3 | |||
|{{Color|tier3|TEXT}} | |||
|Actually <code>rgb(173,90,255)</code> | |||
|- | |||
|<code>[color=#FF3B3B]TEXT[/color]</code> | |||
|Tier 4 | |||
|{{Color|tier4|TEXT}} | |||
|Actually <code>rgb(255,59,59)</code> | |||
|} | |} | ||
===Image Icons=== | ===Image Icons=== | ||
You can add an image with the code <code>[img=20x20]res://path_to_image/file.png[/img]</code>. | You can add an image with the code <code><small>[img=20x20]res://path_to_image/file.png[/img]</small></code>. | ||
* The size 20x20 applies to the default font size (100%). | |||
** At the minimum font size of 80%, the image size is 16x16. | |||
** At the maximum of 125%, the image size is 25x25. | |||
* If you want to show scaled stat icons, you can use <code><small>Utils.get_scaling_stat_text(stat_name)</small></code> ''(see {{Color|color=cream|text=singletons/utils.gd}}).'' | |||
** The code in this func also shows how to get a scaled size for a custom image (<code><small>var w = 20 * ProgressData.settings.font_size</small></code>) | |||
Here's the code for showing stat icons, when the Font Size option is set to its default 100%: | |||
{| class="wikitable mw-collapsible mw-collapsed" | {| class="wikitable mw-collapsible mw-collapsed" | ||
|+BBCode for stat icons | |+BBCode for stat icons | ||
! colspan="1" rowspan="1" |BBCode | ! colspan="1" rowspan="1" |BBCode | ||
! colspan="1" rowspan="1" |Icon | ! colspan="1" rowspan="1" |Icon | ||
! colspan="1" rowspan="1" |Stat Name | ! colspan="1" rowspan="1" |Stat Name | ||
|- | |- | ||
|<code>[img=20x20]res://items/stats/max_hp.png[/img]</code> | |<code>[img=20x20]res://items/stats/max_hp.png[/img]</code> | ||
Line 297: | Line 341: | ||
|[[Crit Chance]] | |[[Crit Chance]] | ||
|- | |- | ||
|<code>[img=20x20]res://items/stats/engineering.png[/img]</code> | | <code>[img=20x20]res://items/stats/engineering.png[/img]</code> | ||
|{{StatIcon|Engineering}} | |{{StatIcon|Engineering}} | ||
|[[Engineering]] | |[[Engineering]] | ||
Line 307: | Line 351: | ||
|<code>[img=20x20]res://items/stats/armor.png[/img]</code> | |<code>[img=20x20]res://items/stats/armor.png[/img]</code> | ||
|{{StatIcon|Armor}} | |{{StatIcon|Armor}} | ||
|[[Armor]] | |[[Armor]] | ||
|- | |- | ||
|<code>[img=20x20]res://items/stats/dodge.png[/img]</code> | |<code>[img=20x20]res://items/stats/dodge.png[/img]</code> | ||
Line 322: | Line 366: | ||
|- | |- | ||
|<code>[img=20x20]res://items/stats/harvesting.png[/img]</code> | |<code>[img=20x20]res://items/stats/harvesting.png[/img]</code> | ||
|{{StatIcon|Harvesting}} | | {{StatIcon|Harvesting}} | ||
|[[Harvesting]] | |[[Harvesting]] | ||
|} | |} | ||
=== Misc === | ===Misc=== | ||
For line breaks, use <code>"\n"</code>. | For line breaks, use <code>"\n"</code>. | ||
Line 333: | Line 377: | ||
==Translations== | ==Translations== | ||
Here's a mini guide for using translations. It was published on [https://discord.com/channels/630060181086142487/999568046052098109/1000910462986227814 Discord] by ''Aequitas''. | Here's a mini guide for using translations. It was published on [https://discord.com/channels/630060181086142487/999568046052098109/1000910462986227814 Discord] by ''Aequitas''. | ||
#Create your CSV translation file | #Create your CSV translation file | ||
#Drag it into your project's file system | #Drag it into your project's file system | ||
#Select the Import tab ([[:File:Guide-Translations 2.png|screenshot here]]) and click ''reimport'' -- the ''.en.translation'' files should be created | #Select the Import tab ([[:File:Guide-Translations 2.png|screenshot here]]) and click ''reimport'' -- the ''.en.translation'' files should be created | ||
#Go to Project > Project Settings > Localization (tab) | # Go to Project > Project Settings > Localization (tab) | ||
#Click add, and add your ''custom.en.translation'' file | # Click add, and add your ''custom.en.translation'' file | ||
Here's how your CSV should look: | Here's how your CSV should look: | ||
Revision as of 20:47, 27 December 2022
This page has notes that modders may find useful.
Apps
Decompile
To decompile Brotato for modding, use GDRETools, which can be downloaded here.
Godot
You'll need to download Godot to edit the decompiled project. Jonus has an excellent video here that covers the basics of modding, and will show you how to customise weapons and characters, and change item appearances. You can also read the documentation for Godot here.
Steam Errors
The standard version of Godot will have lots of errors related to the Steam API when you try to run it via Godot, due to it lacking inbuilt support for Steam's SDK. Instead, you can use an alternate version of Godot that has been compiled to include Steam support, called GodotSteam. Make sure you read GodotSteam's docs on exporting, because there are some limitations and caveats (eg. you can't use the "Export with Debug" option, and you need to set up your export templates manually).
Balancing
When balancing new items, the vanilla Items list is a great point of reference for their costs and effect strength. Sorting by tier can also be very helpful, as it shows where there might be gaps in vanilla's base items.
Characters with Negative Stats
If you're creating an effect that converts one negative stat to a different positive one, keep in mind that many Characters start with huge decreases to certain stats.
The vanilla items that use this effect are: Esty's Couch (-Speed), and Retromation's Hoodie (-Dodge).
Character | Negative Stats | Value |
---|---|---|
Brawler | Range | -50 |
Ranged Damage | -50 | |
Crazy | Dodge | -30% |
Mage | Ranged Damage | -100 |
Melee Damage | -100 | |
Engineering | -50 | |
Chunky | Life Steal | -100 |
Lucky | Attack Speed | -60% |
Mutant | Items Price | -50% |
Loud | Harvesting | -95% (-3 per wave) |
Pacifist | Damage | -100% |
Engineering | -100 | |
Saver | Items Price | -50% |
Sick | HP Regeneration | -100 |
Ghost | Armor | -100 |
Speedy | Armor while standing still | -100 |
Doctor | Attack Speed | -100% |
Artificer | Damage | -100% |
Masochist | Damage | -100% |
Item Costs
Item costs for each tier in vanilla are as follows:
Tier | Min | Max |
---|---|---|
Tier 1 | 8 | 30 |
Tier 2 | 35 | 65 |
Tier 3 | 55 | 95 |
Tier 4 | 80 | 120 |
DebugService
You can use DebugService to edit your items, weapons, starting materials, and much more:
Option | Type | Default | Effect | Notes |
---|---|---|---|---|
debug_weapons | array | []
|
Weapons to add at the start of each wave. | Unlike debug_items, these weapons are always added. Great for testing tier stacking.
Not helpful if you only want 1 instance of the weapon though. |
debug_items | array | []
|
Items to add once, at the start of the next wave. | Can add multiple of the same item |
starting_wave | int | 1
|
Sets initial wave. Supports 1 - 21
|
|
starting_gold | int | 30
|
Sets initial materials | |
invulnerable | bool | false
|
Disables your hurtbox | Prevents things like Bull's effect from triggering |
instant_waves | bool | false
|
Waves only last 1 second | Great for testing shops |
add_all_items | bool | false
|
Adds every item to your character | Can be combined with debug_items to stack them |
add_all_weapons | bool | false
|
Adds every weapon | Can go over your character's weapon limit |
unlock_all_chars | bool | false
|
Unlocks all characters | Temporary |
unlock_all_challenges | bool | false
|
Unlocks all challenges | Permanent |
unlock_all_difficulties | bool | false
|
Unlocks all danger levels | Temporary |
no_weapons | bool | false
|
Removes all weapons | Triggers at the start of each wave |
Note: DebugLoader lets you edit these settings via JSON, which can be useful for testing outside of the Godot editor.
Effects
See Modding Effects for a list of all the effects available in vanilla.
Text (BBCode)
You can use some BBCode in your item descriptions. View the available options in the Godot docs.
Related Files
These files are related to text, and mostly apply colors:
- singletons/text.gd
- weapons/weapon_stats/weapon_stats.gd
- In this file,
col_pos_a
means "color positive, part A", with part B being the closing[/color]
- In this file,
- singletons/utils.gd
- This file also sets the icon size (see Image Icons below)
- ui/menus/shop/item_description.gd
- Sets weapon and item descriptions. It's a good place to start if you're looking for the code that handles them.
Color Options
Code | Color | Example | Notes |
---|---|---|---|
[color=#00ff00]TEXT[/color]
|
Green | TEXT | |
[color=red]TEXT[/color]
|
Red | TEXT | |
[color=white]TEXT[/color]
|
White | TEXT | |
[color=#555555]TEXT[/color]
|
Grey | TEXT | |
[color=#76FF76]TEXT[/color]
|
Materials | TEXT | Actually rgb(118,255,118)
|
[color=#EAE2B0]TEXT[/color]
|
Secondary | TEXT | Actually rgb(234,226,176)
|
[color=#C8C8C8]TEXT[/color]
|
Tier 1 | TEXT | Actually rgb(200,200,200)
|
[color=#4A9BD1]TEXT[/color]
|
Tier 2 | TEXT | Actually rgb(74,155,209)
|
[color=#AD5AFF]TEXT[/color]
|
Tier 3 | TEXT | Actually rgb(173,90,255)
|
[color=#FF3B3B]TEXT[/color]
|
Tier 4 | TEXT | Actually rgb(255,59,59)
|
Image Icons
You can add an image with the code [img=20x20]res://path_to_image/file.png[/img]
.
- The size 20x20 applies to the default font size (100%).
- At the minimum font size of 80%, the image size is 16x16.
- At the maximum of 125%, the image size is 25x25.
- If you want to show scaled stat icons, you can use
Utils.get_scaling_stat_text(stat_name)
(see singletons/utils.gd).- The code in this func also shows how to get a scaled size for a custom image (
var w = 20 * ProgressData.settings.font_size
)
- The code in this func also shows how to get a scaled size for a custom image (
Here's the code for showing stat icons, when the Font Size option is set to its default 100%:
BBCode | Icon | Stat Name |
---|---|---|
[img=20x20]res://items/stats/max_hp.png[/img]
|
Max HP | |
[img=20x20]res://items/stats/hp_regeneration.png[/img]
|
HP Regeneration | |
[img=20x20]res://items/stats/lifesteal.png[/img]
|
Life Steal | |
[img=20x20]res://items/stats/percent_damage.png[/img]
|
Damage | |
[img=20x20]res://items/stats/melee_damage.png[/img]
|
Melee Damage | |
[img=20x20]res://items/stats/ranged_damage.png[/img]
|
Ranged Damage | |
[img=20x20]res://items/stats/elemental_damage.png[/img]
|
Elemental Damage | |
[img=20x20]res://items/stats/attack_speed.png[/img]
|
Attack Speed | |
[img=20x20]res://items/stats/crit_chance.png[/img]
|
Crit Chance | |
[img=20x20]res://items/stats/engineering.png[/img]
|
Engineering | |
[img=20x20]res://items/stats/range.png[/img]
|
Range | |
[img=20x20]res://items/stats/armor.png[/img]
|
Armor | |
[img=20x20]res://items/stats/dodge.png[/img]
|
Dodge | |
[img=20x20]res://items/stats/speed.png[/img]
|
Speed | |
[img=20x20]res://items/stats/luck.png[/img]
|
Luck | |
[img=20x20]res://items/stats/harvesting.png[/img]
|
Harvesting |
Misc
For line breaks, use "\n"
.
Limitations
Bold ([b]
) and italics ([i]
) don't work, because the vanilla game doesn't have support for them.
Translations
Here's a mini guide for using translations. It was published on Discord by Aequitas.
- Create your CSV translation file
- Drag it into your project's file system
- Select the Import tab (screenshot here) and click reimport -- the .en.translation files should be created
- Go to Project > Project Settings > Localization (tab)
- Click add, and add your custom.en.translation file
Here's how your CSV should look:
See the Godot Docs for more info.
Multi Mod
If you're building a mod, creating it to work with dami's Multi Mod might be worth considering. It lets you add your mod pack to any compatible mod (eg. Invasion/dami's Arsenal). It lets you create custom characters, weapons, and items, and release your mod as a small standalone file (usually <3mb).
The only caveat is that you can't touch vanilla code, and can't currently add new weapon classes or challenges.
Weapon Cooldowns
Calculating the displayed cooldown text is tricky. The formula for Ranged weapons is easy to calculate, but the Melee formula is complex and takes many things into consideration. For this reason, Darkly77 made an cooldown text calculator, here:
GitHub
There's a GitHub organisation for Brotato repos here. It is maintained by Darkly77, KANA, and dami, who are all active on the Space Potatoes Discord.
It's not recommended to host a full Brotato project on GitHub, because you'd be making all of Brotato's source code public. But you can host just your modded files (eg Darkly77's Invasion), or even just host the downloads for your mod (eg. KANA's mod releases)
Hosting your downloads on GitHub has a few advantages:
- You can create versioned README and CHANGELOG files to track your mod's changes.
- You can create separate releases, which track the release date.
- You can view download stats with this tool.
Modding [T] | |
---|---|
Wiki | Modding • Notes • Effects • Vanilla Items |
Godot | Download • Docs • GDRETools • GodotSteam • Jonus' Tutorial |
Misc | BrotatoMods • Cooldown Calculator |