tModLoader Research from 1.4 in Terraria 1.3.5

Any idea if I should be worried about all these warnings?
The SetDefaults ones are harmless, means only the items can't be created, and as such will not be researched.
The Tiles one are "harmless", so to speak, but I thought I'd fix them anyway, as it was supposed to be released with the previous version. So, I released a new version with it fixed.

I'll be reworking the internal structure of the mod from the ground up, to allow for features such as disabling research from crafting actually erasing the craft-researched items, allowing for getting back partial researched items (for stuff like when one player has 49/50 and another has 10/50 for the same item, they can share them and research a full item, or just for when you need to craft an item and the only ones you have are the ones you researched) along other features to come. So, for now, I'll focus on that. If any bug comes, I'll try and fix them, but no promisses.
 
Hi JPAN, your mod is getting better and better. I have a question, would it be possible to get the effect of researched Banners?
 
Seems like pretty much every time I throw something in to research it, it has a chance to crash Terraria. The more I've played, the more likely it seems to be to happen. It's gotten to the point where I save and exit and go back in each time I have any important or rare items I don't want to get eaten via a rollback.
Code:
[18:31:32] [1/FATAL] [Terraria]: Main engine crash
System.InvalidOperationException: 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 transformMatrix)
   at Terraria.Main.RenderBlack() in tModLoader\Terraria\Main.cs:line 44323
   at Terraria.Main.RenderTiles() in tModLoader\Terraria\Main.cs:line 43203
   at DMD<Terraria.Main::DoDraw>(Main this, GameTime gameTime)
   at Terraria.Main.Draw(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 46956
   at Microsoft.Xna.Framework.Game.DrawFrame()
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Terraria.Program.LaunchGame_() in tModLoader\Terraria\Program.cs:line 250
 
Having the same problem as WolfHero. After researching so many items, I've now reached a point where every item researched- and even using the search bar- is taking a gamble on the game just crashing, and the risk gets higher and higher with every item researched. At this point, the mod has become barely usable for me, and I'd really like to avoid having to stop using it or completely start again from scratch.

Not sure if it matters, but I'm using 64-bit TML, and had no issues up until I had researched so many items.

It gives one of two errors every time it crashes. I would guess the error I get depends on the specific action I take that causes it. Could be anything from switching categories to trying to search with or without tooltip search on.

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)
at Terraria.Main.DoDraw(GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.SDL2_FNAPlatform.RunLoop(Game game)
at Microsoft.Xna.Framework.Game.Run()
at Terraria.Program.LaunchGame_()
---
System.InvalidOperationException: End was called, but Begin has not yet been called. You must call Begin successfully before you can call End.
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
at Terraria.Main.RenderTiles()
at Terraria.Main.DoDraw(GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.SDL2_FNAPlatform.RunLoop(Game game)
at Microsoft.Xna.Framework.Game.Run()
at Terraria.Program.LaunchGame_()
 
ypu said the hot key is "add" but idk what that is and i cant find it in my controlls, modded or otherwise, what exactly is the hotkey? the mod is working because i see the " research x amount to research"
 
ypu said the hot key is "add" but idk what that is and i cant find it in my controlls, modded or otherwise, what exactly is the hotkey? the mod is working because i see the " research x amount to research"
A bit late but I had this problem too, so I just went into the control settings and changed it.
 
When I run this mod with a low amount of small mods it runs fine. But now I'm running into a problem where it crashes when I run Calamity and Thorium together. I think it may be the sheer amount of items from the two mods that I have researched but I could be completely wrong. I'm about midgame with about 4000 items researched. Here's a link to the crash logs. (hastebin) I would like to request a solution or at least an update because me and my friends playthrough is paused until we can get this problem fixed.
 
Would it be possible to, when you research a crate / treasure bag it automatically researches all the possible drops?

EDIT: Or is that in the config already and I didn't see it?
 
When I run this mod with a low amount of small mods it runs fine. But now I'm running into a problem where it crashes when I run Calamity and Thorium together. I think it may be the sheer amount of items from the two mods that I have researched but I could be completely wrong. I'm about midgame with about 4000 items researched. Here's a link to the crash logs. (hastebin) I would like to request a solution or at least an update because me and my friends playthrough is paused until we can get this problem fixed.
Sorry for the (very) late reply, but health and work conspired to keep me away from Terraria modding. There is indeed a bug, but related to the Tooltip search. When more than a large amount of items are researched, it is possible for the tooltip search to keep going while Terraria started a new Draw cycle. As the way to get the true Tooltip is very hacky (you need to draw the text, and then stop it from rendering), this intersection of Draw/fake Drawing would crash the game.

The newly released version solves that problem by caching the item tooltips when a world is joined first time. This means a little while longer to load the character in the world (once per mod loading), but now should not crash that often.
Would it be possible to, when you research a crate / treasure bag it automatically researches all the possible drops?

EDIT: Or is that in the config already and I didn't see it?
Unfortunately, that is not possible, as crates and treasure bags drop items randomly, there's no set list anywhere of what can spawn from them or something like that that can be looked up like a recipe. If it's a feature many people want, I could run a simulation at game start (same as the tooltips) and add those items when the crate/bag is researched, but it would most likely be a very buggy feature.


V 1.9.1.1 Changelog
- Made tooltip search cache-based. This means some more specific tooltips may not be searched correctly, but at least will not crash the game just by having it on and a lot of researched items. IE: Searching for "Researched!" tooltip will only show as results the items researched prior to world load.

PS: Tested in both single and host and play, and with a grand total of +11k items researched.
 
Question would it be possible to transfer the researched items from one of my chars to another ones of my chars?
 
Question would it be possible to transfer the researched items from one of my chars to another ones of my chars?
It would be possible but only if you have a third party to help you out.
The Research Sharing book only works when the two players sharing the knowledge are in the same world. The knowledge is only temporarly stored in the book, not persistantly.
This was done because saving 10000+ items into a book item would blow up save sizes, that if the save structure does not have a limit for the size of each item's data (either this or minecraft forge had that issue, don't remember if both or not).

So, in order to transfer, get a friend with TMod, create a Host and play server, give him your knowledge, then log on with the second character and receive your friend's knowledge.
I know its a bit of a stretch, but it's the best that can be done to keep the mod working as it should.
 
Was very excited to see this updated, but on trying to start a new game with Fargo's Souls Mod, my game crashes shortly after loading the world. Log gives me a bunch of:

[01:45:58] [Threadpool worker/INFO] [ResearchFrom14]: Could not get tooltip for item 6511; at Terraria.ModLoader.GlobalItem.Instance (Item item) [0x0000a] in tModLoader.exe
at Terraria.ModLoader.ItemLoader.ModifyTooltips (Item item, Int32& numTooltips, String[] names, String[]& text, Boolean[]& modifier, Boolean[]& badModifier, Int32& oneDropLogo, Nullable[Color][]& overrideColor) [0x0006c] in tModLoader.exe
at Terraria.Main.MouseText_DrawItemTooltip (Int32 rare, Byte diff, Int32 X, Int32 Y) [0x02023] in tModLoader.exe
at Terraria.Main.MouseText (String cursorText, Int32 rare, Byte diff, Int32 hackedMouseX, Int32 hackedMouseY, Int32 hackedScreenWidth, Int32 hackedScreenHeight) [0x00077] in tModLoader.exe
at ResearchFrom14.Common.ResearchTable.condensedTooltip (Item item) in ResearchFrom14\Common\ResearchTable.cs:1467

And then this is followed by:

[01:45:58] [1/ERROR] [Terraria]: System.InvalidOperationException: End was called, but Begin has not yet been called. You must call Begin successfully before you can call End.
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End () [0x00008] in FNA.dll
at Terraria.Main.RenderTiles () [0x0005e] in tModLoader.exe
at Terraria.Main.DoDraw (GameTime gameTime) [0x00c98] in tModLoader.exe
at Terraria.Main.Draw (GameTime gameTime) [0x0001c] in tModLoader.exe
[01:45:59] [1/FATAL] [Terraria]: Main engine crash
System.InvalidOperationException: End was called, but Begin has not yet been called. You must call Begin successfully before you can call End.
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End () [0x00008] in FNA.dll
at Terraria.Main.RenderTiles () [0x0005e] in tModLoader.exe
at Terraria.Main.DoDraw (GameTime gameTime) [0x00c98] in tModLoader.exe
at Terraria.Main.Draw (GameTime gameTime) [0x0001c] in tModLoader.exe
 
It would be possible but only if you have a third party to help you out.
The Research Sharing book only works when the two players sharing the knowledge are in the same world. The knowledge is only temporarly stored in the book, not persistantly.
This was done because saving 10000+ items into a book item would blow up save sizes, that if the save structure does not have a limit for the size of each item's data (either this or minecraft forge had that issue, don't remember if both or not).

So, in order to transfer, get a friend with TMod, create a Host and play server, give him your knowledge, then log on with the second character and receive your friend's knowledge.
I know its a bit of a stretch, but it's the best that can be done to keep the mod working as it should.
ah ok thx
 
Was very excited to see this updated, but on trying to start a new game with Fargo's Souls Mod, my game crashes shortly after loading the world. Log gives me a bunch of:

[01:45:58] [Threadpool worker/INFO] [ResearchFrom14]: Could not get tooltip for item 6511; at Terraria.ModLoader.GlobalItem.Instance (Item item) [0x0000a] in tModLoader.exe
at Terraria.ModLoader.ItemLoader.ModifyTooltips (Item item, Int32& numTooltips, String[] names, String[]& text, Boolean[]& modifier, Boolean[]& badModifier, Int32& oneDropLogo, Nullable[Color][]& overrideColor) [0x0006c] in tModLoader.exe
at Terraria.Main.MouseText_DrawItemTooltip (Int32 rare, Byte diff, Int32 X, Int32 Y) [0x02023] in tModLoader.exe
at Terraria.Main.MouseText (String cursorText, Int32 rare, Byte diff, Int32 hackedMouseX, Int32 hackedMouseY, Int32 hackedScreenWidth, Int32 hackedScreenHeight) [0x00077] in tModLoader.exe
at ResearchFrom14.Common.ResearchTable.condensedTooltip (Item item) in ResearchFrom14\Common\ResearchTable.cs:1467

And then this is followed by:

[01:45:58] [1/ERROR] [Terraria]: System.InvalidOperationException: End was called, but Begin has not yet been called. You must call Begin successfully before you can call End.
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End () [0x00008] in FNA.dll
at Terraria.Main.RenderTiles () [0x0005e] in tModLoader.exe
at Terraria.Main.DoDraw (GameTime gameTime) [0x00c98] in tModLoader.exe
at Terraria.Main.Draw (GameTime gameTime) [0x0001c] in tModLoader.exe
[01:45:59] [1/FATAL] [Terraria]: Main engine crash
System.InvalidOperationException: End was called, but Begin has not yet been called. You must call Begin successfully before you can call End.
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End () [0x00008] in FNA.dll
at Terraria.Main.RenderTiles () [0x0005e] in tModLoader.exe
at Terraria.Main.DoDraw (GameTime gameTime) [0x00c98] in tModLoader.exe
at Terraria.Main.Draw (GameTime gameTime) [0x0001c] in tModLoader.exe
OK, I managed to solve this problem permanently by copying the entirety of the MouseDrawTooltip function and remove all the "Draw" parts. This way, it's nearly impossible for the tooltip code to cause the "begin before end" crash. And I applied that same fix to Rare Item Swap for good measure.

V1.9.2 Changelog
-
Removed Item Tooltip cache, as it wasn't fixing what it should and was causing more inacuracies with the search.
- Replaced that with a perfect copy of the MouseDrawTooltip function from Terraria, that does not call anything draw related.
 
Back
Top Bottom