Skip to main content

SelectResources

This view allows the player to select or create a resource and assign it as the value for a stat.

JSON Format

{
"type": "selectResources",
"id": ...,
"type": ...,
"margin_left": ...,
"margin_right": ...,
"margin_top": ...,
"margin_bottom": ...,
"is_visible": ...,
"validation_message": ...,
"stat": ...,
"resource_id": ...,
"view_type": ...,
"should_append": ...,
"should_save_on_selection": ...,
"create_in_place": ...,
"creation_pop_up_type": ...,
"filters": ...
}

Fields

FieldTypeRequiredDescription
filtersMap<String, StatFormulaComponent>Optional. Defaults to an empty map. A map of preselected filters that should be used when allowing the player to choose their existing resource/s. The keys of the map should correspond to the stat property of existing filters (defined in the system) for that particular resource, and the values should be stat formulas that should compute to an appropriate value for that filter (e.g: if the stat is name, a string stat, then the formula should compute to a string).