MycoMerger

版本 v1.0.1·更新於 2022-08-28

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

模組介紹 作者原文

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

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

API_dev-APIBepInEx-BepInExPack_Inscryption

檔案與校驗

檔案名稱
MycoMerger-1.0.1.zip
檔案大小
39.0 KiB