Get "catalog" entity data, either js or lua?

Can I get “entity_data” for entities that don’t exist but could exist? Say I get a root_uri from the catalog; can I then get entity_data.stonehearth:net_worth.value_in_gold for that entity? I was looking at the workshops to try to figure out where it was getting the net worth value for the “to-be-crafted” items since that’s not in the recipe itself and it is in the entity data for that entity, but I couldn’t find where the connection was being made. And as far as I know, traces have to be done on actual object URIs, not the generic root URIs.

Ultimately I want to be able to get a limited list of items from the catalog similar to how I can with a custom item tracker from the inventory.

Try radiant.entities.get_entity_data(uri, entity_data_name) in Lua.

1 Like

You know, I was actually already doing that in my tracker and forgot that I was using the root_uri there via entity_forms_lib.get_root_entity(entity) so I spaced and thought I could only do get_entity_data on object URIs. Thanks! It’s definitely time for sleep.