Closed Moonpile closed 2 years ago
Some other thoughts:
I think that related to the rqgId
field there should also be a language
and a prio
field. With these 3 fields on all items it would be possible to find the correct item from compendiums by returning the item with the correct rqgId in a specific language (possibly with some fallback language like "en") that has the highest prio.
The prio field is needed to make for example the items in a RBM module to take precedence over starter set items if the same item (same rqgId) exists in both.
The default compendium index should include these 3 fields as well to make it possible to quickly find the correct item without having to search through all compendiums.
there should also be a
language
and aprio
field.
The language one makes sense, I suppose. That way if they have, say, English and Spanish starter set installed, but the world is set to Spanish it will retrieve Spanish language items, though the GM can look through the English language compendia for things (and also the eventual compendium browser will filter on that).
So I guess with prio
your idea is that the Starter Set might have a "broadsword" with a prio
of, say 10, and the Core set might have a "broadsword" with a prio
of 20, and so it returns the one with the higher priority. And later if we do a "Weapons and Equipment" mod we might decide, well they tweaked the Broadsword and this is now definitive, so we give it a prio
of 30 and if you have all three mods installed and look for a "broadsword" it will return the one from the "Weapons and Equipment" mod.
We still have the issue of what if they're equal but at some point you just have to pick the first one from the result set, and also the priority shouldn't be equal.
Ok, if my re-statement of this agrees with what you were intending to say then I think we're on the same page.
Needs to be completed before #101
As developers, we need a way to be able to reference items in compendia regardless of the localization. So the Starter Set in English might have a "Broadsword" and in Spanish a "Sable", but the Character Creation Wizard needs to be able to add it to the new Actor based on an Occupation that has an item with "rqid" of "broadsword-starter" in its list of starting gear.
There should be a util function for finding items in the installed compendia based on the "rqid" provided. This should error when none are found. If one is found, it should return it. If more than one is found it might offer a dialog to allow the user to pick one before returning it.