Skip to content

[1.4.4] Other Mod Calls

Sheepish Shepherd edited this page Dec 10, 2023 · 9 revisions

What is this?

BossChecklist provides more mod calls than just one for submitting entries. Mod developers can make use of these additional calls to either submit additional content to existing entries or request an entry's information provided to this mod. Check out the other mod calls below to find out if they can be useful for you! Remember, all calls must be called within ModSystem.PostSetupContent before entry data is finalized.

Porting Notes

If you are in the process of porting your mod to 1.4.4, please note some mod calls have changed and will require updating. Most changes can be found by reading through the arguments needed for each call but here's a few things to make note of:

  • AddToBossX types calls have been changed to SubmitEntryX and have been restructured for ease of use and flexibility when expanding in the future.
  • GetBossInfoDictionary no longer contains internalName, use Key for any use case needed.
  • GetBossInfoDictionary - the collection key has been changed to collectibles.
  • GetBossInfoDictionary - the spawnItem key has been changed to spawnItems.

Submitting Extra Entry Data

'SubmitEntry' type mod calls allow mod developers to submit additional information to other modded or vanilla entries. Multiple entries can be handled under a singular call, so no need to split them up. Also, when using this call, you will not need to have any TryGetMod checks for your submissions as BossChecklist will do that check for each submission using the entry key provided!

Your Mod.Calls might look something like this:

List<int> CollectibleTokens = new List<int> {
	ModContent.ItemType<CommonToken>(),
	ModContent.ItemType<RareToken>()
};

// You can submit as many entries as needed for one call and even use it along with other mod content!
BossChecklist.Call(
	"SubmitEntryCollectibles",
	Mod,
	new Dictionary<string, object>() {
		{ "Terraria EyeofCthulhu", CollectibleTokens }, // List<int> is what will typically be used...
		{ "Terraria SkeletronHead", new List<int> { ModContent.ItemType<UncommonToken>(), ModContent.ItemType<RareToken>() } },
		{ "Terraria WallofFlesh", new List<int> { ModContent.ItemType<CommonToken>(), ModContent.ItemType<UncommonToken>() } },
		{ "Terraria Plantera", ModContent.ItemType<UncommonToken>() }, // ...but single int submissions are also accepted
		{ "Terraria MoonLord", CollectibleTokens },
		{ "CoolMod CoolBoss", CollectibleTokens },
		{ "AnotherCoolMod DifficultBoss", CollectibleTokens }
	}
);

[0] Entry Data Type

string - The first argument needed is what type of data you are submitting. All the available data to submit for are listed below:

  • "SubmitEntryLoot"

BossChecklist will automatically detect the loot of entries using the bestiary. However, there may be an item that you don't want to drop from the NPC itself. Use this call message if you want to add any non-dropped loot to your entry. For example, the Torch God NPC has no drops, but the Torch God's Favor is instead placed directly into a player's inventory.

  • "SubmitEntryCollectibles"

If your mod adds a special item to a boss from vanilla Terraria or another mod you can use this call message to add it to any entry. This is also for mods that add a new universal collectible item such as a figurine for the boss. More information on collectibles and what they are can be found here.

  • "SubmitEntrySpawnItems"

You might want to use this call message if you have a quality of life mod that adds more spawn items to existing bosses. Crafting recipes for all submitted items are automatically detected. There is currently no way to submit additional spawn information.

  • "SubmitEventNPCs"

A fun way to add content is to add more NPCs. If you happen to add any NPCs to an event, you can submit them using this call message to have them be displayed in the Boss Log as an NPC banner. NPCs without banners do not display. If the loot table of your NPCs is properly setup, the loot information of the event entry will automatically update to reflect the additions.

[1] Mod Instance

Mod - A mod instance will be necessary for logging and native support. Use this if you are within your Mod class or use Mod if in a ModSystem class.

[2] Keys & Data

Dictionary<string, object> - You can submit all the data of the call type you need here. Create a dictionary using entry key strings as the keys and the type of data needed to submit. You can find the entry keys in-game by using the 'Access Entry Keys' config found under the Debug Tools for Mod Developers section. There is no limit to the amount of entry keys you can use, as long as the key is valid. The value should be all the actual data you want to add to the entry. All the accepted data types are listed below:

  • SubmitEntryLoot --> int or List<int>
  • SubmitEntryCollectibles --> int or List<int>
  • SubmitEntrySpawnItems --> int or List<int>
  • SubmitEventNPCs --> int or List<int>

Requesting Boss Data

You may also request the data that is submitted to BossChecklist with a GetBossInfoDictionary mod call, which will return a Dictionary<string, Dictionary<string, object>> for you to look through. Keep in mind that making this call before PostAddRecipes may result in incomplete data. The keys of the initial dictionary will be all entry keys created and submitted. The values are a dictionary of all the entries info, with specific keys for sorting the information and values being the information itself. All information provided by this call is listed below:

  • "collectibles" - List<int> - A list of item types deemed to be a collectible for this entry.
  • "displayName" - string - The display name of the entry.
  • "downed" - Func<bool> - The current status of the entry's defeation.
  • "dropRateInfo" - List<DropRateInfo> - Provides the drop rate info of all drops from the entry.
  • "isBoss" - bool - If the entry is a boss, returns true.
  • "isMiniboss" - bool - If the entry is a mini-boss, returns true.
  • "isEvent" - bool - If the entry is a event, returns true.
  • "key" - string - Provides the entry's assigned key.
  • "loot" - List<int> - A list of the entry's drops as item types.
  • "modSource" - string - The internal name of the mod that submitted this entry.
  • "npcIDs" - List<int> - A list of the entry's NPC types.
  • "progression" - float - The progression value submitted for this entry.
  • "spawnInfo" - Func<LocalizedText> - The spawn info that is displayed on the entry's log page.
  • "spawnItems" - List<int> - A list of item types of items needed to summon this entry.
  • "treasureBag" - int - The item type of this entry's treasure bag. If no assigned treasure bag, returns 0.

[0] Message Type

string To take advantage of this call, "GetBossInfoDictionary" must be used as the message.

[1] Mod Instance

Mod - A mod instance will be necessary for logging and native support. Use this if you are within your Mod class or use Mod if in a ModSystem class.

[2] API Version

string - TODO: explanation about version here

Clone this wiki locally