From Brotato Wiki

< User:Darkly77

Revision as of 01:54, 13 December 2022 by Darkly77 (talk | contribs) (temp copy of content from Invasion Mod)

Notes, info and data that didn't quite make the cut for the wiki.


Attack Speed Calculations

In the game's code, a weapon's displayed "attack speed" is determined by both two of its stats: cooldown and recoil_duration, via weapon_stats.gd (see get_cooldown_text in ranged_weapon_stats.gd and melee_weapon_stats.gd)

Recoil Duration is almost always 0.1, except for 11 ranged weapons: Crossbow (0.15), Flamethrower (0.02), Laser Gun (0.2), Minigun (0.02), Nuclear Launcher (0.142), Obliterator (0.2), Rocket Launcher (0.142), Shredder (0.15), Slingshot (0.15), SMG (0.05), and Sniper Gun (0.2).

For ranged weapons, the displayed attack speed is calculated as:

(cooldown / 60) + (recoil_duration * 2)

For melee weapons, the displayed attack speed is calculated as:

(cooldown / 60) + recoil_duration + (atk_duration / 2) + back_duration

Here's what those melee variables mean:

  • back_duration = 0.2 / (1 + (stat_attack_speed * 3))
    • At 0 attack speed, this would be: 0.2
    • At 10 attack speed (0.1), this would be: 0.15
    • At 50 attack speed (0.5), this would be: 0.08
    • At 100 attack speed (1), this would be: 0.05
  • atk_duration = max(0.01, 0.2 - (stat_attack_speed / 10.0)) + range_factor * 0.15
  • range_factor = max(0.0, (WPN.max_range + (stat_range / 2)) / clamp(70.0 * (1 + (stat_attack_speed / 3)), 70.0, 120.0))
    • max gets the highest value, so here it can't be lower than 0
    • clamp makes sure the value isn't higher/lower than the specified numbers, so here it can't be lower than 70 or higher than 120


Removed Invasion Mod Text

There seems to be an issue with my compile of the DebugLoader PCK, so I've removed it for now.

Download

There are two ways you can install Invasion: Either with a standalone PCK that installs like any other mod, or with dami's mod loader.

Standalone PCK

Slightly easier to install, but harder to update and won't be updated as often.

[PCK v0.1.1] (Game version: 0.6.1.6)

Mod Loader

This is the intended way to install, as it lets you apply new updates very quickly.

Invasion Mod

Mod files. Add to your mods folder after installing the Mod Loader PCK.

[0.1.1-alpha] (2.88mb)

Mod Loader PCK

This is dami's multi mod loader plus DebugLoader v1.1.0, with a PCK at game version 0.6.1.6.

[Loader] (76.5mb)


Installation

Check if the mod has a steam workshop page.

If not, manual installation steps can be found here.

If you're using the mod loader approach, you'll want to install the mod loader PCK, add a folder called "mods" in the Brotato folder, and put the Invasion mod zip into that folder.