tModLoader

tModLoader

Weapon Enchantments
aymalkin 21 Feb, 2023 @ 4:38am
Calamity .2.1 crash log
Because it's too long to post in the comment section:

Calamity mod incompatibility as well. Here's the crash log:
System.NullReferenceException: Object reference not set to an instance of an object.
at CalamityMod.NPCs.ExoMechs.Thanatos.ThanatosBody1.ModifyTypeName(String& typeName) in CalamityMod\NPCs\ExoMechs\Thanatos\ThanatosBody1.cs:line 615
at Terraria.ModLoader.NPCLoader.ModifyTypeName(NPC npc, String& typeName) in tModLoader\Terraria\ModLoader\NPCLoader.cs:line 975
at Terraria.NPC.get_FullName() in tModLoader\Terraria\NPC.cs:line 530
at WeaponEnchantments.Common.Globals.GlobalBossBags.SetupModBossBagIntegration() in WeaponEnchantments\Common\Globals\GlobalBossBags.cs:line 62
at WeaponEnchantments.Common.Globals.WEGlobalNPC.AddBossLoot(ILoot loot, NPC npc, IItemDropRule dropRule, Boolean bossBag) in WeaponEnchantments\Common\Globals\WEGlobalNPC.cs:line 530
at WeaponEnchantments.Common.Globals.WEGlobalNPC.GetLoot(ILoot loot, NPC npc, Boolean bossBag) in WeaponEnchantments\Common\Globals\WEGlobalNPC.cs:line 409
at Terraria.ModLoader.NPCLoader.ModifyNPCLoot(NPC npc, NPCLoot npcLoot) in tModLoader\Terraria\ModLoader\NPCLoader.cs:line 470
at Terraria.GameContent.ItemDropRules.ItemDropDatabase.Populate() in tModLoader\Terraria\GameContent\ItemDropRules\ItemDropDatabase.cs:line 134
at Terraria.ModLoader.ModContent.SetupBestiary() in tModLoader\Terraria\ModLoader\ModContent.cs:line 404
at Terraria.ModLoader.ModContent.Load(CancellationToken token) in tModLoader\Terraria\ModLoader\ModContent.cs:line 359
at Terraria.ModLoader.ModLoader.Load(CancellationToken token) in tModLoader\Terraria\ModLoader\ModLoader.cs:line 125
< >
Showing 1-7 of 7 comments
NovaKatt😽💚 21 Feb, 2023 @ 12:20pm 
Just came here to start a discussion about the very same thing but you were first, so I'll just add it here instead of a duplicate "New Discussion". :)

On the Calamity discord a developer checked the above crash log and checked stuff, and then confirmed that this is most likely because their new recent update renamed a whole ton of stuff, which Weapon Enchantments is trying to call, hence it breaks when used together.

So the developer for WE needs to go through the C update to check what's been renamed and updated so they work together again. :)
aymalkin 21 Feb, 2023 @ 2:59pm 
Thanks for the information, I'm sure that will be helpful to the dev.
andro951  [developer] 24 Feb, 2023 @ 11:31am 
I've implemented a work around to fix it until Calamity fixes the issue on their end. I'll delete this discussion in a month or so if it has no activity to reduce clutter.
ProgramerGeek 27 Feb, 2023 @ 6:27pm 
What is the work around and how do I implement it? I looked on discord and I did not see any mention of it on there either.
andro951  [developer] 2 Mar, 2023 @ 11:47am 
ProgrammerGeek, The workaround is in an update I released. You don't have to do anything. If you're still having issues, try manually updating Weapon Enchantments:
https://discord.com/channels/976648540187131978/992847247408635985/999048708228403411
aymalkin 3 Mar, 2023 @ 9:05am 
I think what he means is that he'd like to know how the workaround actually works, because other modders will run into the same problem soon enough.
andro951  [developer] 7 Mar, 2023 @ 12:02pm 
I made a new static Method and replaced every instance of npc.FullName with npc.FullName()
public static string FullName(this NPC npc) {
if (WEMod.calamityEnabled) {
string sampleModNPCFullName = npc.ModNPC?.FullName;
switch (sampleModNPCFullName) {
case "CalamityMod/ThanatosBody1":
case "CalamityMod/ThanatosBody2":
return "Draedon";
case "CalamityMod/ThanatosTail":
return "XM-05 Thanatos";
default:
return npc.FullName;
}
}
else {
return npc.FullName;
}
}
Last edited by andro951; 7 Mar, 2023 @ 12:05pm
< >
Showing 1-7 of 7 comments
Per page: 1530 50