JavidPack / BossChecklist

Mod for tModLoader to help with Boss Progression
https://forums.terraria.org/index.php?threads/boss-checklist-in-game-progression-checklist.50668/
60 stars 23 forks source link

New mod calls for 1.4.4 #102

Closed SheepishShepherd closed 1 year ago

SheepishShepherd commented 1 year ago

New call arguments for LogBoss (previously AddBoss)

AddBoss has been changed to LogBoss. The AddBoss calls and its alternatives have been made obsolete. Changing the call message will ensure that all modders know they need to update their mod calls. If a mod does not update their mod calls, a message will be logged, listing all entries that were attempted to be submitted and informing the developers of the new changes with a github wiki link.

The new mod calls for submitting entries now only require the bare minimum info needed to make an entry. Other optional data is no longer submitted as its own argument, but instead added to a Dictionary<string, obj> at the end of the call if needed. The new argument ordering is the following:

1.) EntryType

string - The message being passed will determine what type of entry will be added. AddBoss type messages have been changed and modders must update them.

2.) Mod Instance

Mod - The mod will be grabbed to directly get the mod's internal and display names.

3.) Internal Name

string - Mod developers can choose a unique string to identify their boss to be built into the boss key. The passed string can only contain letters and must have no whitespace characters.

4.) Progression Value

float - The float value that will determine the entry's progression position on the list.

5.) Localized Name

LocalizedText - A LocalizedText must be passed for the entry's name. string variables are no longer supported. Changes to 1.4.4 encourages modders to use translations and most mods that add content use translations anyways.

6.) NPC ID List

int or List<int> - The IDs of any NPCs that are apart of this boss, with the first being the main part of the NPC.

7.) Downed Check

Func<bool> - The downed variable needed to mark and entry as defeated.

9.) Additional Data (all optional)

Dictionary<string, object> - Modders can add a dictionary of objects with string keys to add any additional data they may need that isn't required to make an entry. This will also allow us to add more optional data without adding more arguments needed to be passed and checked for (at least until necessary). BossChecklist will look for specific string keys in the dictionary to apply any additional data such as spawn items or despawn messages. The keys can be applied in any order and not all of them have to be present. The current keys that are check for are the following:

Entry Keys

Keys will be different than normal due to the new internalName call argument. I'm still open to changing how internal names are determined, so this may change later down the line too. Keys now use { get; init; } instead of just grabbing the modSource and internalName when requested and is determined upon EntryInfo creation. EntryInfo.internalName has also been outright removed with this change as the Key was the only thing it was used for and that still holds true with this new change.

Vanilla Entry Submissions

Vanilla entries have been updated accordingly and happen to look a little cleaner as a result. Might also want to look to see if progression values can finally be solidified.

TODO

SheepishShepherd commented 1 year ago

Wiki page created for the changes https://github.com/JavidPack/BossChecklist/wiki/%5B1.4.4%5D-Boss-Log-Entry-Mod-Call

SheepishShepherd commented 1 year ago

Wiki page created for the OrphanData (and mod call) changes https://github.com/JavidPack/BossChecklist/wiki/%5B1.4.4%5D-Other-Mod-Calls