tModLoader

tModLoader

Remington's Revenge (1.4.4 PORT)
Remington  [开发者] 2022 年 8 月 10 日 下午 5:49
Bestiary Bug
After adding my boss to the bestiary when you look at the bestiary the game freezes. Does anyone know why?
< >
正在显示第 1 - 6 条,共 6 条留言
White_Tiger 2022 年 8 月 15 日 下午 6:45 
it depends on your code; can I take a look at your boss's SetBestiary()?
Remington  [开发者] 2022 年 8 月 15 日 下午 8:03 
引用自 White_Tiger
it depends on your code; can I take a look at your boss's SetBestiary()?

yes, here
NPCID.Sets.NPCBestiaryDrawModifiers drawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0)
{
CustomTexturePath = "",
PortraitScale = 0.6f, // Portrait refers to the full picture when clicking on the icon in the bestiary
PortraitPositionYOverride = 0f,
};
NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, drawModifiers);

also this
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
{
// Sets the description of this NPC that is listed in the bestiary
bestiaryEntry.Info.AddRange(new List<IBestiaryInfoElement> {
new MoonLordPortraitBackgroundProviderBestiaryInfoElement(), // Plain black background
new FlavorTextBestiaryInfoElement("The Protector Of The Ancients.")
});
}
i left the texture path empty to see if it fixed it but it did nothing. also, it could be the minions also causing the problem but i am not sure
White_Tiger 2022 年 8 月 15 日 下午 8:12 
on the example mod github, only example minion boss & its minion use "List<IBestiaryInfoElement>" when everything else uses "IBestiaryInfoElement[]", so try swapping out "new List<IBestiaryInfoElement>" with "new IBestiaryInfoElement[]"

make sure you have "using Terraria.GameContent.Bestiary;" at the top!!!
Remington  [开发者] 2022 年 8 月 15 日 下午 11:37 
引用自 White_Tiger
on the example mod github, only example minion boss & its minion use "List<IBestiaryInfoElement>" when everything else uses "IBestiaryInfoElement[]", so try swapping out "new List<IBestiaryInfoElement>" with "new IBestiaryInfoElement[]"

make sure you have "using Terraria.GameContent.Bestiary;" at the top!!! [/quo
i tried this but it still freezes the game. I dont undertsand why but if there is no other way to fix it then ill probably just delete it from the beistiary as it is not very important. Thanks for trying to help me though!
White_Tiger 2022 年 8 月 16 日 上午 7:33 
WAITWAITWAIT i think the reason why it freezes is because the CustomTexturePath is set to " "; you just don't put it in if you want to just use the enemy's default sprites
最后由 White_Tiger 编辑于; 2022 年 8 月 16 日 下午 3:40
Remington  [开发者] 2022 年 8 月 16 日 下午 4:59 
引用自 White_Tiger
WAITWAITWAIT i think the reason why it freezes is because the CustomTexturePath is set to " "; you just don't put it in if you want to just use the enemy's default sprites

Thank You it worked! Now there are almost no game breaking bugs i know of
< >
正在显示第 1 - 6 条,共 6 条留言
每页显示数: 1530 50