JavidPack / ItemChecklist

Item Checklist mod for tModLoader
https://forums.terraria.org/index.php?threads/item-checklist-in-game-100-item-collection-checklist.52786/
14 stars 8 forks source link

1.4.4 Port #14

Closed OMGeeky closed 3 months ago

OMGeeky commented 1 year ago

Hello there,

i tried my best at porting this mod (mostly Localization's & tmodPorter) to 1.4.4 since I wanted to use it myself. I tested everything I changed and I think everything works.

I'm not so sure about this line, if it needs to be changed to (I don't think so but thought I'd mention it): ItemChecklist\ItemChecklist.cs:122

Its a lot of code changes, especially in SharedUI and if you got a good Idea how to do that better I'm open to suggestions. But this was the best way I found without major restructuring.

This mod does currently not support the magic storage recursive crafting feature, if you want to use magic storage and this mod make sure to disable that (otherwise it will mark a lot of items as collected when opening the magic storage interface). Once Magic storage adds a way to see if recursive crafting is currently active this can be prevented but until then the feature remains incompatible (unless someone wants to do a rework how the mod detects items...).

AerYareli commented 1 year ago

Heya, I don't where to post this but hopefully here is okay, I downloaded the version you made and started to build it on tModLoader, but no matter what I do I always get this error, any help would be greatly appreciated!


The mod(s) have been automatically disabled.
System.Exception: A mod's internal name cannot contain a period
   at Terraria.ModLoader.Core.ModOrganizer.VerifyNames(List`1 mods) in tModLoader\Terraria\ModLoader\Core\ModOrganizer.cs:line 409
   at Terraria.ModLoader.Core.ModOrganizer.SelectAndSortMods(IEnumerable`1 mods, CancellationToken token) in tModLoader\Terraria\ModLoader\Core\ModOrganizer.cs:line 345
   at Terraria.ModLoader.ModLoader.Load(CancellationToken token) in tModLoader\Terraria\ModLoader\ModLoader.cs:line 120
JavidPack commented 1 year ago

Heya, I don't where to post this but hopefully here is okay, I downloaded the version you made and started to build it on tModLoader, but no matter what I do I always get this error, any help would be greatly appreciated!

The mod(s) have been automatically disabled.
System.Exception: A mod's internal name cannot contain a period
   at Terraria.ModLoader.Core.ModOrganizer.VerifyNames(List`1 mods) in tModLoader\Terraria\ModLoader\Core\ModOrganizer.cs:line 409
   at Terraria.ModLoader.Core.ModOrganizer.SelectAndSortMods(IEnumerable`1 mods, CancellationToken token) in tModLoader\Terraria\ModLoader\Core\ModOrganizer.cs:line 345
   at Terraria.ModLoader.ModLoader.Load(CancellationToken token) in tModLoader\Terraria\ModLoader\ModLoader.cs:line 120

Sounds like you have the folder named ItemChecklist-1.4.4, which would happen if you just downloaded and extracted the repo from github.com. You'll want to rename the folder to be ItemChecklist

AerYareli commented 1 year ago

Sounds like you have the folder named ItemChecklist-1.4.4, which would happen if you just downloaded and extracted the repo from github.com. You'll want to rename the folder to be ItemChecklist

This was it! I'm so sorry! I feel so dumb lol

PlayfulPiano commented 12 months ago

I feel like for some reason this version doesn't work right, because I have in my item checklist a bunch of items I did not yet obtain, either through magicstorage or through my player inventory. It shows me at around 40% completion in vanilla items and I haven't even beaten a boss yet.

Edit: unless it might've been an instance where item checklist is world based and not player based. if so, maybe could there be a way to implement a reset data for a world/player?

PlayfulPiano commented 12 months ago

I just figured out the issue, it's taking any "unable to craft" item from magic storage's "storage crafting interface" as part of completion. Seems independent from whether you have the "Toggle Collect Chest Items" setting enabled or not.

It automatically updates whenever you include a new crafting station into the interface.

OMGeeky commented 12 months ago

Interesting. Does this happen before 1.4.4 too or just after my port?

facundodestro commented 12 months ago

Excuse me for asking, but how would I install this? By downloading the main package I get a folder and I don't know where to put that. If I put it in the Mods folder in MyGames, it does nothing, as only .tmod files go there.

facundodestro commented 12 months ago

Nevermind, I found the Build option in Tmodloader, but when I compile it with that it gives an error

Terraria.ModLoader.Exceptions.BuildException: Compiling ItemChecklist.dll failed with 31 errors and 9 warnings Error: C:/Users/User\Documents\My Games\Terraria\tModLoader\ModSources\ItemChecklist\ItemChecklistGlobalItem.cs(9,44): error CS0246: The type or namespace name 'ItemCreationContext' could not be found (are you missing a using directive or an assembly reference?)

And yes, the folder is called ItemChecklist, not ItemChecklist-1.4.4 or anything weird like that

OMGeeky commented 12 months ago

Nevermind, I found the Build option in Tmodloader, but when I compile it with that it gives an error

Terraria.ModLoader.Exceptions.BuildException: Compiling ItemChecklist.dll failed with 31 errors and 9 warnings Error: C:/Users/User\Documents\My Games\Terraria\tModLoader\ModSources\ItemChecklist\ItemChecklistGlobalItem.cs(9,44): error CS0246: The type or namespace name 'ItemCreationContext' could not be found (are you missing a using directive or an assembly reference?)

And yes, the folder is called ItemChecklist, not ItemChecklist-1.4.4 or anything weird like that

Can you build it without my changes on 1.4.3? I did not test it in a while but I don't think it should've changed since I did.

facundodestro commented 12 months ago

Uh I'm not very experienced in modding besides the menu built in the tmodloader, so I don't really know how to do that lol. Although isn't this port supposed to be for 1.4.4? If I build it on 1.4.3 then I might as well use the default mod with no changes by downgrading Tmodloader

Yoshiver commented 12 months ago

Does this save progress from 1.4.3 to 1.4.4?

OMGeeky commented 12 months ago

Uh I'm not very experienced in modding besides the menu built in the tmodloader, so I don't really know how to do that lol. Although isn't this port supposed to be for 1.4.4? If I build it on 1.4.3 then I might as well use the default mod with no changes by downgrading Tmodloader

Yes its basically the same version from the workshop. I just tried to find out if it is a problem with my port or a problem with your setup.

I set everything up fresh on a new machine and got a clone of this pr and it works, so the issue is on your end. I'm not sure how you cloned the source to that folder but my guess would be that you don't have right thing cloned, I think you might have the 1.4 branch not this PR. to check you can open the file C:/Users/User\Documents\My Games\Terraria\tModLoader\ModSources\ItemChecklist\ItemChecklistGlobalItem.cs and if line 11 looks like const string LOCALIZATION_KEY = "Mods.ItemChecklist.GlobalItem."; you got the right version. otherwise you don't.

facundodestro commented 12 months ago

Uh I'm not very experienced in modding besides the menu built in the tmodloader, so I don't really know how to do that lol. Although isn't this port supposed to be for 1.4.4? If I build it on 1.4.3 then I might as well use the default mod with no changes by downgrading Tmodloader

Yes its basically the same version from the workshop. I just tried to find out if it is a problem with my port or a problem with your setup.

I set everything up fresh on a new machine and got a clone of this pr and it works, so the issue is on your end. I'm not sure how you cloned the source to that folder but my guess would be that you don't have right thing cloned, I think you might have the 1.4 branch not this PR. to check you can open the file C:/Users/User\Documents\My Games\Terraria\tModLoader\ModSources\ItemChecklist\ItemChecklistGlobalItem.cs and if line 11 looks like const string LOCALIZATION_KEY = "Mods.ItemChecklist.GlobalItem."; you got the right version. otherwise you don't.

I checked it and it says "if (context is RecipeCreationContext rContext) {" in line 11. In fact the const variable isn't even on the script from my end lol. There aren't even any variables on the ItemChecklistGlobalItem Script To be honest I don't know what I'm getting wrong, to download the mod I'm going to <> Code and then the Code button and Download ZIP. In one part I found some releases but they were from 2018 for a very old version of Tmodloader. I don't know if that's the right way to install your port. After that I just unzip the folder, paste it in ModSources and click the Build option on the Tmodloader menu seen in the in-game menu

OMGeeky commented 12 months ago

I checked it and it says "if (context is RecipeCreationContext rContext) {" in line 11. In fact the const variable isn't even on the script from my end lol. There aren't even any variables on the ItemChecklistGlobalItem Script To be honest I don't know what I'm getting wrong, to download the mod I'm going to <> Code and then the Code button and Download ZIP. In one part I found some releases but they were from 2018 for a very old version of Tmodloader. I don't know if that's the right way to install your port. After that I just unzip the folder, paste it in ModSources and click the Build option on the Tmodloader menu seen in the in-game menu

So you need GitHub desktop or some other tool that works with PRs and on the page of this pull request click on the <> Code and there click on clone with GitHub desktop or something like that. This way you get the version from this pull request. You can also go to https://github.com/OMGeeky/ItemChecklist/tree/1.4.4 And get the code from there (it's the same code, just different ways of getting it) just make sure you are getting the 1.4.4 branch. Then check again what I told you earlier and you should have that line. If you do you should be able to build it.

AblazingHeart commented 11 months ago

PlayfulPiano

I was having that problem myself, I had the new item acquired message option from item checklist activated, and if I opened the crafting interface of magic storage it would start adding a lot of yet unfound items and crash my game, after some testing with other worlds I figured this only happens (as far as I know) if you have recipe recursion activated in magic storage, I put that option to 0 and the problem didn't appear again

OMGeeky commented 11 months ago

PlayfulPiano

I was having that problem myself, I had the new item acquired message option from item checklist activated, and if I opened the crafting interface of magic storage it would start adding a lot of yet unfound items and crash my game, after some testing with other worlds I figured this only happens (as far as I know) if you have recipe recursion activated in magic storage, I put that option to 0 and the problem didn't appear again

Yes we figured out the problem with the help of one of the magic storage devs. He said that the recursion error creates items and if this mod relies on 'OnCreated' there is currently no workaround for it. He intends to add an API to a future update for mods to check if recursion crafting is currently happening, that way this problem can be solved. Until he does that there is nothing we can do about it other than to disable it in the config.

JavidPack commented 3 months ago

Thanks a ton, I've finally found some time to revisit this and publish it, thanks for making all these changes.

PlayfulPiano commented 3 months ago

WE'RE SO BACK