Skip to content

Commit

Permalink
Merge pull request #318 from SaxbyMod/patch-3
Browse files Browse the repository at this point in the history
Fix Pelt Name when Trader says the line
  • Loading branch information
IngoHHacks authored Nov 29, 2024
2 parents 186cd59 + 5d70c46 commit da6e101
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<details>
<summary>View Changelog</summary>

# 2.22.3
- Fixed pelt names when a user goes to the trader with modded cards, Examples shown below.
<img src="https://github.com/user-attachments/assets/49b9da13-e602-4020-a560-40344e9ef6af" width="750">
<img src="https://github.com/user-attachments/assets/4b432cc9-a0f7-4d75-99b4-8951ba46705b" width="750">

# 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
Expand Down
2 changes: 1 addition & 1 deletion InscryptionAPI/InscryptionAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<DebugType>full</DebugType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Version>2.22.2</Version>
<Version>2.22.3</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion InscryptionAPI/InscryptionAPIPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";

Expand Down
32 changes: 24 additions & 8 deletions InscryptionAPI/Pelts/PeltManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,24 +207,40 @@ internal static void CreateDialogueEvents()
string dialogueId = "TraderPelts" + name;
if (!DialogueManager.CustomDialogue.Exists(x => x.DialogueEvent.id == dialogueId))
{
DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId,
new()
{
name + " pelts..."
});
if (name.Contains("pelt") || name.Contains("pelt")) {
DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId,
new()
{
name + "pelts..."
}
);
} else {
DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId,
new()
{
name + "..."
}
);
}
}
}
}

public static string GetTierNameFromPelt(string cardName)
{
string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace(" ", "");
result = result.Split('_').Last().ToTitleCase();
string result = "";
if (cardName.Contains("pelt") || cardName.Contains("pelt")) {
result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", "");
result = result.Split('_').Last().ToTitleCase();
} else {
result = cardName.ToLowerInvariant();
result = result.Split('_').Last().ToTitleCase();
}

return result;
}
public static string GetTierNameFromData(PeltData peltData)
{
return peltData.peltTierName ?? GetTierNameFromPelt(peltData.peltCardName);
}
}
}
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# API

## Inscryption API
Expand Down Expand Up @@ -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).
Expand All @@ -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
Expand All @@ -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: <https://docs.bepinex.dev/articles/user_guide/installation/index.html>
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).

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -141,3 +150,5 @@ Contributors and builders of API 2.0:
- Void Slime
- WhistleWind
- Windows10CE
- Keks307
- ThinCreator3483
17 changes: 12 additions & 5 deletions docs/wiki/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit da6e101

Please sign in to comment.