Skip to content

Commit

Permalink
Autoconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Moffein committed Sep 13, 2024
1 parent ab0323c commit 1dff511
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 28 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ This mod can be used alongside the official version of Starstorm 2. Be sure to g
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/portraitPyro.png) | Pyro | The Pyro will stop at nothing to burn down everything in sight. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/portraitNucleator.png) | Nucleator | The Nucleator is a radioactive juggernaut with rad-proof armor, which allows him to manipulate nuclear components for long periods of time. |

## 10 New Items
## 12 New Items

| Icon | Name | Description |
|:--:|:--:|--|
| Common | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemDetritiveTrematode.png) | Detritive Trematode | Enemies below **25% health** are infested for **100%** *(+100%)* base damage per second. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemDiary.png) | Diary | Increases **movement speed** by **10%** *(+10%)* and **armor** by **3** *(+3)*. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemDungus.png) | Dormant Fungus | Heals for **1.2%** *(+0.6%)* of your **health** every second **while sprinting**. |
| Rare | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemFork.png) | Fork | Increases your base damage by **2.4** *(+2.4)*. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemMoltenCoin.png) | Molten Coin | **6%** chance to **ignite on hit** for **320%** *(+320%)* base damage and earn **$1**. Scales with time. |
| Uncommon | | |
Expand All @@ -42,6 +44,8 @@ This mod can be used alongside the official version of Starstorm 2. Be sure to g
| Equipment | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/equipCloakingHeadband.png) | Cloaking Headband | Become **invisible** for 10 seconds. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/equipGreaterWarbanner.png) | Greater Warbanner | Place a greater warbanner which strengthens all allies within **25m**. Raises **critical chance** by **25%**. Every second, **reduces skill cooldowns by 0.5s** and **heals** for **2.5%** of your **health**. Only **1** banner may be active at a time. |
| Lunar | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemMass.png) | Relic of Mass | **Increase maximum health** by **100%** *(+100%)*. **Reduce acceleration and deceleration** by a factor of **8** *(+8)*. |

## Disabled Items
Can be re-enabled in config.
Expand All @@ -51,12 +55,8 @@ Can be re-enabled in config.
|:--:|:--:|--|
| Common | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemCoffeeBag.png) | Coffee Bag | Increases **movement speed** by **7%** *(+7%)* and **attack speed** by **7.5%** *(+7.5%)*. Disabled due to being officially implemented as **Mocha**. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemDungus.png) | Dormant Fungus | Heals for **1.2%** *(+0.6%)* of your **health** every second **while sprinting**. Disabled due to being officially implemented as **Weeping Fungus**. |
| Rare | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemErraticGadget.png) | Erratic Gadget | Gain **10% critical chance**. **Critical strikes** hit an additional time for **50%** *(+50%)* TOTAL damage. Disabled due to being similar to **Laser Scope**, same damage boost but applied in a different way. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemNkota.png) | Nkota's Heritage | **Receive an item** on **level up** or starting the **Teleporter event**. Rerolls for a higher item tier **0** *(+1)* times. **Unaffected by luck**. |
| Lunar | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemMass.png) | Relic of Mass | **Increase maximum health** by **100%** *(+100%)*. **Reduce acceleration and deceleration** by a factor of **8** *(+8)*. Disabled due to being similar to **Stone Flux Pauldron**, though the movement penalty works very differently. |

</details>

Expand Down
3 changes: 2 additions & 1 deletion Starstorm 2/ModCompat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public static class RiskyMod
public static void InitCompat()
{
pluginLoaded = BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.RiskyLives.RiskyMod");

RoR2Application.onLoad += OnLoadActions;
}

Expand All @@ -50,6 +49,7 @@ private static void OnLoadActions()
public static class SS2OCompat
{
public static bool pluginLoaded = false;
public static bool autoConfig;

public static bool enableNemMercInvasion = true;
public static bool enableNemCommandoInvasion = true;
Expand All @@ -59,6 +59,7 @@ public static class SS2OCompat

public static void InitCompat()
{
pluginLoaded = BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm.Starstorm2");
RoR2Application.onLoad += OnLoadActions;
}
private static void OnLoadActions()
Expand Down
13 changes: 13 additions & 0 deletions Starstorm 2/Modules/Config.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using BepInEx.Configuration;
using RiskOfOptions;
using Starstorm2Unofficial.Cores.Equipment;
using Starstorm2Unofficial.Modules.Achievements;
using Starstorm2Unofficial.Survivors.Cyborg;
using Starstorm2Unofficial.Survivors.Cyborg.Components.Crosshair;
Expand Down Expand Up @@ -53,6 +54,10 @@ internal static class Config

internal static void Initialize()
{
ModCompat.SS2OCompat.autoConfig = StarstormPlugin.instance.Config.Bind("Starstorm 2 :: Compatibility",
"SS2 Official - Autoconfig",
true,
"Automatically disable duplicated features that exist in SS2 Official. Disable this if you want to pick and choose which things to keep.").Value;

ModCompat.SurvariantsCompat.useVariants = StarstormPlugin.instance.Config.Bind("Starstorm 2 :: Compatibility",
"Survariants",
Expand Down Expand Up @@ -329,6 +334,14 @@ internal static void Initialize()
{
RiskOfOptionsCompat();
}

if (ModCompat.SS2OCompat.pluginLoaded && ModCompat.SS2OCompat.autoConfig)
{
EnableEvents.Value = false;
EnableVoid.Value = false;
EnableTyphoon.Value = false;
//Item/Equipment doorstop is handle separately.
}
}

// this helper automatically makes config entries for enabling/disabling survivors
Expand Down
15 changes: 15 additions & 0 deletions Starstorm 2/Starstorm2Release/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
`0.21.0`

- SS2 Official Autoconfig (Enabled by default, Untested)
- If it detects SS2 Official is loaded, it'll automatically turn off Storms/Events, Void Invasion, Typhoon, and duplicated Items/Equipments that exist in the Official version.
- The list of features disabled is manually set, and won't automatically update when SS2 Official updates.
- Does not affect Survivors since they're already nested under Variants.
- If you want to manually configure which features to keep, disable this option.

- Re-enabled Dormant Fungus by default. (Existing config unaffected)
- It's a nice item to have in the pool, and can be considered different from Vanilla Wungus by having lower numbers but being usable alongside Bungus.

- Re-enabled Relic of Mass by default. (Existing config unaffected)
- Acceleration reduction is funny, different enough from Stone Flux Pauldron to warrant keeping.


`0.20.9`

- Fixed TemporaryOverlay nullrefs on Executioner and other survivors.
Expand Down
10 changes: 5 additions & 5 deletions Starstorm 2/Starstorm2Release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ This mod can be used alongside the official version of Starstorm 2. Be sure to g
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/portraitPyro.png) | Pyro | The Pyro will stop at nothing to burn down everything in sight. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/portraitNucleator.png) | Nucleator | The Nucleator is a radioactive juggernaut with rad-proof armor, which allows him to manipulate nuclear components for long periods of time. |

## 10 New Items
## 12 New Items

| Icon | Name | Description |
|:--:|:--:|--|
| Common | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemDetritiveTrematode.png) | Detritive Trematode | Enemies below **25% health** are infested for **100%** *(+100%)* base damage per second. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemDiary.png) | Diary | Increases **movement speed** by **10%** *(+10%)* and **armor** by **3** *(+3)*. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemDungus.png) | Dormant Fungus | Heals for **1.2%** *(+0.6%)* of your **health** every second **while sprinting**. |
| Rare | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemFork.png) | Fork | Increases your base damage by **2.4** *(+2.4)*. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemMoltenCoin.png) | Molten Coin | **6%** chance to **ignite on hit** for **320%** *(+320%)* base damage and earn **$1**. Scales with time. |
| Uncommon | | |
Expand All @@ -42,6 +44,8 @@ This mod can be used alongside the official version of Starstorm 2. Be sure to g
| Equipment | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/equipCloakingHeadband.png) | Cloaking Headband | Become **invisible** for 10 seconds. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/equipGreaterWarbanner.png) | Greater Warbanner | Place a greater warbanner which strengthens all allies within **25m**. Raises **critical chance** by **25%**. Every second, **reduces skill cooldowns by 0.5s** and **heals** for **2.5%** of your **health**. Only **1** banner may be active at a time. |
| Lunar | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemMass.png) | Relic of Mass | **Increase maximum health** by **100%** *(+100%)*. **Reduce acceleration and deceleration** by a factor of **8** *(+8)*. |

## Disabled Items
Can be re-enabled in config.
Expand All @@ -51,12 +55,8 @@ Can be re-enabled in config.
|:--:|:--:|--|
| Common | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemCoffeeBag.png) | Coffee Bag | Increases **movement speed** by **7%** *(+7%)* and **attack speed** by **7.5%** *(+7.5%)*. Disabled due to being officially implemented as **Mocha**. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemDungus.png) | Dormant Fungus | Heals for **1.2%** *(+0.6%)* of your **health** every second **while sprinting**. Disabled due to being officially implemented as **Weeping Fungus**. |
| Rare | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemErraticGadget.png) | Erratic Gadget | Gain **10% critical chance**. **Critical strikes** hit an additional time for **50%** *(+50%)* TOTAL damage. Disabled due to being similar to **Laser Scope**, same damage boost but applied in a different way. |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemNkota.png) | Nkota's Heritage | **Receive an item** on **level up** or starting the **Teleporter event**. Rerolls for a higher item tier **0** *(+1)* times. **Unaffected by luck**. |
| Lunar | | |
| ![](https://raw.githubusercontent.com/Moffein/Starstorm2Unofficial/main/README%20Images/itemMass.png) | Relic of Mass | **Increase maximum health** by **100%** *(+100%)*. **Reduce acceleration and deceleration** by a factor of **8** *(+8)*. Disabled due to being similar to **Stone Flux Pauldron**, though the movement penalty works very differently. |

</details>

Expand Down
Binary file modified Starstorm 2/Starstorm2Release/VideogameMod2Unofficial.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion Starstorm 2/Starstorm2Release/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Videogame_Mod_2_Unofficial",
"version_number": "0.20.9",
"version_number": "0.21.0",
"website_url": "https://github.com/Moffein/Starstorm2Unofficial",
"description": "A restoration of the pre-SotV Videogame Mod 2. Compatible with the official Videogame Mod 2!",
"dependencies": [
Expand Down
Binary file not shown.
37 changes: 21 additions & 16 deletions Starstorm 2/StarstormPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class StarstormPlugin : BaseUnityPlugin
{
internal const string guid = "com.ChirrLover.Starstorm2Unofficial";
internal const string modName = "Starstorm 2 Unofficial";
internal const string version = "0.20.9";
internal const string version = "0.21.0";

public static StarstormPlugin instance;

Expand Down Expand Up @@ -170,8 +170,11 @@ private void Initialize()
if (Modules.Config.EnableEquipment.Value)
{
equipmentCore = new EquipmentCore();
AddEquipmentIfEnabled(new CloakingHeadband(), EquipmentCore.instance.equipment);
AddEquipmentIfEnabled(new GreaterWarbanner(), EquipmentCore.instance.equipment);
if (ModCompat.SS2OCompat.pluginLoaded && ModCompat.SS2OCompat.autoConfig)
{
AddEquipmentIfEnabled(new CloakingHeadband(), EquipmentCore.instance.equipment);
AddEquipmentIfEnabled(new GreaterWarbanner(), EquipmentCore.instance.equipment);
}
//AddEquipmentIfEnabled(new PressurizedCanister(), EquipmentCore.instance.equipment); //fuck this equipment in particular
EquipmentCore.instance.InitEquipment();
}
Expand All @@ -180,24 +183,26 @@ private void Initialize()
{
itemCore = new ItemCore();

AddItemIfEnabled(new Fork(), ItemCore.instance.items);
AddItemIfEnabled(new MoltenCoin(), ItemCore.instance.items);
if (ModCompat.SS2OCompat.pluginLoaded && ModCompat.SS2OCompat.autoConfig)
{
AddItemIfEnabled(new Fork(), ItemCore.instance.items);
AddItemIfEnabled(new MoltenCoin(), ItemCore.instance.items);
AddItemIfEnabled(new DetritiveTrematode(), ItemCore.instance.items);
AddItemIfEnabled(new CoffeeBag(), ItemCore.instance.items, false);
AddItemIfEnabled(new WatchMetronome(), ItemCore.instance.items);
AddItemIfEnabled(new DormantFungus(), ItemCore.instance.items);
AddItemIfEnabled(new DroidHead(), ItemCore.instance.items);
AddItemIfEnabled(new GreenChocolate(), ItemCore.instance.items);
AddItemIfEnabled(new NkotasHeritage(), ItemCore.instance.items, false);
AddItemIfEnabled(new RelicOfMass(), ItemCore.instance.items);
AddItemIfEnabled(new StirringSoul(), ItemCore.instance.items);
}

AddItemIfEnabled(new Diary(), ItemCore.instance.items);
AddItemIfEnabled(new DetritiveTrematode(), ItemCore.instance.items);
AddItemIfEnabled(new DormantFungus(), ItemCore.instance.items, false);
AddItemIfEnabled(new CoffeeBag(), ItemCore.instance.items, false);

AddItemIfEnabled(new WatchMetronome(), ItemCore.instance.items);
AddItemIfEnabled(new StrangeCan(), ItemCore.instance.items);

AddItemIfEnabled(new DroidHead(), ItemCore.instance.items);
AddItemIfEnabled(new GreenChocolate(), ItemCore.instance.items);
AddItemIfEnabled(new ErraticGadget(), ItemCore.instance.items, false);
AddItemIfEnabled(new NkotasHeritage(), ItemCore.instance.items, false);

AddItemIfEnabled(new RelicOfMass(), ItemCore.instance.items, false);

AddItemIfEnabled(new StirringSoul(), ItemCore.instance.items);

//AddItemIfEnabled(new Malice(), ItemCore.instance.items);
//AddItemIfEnabled(new BrokenBloodTester(), ItemCore.instance.items);
Expand Down

0 comments on commit 1dff511

Please sign in to comment.