mrkwnzl / cyphersystem-foundryvtt

The Cypher System for Foundry VTT
Other
21 stars 14 forks source link

When adding or updating an Item set archived state based on tags #306

Closed farling42 closed 11 months ago

farling42 commented 1 year ago

When using tags or recursions, it would be nice if the archived state was set correctly when an Item is first created or subsequently edited.

(I know that I can manually select the tag/recursion again to set the correct state, but it would be a QOL improvement to have it happen automatically.)

mrkwnzl commented 1 year ago

I think that’s really hard to implement, at least with the current way how Recursions work. Thing is, I can’t tell Foundry to not change the archive status if something else that is not the recursion tag has been changed. And in the next update, there will be a way to drag foci, which is a way to keep items active even if you aren’t on the tagged recursion.

For example, I have a certain focus on Earth and it can be dragged to Ardeyn. When I drag that focus, my abilities, skills, and equipment stay the same on Ardeyn. If I now implement an automatism that archives or unarchives the items based on the current recursion when I update the items, for example because I reduced the quantity, or fixed a typo, they are being archived although I don’t want that. How can I tell Foundry when to do it when not to do it?

Edit: The way dragging works is that I simply don’t archive or unarchive any items and don’t change any stats when translating to another Recursion. I simply skip all the functions.

I like the idea, and I’ll keep thinking about a way to implement that, but right now, I’d rather stay on the side of keeping it in the player’s hand to archive or unarchive the appropriate items, either by doing it for the individual the item or by translating to another (or even the same) recursion. And if you have an idea on how to tackle that within the current recursion functionality, please let me know.

farling42 commented 1 year ago

Ah, I guess my "editing" idea was about adding a recursion to an Item that didn't currently have one.

Being able to do it on initially adding an Item to an Actor would be a nice QOL improvement though.

At some point I might have a look at the code to see what is easily possible :)

mrkwnzl commented 11 months ago

This is implemented in the tagging overhaul in v2.12.0