Skip to content

Commit da6e101

Browse files
authored
Merge pull request #318 from SaxbyMod/patch-3
Fix Pelt Name when Trader says the line
2 parents 186cd59 + 5d70c46 commit da6e101

File tree

6 files changed

+60
-21
lines changed

6 files changed

+60
-21
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<details>
22
<summary>View Changelog</summary>
33

4+
# 2.22.3
5+
- Fixed pelt names when a user goes to the trader with modded cards, Examples shown below.
6+
<img src="https://github.com/user-attachments/assets/49b9da13-e602-4020-a560-40344e9ef6af" width="750">
7+
<img src="https://github.com/user-attachments/assets/4b432cc9-a0f7-4d75-99b4-8951ba46705b" width="750">
8+
49
# 2.22.2
510
- Added GetEnergyConfig method to community patch's EnergyDrone class - retrieves the current Act's EnergyConfigInfo
611
- CommunityPatches: Added community config to move pelt price tags to the right of the card

InscryptionAPI/InscryptionAPI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<DebugType>full</DebugType>
1111
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1212
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
13-
<Version>2.22.2</Version>
13+
<Version>2.22.3</Version>
1414
</PropertyGroup>
1515

1616
<PropertyGroup>

InscryptionAPI/InscryptionAPIPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class InscryptionAPIPlugin : BaseUnityPlugin
3030
{
3131
public const string ModGUID = "cyantist.inscryption.api";
3232
public const string ModName = "InscryptionAPI";
33-
public const string ModVer = "2.22.2";
33+
public const string ModVer = "2.22.3";
3434

3535
public static string Directory = "";
3636

InscryptionAPI/Pelts/PeltManager.cs

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,24 +207,40 @@ internal static void CreateDialogueEvents()
207207
string dialogueId = "TraderPelts" + name;
208208
if (!DialogueManager.CustomDialogue.Exists(x => x.DialogueEvent.id == dialogueId))
209209
{
210-
DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId,
211-
new()
212-
{
213-
name + " pelts..."
214-
});
210+
if (name.Contains("pelt") || name.Contains("pelt")) {
211+
DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId,
212+
new()
213+
{
214+
name + "pelts..."
215+
}
216+
);
217+
} else {
218+
DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId,
219+
new()
220+
{
221+
name + "..."
222+
}
223+
);
224+
}
215225
}
216226
}
217227
}
218228

219229
public static string GetTierNameFromPelt(string cardName)
220230
{
221-
string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace(" ", "");
222-
result = result.Split('_').Last().ToTitleCase();
231+
string result = "";
232+
if (cardName.Contains("pelt") || cardName.Contains("pelt")) {
233+
result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", "");
234+
result = result.Split('_').Last().ToTitleCase();
235+
} else {
236+
result = cardName.ToLowerInvariant();
237+
result = result.Split('_').Last().ToTitleCase();
238+
}
223239

224240
return result;
225241
}
226242
public static string GetTierNameFromData(PeltData peltData)
227243
{
228244
return peltData.peltTierName ?? GetTierNameFromPelt(peltData.peltCardName);
229245
}
230-
}
246+
}

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# API
32

43
## Inscryption API
@@ -26,11 +25,16 @@ It can currently create and modify:
2625

2726
Additionally, a number of quality-of-life patches from the community are included with each release.
2827

29-
### Installing with a Mod Manager (recommended)
30-
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/).
28+
### Installing with a Mod Manager
29+
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/).
3130
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.
3231
3. Run the game via the mod manager.
3332

33+
If you have issues with ModmManagers head to one of these discords;
34+
35+
* **Thunderstore/R2ModMan Support Discord:** [Here](https://discord.gg/Fbz54kQAxg)
36+
* **Gale Mod Manager Support Discord:** [Here](https://discord.gg/sfuWXRfeTt)
37+
3438
### Installing Manually
3539
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!**
3640
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
4246
8. Run the game again. If everything runs correctly, a message will appear in the console telling you that the API was loaded.
4347

4448
### Installing on the Steam Deck
45-
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.
49+
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.
4650
2. Download the mods you plan on using and their dependencies..
4751
3. Go to the setting of the profile you are using for the mods and click `Browse Profile Folder`.
4852
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
5256
8. Open Inscryption. If everything was done correctly, you should see a console appear on your screen.
5357

5458
### Mac & Linux
55-
1. Follow the steps here first: [Installing BepInEx](https://docs.bepinex.dev/articles/user_guide/installation/index.html?tabs=tabid-nix)
59+
1. Follow the steps here first: <https://docs.bepinex.dev/articles/user_guide/installation/index.html>
5660
2. Next do steps 4-8 of the Manual Installation
5761
3. Your game should be setup for inscryption modding now
5862

63+
If you have any issues with Mac/Linux, Steam Deck, or Manual head over to the discord for this game:
64+
65+
* **Inscryption Modding Discord:** [Here](https://discord.gg/ZQPvfKEpwM)
66+
5967
An example mod utilising this plugin can be found [here](https://github.com/debugman18/InscryptionExampleMod),
6068
and the modding wiki and documentation can be found [here](https://inscryptionmodding.github.io/InscryptionAPI/wiki/index.html).
6169

@@ -110,9 +118,10 @@ Fixes the OverrideAbilityIcon method to work in Act 2.
110118
# Using the API
111119

112120
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.
121+
113122
The API does provide a number of helper methods to make this process simpler for you.
114123

115-
For more information, please check out the wiki: https://inscryptionmodding.github.io/InscryptionAPI/wiki/
124+
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).
116125

117126
## Contribution
118127

@@ -141,3 +150,5 @@ Contributors and builders of API 2.0:
141150
- Void Slime
142151
- WhistleWind
143152
- Windows10CE
153+
- Keks307
154+
- ThinCreator3483

docs/wiki/getting_started.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
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.
44

55
### Installing with a Mod Manager
6-
This is the recommended way to install BepInEx to the game.
7-
8-
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/).
6+
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/).
97
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.
108
3. Run the game via the mod manager.
119

10+
If you have issues with ModmManagers head to one of these discords;
11+
12+
* **Thunderstore/R2ModMan Support Discord:** [Here](https://discord.gg/Fbz54kQAxg)
13+
* **Gale Mod Manager Support Discord:** [Here](https://discord.gg/sfuWXRfeTt)
14+
1215
### Installing Manually
1316
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!**
1417
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.
2023
8. Run the game again. If everything runs correctly, a message will appear in the console telling you that the API was loaded.
2124

2225
### Installing on the Steam Deck
23-
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.
26+
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.
2427
2. Download the mods you plan on using and their dependencies..
2528
3. Go to the setting of the profile you are using for the mods and click `Browse Profile Folder`.
2629
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.
3437
2. Next do steps 4-8 of the Manual Installation
3538
3. Your game should be setup for inscryption modding now
3639

40+
If you have any issues with Mac/Linux, Steam Deck, or Manual head over to the discord for this game:
41+
42+
* **Inscryption Modding Discord:** [Here](https://discord.gg/ZQPvfKEpwM)
43+
3744
## Getting Started: Modding
3845
---
3946
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,
4552

4653
JSONLoader's documentation can be found [here](https://github.com/MADH95/JSONLoader).
4754

48-
A video tutorial covering how to use JSONLoader can be found [here](https://www.youtube.com/watch?v=grTSkpI4U7g).
55+
A video tutorial covering how to use JSONLoader in a basic form can be found [here](https://www.youtube.com/watch?v=grTSkpI4U7g).
4956

5057
### Modding with C#
5158
To begin modding with C#, you will need to create a new C# project using a code editor.

0 commit comments

Comments
 (0)