41 |
--------------------------------------------------------------------------------
/docs/template/darkfx/partials/footer.tmpl.partial:
--------------------------------------------------------------------------------
1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
2 |
3 |
--------------------------------------------------------------------------------
/docs/template/darkfx/partials/head.tmpl.partial:
--------------------------------------------------------------------------------
1 | {{!Copyright (c) Oscar Vasquez. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
2 |
3 |
4 |
5 |
6 | {{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}
7 |
8 |
9 |
10 | {{#_description}}{{/_description}}
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{#_noindex}}{{/_noindex}}
18 | {{#_enableSearch}}{{/_enableSearch}}
19 | {{#_enableNewTab}}{{/_enableNewTab}}
20 |
--------------------------------------------------------------------------------
/docs/template/darkfx/styles/toggle-theme.js:
--------------------------------------------------------------------------------
1 | const sw = document.getElementById("switch-style"), sw_mobile = document.getElementById("switch-style-m"), b = document.body;
2 | if (b) {
3 | function toggleTheme(target, dark) {
4 | target.classList.toggle("dark-theme", dark)
5 | target.classList.toggle("light-theme", !dark)
6 | }
7 |
8 | function switchEventListener() {
9 | toggleTheme(b, this.checked);
10 | if (window.localStorage) {
11 | this.checked ? localStorage.setItem("theme", "dark-theme") : localStorage.setItem("theme", "light-theme")
12 | }
13 | }
14 |
15 | var isDarkTheme = !window.localStorage || !window.localStorage.getItem("theme") || window.localStorage && localStorage.getItem("theme") === "dark-theme";
16 |
17 | if(sw && sw_mobile){
18 | sw.checked = isDarkTheme;
19 | sw_mobile.checked = isDarkTheme;
20 |
21 | sw.addEventListener("change", switchEventListener);
22 | sw_mobile.addEventListener("change", switchEventListener);
23 |
24 | // sync state between switches
25 | sw.addEventListener("change", function() {
26 | sw_mobile.checked = this.checked;
27 | });
28 |
29 | sw_mobile.addEventListener("change", function() {
30 | sw.checked = this.checked;
31 | });
32 | }
33 |
34 | toggleTheme(b, isDarkTheme);
35 | }
--------------------------------------------------------------------------------
/docs/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Home
2 | href: index.md
3 | - name: Wiki
4 | href: wiki/
5 | homepage: wiki/index.md
6 | - name: API Documentation
7 | href: api/
8 | homepage: api/index.md
--------------------------------------------------------------------------------
/docs/wiki/asset_bundle.md:
--------------------------------------------------------------------------------
1 | ## Asset Bundles
2 | ---
3 | Asset bundles are how you can import your own models, textures, gameobjects and more into Inscryption.
4 |
5 | Think of them as fancy .zip's that are supported by Unity.
6 |
7 | ### Making Asset Bundles
8 | 1. Make a Unity project. Make sure you are using 2019.4.24f1 or your models will not show in-game.
9 | 2. Install the AssetBundleBrowser package. (Window->Package Manager)
10 | 3. Select the assets you want to be in the bundle (They need to be in the hierarchy, not in a scene!)
11 | 4. At the bottom of the Inspector window you'll see a section labedled "Asset Bundle"
12 | 5. Assign a new asset bundle name (example: testbundleexample)
13 | 6. Build Asset bundles Window->AssetBundle Browser
14 | 7. Go to the output path using file explorer
15 | 8. There should be a file called 'testbundleexample' in that folder (It will not have an extension!)
16 | 9. Copy this file into your mod folder
17 |
18 | ### Loading Asset Bundles
19 |
20 | ```csharp
21 | if (AssetBundleHelper.TryGet("pathToBundleFile", "nameOfPrefabInsideAssetBundle", out GameObject prefab))
22 | {
23 | GameObject clone = GameObject.Instantiate(prefab);
24 | // Do things with gameobject!
25 | }
26 | ```
27 |
28 | First parameter is the path to the asset bundle that we copied to your mod folder in #9.
29 |
30 | Second parameter is the name of the prefab or texture... etc that you changed to have the asset bundle name in #4.
31 |
32 | Third parameter is the result of taking the object out of the asset bundle.
33 |
34 | **NOTE**: Getting a prefab from an asset bundle does not load it into the world. You need to clone it with Instantiate!
35 |
36 | **NOTE 2**: If the GameObject is being created but the model isn't showing up in-game, make sure you are using Unity 2019.4.24f1 to build the asset bundle; the model will not show up otherwise!
--------------------------------------------------------------------------------
/docs/wiki/localisation.md:
--------------------------------------------------------------------------------
1 | ## Localisation
2 | ---
3 | While Inscryption already provides translations for a number of languages, these only apply to the base game's text, meaning any modded content is stuck in the language it was written in.
4 |
5 | To alleviate this problem, the API provides support for adding new translations and even new languages.
6 |
7 | ### Adding new Translations
8 | If you want to add your own translations to Inscryption you can use the API's localisation system.
9 | ```csharp
10 | LocalizationManager.Translate("MyModGUID", null, "Hello", "안녕하세요", Language.Korean);
11 | ```
12 |
13 | ## Default languages
14 | ---
15 | The default supported languages are listed in the table below.
16 |
17 | | Suffix | Language |
18 | |--------|-------------|
19 | | fr | French |
20 | | it | Italian |
21 | | de | German |
22 | | es | Spanish |
23 | | pt | Portuguese |
24 | | tr | Turkish |
25 | | ru | Russian |
26 | | ja | Japanese |
27 | | ko | Korean |
28 | | zhcn | Chinese (Simplified) |
29 | | zhtw | Chinese (Traditional)|
30 |
31 | ### Adding new Languages
32 | If you want to translate into an unsupported language, you can add a new langauge and translation like so:
33 | ```csharp
34 | LocalizationManager.NewLanguage("MyModGUID", "Polish", "PL", "Reset With Polish", pathToCSV);
35 | ```
36 |
37 | Your language file must be a .csv, and formatted in the following way so the API can read it properly:
38 | ```
39 | Column1,Column10,PL
40 | TALKING_STOAT_DIALOGUE_STOATSACRIFICE_REPEAT_#2_852_M,Again...,Ponownie...
41 | _OPPONENTSKIPTURN_REPEAT_#1_558_M,Pass.,Przechodzić.
42 | ```
--------------------------------------------------------------------------------
/docs/wiki/rulebook.md:
--------------------------------------------------------------------------------
1 | ## The Rulebook
2 | The Rulebook is a vital tool for the player while playing outside of Act 2.
3 |
4 | Every ability, stat icon, boon, and item that can appear in the current Act will have an entry in the book, providing information on what each one does.
5 | Custom abilities and such will appear in the rulebook if marked to do so in their `metaCategories` field*.
6 |
7 | For most situations, this will be the extent of your modding experience with the rulebook; if you want an ability to appear in Act 1, you give it the appropriate AbilityMetaCategoy.
8 | If you don't want a stat icon to appear in the rulebook at all, you leave `metaCategories` empty.
9 |
10 | However, there are some instances where you'll want to modify the rulebook even further, such as adding custom pages or even a whole new section to the rulebook.
11 | In these cases, the API has you covered.
12 |
13 | However, there may arise cases where this is insufficient for your needs.
14 | Maybe you want an ability to always appear at the beginning of the Rulebook for some reason, or you want to add a whole new section to the Rulebook.
15 | The former case can be easily handled with a simple patch to RuleBookInfo.ConstructPageData, but the latter can get fairly complicated.
16 | In either case, you can use the API's RuleBookManager to make this process simpler.
17 |
18 | \* *Items and Boons can be made to appear in multiple Acts or outside Act 1 by modifying their associated Full(...)Info.*
--------------------------------------------------------------------------------
/docs/wiki/sniper.md:
--------------------------------------------------------------------------------
1 | ## Custom Sniper Logic
2 | ---
3 | Though not technically part of the API proper, the community patches still offer a number of useful options for modders to take advantage of.
4 |
5 | InscryptionCommunityPatch.Card.SniperFix, as its name suggests, fixes the Sniper ability when used in Act 1. It does more than just that, however; it also expands the Sniper ability's logic into a number of overridable methods, allowing for further customisation to how Sniper functions in all parts of the game.
6 |
7 | To modify these methods, you will need to patch them using Harmony.
8 |
9 | These methods are:
10 | - DoSniperLogic() - controls whether to use player or opponent sniper logic
11 | - DoAttackTargetSlotsLogic() - controls attack logic for each target slot
12 | - GetValidTargets() - returns the list of card slot the player and opponent can target
13 | - PlayerTargetSelectedCallback() - called when the player selects a valid target
14 | - PlayerSlotCursorEnterCallback() - called when the player's cursor enters a slot
15 | - OpponentSelectTarget() - returns a card slot for the opponent to target and attack
16 |
17 | For example, if you wanted to allow cards with the Sniper ability to target any card slot, including slots on the same side of the board, you would do:
18 | ```
19 | [HarmonyPostfix, HarmonyPatch(typeof(SniperFix), nameof(SniperFix.GetValidTargets))]
20 | private static void TargetAllSlots(ref List __result, bool playerIsAttacker, CardSlot attackingSlot)
21 | {
22 | __result = BoardManager.Instance.AllSlotsCopy; // override the default list of valid targets
23 | __result.Remove(attackingSlot); // remove the currently attacking slot as a valid target
24 | }
25 | ```
--------------------------------------------------------------------------------
/docs/wiki/sound.md:
--------------------------------------------------------------------------------
1 | ## Adding Music Tracks to the Gramophone
2 | ---
3 | This API supports adding new tracks to the Gramophone in Leshy's Cabin.
4 | (A user must have the Hex disc unlocked in order to be able to listen to the new tracks.)
5 |
6 | All you need for that is a regular audio file. The API will do all of the conversion. The file should be inside the 'plugins' folder. and the supported audio formats are MP3, WAV, OGG and AIFF.
7 |
8 | You can register your track like this:
9 |
10 | ```csharp
11 | GramophoneManager.AddTrack(PluginGuid, "MyFile.wav", 0.5f);
12 | ```
13 | The first parameter should be your plugin's GUID. The second parameter should be your file's name.
14 | The third parameter is optional, and determines the volume of your track, from 0 to 1f.
15 |
16 | ## Converting Audio Files to Unity AudioClip Objects
17 | This API provides a helper method for converting audio files to Unity AudioClip objects so that they can be played in-game with the AudioSource component. You can use this to replace in-game music through patches, or to play your own sound effects.
18 |
19 | The audio file should be located inside of the 'plugins' folder. The supported audio formats are MP3, WAV, OGG and AIFF.
20 |
21 | You can convert your audio file into an AudioClip object like this:
22 |
23 | ```csharp
24 | AudioClip audio = SoundManager.LoadAudioClip("Example.mp3");
25 | ```
--------------------------------------------------------------------------------
/docs/wiki/toc.yml:
--------------------------------------------------------------------------------
1 | items:
2 | - name: Home
3 | href: index.md
4 | - name: Getting Started
5 | href: getting_started.md
6 | - name: Cards
7 | href: card_management.md
8 | items:
9 | - name: Custom Costs
10 | href: custom_costs.md
11 | - name: Talking Cards
12 | href: talking_cards.md
13 | - name: Custom Pelts
14 | href: pelts.md
15 | - name: Abilities
16 | href: ability_management.md
17 | items:
18 | - name: Triggers and Interfaces
19 | href: triggers.md
20 | - name: Slot Modification
21 | href: slots.md
22 | - name: DamageShieldBehaviour
23 | href: shield.md
24 | - name: Custom Sniper Logic
25 | href: sniper.md
26 | - name: Custom Properties
27 | href: custom_properties.md
28 | - name: Ascension (Kaycee's Mod)
29 | href: ascension.md
30 | - name: Maps and Encounters
31 | href: map.md
32 | - name: Opponents
33 | href: opponent.md
34 | - name: Totems
35 | href: totems.md
36 | - name: Items
37 | href: items.md
38 | - name: The Rulebook
39 | href: rulebook.md
40 | items:
41 | - name: Adding Custom Pages
42 | href: rulebook_sections.md
43 | - name: Adding Text Redirects
44 | href: redirect.md
45 | - name: Asset Bundles
46 | href: asset_bundle.md
47 | - name: Sound
48 | href: sound.md
49 | - name: Localisation
50 | href: localisation.md
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InscryptionModding/InscryptionAPI/d56bf5bd89588fb2fb73251c71d60ea43ecc7959/icon.png
--------------------------------------------------------------------------------
/thunderstore.toml:
--------------------------------------------------------------------------------
1 | [config]
2 | schemaVersion = "0.0.1"
3 |
4 | [package]
5 | namespace = "API_dev"
6 | name = "API"
7 | versionNumber = "2.15.2"
8 | description = "The de-facto standard core API for all Inscryption mods. This lets you create new cards, abilities, challenges, map nodes, starter decks, and more."
9 | websiteUrl = "https://github.com/ScottWilson0903/InscryptionAPI"
10 | containsNsfwContent = false
11 |
12 | [package.dependencies]
13 | BepInEx-BepInExPack_Inscryption = "5.4.1902"
14 | BepInEx-MonoMod_Loader_Inscryption = "1.0.0"
15 |
16 | [build]
17 | icon = "./icon.png"
18 | readme = "./README.md"
19 | outdir = "./build"
20 |
21 | [[build.copy]]
22 | source = "InscryptionAPI/bin/Release/InscryptionAPI.dll"
23 | target = "plugins/InscryptionAPI.dll"
24 |
25 | [[build.copy]]
26 | source = "APIPatcher/bin/Release/Assembly-CSharp.APIPatcher.mm.dll"
27 | target = "monomod/Assembly-CSharp.APIPatcher.mm.dll"
28 |
29 | [[build.copy]]
30 | source = "InscryptionCommunityPatch/bin/Release/InscryptionCommunityPatch.dll"
31 | target = "plugins/InscryptionCommunityPatch.dll"
32 |
33 | [publish]
34 | repository = "https://inscryption.thunderstore.io"
35 | communities = ["inscryption"]
36 | categories = ["libraries"]
37 |
--------------------------------------------------------------------------------