Code Monkey home page Code Monkey logo

bosschecklist's Introduction

BossChecklist

Boss Checklist is a tModLoader mod to help users track Boss Progression. Users can view upcoming bosses among many other useful features.

Boss Checklist is currently the 3rd most subscribed mod for tModLoader, with over 3 million subscribers.

Mods can add their bosses to the Boss Log via simple Mod.Call code. There are many customization options available to modders who wish to do advanced options as well.

Download

Users should download Boss Checklist either in-game or by clicking the subscribe button on the workshop homepage.

API

The wiki has all the information modders need for adding support for bosses in their mods.

Development

Feel free to suggest features and submit bug reports. It is preferred that you come talk to us directly on the #boss-checklist channel of our Discord. Chatting in real-time will greatly speedup any discussion or bug reporting.

bosschecklist's People

Contributors

cyrillya avatar direwolf420 avatar exterminatorx99 avatar javidpack avatar linnnnnna avatar linnnnnnnnnna avatar pixelnando avatar razzsg avatar remforever0 avatar rijam avatar sheepishshepherd avatar wolf-igmc4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bosschecklist's Issues

[Feature Request] Mod Call support for Day Despawners

At the moment, all modded bosses who despawn during daytime in a similar manner to Eye of Cthulhu will use the default "[boss] is no longer after you..." message, instead of the "[boss] flees as the sun rises..." message that the Eye of Cthulhu, Twins, and Destroyer use. Personally, I feel that for consistency's sake, there should be some way to add more NPCs to the list of NPCs that use the day despawning message.
There are two potential ways this could be addressed; either the existing "AddBossWithInfo" call is updated to have a bool for whether the boss despawns during the day or not. If that bool is true, they're added to the DayDespawners list automatically, or make a new call type:
BossChecklist.Call("AddDayDespawners", NPCType<MyCoolNightBoss>())
This example of the new call function would be used to add MyCoolNightBoss to the list of day despawners. "AddDayDespawners" could also optionally support using a List<int> instead of a singular int in case modders have several bosses to add, but either way works.

Missing UI

Around half the time I use this mod, I get missing UI elements (icon to open, check marks, buttons).
BossLog1
Bosslog2PNG

build for TML 0.11.7.7

When attempting to load Boss Checklist via tModLoader on Steam on Debian Stable, I'm getting the error:

21:26:41] [Thread Pool Worker/ERROR] [tML]: An error occurred while loading BossChecklist
It has been detected that this mod was built for tModLoader v0.11.7.5
However, you are using tModLoader v0.11.7.7
The mod(s) have been automatically disabled.
Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'Microsoft.Xna.Framework.Color'. Path '', line 1, position 2. ---> System.ArgumentException: Could not cast or convert from {null} to Microsoft.Xna.Framework.Color.
  at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable (Object value, Type initialType, Type targetType) [0x00067] in data-0x7fc346480010 
  at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast (Object initialValue, CultureInfo culture, Type targetType) [0x00036] in data-0x7fc346480010 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) [0x000bb] in data-0x7fc346480010 
   --- End of inner exception stack trace ---
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) [0x000eb] in data-0x7fc346480010 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EndProcessProperty (Object newObject, JsonReader reader, JsonObjectContract contract, Int32 initialDepth, JsonProperty property, PropertyPresence presence, Boolean setDefaultValue) [0x00175] in data-0x7fc346480010 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) [0x002d4] in data-0x7fc346480010 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Populate (JsonReader reader, Object target) [0x00136] in data-0x7fc346480010 
  at Newtonsoft.Json.JsonSerializer.PopulateInternal (JsonReader reader, Object target) [0x00050] in data-0x7fc346480010 
  at Newtonsoft.Json.JsonSerializer.Populate (JsonReader reader, Object target) [0x00000] in data-0x7fc346480010 
  at Newtonsoft.Json.JsonConvert.PopulateObject (String value, Object target, JsonSerializerSettings settings) [0x00013] in data-0x7fc346480010 
  at Terraria.ModLoader.Config.ConfigManager.Load (ModConfig config) [0x0009d] in tModLoader.exe 
  at Terraria.ModLoader.Config.ConfigManager.Add (ModConfig config) [0x00000] in tModLoader.exe 
  at Terraria.ModLoader.Mod.AddConfig (String name, ModConfig mc) [0x0000e] in tModLoader.exe 
  at Terraria.ModLoader.Mod.AutoloadConfig () [0x000f6] in tModLoader.exe 
  at Terraria.ModLoader.ModContent+<>c.<Load>b__38_0 (Mod mod) [0x0000d] in tModLoader.exe 
  at Terraria.ModLoader.ModContent.LoadModContent (CancellationToken token, Action[T] loadAction) [0x00065] in tModLoader.exe 
  at Terraria.ModLoader.ModContent.Load (CancellationToken token) [0x0001b] in tModLoader.exe 
  at Terraria.ModLoader.ModLoader.Load (CancellationToken token) [0x00098] in tModLoader.exe 

"View Collectibles Only" button in Boss Log causes game crash with Calamity Mod

So after some several tests of different mods enabled/disabled, I've managed to narrow this issue down to an incompatibility with Calamity Mod, and the Boss Log menu.

In short, selecting any boss in this menu, then navigating to the "View Collectibles Only" button. Using this button causes a fatal error and thus crashes the game.

Active mods at the time of crash;

  • Calamity Mod
  • Calamity Mod Music
  • Calamity Mod Extra Music
  • Boss Checklist

client.log

System: Windows

vanilla event name rewrite

can add some write(display) a vanilla event name list? use localizer mod, can't change event name. (blood moon/solar eclipse/lunar event) i found only event load, if rewrite here, checklist is broken.

There is no event name entry in the tmodloader localization file too. so all name changed, but not event name.

(terraria not support korean. so korea player use en-US rewrite patcher and font dump. so mod localization add is impossible. only can use localizer mod.)

Mod breaks world generation

public override void SaveWorldData(TagCompound tag) {
var WorldRecordList = new List<WorldRecord>(worldRecords);
var HiddenBossesList = new List<string>(HiddenBosses);
var downed = new List<string>();

This code assumes worldRecords isn't null, but it can be, we'll need to initialize data structures outside of OnWorldLoad to ensure they aren't null. 1.3 used Initialize, which doesn't seem to be in 1.4, this is probably something we need to make sure is added back into the 1.4 alpha

Feature Request: Allows modders to access the boss portrait

Recently, Starlight River did this:
image

This required a bit of IL editing.

Me and a few others think allowing modders to access the drawing of the boss portrait so we can apply shaders, draw our own things (for multibosses or bosses made out of segments) and other things people may come up with

image
image

We need to clear out bools in PreWorldGen too

From forum: "For some reason when i make a new world some bosses i haven't beaten are checked out, the only mod i have that adds bosses is calamity. The first world i made had all the calamity bosses that i had beaten in a different world checked out, and when i made a second world the torch god, blood moon and solar eclipse were checked out."

OnWorldLoad isn't called when generating a world, so data from a previous world loaded will be saved to the new world when that world finishes generating

Mod Auto-Disabling Itself

Like the title says, the mod keeps auto-disabling itself. I'm using tModLoader v0.11.3, and I'm thinking this mod just hasn't fully updated yet or something.

I also get the occasional random crash caused by this mod (but forgot to screenshot it, so I'll attach one if it happens again)

Do you think you can fix it? This is one of my favourite QoL mods ever, and I'd rather not have to get rid of it.

[Feature Request] Add configurations for different types of respawn timer sounds

Thought about giving users more customization options by allowing them to change what sounds plays for the respawn timer. Not sure what the best way to implement this would be as SoundStyles are not support in ModConfigurations. String Option came to mind, but that limits it to presets. Wondering if there may be another way to approach this feature.

[1.4] Merge loot and collectible display pages together

With new collectibles coming to 1.4, remaking the display texture might make things a bit tight for space. So I plan to rework this by adding functionality to the itemslots, that will make any collectible thats not deemed 'generic' by CollectionType (ID.cs) clickable to show off the singular item.

CollectionTypes

  • Generic: This will not be displayable. I may change my mind on this.

  • Relic: This will display the multi-tile when placed (without animation probably? dunno yet). This will be the default item shown unless the item is NOT obtained or if the world is NOT currently in Master Mode.

  • Trophy: This will display the multi-tile when placed. This will be the default item shown if as long as the Relic isnt being shown and the player has obtained one.

  • Mask: Will be placed on a mannequin.

  • Music Box: This will display the multi-tile when placed. If it is the active song, the box will appear opened.

  • Pet/Mount: This will display the item itself as well as the first(?) frame of the projectile it creates. For mounts, I'll need to learn how they work to figure out if they can even be displayed.

Better Localization Values

Currently Boss Checklist sets up boss and event names when loaded, so when you switch the language it doesn't refresh until reloading mods. A solution to this is to not translate the keys immediately, but instead to keep the key and run Language.GetText() on it when drawing the text.
This should also help with mods that input a language key for their Bosses' or Event's name by automatically translating the key, especially since ModTranslations are not loaded in Mod.PostSetupContent (where Boss Checklist is commonly called)

Boss Checklist is open on boot-up

When launching Terraria (or reloading mods), the checklist will be open when entering a world. If it's the first time that it's open, it will even be blank (as the boss info list has not been updated yet at that time to include any bosses or such, since the checklist was never manually opened before that point).

This seems completely related to commit 9ad3455 (which fixed issue #1), as that commit made the checklist be considered visible if BossChecklist.bossChecklistInterface.CurrentState is the checklist UI, while the state defaults to being that UI instead of null.

I'm not exactly sure, but I think that before the above commit, the boss checklist also used to be automatically hidden when leaving and re-entering a world, while after that commit, the checklist "remembers" whether it's visible or not when leaving and re-entering a world.
(In any case, the latter behaviour seems/feels wrong to me, and might possibly not even update the checkboxes when entering a different world.)

~

From my limited knowledge, simply having BossChecklist.bossChecklistInterface.CurrentState set to null when entering a world might fix this issue.

I would've suggested "maybe in the OnEnterWorld hook of ModPlayer overrides", but I don't know how that would act when someone else joins a multiplayer server. Though perhaps combining it with a check for Main.LocalPlayer in some way could overcome that? I'm not sure.

Moon/Eclipse data bleeds into other worlds

If a player leaves during a Frost/Pumpkin/Blood Moon or a Solar Eclipse and enters a different world, the "despawn" message of the event occurs and sets the respective downed bool to true for the world.

(Forgot to add this to the GitHub issues. This issue has been discovered several months ago.)

Micro-Gaps in banner tile display

When adjusting the UI scale, drawings that have to be pieced together will contain very small gaps between each drawn tile. This is undesirable, as all users should see the same thing no matter what UI scale they decide to have. From testing out some fixes I noticed that it seems to be an issue with the sourceRectangle as when I increased the drawing source to include the transparent parts, the pixels into the next banner starts to bleed into the drawing.

uiscaleissue

Missing UI

The boss log button and some elements of the log's UI are missing.
image
image

Modded Event Enemies

I'm not sure if this is intentional or not but modded enemies from vanilla events aren't showing up. ex: goblin trapper, goblin drummer from Thorium.

Crash when clicking previous boss

I clicked the previous boss button and then it crashed. I think I was on the Dragonfloss boss page from the calamity mod.
Here's the log from that session:

client.log

Relevant lines:

[19:02:02] [1/ERROR] [Terraria]: System.InvalidOperationException: Begin has been called before calling End after the last call to Begin. Begin cannot be called again until End has been successfully called.
  at Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin (SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformationMatrix) [0x00008] in FNA.dll 
  at Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin () [0x0001c] in FNA.dll 
  at Terraria.Main.RenderBlack () [0x0003f] in tModLoader.exe 
  at Terraria.Main.RenderTiles () [0x00008] in tModLoader.exe 
  at (wrapper dynamic-method) Terraria.Main:DMD<Terraria.Main::DoDraw> (Main,GameTime)
  at Terraria.Main.Draw (GameTime gameTime) [0x0001c] in tModLoader.exe 
[19:02:02] [1/FATAL] [Terraria]: Main engine crash
System.InvalidOperationException: Begin has been called before calling End after the last call to Begin. Begin cannot be called again until End has been successfully called.
  at Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin (SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformationMatrix) [0x00008] in FNA.dll 
  at Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin () [0x0001c] in FNA.dll 
  at Terraria.Main.RenderBlack () [0x0003f] in tModLoader.exe 
  at Terraria.Main.RenderTiles () [0x00008] in tModLoader.exe 
  at (wrapper dynamic-method) Terraria.Main:DMD<Terraria.Main::DoDraw> (Main,GameTime)
  at Terraria.Main.Draw (GameTime gameTime) [0x0001c] in tModLoader.exe 
[19:02:02] [1/DEBUG] [tML]: Assembly Resolve: System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 -> Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
[19:02:02] [1/DEBUG] [tML]: Assembly Resolve: System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 -> Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

My other mods:

  • Calamity
  • Yet another boss health bar
  • Lan's unlimited buff slots
  • Magic Storage extra
  • Recipebrowser
  • Smart doors
  • What mod is this from

Multiplayer memory leak

[15:26:46] [1/WARN] [tML]: Silently Caught Exception: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Collections.Generic.List`1.set_Capacity(Int32 value)
   at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
   at System.Collections.Generic.List`1.Add(T item)
   at BossChecklist.WorldAssist.PreUpdate() in BossChecklist\WorldAssist.cs:line 115
   at Terraria.ModLoader.WorldHooks.PreUpdate()
   at Terraria.WorldGen.UpdateWorld()
   at Terraria.Main.DoUpdate(GameTime gameTime)
   at Terraria.Main.Update(GameTime gameTime)
   at Terraria.Main.DedServ()
   at Terraria.Program.LaunchGame_()
   at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs)
   at Terraria.WindowsLaunch.Main(String[] args)

Saving data issue when Progression Mode is enabled

I currently do not have any concrete evidence about this. However, multiple people within the Calamity discord server have been claiming that Boss Checklist corrupts world data. The solution they have found is disabling all Progression Mode configs.

[Feature Request] Add a way of altering Vanilla Boss entries

This would allow for better compatibility with mods that alter vanilla progression by letting you disable the Boss entries usually provided by Boss Checklist and add your own instead.
With this you can make it clear whether any vanilla bosses have been altered and no longer fit the default Boss Checklist descriptions.
In the case of multiple mods requesting this, perhaps adding an option to sort the priority of which mods new vanilla entries get chosen could give modpacks a lot of potential, or even allowing you to disable a given mods entries, though that's more than I'm asking for here.
I just want to be able to rename Skeletron Prime, The Twins and move Plantera to somewhere else in progression.

Treasure Bags don't work on other languages

Due to a reliance on expecting "Treasure Bag" in item.Name, we don't detect bags when other languages are enabled. We should hard-code vanilla bag itemids and then check modItem.BossBagNPC against npcid for the boss instead.

Continue Release Versioning

It would be better to upload release everytime a new version comes.
This would be beneficial for people that wants to use older version of your mod due to compatibility issues or wants to use an older version of TMODLOADER.

Steam workshop does not keep track of versions and its really inconvenient when you downgrade and the mod does not support it anymore

Boss Log randomly going to index in multiplay

Report from forum:

In multiplayer, everytime you click someone in the book or scroll down it resets the input back to the default (so If I click on a boss his loot it will boot me back to the list of bosses after about 2 seconds). However I tried the mod on singleplayer and it works totally as expected ! Is this a known issue ?

validItems check needs rework. Currently checks for english name.

The item checks need to be redone.

foreach (int type in selectedBoss.collection) {
	if (type != -1) {
		Item newItem = new Item();
		newItem.SetDefaults(type);
		if (newItem.Name.Contains("Trophy") && newItem.createTile > 0) validItems[0].Add(type);
		if (newItem.Name.Contains("Mask") && newItem.vanity) validItems[1].Add(type);
		if (newItem.Name.Contains("Music Box") && newItem.createTile > 0) validItems[2].Add(type);
	}
}

Checklist can be interacted with while it's invisible

When you open the boss checklist, there are four buttons near its top-left area, for toggling some things in the list. But when you close the boss checklist, those buttons seem to be "hid" rather than removed, meaning that there's still a "click" sound for mousing over the area with the buttons, as well as a "bloop" sound for clicking on the invisible buttons.

Not only that, but clicking on the buttons does affect the boss checklist the next time that you open it, and you can even hide bosses by Alt-clicking on an invisible boss name (though you only seem to be able to hide up to one boss per time that the boss checklist is closed).

The scrollbar is mostly unaffected by this. It does not make a "click" sound and can not be moved with the left mouse button while the checklist is hidden, but it still gets moved if the scroll wheel is scrolled up or down in the checklist's area.

~

Note that this does not happen immediately after rebooting Terraria (I don't know about after reloading mods), until that the boss checklist is opened at least once while in-game, though it does persist when leaving a world and entering a new one without rebooting Terraria.

Visual bug in "Boss Log" menu

It appears there is a math bleed only in the knockback stats on weapons/summons within the Boss Log menu.
Using XItemStats, I am able to watch as the values increase towards (and eventually reach) "infinity"

This appears to happen only when the player has an item/pet/mount which increases knockback.

Note: This is purely a visual bug, and does not affect gameplay in any form.

Running out of memory during map updates

BossChecklist may have caused the client to run out of memory with a relatively small number of mods, client-side only.
With what I understand it should be unlikely for the client to run out of memory with this number of mods while a lot of the processes is kept server side.

(14 mods, Thorium, SoA, Magic Storage and Chad's Furniture as content while the rest remains very small tweaks such as autotrash and Boss Checklist)
Happened when clearing the corruption with a clentaminator, something to do with MapAssist: https://pastebin.com/GmtMnu3k

Remove BossCollection and save its components as a KeyValuePair

At this point there is no reason to keep public class BossCollection : TagSerializable as it is. Both the loot and collectible lists can be combined as one into a value, and the boss key can be a key. This would result in a loss of player data relating to this, but I feel it would be the better approach. Considering we are still in alpha, might be worth considering.

Simplify the wiki

I want to make my mod's bosses show up on the Boss Checklist, but idk how. Could you please simplify the tutorial on how to do that so my peanut sized brain can understand what to do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.