iron-vault-plugin / iron-vault

Obsidian plugin for Ironsworn/Starforged games
https://ironvault.quest/
Other
49 stars 9 forks source link

Links to asset-linked moves don't work #112

Closed cwegrzyn closed 4 months ago

cwegrzyn commented 5 months ago

If you Make a move with an asset-linked move, such as Empath's Read Heart, the resulting move link (to move:starforged/assets/path/empath/abilities/0/moves/read_heart) does not open the move modal with that move. This makes technical sense, because the asset-linked moves are not indexed into the Move index. But it isn't very nice from a user perspective.

Related to this, asset-linked moves are not available to folks not using character sheets.

Considerations

Possible solutions

Two main strategies:

  1. Index asset-linked moves into the Move index. Introduce some mechanism into the index for identifying moves that should be filtered out based on circumstance (may be relevant for campaign, ruleset support too). Add layer on top of index which most of the system uses for finding active moves (ActionContext?)
  2. Keep Move index as the index of all top-level Moves (just like the Asset index is the index of all top-level assets). Introduce a layer on top of indexes that maintains the available list of moves by integrating Moves index, moves from assets index, etc.
zkat commented 5 months ago

Why don't we start by indexing all asset moves, but then we only display the ones that are associated with an existing character asset, in the make a move command?

cwegrzyn commented 5 months ago

Yeah, that's option 1, and that's where I'm leaning too. It makes sense that the index has all known moves, even ones that aren't "active" in some sense. I think I can just wrap the moves in the index with something that provides their origin (e.g., if a move came from an asset, also stash the asset id). Will be easy enough to then filter that down. And the same strategy can be used to associate moves with rulesets.

Still not 100% sure how move enhancements fit in, but that feels like a distant nice-to-have.