You are viewing a potentially older version of this package. View all versions.
ryuka_labs-ArmsRace-1.0.4 icon

ArmsRace

Kill enemies, get randomized weapons, and Arms Race your way through SULFUR.

Date uploaded 2 weeks ago
Version 1.0.4
Download link ryuka_labs-ArmsRace-1.0.4.zip
Downloads 165
Dependency string ryuka_labs-ArmsRace-1.0.4

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

Arms Race

You accidentally brought habits from another world into SULFUR.
Now you have to Arms Race your way out.

Enter a level and you get a random gun. Kill something and it turns into a different random gun. You don't get to keep any of them.

How it plays

Each level starts with a random gun in your hands, about two seconds after you arrive. Every kill gives you a new one, at most once per second by default. An enemy only counts if you hurt it yourself and it's worth XP, so something that dies on its own won't swap your gun.

The guns are vanilla weapons with vanilla upgrades rolled on top:

  • 1 to 5 random oils
  • a 50% chance of scrolls
  • a 60% chance of attachments
  • enough rank to hold what it rolled
  • at least 50% durability

The mod doesn't change the weapons themselves, so a copy of the same gun you find in a normal run stays normal.

Two guns at once

Set GeneratedWeaponCount to 2 and every level starts with a random gun in both weapon slots. Each kill replaces the older of the two and puts the new one in your hands, so you're holding your newest gun with the previous one as a backup.

Your own guns get moved to your backpack to make room. With the default of 1, a gun only moves when both slots are taken. With 2, both of them move. On Medium you lose unequipped loot when you die, and that includes a gun the mod moved to your backpack, so stash anything you care about before you head out.

If your backpack has no room for a gun, it stays in its slot and you get one generated weapon fewer.

Rechambering

This one is off by default. Turn on EnableRandomRechamber and generated guns can roll a different caliber, the same thing a Chamber Chisel does in a normal run. RechamberChance sets how often it happens (25% by default).

A rechambered gun starts with a full magazine. Reloading it takes ammo of the new caliber. Lasers and arrow weapons can't be rechambered, same as in the base game.

A caliber is skipped if it would more than double the gun's damage per shot, which you can change with MaxRechamberDamageRatio. Guns that fire faster than 600 RPM never roll 12 gauge.

These guns aren't yours

Generated weapons disappear when you change levels, use the Amulet or die. Dropping one destroys it, and vendors won't buy them. The mod keeps nothing in your save.

Generated guns count for achievements, so you might unlock some of them early.

Settings

The config file shows up after you launch the game once:

BepInEx/config/kumo.sulfur.random_weapon_per_level.cfg

If you have SULFUR Config installed, you can change everything in game instead. Its setting names and descriptions are translated into 15 languages.

The ones you'll most likely want:

[General]
RandomizeOnLevelStart = true
GeneratedWeaponCount = 1
PreferredWeaponSlot = FirstAvailable
ForceSelectGeneratedWeapon = true

[Kill Reward]
EnableRandomWeaponOnKill = true
RandomWeaponOnKillCooldown = 1

[Random Upgrades]
MinOilCount = 1
MaxOilCount = 5
ScrollChance = 0.5
AttachmentChance = 0.6
EnableRandomRechamber = false
RechamberChance = 0.25
MaxRechamberDamageRatio = 2

There's also a debug key that gives you a new gun on demand. It's off unless you set DebugKeyEnabled = true.

Installing

Install it with r2modman, Gale or the Thunderstore Mod Manager.

To install by hand, you need BepInEx first. Put Arms Race.dll and the lang folder in BepInEx/plugins/ArmsRace/.

To remove it, delete that folder. You can delete the config file too. Your save will still load.

Compatibility

Arms Race can clash with mods that change weapon slots, the inventory, enemy death or level transitions. If another mod also hands you weapons at the start of a level, expect them to fight over your slots.

Source

The code is at ryuka-dev/ArmsRace. It only contains my own code and packaging text, no game files or BepInEx binaries. If you're making your own mod, feel free to use it as a reference.

CHANGELOG

Changelog

1.0.4

  • Built for SULFUR 1.0.5.
  • New option: GeneratedWeaponCount. At 2, each level starts with a random gun in both weapon slots and each kill replaces the older one. Your own guns move to your backpack to make room.
  • New option: random rechambering (EnableRandomRechamber, off by default). Generated guns can roll a different caliber. Calibers that would more than double the damage per shot are skipped.
  • Fixed generated weapons staying in your inventory for good after you died or left a level from the pause menu.
  • Fixed generated weapons being sellable to vendors.
  • PreferredWeaponSlot = FirstAvailable now uses an empty weapon slot when you have one, instead of always moving the gun in the first slot.
  • Kills only count if you damaged the enemy yourself.
  • EnableMod = false now also turns off kill rewards.
  • Weapons cut from the game no longer show up in the random pool.
  • Random Pool settings now apply without restarting the game.
  • Removed the GunsOnly setting. It never did anything: the pool has always been guns only.
  • Added Traditional Chinese and redid the settings translations in every other language.

1.0.3

  • Works again on SULFUR 1.0 (tested on 1.0.2). The previous build was compiled against an older game version and hit errors on newer ones: since game version 0.19 when it had to move a weapon you already had equipped into your backpack, and on 1.0.2 when selecting the new weapon. No gameplay changes.
  • The SULFUR Config translations now ship in a lang folder next to the DLL.
  • Updating by hand: the plugin file is still Arms Race.dll, so replace the old one instead of keeping two copies, put the lang folder next to it, and delete the old loose .json translation files.
  • Corrected the config file name in the description: it is kumo.sulfur.random_weapon_per_level.cfg.

1.0.2

  • Added SULFUR Config translations for 14 languages. No gameplay changes.

1.0.1

  • The random weapon pool now skips weapons that have no regular projectile type.

1.0.0

  • Initial release.
  • Adds random weapon generation on level start.
  • Adds random weapon reward on enemy kill.
  • Adds configurable kill reward cooldown.
  • Adds random oils, scrolls, compatible attachments, rank adjustment, and durability safety.
  • Adds runtime cleanup for generated weapons.
  • Adds level transition cleanup.
  • Adds Amulet teleport cleanup.
  • Adds drop prevention for generated weapons.
  • Debug key spawning is available but disabled by default.