From Brotato Wiki

< User:Darkly77

(Created page with "== Itembox == Testing a new template, intended for use on mod pages. PLEASE USE CTRL+F5 TO SEE THE NEW STYLES! <table> <tr> <td style="vertical-align: top; padding: 0 20px 20px 0;"> <!-- Circular Saw --> <div class="ibox rarity2 rounded"> <div class="ibox__top"> <div class="ibox__icon rounded"> 60x60px </div> <div class="ibox__top-right"> <div class="ibox__name colorrarity2">Circular Saw</div>...")
 
(headings)
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Itembox ==
[[Modding Effects]] (New Version, WIP)


Testing a new template, intended for use on mod pages.
The Modding Effects page is very out of date, and the data is scattered. On this page I'll try to update it all.


PLEASE USE CTRL+F5 TO SEE THE NEW STYLES!
---


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.


<table>
---
<tr>


<td style="vertical-align: top; padding: 0 20px 20px 0;">
''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.''
<!-- Circular Saw -->
<div class="ibox rarity2 rounded">
<div class="ibox__top">
<div class="ibox__icon rounded">
[[File:Circular_Saw.png|60x60px]]
</div>
<div class="ibox__top-right">
<div class="ibox__name colorrarity2">Circular Saw</div>
<div class="ibox__class">{{Color|cream|Medical}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|cream|Damage:}} 14 (50%{{StatIcon|Melee Damage}})
</li>
<li>
{{Color|cream|Critical:}} x2 (10% chance)
</li>
<li>
{{Color|cream|Cooldown:}} 0.5s
</li>
<li>
{{Color|cream|Knockback:}} 10
</li>
<li>
{{Color|cream|Range:}} 350 (Melee)
</li>
<li>
{{Color|cream|Piercing:}} 2 (-{{Color|green|20%}} damage)
</li>
<li>
{{Color|cream|Life Steal:}} {{Color|green|5%}}
</li>
</ul>
</div>
</div>
</td>


</tr>
==Global Effects==
</table>
==== effect.gd ====
Location:  {{Color|color=cream|text=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 {{Color|cream|acid_effect_1.tres}} as a reference, which grants "{{Color|green|+8}} Max HP".


{| class="wikitable"
!Property
!Value for Acid
!Description
|-
|Key
|stat_max_hp
| Has two uses:


* Most commonly, it specifies the target of the effect's behaviour: For example, if you're modifying a stat, the key is the stat (eg "stat_max_hp").
* The second use is to specify a custom effet key, with the effect ID being the key: For example, Crown uses the key "harvesting_growth".
|-
|Text Key
|<small>''n/a''</small>
|If an effect key is specified, it's retrieved from the translation file.


<table>
* For simple stat changes, you don't need to provide a Text Key. But for anything more complex than basic stat changes, you'll probably need one.
<tr>
* For example, Crown's Text Key is "effect_harvesting_growth".
* The translation string can include placeholders for args (arguments), which replace strings like "{0}", "{1}", etc.
* If you're making your own custom effect, you can specify what value these args should use with the method get_args in your effect file.
* To see how they're processed, view the "text" method in {{Color|cream|text=singletons/text.gd}}.
** This method basically reads the Text Key from the translations file, and works out where the arg replacements should be (ie. "{0}", "{1}", etc)
** Then replaces it them with the args provided.
|-
| 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:


<td style="vertical-align: top; padding: 0 20px 20px 0;">
* {{MiniIconbox|Alien Eyes}} = The value of 6 determines that 6 Alien Eyes should be shot.
<!-- Isaac's Tears -->
* {{MiniIconbox|Baby Elephant}} = The value of 25 is used to determine that the chance of Baby Elephant's effect is 25%.
<div class="ibox rarity1 rounded">
|-
<div class="ibox__top">
|Custom Key
<div class="ibox__icon rounded">
|<small>''n/a''</small>
[[File:Mod-Isaac-isaacs_tears_icon.png|60x60px]]
|Custom Key can be used instead of Key, to determine a special effect.
</div>
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.
<div class="ibox__top-right">
Example:
<div class="ibox__name colorrarity1">Isaac's Tears</div>
<div class="ibox__class">{{Color|cream|Tears}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|cream|Damage:}} 7 ({{StatIcon|Ranged Damage}})
</li>
<li>
{{Color|cream|Critical:}} x2 (3% chance)
</li>
<li>
{{Color|cream|Cooldown:}} 0.7s
</li>
<li>
{{Color|cream|Knockback:}} 10
</li>
<li>
{{Color|cream|Range:}} 700 (Ranged)
</li>
</ul>
</div>
</div>
</td>


<td style="vertical-align: top; padding: 0 20px 20px 0;">
* {{MiniIconbox|Anvil}}'s effect is set with its Custom Key, "upgrade_random_weapon".
<!-- Number One -->
* The effect upgrades a random weapon, and if it can't, then it increases a stat.
<div class="ibox rarity1 rounded">
* Anvil's effect sets the key to "stat_armor", which means that the increased stat is Armor
<div class="ibox__top">
* (And its value of "2" means that the Armor stat should be increased by 2.)
<div class="ibox__icon rounded">
|-
[[File:Mod-Isaac-number_one_icon.png|60x60px]]
|Storage Method
</div>
|Sum
<div class="ibox__top-right">
| Determines how the value should be saved/applied:
<div class="ibox__name colorrarity1">Number One</div>
<div class="ibox__class">{{Color|cream|Tears}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|cream|Damage:}} 4 (50%{{StatIcon|Ranged Damage}})
</li>
<li>
{{Color|cream|Critical:}} x2 (3% chance)
</li>
<li>
{{Color|cream|Cooldown:}} 0.45s
</li>
<li>
{{Color|cream|Knockback:}} 15
</li>
<li>
{{Color|cream|Range:}} 200 (Ranged)
</li>
</ul>
</div>
</div>
</td>


<td style="vertical-align: top; padding: 0 20px 20px 0;">
* '''Sum''' = The value will be added (or deducted) from whatever the current run's effect value is.
<!-- The Inner Eye -->
** Acid uses this to add +8 to the current Max HP value.
<div class="ibox rarity1 rounded">
** Your final Max HP value is the ''sum'' of whatever your current Max HP is, plus Acid's value of +8.
<div class="ibox__top">
* '''Key Value''' = ???
<div class="ibox__icon rounded">
** Used by: apprentice / farmer_effect_2b / glutton_effect_1 / peacock_effect_2 / peacock_effect_3
[[File:Mod-Isaac-inner_eye_icon.png|60x60px]]
* '''Replace''' = This effect's value should replace (ie. override) the current run's stat.
</div>
** Eg. Arms Dealer uses "minimum_weapons_in_shop", with a value of 1, which replaces any other values in the run.
<div class="ibox__top-right">
|-
<div class="ibox__name colorrarity1">The Inner Eye</div>
|Effect Sign
<div class="ibox__class">{{Color|cream|Tears}}</div>
|From Value
</div>
|Determines how to get the sign ("+" or "-") of the value.
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|cream|Damage:}} 7x3 (50%{{StatIcon|Ranged Damage}})
</li>
<li>
{{Color|cream|Critical:}} x2 (3% chance)
</li>
<li>
{{Color|cream|Cooldown:}} 1.2s
</li>
<li>
{{Color|cream|Knockback:}} 10
</li>
<li>
{{Color|cream|Range:}} 300 (Ranged)
</li>
</ul>
</div>
</div>
</td>


<td style="vertical-align: top; padding: 0 20px 20px 0;">
* '''Positive''' = Force a plus sign (+)
<!-- Mom's Knife -->
* '''Negative''' = Force a minus sign (-)
<div class="ibox rarity2 rounded">
* '''From Value''' = Get the sign from the value. If it's positive, show +, and vice versa. This is usually the best setting to use.
<div class="ibox__top">
* '''Neutral''' = Ensures no sign will be added.
<div class="ibox__icon rounded">
* '''From Arg''' = This means that the sign or format is specified with Custom Args.
[[File:Mod-Isaac-moms_knife_icon.png|60x60px]]
|-
</div>
|Custom Args
<div class="ibox__top-right">
|<small>''n/a''</small>
<div class="ibox__name colorrarity2">Mom's Knife II</div>
|Allows you to determine the formatting of any and all args that this effect uses. See below for more details.
<div class="ibox__class">{{Color|cream|Precise, Demonic}}</div>
|}
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|cream|Damage:}} 30 (60%{{StatIcon|Melee Damage}})
</li>
<li>
{{Color|cream|Critical:}} x1.5 (30% chance)
</li>
<li>
{{Color|cream|Cooldown:}} 1.3s
</li>
<li>
{{Color|cream|Knockback:}} 2
</li>
<li>
{{Color|cream|Range:}} 350 (Melee)
</li>
</ul>
</div>
</div>
</td>
</tr>
</table>


====custom_arg.gd====
Location: {{Color|color=cream|text=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.


<table>
For example, open {{Color|cream|estys_couch_effect_1.tres}} in Godot's Inspector. We know that this effect gives "{{Color|green|+2}} HP Regeneration for every -1% Speed you have.". The ''effect_sign'' is set to positive,
<tr>
<td style="vertical-align: top; padding: 0 20px 20px 0;">
<!-- D6 -->
<div class="ibox rarity3 rounded">
<div class="ibox__top">
<div class="ibox__icon rounded">
[[File:Mod-Isaac-dice6_icon.png|60x60px]]
</div>
<div class="ibox__top-right">
<div class="ibox__name colorrarity3">D6</div>
<div class="ibox__class">{{Color|cream|Unique}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|green|+2}} free reroll in the shop
</li>
<li>
{{Color|red|-5}} Luck
</li>
<li>
{{Color|red|+5%}} Items Price
</li>
</ul>
</div>
</div>
</td>


<td style="vertical-align: top; padding: 0 20px 20px 0;">
<!-- Belial Book -->
<div class="ibox rarity3 rounded">
<div class="ibox__top">
<div class="ibox__icon rounded">
[[File:Mod-Isaac-belial_book_icon.png|60x60px]]
</div>
<div class="ibox__top-right">
<div class="ibox__name colorrarity3">The Book of Belial</div>
<div class="ibox__class">{{Color|cream|Unique}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|green|+1}} temporary damage per crit kill
</li>
<li>
{{Color|red|-10}} Max HP
</li>
<li>
{{Color|red|-10%}} Damage
</li>
</ul>
</div>
</div>
</td>


<td style="vertical-align: top; padding: 0 20px 20px 0;">
<!-- Bomb -->
<div class="ibox rarity1 rounded">
<div class="ibox__top">
<div class="ibox__icon rounded">
[[File:Mod-Isaac-bomb_icon.png|60x60px]]
</div>
<div class="ibox__top-right">
<div class="ibox__name colorrarity1">Bomb</div>
<div class="ibox__class">{{Color|cream|Limited (10)}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
A landmine spawns every {{Color|green|-1}} seconds dealing {{Color|green|56}} (200% {{StatIcon||Engineering}}) damage in an area
</li>
</ul>
</div>
</div>
</td>


<td style="vertical-align: top; padding: 0 20px 20px 0;">
== Item Effects ==
<!-- Lucky Foot -->
Stored in {{Color|color=cream|text=res://effects/items/*.gd}}
<div class="ibox rarity2 rounded">
{| class="wikitable"
<div class="ibox__top">
!
<div class="ibox__icon rounded">
!
[[File:Mod-Isaac-lucky_foot_icon.png|60x60px]]
|-
</div>
|burn_chance_effect.gd
<div class="ibox__top-right">
|
<div class="ibox__name colorrarity2">Lucky Foot</div>
|-
<div class="ibox__class">{{Color|cream|Limited (5)}}</div>
|chance_stat_damage_effect.gd
</div>
|
</div>
|-
<div class="ibox__stats">
|class_bonus_effect.gd
<ul>
|
<li>
|-
{{Color|green|+1%}} chance to get {{Color|green|+1}} Luck when picking up a material
|convert_stat_effect.gd
</li>
|
<li>
|-
{{Color|red|-5%}} Speed
|gain_stat_for_every_stat_effect.gd
</li>
|
</ul>
|-
</div>
|healing_effect.gd
</div>
|
</td>
|-
</tr>
|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
|
|}


<tr>
== Weapon Effects ==
 
Stored in {{Color|color=cream|text=res://effects/weapons/*.gd}}  
<td style="vertical-align: top; padding: 0 20px 20px 0;">
{| class="wikitable"
<!-- Maggy's Faith -->
!Filename
<div class="ibox rarity2 rounded">
!Info
<div class="ibox__top">
|-
<div class="ibox__icon rounded">
|burning_effect.gd
[[File:Mod-Isaac-maggys_faith_icon.png|60x60px]]
|
</div>
|-
<div class="ibox__top-right">
|exploding_effect.gd
<div class="ibox__name colorrarity2">Maggy's Faith</div>
|
<div class="ibox__class">{{Color|cream|Limited (3)}}</div>
|-
</div>
|gain_stat_every_killed_enemies_effect.gd
</div>
|
<div class="ibox__stats">
|-
<ul>
|null_effect.gd
<li>
|
{{Color|green|+1}} Max HP at the end of a wave
|-
</li>
|projectiles_on_hit_effect.gd
<li>
|
{{Color|red|-4%}} Speed
|-
</li>
|slow_in_zone_effect.gd
</ul>
|
</div>
|-
</div>
|weapon_stack_effect.gd
</td>
|
 
|}
<td style="vertical-align: top; padding: 0 20px 20px 0;">
<!-- Yum Heart -->
<div class="ibox rarity2 rounded">
<div class="ibox__top">
<div class="ibox__icon rounded">
[[File:Mod-Isaac-yum_heart_icon.png|60x60px]]
</div>
<div class="ibox__top-right">
<div class="ibox__name colorrarity2">Yum Heart</div>
<div class="ibox__class">{{Color|cream|Unique}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|green|+7 HP}} recovered from consumables
</li>
<li>
{{Color|red|-20%}} Life Steal
</li>
</ul>
</div>
</div>
</td>
 
<td style="vertical-align: top; padding: 0 20px 20px 0;">
<!-- Bomb Bag -->
<div class="ibox rarity3 rounded">
<div class="ibox__top">
<div class="ibox__icon rounded">
[[File:Mod-Isaac-bomb_bag_icon.png|60x60px]]
</div>
<div class="ibox__top-right">
<div class="ibox__name colorrarity3">Bomb Bag</div>
<div class="ibox__class">{{Color|cream|Limited (3)}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
Flies with you
</li>
<li>
A landmine spawns every {{Color|green|20}} seconds dealing {{Color|green|65}} (200% {{StatIcon||Engineering}}) damage in an area
</li>
</ul>
</div>
</div>
</td>
 
<td style="vertical-align: top; padding: 0 20px 20px 0;">
<!-- Bloodshot Eye -->
<div class="ibox rarity1 rounded">
<div class="ibox__top">
<div class="ibox__icon rounded">
[[File:Mod-Isaac-bloodshot_eye_icon.png|60x60px]]
</div>
<div class="ibox__top-right">
<div class="ibox__name colorrarity1">Bloodshot Eye</div>
<div class="ibox__class">{{Color|cream|Limited (6)}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
Spawns a companion that flies around you and shoots enemies for 8 damage (50% {{StatIcon|Ranged Damage}} 50% {{StatIcon||Engineering}})
</li>
</ul>
</div>
</div>
</td>
 
<td style="vertical-align: top; padding: 0 20px 20px 0;">
<!-- 8 Inch Nails -->
<div class="ibox rarity3 rounded">
<div class="ibox__top">
<div class="ibox__icon rounded">
[[File:Mod-Isaac-inch_nails_icon.png|60x60px]]
</div>
<div class="ibox__top-right">
<div class="ibox__name colorrarity3">8 Inch Nails</div>
<div class="ibox__class">{{Color|cream|Unique}}</div>
</div>
</div>
<div class="ibox__stats">
<ul>
<li>
{{Color|green|Damage}} modifications are increased by {{Color|green|10%}}
</li>
</ul>
</div>
</div>
</td>
</tr>
 
</table>

Latest revision as of 08:11, 30 June 2023

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:
  • Most commonly, it specifies the target of the effect's behaviour: For example, if you're modifying a stat, the key is the stat (eg "stat_max_hp").
  • The second use is to specify a custom effet key, with the effect ID being the key: For example, Crown uses the key "harvesting_growth".
Text Key n/a If an effect key is specified, it's retrieved from the translation file.
  • For simple stat changes, you don't need to provide a Text Key. But for anything more complex than basic stat changes, you'll probably need one.
  • For example, Crown's Text Key is "effect_harvesting_growth".
  • The translation string can include placeholders for args (arguments), which replace strings like "{0}", "{1}", etc.
  • If you're making your own custom effect, you can specify what value these args should use with the method get_args in your effect file.
  • To see how they're processed, view the "text" method in singletons/text.gd.
    • This method basically reads the Text Key from the translations file, and works out where the arg replacements should be (ie. "{0}", "{1}", etc)
    • Then replaces it them with the args provided.
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:

  • Alien Eyes.png Alien Eyes = The value of 6 determines that 6 Alien Eyes should be shot.
  • Baby Elephant.png Baby Elephant = The value of 25 is used to determine that the chance of Baby Elephant's effect is 25%.
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:

  • Anvil.png Anvil's effect is set with its Custom Key, "upgrade_random_weapon".
  • The effect upgrades a random weapon, and if it can't, then it increases a stat.
  • Anvil's effect sets the key to "stat_armor", which means that the increased stat is Armor
  • (And its value of "2" means that the Armor stat should be increased by 2.)
Storage Method Sum Determines how the value should be saved/applied:
  • Sum = The value will be added (or deducted) from whatever the current run's effect value is.
    • Acid uses this to add +8 to the current Max HP value.
    • Your final Max HP value is the sum of whatever your current Max HP is, plus Acid's value of +8.
  • Key Value = ???
    • Used by: apprentice / farmer_effect_2b / glutton_effect_1 / peacock_effect_2 / peacock_effect_3
  • Replace = This effect's value should replace (ie. override) the current run's stat.
    • Eg. Arms Dealer uses "minimum_weapons_in_shop", with a value of 1, which replaces any other values in the run.
Effect Sign From Value Determines how to get the sign ("+" or "-") of the value.
  • Positive = Force a plus sign (+)
  • Negative = Force a minus sign (-)
  • From Value = Get the sign from the value. If it's positive, show +, and vice versa. This is usually the best setting to use.
  • Neutral = Ensures no sign will be added.
  • From Arg = This means that the sign or format is specified with Custom Args.
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