javidpack / bosschecklist Goto Github PK
View Code? Open in Web Editor NEWMod for tModLoader to help with Boss Progression
Home Page: https://forums.terraria.org/index.php?threads/boss-checklist-in-game-progression-checklist.50668/
Mod for tModLoader to help with Boss Progression
Home Page: https://forums.terraria.org/index.php?threads/boss-checklist-in-game-progression-checklist.50668/
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
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.
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);
}
}
When playing on a drunk world, defeating one of the two world evil bosses (in my case, BoC) reports the other (EoW) as also beaten despite having not done so.
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.
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.
Any call to this method that happens more than once per session isn't good
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:
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:
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.
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.
Hi, I love this mod
Do you support the API in http mode to view defeated bosses and undefeated bosses?
If not, whether to consider adding this API later
Ex. Demonite Bar will always show, leaving Crimtane Bars out of any recipe
or Wood will only show normal wood
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
Lines 188 to 192 in c9637f8
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
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.
Collecting modded collectibles for bosses sometimes does not display them on the showcase when the boss's page is first opened. Changing pages is the only way to get the page properly updated. Possibly due to the BossLogPanel.validItems Lists.
Provided by Laugic:
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.
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.
[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)
Line 1375 in 978491e
It appears that images that are cropped with this method are visually broken after loading mods.
On the mod, browser while downloading an update to the mod, it gets stuck at the last tick of the bar and never fully downloads.
In a future tModLoader version, tModLoader/tModLoader#3558 will be live, we can make use of the sets to be more compatible.
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.
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.
This could streamline integration. The modder wouldn't even need to call the methods anymore
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.
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;
System: Windows
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.
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.)
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.
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 ?
we'd need to have the next and previous buttons skip unavailable and hidden bosses to make them truly hidden
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?
BossChecklist/UIElements/BossLogUIElements.cs
Line 452 in 9be8396
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)
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.
Is it a bug or am I missing something?
Crashes on my friend's client, but doesn't crash on my computer. Seems to be something to do with a texture.
Log for the crash:
client.log
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
I am chinese. And I would like to make a chinese translation of this Mod
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
The game becomes absolutely unplayable with this mod.
The call tree seems to indicate that the massive performance loss possibly comes from these lines:
Steps:
Modpack:
enabled.txt
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.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.