From 0c3cf20cb28093b73af93f0ecedebad005ae01cb Mon Sep 17 00:00:00 2001 From: Thin Creator 3483 <102002463+SaxbyMod@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:22:59 -0500 Subject: [PATCH 1/7] Fix Pelt Name when Trader says the line * Essentially fixes the pelt names as the trader would call them. --- InscryptionAPI/Pelts/PeltManager.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/InscryptionAPI/Pelts/PeltManager.cs b/InscryptionAPI/Pelts/PeltManager.cs index 6036f35c..ccc857c2 100644 --- a/InscryptionAPI/Pelts/PeltManager.cs +++ b/InscryptionAPI/Pelts/PeltManager.cs @@ -210,7 +210,11 @@ internal static void CreateDialogueEvents() DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, new() { - name + " pelts..." + if (cardName.Contains("pelt") || cardName.Contains("pelt") { + + name + "pelts..." + } else { + name + "..." }); } } @@ -218,8 +222,13 @@ internal static void CreateDialogueEvents() public static string GetTierNameFromPelt(string cardName) { - string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace(" ", ""); - result = result.Split('_').Last().ToTitleCase(); + if (cardName.Contains("pelt") || cardName.Contains("pelt") { + string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", ""); + result = result.Split('_').Last().ToTitleCase(); + } else { + string result = cardName.ToLowerInvarient(); + result = result.Split('_').Last().ToTitleCase(); + } return result; } @@ -227,4 +236,4 @@ public static string GetTierNameFromData(PeltData peltData) { return peltData.peltTierName ?? GetTierNameFromPelt(peltData.peltCardName); } -} \ No newline at end of file +} From c2cb80f51d7699f4a21e640cf2a1b1ffeec1cd5a Mon Sep 17 00:00:00 2001 From: Thin Creator 3483 <102002463+SaxbyMod@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:27:11 -0500 Subject: [PATCH 2/7] Update PeltManager.cs * Fix Code Flow --- InscryptionAPI/Pelts/PeltManager.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/InscryptionAPI/Pelts/PeltManager.cs b/InscryptionAPI/Pelts/PeltManager.cs index ccc857c2..0338a13b 100644 --- a/InscryptionAPI/Pelts/PeltManager.cs +++ b/InscryptionAPI/Pelts/PeltManager.cs @@ -207,15 +207,21 @@ internal static void CreateDialogueEvents() string dialogueId = "TraderPelts" + name; if (!DialogueManager.CustomDialogue.Exists(x => x.DialogueEvent.id == dialogueId)) { - DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, - new() - { - if (cardName.Contains("pelt") || cardName.Contains("pelt") { - + if (cardName.Contains("pelt") || cardName.Contains("pelt") { + DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, + new() + { name + "pelts..." - } else { + } + ); + } else { + DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, + new() + { name + "..." - }); + } + ); + } } } } From 45fbcd1202225be55b80fa2d62979c98d386310a Mon Sep 17 00:00:00 2001 From: Thin Creator 3483 <102002463+SaxbyMod@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:29:39 -0500 Subject: [PATCH 3/7] Update PeltManager.cs * Bit More Logic Fixing --- InscryptionAPI/Pelts/PeltManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InscryptionAPI/Pelts/PeltManager.cs b/InscryptionAPI/Pelts/PeltManager.cs index 0338a13b..b0c7387a 100644 --- a/InscryptionAPI/Pelts/PeltManager.cs +++ b/InscryptionAPI/Pelts/PeltManager.cs @@ -207,7 +207,7 @@ internal static void CreateDialogueEvents() string dialogueId = "TraderPelts" + name; if (!DialogueManager.CustomDialogue.Exists(x => x.DialogueEvent.id == dialogueId)) { - if (cardName.Contains("pelt") || cardName.Contains("pelt") { + if (cardName.Contains("pelt") || cardName.Contains("pelt")) { DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, new() { @@ -228,7 +228,7 @@ internal static void CreateDialogueEvents() public static string GetTierNameFromPelt(string cardName) { - if (cardName.Contains("pelt") || cardName.Contains("pelt") { + if (cardName.Contains("pelt") || cardName.Contains("pelt")) { string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", ""); result = result.Split('_').Last().ToTitleCase(); } else { From 738de32be2b471a72fa896174fb7a1848f55d7c0 Mon Sep 17 00:00:00 2001 From: Thin Creator 3483 <102002463+SaxbyMod@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:34:23 -0500 Subject: [PATCH 4/7] Update PeltManager.cs * Even more Logic Fixing (Should have done this in VS instead of Github..... --- InscryptionAPI/Pelts/PeltManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InscryptionAPI/Pelts/PeltManager.cs b/InscryptionAPI/Pelts/PeltManager.cs index b0c7387a..059ffb40 100644 --- a/InscryptionAPI/Pelts/PeltManager.cs +++ b/InscryptionAPI/Pelts/PeltManager.cs @@ -207,7 +207,7 @@ internal static void CreateDialogueEvents() string dialogueId = "TraderPelts" + name; if (!DialogueManager.CustomDialogue.Exists(x => x.DialogueEvent.id == dialogueId)) { - if (cardName.Contains("pelt") || cardName.Contains("pelt")) { + if (peltCardInfo.displayedName.Contains("pelt") || peltCardInfo.displayedName.Contains("pelt")) { DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, new() { @@ -232,7 +232,7 @@ public static string GetTierNameFromPelt(string cardName) string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", ""); result = result.Split('_').Last().ToTitleCase(); } else { - string result = cardName.ToLowerInvarient(); + string result = cardName.ToLowerInvariant(); result = result.Split('_').Last().ToTitleCase(); } From ae7d60ca1e5205aa095bd20862fbffbfd9df35cb Mon Sep 17 00:00:00 2001 From: Thin Creator 3483 <102002463+SaxbyMod@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:58:56 -0500 Subject: [PATCH 5/7] Update PeltManager.cs * More Tweaking to try and get Github To Behave --- InscryptionAPI/Pelts/PeltManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/InscryptionAPI/Pelts/PeltManager.cs b/InscryptionAPI/Pelts/PeltManager.cs index 059ffb40..a1131864 100644 --- a/InscryptionAPI/Pelts/PeltManager.cs +++ b/InscryptionAPI/Pelts/PeltManager.cs @@ -207,7 +207,7 @@ internal static void CreateDialogueEvents() string dialogueId = "TraderPelts" + name; if (!DialogueManager.CustomDialogue.Exists(x => x.DialogueEvent.id == dialogueId)) { - if (peltCardInfo.displayedName.Contains("pelt") || peltCardInfo.displayedName.Contains("pelt")) { + if (name.Contains("pelt") || name.Contains("pelt")) { DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, new() { @@ -228,11 +228,12 @@ internal static void CreateDialogueEvents() public static string GetTierNameFromPelt(string cardName) { + strring result = ""; if (cardName.Contains("pelt") || cardName.Contains("pelt")) { - string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", ""); + result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", ""); result = result.Split('_').Last().ToTitleCase(); } else { - string result = cardName.ToLowerInvariant(); + result = cardName.ToLowerInvariant(); result = result.Split('_').Last().ToTitleCase(); } From 47027da31165a7d5beef35fad1e2f10b58ec8c70 Mon Sep 17 00:00:00 2001 From: Thin Creator 3483 <102002463+SaxbyMod@users.noreply.github.com> Date: Sat, 23 Nov 2024 12:00:17 -0500 Subject: [PATCH 6/7] Update PeltManager.cs * String is spelled with one `r` not two --- InscryptionAPI/Pelts/PeltManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InscryptionAPI/Pelts/PeltManager.cs b/InscryptionAPI/Pelts/PeltManager.cs index a1131864..d4d0f951 100644 --- a/InscryptionAPI/Pelts/PeltManager.cs +++ b/InscryptionAPI/Pelts/PeltManager.cs @@ -228,7 +228,7 @@ internal static void CreateDialogueEvents() public static string GetTierNameFromPelt(string cardName) { - strring result = ""; + string result = ""; if (cardName.Contains("pelt") || cardName.Contains("pelt")) { result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", ""); result = result.Split('_').Last().ToTitleCase(); From 5d70c468d3e858be1828ba608c73e29f9157adf0 Mon Sep 17 00:00:00 2001 From: Thin Creator 3483 <102002463+SaxbyMod@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:17:48 -0500 Subject: [PATCH 7/7] Pelts Working In Game --- CHANGELOG.md | 5 +++++ InscryptionAPI/InscryptionAPI.csproj | 2 +- InscryptionAPI/InscryptionAPIPlugin.cs | 2 +- README.md | 23 +++++++++++++++++------ docs/wiki/getting_started.md | 17 ++++++++++++----- 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41616525..6ef94fe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@
View Changelog +# 2.22.3 +- Fixed pelt names when a user goes to the trader with modded cards, Examples shown below. + + + # 2.22.2 - Added GetEnergyConfig method to community patch's EnergyDrone class - retrieves the current Act's EnergyConfigInfo - CommunityPatches: Added community config to move pelt price tags to the right of the card diff --git a/InscryptionAPI/InscryptionAPI.csproj b/InscryptionAPI/InscryptionAPI.csproj index 8d4a0a4f..97fe1263 100644 --- a/InscryptionAPI/InscryptionAPI.csproj +++ b/InscryptionAPI/InscryptionAPI.csproj @@ -10,7 +10,7 @@ full false true - 2.22.2 + 2.22.3 diff --git a/InscryptionAPI/InscryptionAPIPlugin.cs b/InscryptionAPI/InscryptionAPIPlugin.cs index 822013cd..8ba20cbe 100644 --- a/InscryptionAPI/InscryptionAPIPlugin.cs +++ b/InscryptionAPI/InscryptionAPIPlugin.cs @@ -30,7 +30,7 @@ public class InscryptionAPIPlugin : BaseUnityPlugin { public const string ModGUID = "cyantist.inscryption.api"; public const string ModName = "InscryptionAPI"; - public const string ModVer = "2.22.2"; + public const string ModVer = "2.22.3"; public static string Directory = ""; diff --git a/README.md b/README.md index bd871598..40e1ecc0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - # API ## Inscryption API @@ -26,11 +25,16 @@ It can currently create and modify: Additionally, a number of quality-of-life patches from the community are included with each release. -### Installing with a Mod Manager (recommended) -1. Download and install [Thunderstore Mod Manager](https://www.overwolf.com/app/Thunderstore-Thunderstore_Mod_Manager) or [r2modman](https://Timberborn.thunderstore.io/package/ebkr/r2modman/). +### Installing with a Mod Manager +1. Download and install [Thunderstore Mod Manager](https://www.overwolf.com/app/Thunderstore-Thunderstore_Mod_Manager), [Gale](https://thunderstore.io/c/inscryption/p/Kesomannen/GaleModManager/) or [r2modman](https://thunderstore.io/c/inscryption/p/ebkr/r2modman/). 2. Click the **Install with Mod Manager** button on the top of [BepInEx's](https://thunderstore.io/package/download/BepInEx/BepInExPack_Inscryption/5.4.1902/) page. 3. Run the game via the mod manager. +If you have issues with ModmManagers head to one of these discords; + +* **Thunderstore/R2ModMan Support Discord:** [Here](https://discord.gg/Fbz54kQAxg) +* **Gale Mod Manager Support Discord:** [Here](https://discord.gg/sfuWXRfeTt) + ### Installing Manually 1. Install [BepInEx](https://thunderstore.io/package/download/BepInEx/BepInExPack_Inscryption/5.4.1902/) by pressing 'Manual Download' and extract the contents into a folder. **Do not extract into the game folder!** 2. Move the contents of the 'BepInExPack_Inscryption' folder into the game folder (where the game executable is). @@ -42,7 +46,7 @@ Additionally, a number of quality-of-life patches from the community are include 8. Run the game again. If everything runs correctly, a message will appear in the console telling you that the API was loaded. ### Installing on the Steam Deck -1. Download [r2modman](https://Timberborn.thunderstore.io/package/ebkr/r2modman/) on the Steam Deck’s Desktop Mode and open it from its download using its `AppImage` file. +1. Download [r2modman](https://thunderstore.io/c/inscryption/p/ebkr/r2modman/) on the Steam Deck’s Desktop Mode and open it from its download using its `AppImage` file. 2. Download the mods you plan on using and their dependencies.. 3. Go to the setting of the profile you are using for the mods and click `Browse Profile Folder`. 4. Copy the BepInEx folder, then go to Steam and open Inscryption's Properties menu @@ -52,10 +56,14 @@ Additionally, a number of quality-of-life patches from the community are include 8. Open Inscryption. If everything was done correctly, you should see a console appear on your screen. ### Mac & Linux -1. Follow the steps here first: [Installing BepInEx](https://docs.bepinex.dev/articles/user_guide/installation/index.html?tabs=tabid-nix) +1. Follow the steps here first: 2. Next do steps 4-8 of the Manual Installation 3. Your game should be setup for inscryption modding now +If you have any issues with Mac/Linux, Steam Deck, or Manual head over to the discord for this game: + +* **Inscryption Modding Discord:** [Here](https://discord.gg/ZQPvfKEpwM) + An example mod utilising this plugin can be found [here](https://github.com/debugman18/InscryptionExampleMod), and the modding wiki and documentation can be found [here](https://inscryptionmodding.github.io/InscryptionAPI/wiki/index.html). @@ -110,9 +118,10 @@ Fixes the OverrideAbilityIcon method to work in Act 2. # Using the API Inscryption API 2.0 tries to have you use the original game's objects as much as possible. For example, there are no more 'NewCard' and 'CustomCard' objects; instead, you are responsible to create CardInfo objects yourself and add them. + The API does provide a number of helper methods to make this process simpler for you. -For more information, please check out the wiki: https://inscryptionmodding.github.io/InscryptionAPI/wiki/ +For more information, please check out the wiki: [Here](https://inscryptionmodding.github.io/InscryptionAPI/wiki/), and if you need any help with anything related to the API send a message over in [Inscryption Modding Discord](https://discord.gg/QrJEF5Denm). ## Contribution @@ -141,3 +150,5 @@ Contributors and builders of API 2.0: - Void Slime - WhistleWind - Windows10CE +- Keks307 +- ThinCreator3483 \ No newline at end of file diff --git a/docs/wiki/getting_started.md b/docs/wiki/getting_started.md index e5da6939..77aa9c99 100644 --- a/docs/wiki/getting_started.md +++ b/docs/wiki/getting_started.md @@ -3,12 +3,15 @@ To begin, we'll go over how to install BepInEx, the framework all Inscryption mods use. This is a necessary step to playing modded Inscryption, so be sure to follow this carefully. ### Installing with a Mod Manager -This is the recommended way to install BepInEx to the game. - -1. Download and install [Thunderstore Mod Manager](https://www.overwolf.com/app/Thunderstore-Thunderstore_Mod_Manager) or [r2modman](https://Timberborn.thunderstore.io/package/ebkr/r2modman/). +1. Download and install [Thunderstore Mod Manager](https://www.overwolf.com/app/Thunderstore-Thunderstore_Mod_Manager), [Gale](https://thunderstore.io/c/inscryption/p/Kesomannen/GaleModManager/) or [r2modman](https://thunderstore.io/c/inscryption/p/ebkr/r2modman/). 2. Click the **Install with Mod Manager** button on the top of [BepInEx's](https://thunderstore.io/package/download/BepInEx/BepInExPack_Inscryption/5.4.1902/) page. 3. Run the game via the mod manager. +If you have issues with ModmManagers head to one of these discords; + +* **Thunderstore/R2ModMan Support Discord:** [Here](https://discord.gg/Fbz54kQAxg) +* **Gale Mod Manager Support Discord:** [Here](https://discord.gg/sfuWXRfeTt) + ### Installing Manually 1. Install [BepInEx](https://thunderstore.io/package/download/BepInEx/BepInExPack_Inscryption/5.4.1902/) by pressing 'Manual Download' and extract the contents into a folder. **Do not extract into the game folder!** 2. Move the contents of the 'BepInExPack_Inscryption' folder into the game folder (where the game executable is). @@ -20,7 +23,7 @@ This is the recommended way to install BepInEx to the game. 8. Run the game again. If everything runs correctly, a message will appear in the console telling you that the API was loaded. ### Installing on the Steam Deck -1. Download [r2modman](https://Timberborn.thunderstore.io/package/ebkr/r2modman/) on the Steam Deck’s Desktop Mode and open it from its download using its `AppImage` file. +1. Download [r2modman](https://thunderstore.io/c/inscryption/p/ebkr/r2modman/) on the Steam Deck’s Desktop Mode and open it from its download using its `AppImage` file. 2. Download the mods you plan on using and their dependencies.. 3. Go to the setting of the profile you are using for the mods and click `Browse Profile Folder`. 4. Copy the BepInEx folder, then go to Steam and open Inscryption's Properties menu @@ -34,6 +37,10 @@ This is the recommended way to install BepInEx to the game. 2. Next do steps 4-8 of the Manual Installation 3. Your game should be setup for inscryption modding now +If you have any issues with Mac/Linux, Steam Deck, or Manual head over to the discord for this game: + +* **Inscryption Modding Discord:** [Here](https://discord.gg/ZQPvfKEpwM) + ## Getting Started: Modding --- Modding Inscryption requires a knowledge of coding in C#, and in many cases an understanding of how to patch the game using HarmonyPatch. @@ -45,7 +52,7 @@ If you're unfamiliar with any of this, or just want to create cards and sigils, JSONLoader's documentation can be found [here](https://github.com/MADH95/JSONLoader). -A video tutorial covering how to use JSONLoader can be found [here](https://www.youtube.com/watch?v=grTSkpI4U7g). +A video tutorial covering how to use JSONLoader in a basic form can be found [here](https://www.youtube.com/watch?v=grTSkpI4U7g). ### Modding with C# To begin modding with C#, you will need to create a new C# project using a code editor.