MycoMerger

v1.0.1·Updated 2022-08-28

Extends Mycologists functionality to allow non-duplicate merges and unique merge results. Supports use by other mods including JSONCardLoader.

About this mod Author’s original text

MycoMerger

===============

Extends Mycologists functionality to allow non-duplicate merges and unique merge results. Supports use by other mods including JSONCardLoader.

Features

  • Merge two different cards, not just duplicates, for a specified result!
  • Change the maximum number of sigils that can be added to a card through merging.
  • Change what is inherited by the result from the cards used in merging.
  • Cards and mods can override a user's default settings for merges if the user doesn't disallow overriding in their configuration. (It is allowed by default.) Specific settings of a merge when available are always used over the default.

How to use

Simply install if you're not making new cards or mods. If you are, see below.

With your mod

  • If you include MycoMerger in your project, you can use the MergerManager class to do:

MergerManager.AddMergeData("SourceCardName", "TargetCardName", "Result")

  • You can also specify MergeInheritance for a merge using:

MergerManager.AddMergeData("SourceCardName", "TargetCardName", "Result", "MergeInheritance")

  • If you don't include MycoMerger, you can set an extended property for cards using the InscryptionAPI CardInfo extension with the following format:

SourceCardInfo.SetExtendedProperty("MycoMerger", "TargetCardName1:Result1, TargetCardName2:Result2:MergeInheritance … " )

  • SourceCardInfo can be retrieved with CardLoader.GetCardByName("SourceCardName").
  • Beware that if the SourceCard already has MycoMerger data as using SetExtendedProperty will overwrite that data. You can retrieve that data using SourceCardInfo.GetExtendedProperty("MycoMerger") and check if any data exists using string.IsNullOrWhiteSpace. You can append any new data with string.Concat(ExistingMycomergerData, ",", "AdditionalMycomergerData") before using that to set the extended property but beware duplicate TargetCardName entries.

With JSON Loader (jldr2)

  • In your card's.jldr2 file, add an entry to its extensionProperties with the following format: "extensionProperties": { "MycoMerger": "[MERGEDATA]" }.
  • If there are other entries in your card's extensionProperties, it will look like this: "extensionProperties": { "Property1": "Value1", "Property2": "Value2", "MycoMerger": "[MERGEDATA]" }.
  • [MERGEDATA] is composed of the following: TargetCard:Result with each entry separated by commas. Spaces between don't matter. Example: Packrat:Cat, FieldMouse: FieldMouse.
  • MergeInheritance can be specified by adding another colon: and a plus sign + if there is more than one keyword. See References further below. Example:

Packrat:Cat:UserDefault, FieldMouse: FieldMouse: Attack + Health.

  • If the card you're making should be the result of a merge, you can use this special format:!RESULT!:SourceCard:TargetCard.

*!RESULT! means this card is the result of the merge of two other cards. This MergeData is then assigned to the SourceCard. This is mostly meant for making a new card using jldr2 the result of a merge without needing to make files for or edit other cards. This means that if you're making a new card and use this format, it's equivalent to adding this merge data in SourceCard: TargetCard:NewCard.

  • Example in FieldMouse.jldr2:

"extensionProperties": { "MycoMerger": "FieldMouse:SporeMouse" }

  • Example!RESULT! in SporeMouse.jldr2:

"extensionProperties": { "MycoMerger": "!RESULT!:FieldMouse:FieldMouse" }

  • Example MergeInheritance in Stoat.jldr2:

"extensionProperties": { "MycoMerger": "Burrow:Rabbit:None" }

  • Example of other valid formatting with RatKing.jldr2:

"extensionProperties": {

"OtherProperty1": "OtherValue1",

"MycoMerger": "!RESULT!:FieldMouse:FieldMouse,!RESULT!:PackRat:PackRat:UserDefault,!RESULT!: FieldMouse: PackRat: Attack+Health+AddedSigils,!RESULT!: RatKing:FieldMouse,

PackRat:RatKing:Vanilla, Hodag:MycoMerger_TotalStats:All

RatKing:RatEmperor",

"OtherProperty2: "OtherValue2" }

Notes

  • SourceCard just means the card where the merge data is stored.
  • TargetCard is the card targeted for the

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

API_dev-APIBepInEx-BepInExPack_Inscryption

File & checksum

Filename
MycoMerger-1.0.1.zip
File size
39.0 KiB