Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserving Item Mod Data Megathread #265

Closed
21 tasks done
JavidPack opened this issue Nov 12, 2017 · 11 comments
Closed
21 tasks done

Preserving Item Mod Data Megathread #265

JavidPack opened this issue Nov 12, 2017 · 11 comments
Assignees
Labels
Benefit - Low Complexity - Low Needs Further Testing Requires re-evaluation as to whether the issue is still relevant/has actionables Requestor-TML Maintainers Issues or PRs improving or maintaining TML code base

Comments

@JavidPack
Copy link
Collaborator

JavidPack commented Nov 12, 2017

This issue serves as a home for all issues pertaining to preserving mod data in Mod Items through all possible movement vectors.

All items are tested with ExampleMod's ExampleInstancedGlobalItem.

GlobalItem

Single Player

1.4 Update

  • Void Storage
  • ItemDropRules

Multiplayer

TODO: Untested

ModItem

TODO: Untested

@Chicken-Bones
Copy link
Member

If you want to handle the testing for this, I'm quite happy to do the fixing and verify everything is going through the appropriate channels (since I did the Save/Load, Networking and advised on Mod/Global design)

Also are we talking about ModItem data or GlobalItem data in each case, and as a sub point for Save/Load/Unload, are we talking about when the mod providing the GlobalItem is unloaded, or when the mod providing the host item with GlobalItem data from another mod is unloaded?

@JavidPack
Copy link
Collaborator Author

For the preserve through unload, what I tried so far was a vanilla item with GlobalItem data attached (ExampleInstancedGlobalItem, it attaches a string to the item). The mod supplying the GlobalItem was unloaded, the world entered and exited, the mod was re-enabled, and the world was re-entered. In this case, the data was still present in the .twld file after leaving the world while the mod was unloaded, but the MysteryGlobalItem was not restored to the Player or World once the mod was reenabled. Also, if the world is entered while the data is already in MysteryGlobalItem, the data is lost as well. (As in, Exit World/Unload/Enter/Exit/Enter/Exit)

@Jofairden
Copy link
Member

#257 should fix for reforges. ( I did test, worked for me )

@Jofairden
Copy link
Member

Jofairden commented Dec 6, 2017

I added Linking an item into chat (by holding LALT) as it also suffers from this issue
Edit: Item linking done, and introduced a feature to save and load items using base64 format: 4788795

@Jofairden
Copy link
Member

I believe Preserve through Unload is fixed by #329

@Jofairden
Copy link
Member

To add a comment on quick stacking: As discussed before, stacking is undefined behavior with custom data. To support this usecase, we need hooks that can define behavior when stacking (CanStack, OnStack.. etc. as discussed). This is probably best suited as a separate issue at some point.

@Jofairden
Copy link
Member

Adding a couple new sources to the list for 1.4:

  • Void Storage
  • Item drop system (Drop loot rules)

@Jofairden Jofairden self-assigned this May 2, 2020
@Mirsario Mirsario added this to the Terraria 1.4 milestone Sep 28, 2020
@Solxanich
Copy link
Collaborator

Solxanich commented Jan 13, 2021

So, I'm just trying to figure out what's left to tackle here. Allow me to summarize knowns

Tile entities, item frames were addressed in Dec by Mirsario: 12cd989

Mannequins preserving armor was also addressed at some point, though can't find any particular source (is this what right-click to equipment refers to? Or are we just speaking about the right click to equip, at which point that's been working afaik?)

Preservation of the items in chests will be addressed by: #1266

Preservation of items in void vault will be addressed by: #1270

NPC Loot drop system was addressed by: #1063


tldr; is all that is left fixing the quick stack for chests in multi?

@Solxanich
Copy link
Collaborator

Looks like quick stack was fixed at some point for multi, or at least compared original issue #235 and never marked here as done (proof with reported durability mod):

durability_quickstack.mp4

So I guess this is almost closable?

@Chicken-Bones Chicken-Bones modified the milestones: Terraria 1.4, 1.4 New Features Apr 7, 2021
@Solxanich Solxanich added Priority: Release Requestor-TML Maintainers Issues or PRs improving or maintaining TML code base Bug Bugs that affect users Type: Change/Feature Request Is a request for changes to code base in order to provide improved capabilities Needs Further Testing Requires re-evaluation as to whether the issue is still relevant/has actionables and removed Improvement Bug Bugs that affect users labels Jan 15, 2022
@JavidPack JavidPack added Benefit - Low Complexity - Low and removed Priority: Release Type: Change/Feature Request Is a request for changes to code base in order to provide improved capabilities labels Sep 14, 2022
@JavidPack
Copy link
Collaborator Author

This needs a once over test, then probably close in favor of individual issues still present logged in existing issues.

@Chicken-Bones
Copy link
Member

I believe this is done

@Chicken-Bones Chicken-Bones removed this from the 1.4 New Features milestone May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benefit - Low Complexity - Low Needs Further Testing Requires re-evaluation as to whether the issue is still relevant/has actionables Requestor-TML Maintainers Issues or PRs improving or maintaining TML code base
Projects
None yet
Development

No branches or pull requests

5 participants