Skip to content

Commit

Permalink
Update mods to match QoD v1.0.3 (#15)
Browse files Browse the repository at this point in the history
* add RedCapoteBuff mod

* update FiendsNerf and TruePierce

* update readme
  • Loading branch information
FrenchKrab authored Sep 30, 2023
1 parent 8cb6d77 commit d641b7d
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 29 deletions.
66 changes: 41 additions & 25 deletions FiendsNerf/FiendsNerfMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,55 @@
namespace FiendsNerf;
public class FiendsNerfMod : MelonMod
{
private static bool s_isAnalyzing = false;

// After getting the affinities of a demon
[HarmonyPatch(typeof(datAisyoName), nameof(datAisyoName.Get))]
private class Patch
{
public static void Postfix(ref int id, ref string __result)
{
switch (id)
if (!s_isAnalyzing)
{
case 199:
__result = "Null: Force/Light/Dark • Str: Nerve • Weak: Elec"; // Matador
break;
case 201:
__result = "Null: Light/Dark/Mind • Str: Curse • Weak: Fire"; // Daisoujou
break;
case 200:
__result = "Drn: Force • Null: Fire/Light/Dark • Str: Nerve • Weak: Ice"; // Hell Biker
break;
case 196:
__result = "Null: Fire/Light/Dark/Nerve • Weak: Elec"; // White Rider
break;
case 197:
__result = "Null: Elec/Force/Light/Dark/Mind • Weak: Ice"; // Red Rider
break;
case 198:
__result = "Drn: Ice • Null: Light/Dark/Curse • Weak: Force"; // Black Rider
break;
case 195:
__result = "Null: Ice/Light/Dark/Curse/Mind • Weak: Fire"; // Pale Rider
break;
case 202:
__result = "Rpl: Phys • Drn: Elec • Null: Light/Dark • Str: Ailments • Weak Force"; // Mother Harlot
break;
switch (id)
{
case 199:
__result = "Null: Force/Light/Dark • Str: Nerve • Weak: Elec"; // Matador
break;
case 201:
__result = "Null: Light/Dark/Mind • Str: Curse • Weak: Fire"; // Daisoujou
break;
case 200:
__result = "Drn: Force • Null: Fire/Light/Dark • Str: Nerve • Weak: Ice"; // Hell Biker
break;
case 196:
__result = "Null: Fire/Light/Dark/Nerve • Weak: Elec"; // White Rider
break;
case 197:
__result = "Null: Elec/Force/Light/Dark/Mind • Weak: Ice"; // Red Rider
break;
case 198:
__result = "Drn: Ice • Null: Light/Dark/Curse • Weak: Force"; // Black Rider
break;
case 195:
__result = "Null: Ice/Light/Dark/Curse/Mind • Weak: Fire"; // Pale Rider
break;
case 202:
__result = "Rpl: Phys • Drn: Elec • Null: Light/Dark • Str: Ailments • Weak Force"; // Mother Harlot
break;
}
}

s_isAnalyzing = false;
}
}

[HarmonyPatch(typeof(datDevilFormat), nameof(datDevilFormat.Analyze))]
private class Patch2
{
public static void Prefix()
{
s_isAnalyzing = true;
}
}

Expand Down
6 changes: 6 additions & 0 deletions MatthiewNocturne.sln
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EveryoneGetsExp", "Everyone
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EscapeOnHard", "EscapeOnHard\EscapeOnHard.csproj", "{4D81714C-174C-447A-B2B7-EEAEEAFCD103}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedCapoteBuff", "RedCapoteBuff\RedCapoteBuff.csproj", "{1C166E9D-6054-4149-BCFD-444560A6D475}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -222,5 +224,9 @@ Global
{4D81714C-174C-447A-B2B7-EEAEEAFCD103}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D81714C-174C-447A-B2B7-EEAEEAFCD103}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D81714C-174C-447A-B2B7-EEAEEAFCD103}.Release|Any CPU.Build.0 = Release|Any CPU
{1C166E9D-6054-4149-BCFD-444560A6D475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C166E9D-6054-4149-BCFD-444560A6D475}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C166E9D-6054-4149-BCFD-444560A6D475}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C166E9D-6054-4149-BCFD-444560A6D475}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
**DEV BRANCH** : adds support for configurations in various mods

Please report any **bug** you have with the mods by **opening an issue** !
You can also submit feature request to add configurations in existing mods.

# Mods

## Modpack content
Up to date to [*Quality of Death*](https://gamebanana.com/mods/443748) **v1.0.3**.

Some mods can be further configured (these), these will have Nocturne vanilla behaviour by default (=~ disabled). To enable them, check out their available presets.

Expand Down Expand Up @@ -43,6 +41,7 @@ Some mods can be further configured (these), these will have Nocturne vanilla be
| [RepulseBellEveryShop](https://gamebanana.com/mods/382242) | | |
| [SkipAmalaMinigame](https://gamebanana.com/mods/415578) | | |
| [TruePierce](https://gamebanana.com/mods/411510) | :heavy_check_mark: | [presets](_cfg_presets/TruePierce/) |
| [RedCapoteBuff](https://github.com/MatthiewPurple/red-capote-buff) | | |

### How to configure mods

Expand All @@ -51,7 +50,7 @@ You can open them with any text editor, and edit the values as you see fit, each

## Bonus / Non-canonical mods

List of standalone mods that won't be part of the modpack (fate to be determined):
List of standalone mods that aren't part of the Quality Of Death modpack (fate to be determined):
- [PiercingMagmaAxis](https://gamebanana.com/mods/380326)
- [UncappedMagic](https://gamebanana.com/mods/416903)
- [DanteOnNewGamePlus](https://gamebanana.com/mods/439012)
Expand Down
35 changes: 35 additions & 0 deletions RedCapoteBuff/RedCapoteBuff.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>RedCapoteBuff</RootNamespace>
<AssemblyName>RedCapoteBuff</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputPath>..\bin\</OutputPath>
</PropertyGroup>

<ItemGroup>
<Reference Include="0Harmony">
<HintPath>..\_dlls\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\_dlls\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2CppInterop.Runtime">
<HintPath>..\_dlls\Il2CppInterop.Runtime.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>..\_dlls\Il2Cppmscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MelonLoader">
<HintPath>..\_dlls\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>

</Project>
61 changes: 61 additions & 0 deletions RedCapoteBuff/RedCapoteBuffMod.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright (c) MatthiewPurple. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information.

using HarmonyLib;
using Il2Cpp;
using MelonLoader;
using RedCapoteBuff;

[assembly: MelonInfo(typeof(RedCapoteBuffMod), "Red Capote buff", "1.0.0", "Matthiew Purple")]
[assembly: MelonGame("アトラス", "smt3hd")]

namespace RedCapoteBuff;
public class RedCapoteBuffMod : MelonMod
{
private static bool s_isRedCapote; // is true when the last used skill was Red Capote

// After getting the description of a skill
[HarmonyPatch(typeof(datSkillHelp_msg), nameof(datSkillHelp_msg.Get))]
private class Patch
{
public static void Postfix(ref int id, ref string __result)
{
if (id == 276)
{
__result = "Maximizes Evasion/Hit Rate.";
}
}
}

// Before displaying the text box
[HarmonyPatch(typeof(nbHelpProcess), nameof(nbHelpProcess.nbDispText))]
private class Patch2
{
public static void Prefix(ref string text1, ref int type)
{
// If the text box is displaying the effect of Red Capote
if (type == 1 && s_isRedCapote)
{
type = 0;
text1 = "Evasion/Hit Rate maximized!";
s_isRedCapote = false;
}
}
}

// Before displying a skill name in the text box
[HarmonyPatch(typeof(nbHelpProcess), nameof(nbHelpProcess.nbDispSkillName))]
private class Patch3
{
public static void Prefix(ref int id)
{
s_isRedCapote = id == 276;
}
}

// When launching the game
public override void OnInitializeMelon()
{
// Buffs Red Capote
datNormalSkill.tbl[276].hojopoint = 8; // Self-Sukukaja x 8
}
}
9 changes: 9 additions & 0 deletions TruePierce/TruePierceMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ public static void Postfix(ref uint __result, ref int attr, ref int formindex, r
if (s_hasPierce && isTypeTruePierce && (!isRepel || s_cfgAllowRepel.Value) && (__result < 100 || (__result >= 65536 && __result < 2147483648)))
{
__result = 100; // Forces the affinity to become "neutral"
if ((__result >> 20) % 2 == 1)
{
__result = 100 + 1048576; // Forces the affinity to become "neutral" but keeps Freeze/Shock resistance
}
else
{
__result = 100; // Forces the affinity to become "neutral"
}

nbMainProcess.nbGetMainProcessData().d31_kantuu = 1; // Displays the "Pierced!" message
}
}
Expand Down

0 comments on commit d641b7d

Please sign in to comment.