Standalone [1.3] tModLoader - A Modding API

What's wrong with that code?
Code:
public override void AddRecipeGroups()
        {
            RecipeGroup group = new RecipeGroup(() => Lang.misc[37] + " " + GetItem("Wings").item.name, new int[]
            {
                ItemType(ItemID.AngelWings),
                ItemType(ItemID.DemonWings),
                ItemType(ItemID.Jetpack),
                ItemType(ItemID.ButterflyWings),
                ItemType(ItemID.FairyWings),
                ItemType(ItemID.HarpyWings),
                ItemType(ItemID.BoneWings),
                ItemType(ItemID.FlameWings),
                ItemType(ItemID.FrozenWings),
                ItemType(ItemID.GhostWings),
                ItemType(ItemID.SteampunkWings),
                ItemType(ItemID.LeafWings),
                ItemType(ItemID.BatWings),
                ItemType(ItemID.BeeWings),
                ItemType(ItemID.TatteredFairyWings),
                ItemType(ItemID.SpookyWings),
                ItemType(ItemID.FestiveWings),
                ItemType(ItemID.BeetleWings),
                ItemType(ItemID.FinWings),
                ItemType(ItemID.FishronWings),
                ItemType(ItemID.MothronWings),
                ItemType(ItemID.WingsSolar),
                ItemType(ItemID.WingsVortex),
                ItemType(ItemID.WingsNebula),
                ItemType(ItemID.WingsStardust),
                ItemType(ItemID.Hoverboard)
            });
            RecipeGroup.RegisterGroup("EpicModpack:Wings", group);
        }

EDIT: Also, game crashes whenever I try to get into a world or create new one. What's wrong?
Please help :(
 
Says unknown error, and when I load the logs it says this.

"
Sequence contains no matching element
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
at Terraria.ModLoader.AssemblyManager.InstantiateMods(List`1 modsToLoad)

Any help please?
 
Multiplayer performance issue : whenever I join a server my FPS drops to about 5-15,depending on who's hosting. Single player is OK. Vanilla Multiplayer is also OK. Turning frame skip off makes the game smooth but slow and NPC's start teleporting around. The friend that I'm trying to play with reports no issues with frame rate, while having the same ingame settings and more-or-less the same level hardware.

Could having too many mods(40, including big ones like Tremor and Thorium) kill my multiplayer performance?

If it helps, my specs are : AMD FX-6100, NVIDIA GTX 660 2GB, 8 GB DDR3 RAM, Windows 7
His specs : Intel Core i3 2120, Radeon R7 260x, 8 GB DDR3 RAM, Win10
 
Multiplayer performance issue : whenever I join a server my FPS drops to about 5-15,depending on who's hosting. Single player is OK. Vanilla Multiplayer is also OK. Turning frame skip off makes the game smooth but slow and NPC's start teleporting around. The friend that I'm trying to play with reports no issues with frame rate, while having the same ingame settings and more-or-less the same level hardware.

Could having too many mods(40, including big ones like Tremor and Thorium) kill my multiplayer performance?

If it helps, my specs are : AMD FX-6100, NVIDIA GTX 660 2GB, 8 GB DDR3 RAM, Windows 7
His specs : Intel Core i3 2120, Radeon R7 260x, 8 GB DDR3 RAM, Win10
If I were you, I would open up the server using the tmodloaderserver.exe or one of the bats and check the output as you are playing. My guess is one of your mods is throwing exceptions due to bad coding, causing NPC desync.
 
Does anybody know how you would replace Skeletrons hands with custom ones, when creating a skeletron like boss, or at the least how to remove them from spawning?
 
If I were you, I would open up the server using the tmodloaderserver.exe or one of the bats and check the output as you are playing. My guess is one of your mods is throwing exceptions due to bad coding, causing NPC desync.

NPC's jump around only if I disable frame skipping, they are mostly alright otherwise. I think desync is caused by my game being slower than the server.
No exceptions in output either.
And the other guy gets no slowdown, even when hosting a dedicated server on the same machine. I've even tried using a third machine as server.
The main problem is that my game is ridiculously slow and my friend's isn't, while having almost the same-level hardware.
The interesting thing is that this third machine also runs win7 and has the same problem as mine. I've also noticed how my friend's game loads a lot faster. We both have 7200 RPM HHD's and game is on the same drive as the OS, if that changes anything.
 
Does anybody know how you would replace Skeletrons hands with custom ones, when creating a skeletron like boss, or at the least how to remove them from spawning?
Instead of spawning NPCID.SkeletronHand, spawn your own modNPC. I'm not sure what you are asking, unless you haven't actually decompiled Terraria and are trying to do this through npc.aiStyle instead of actual AI code.
 
Instead of spawning NPCID.SkeletronHand, spawn your own modNPC. I'm not sure what you are asking, unless you haven't actually decompiled Terraria and are trying to do this through npc.aiStyle instead of actual AI code.
I am trying to do this through npc.aiStyle, how can I decompile Terraria?
 
I am trying to do this through npc.aiStyle, how can I decompile Terraria?
You decompile Terraria through ilspy. google for download. For a whole skeletron-type boss, there are a few bits of code related to drawing the arm bones that you'll also have to find to get it looking right. You'll have to make your own head and your own arms, but adapting the vanilla code should be straightforward albeit mysterious.
 
You decompile Terraria through ilspy. google for download. For a whole skeletron-type boss, there are a few bits of code related to drawing the arm bones that you'll also have to find to get it looking right. You'll have to make your own head and your own arms, but adapting the vanilla code should be straightforward albeit mysterious.
Do you think all the files needed will be listed under skeletron, or will I have to look up other parts?
 
You'll look in NPC.cs for the AI and the arm bone drawing is in Main.cs when you search for "type == 36" (36 is the NPCID of SkeltronHand)
Thanks a ton!
[doublepost=1478123450,1478123261][/doublepost]
You'll look in NPC.cs for the AI and the arm bone drawing is in Main.cs when you search for "type == 36" (36 is the NPCID of SkeltronHand)
Is ilspy supposed to take a while to look at the large main files?
 
Thanks a ton!
[doublepost=1478123450,1478123261][/doublepost]
Is ilspy supposed to take a while to look at the large main files?
Yeah, expect 10 minutes maybe for NPC or Main. You can click save code and it'll save the whole thing as a Visual studio project you can open up. My computer it takes 13 minutes?, but it all depends mostly on how much RAM you have and your processor speed.
 
Back
Top Bottom