SearchFilter
This construct represents a filter that a player can use to search resources in the resource (orange) section of the system.
JSON Format
{
"type": "SearchFilter",
"name": ...,
"stat": ...,
"true_name": ...,
"false_name": ...,
"options": ...,
"options_display_stat": ...
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | String | ✓ | The name for this filter. This is the name the player will see pop up in the search bar when typing filter options. |
stat | String | ✓ | The stat this search filter will be filtering on. |
true_name | String | Optional. Defaults to the name of stat. Relevant only for bool stats. How to display the true value for this stat in the filter. For example, if the stat name is "Is magic", you might want to have the true_name be "Magical" and the false_name be "Non-magical". | |
false_name | String | Optional. Defaults to "Not " + the name of stat. Relevant only for bool stats. How to display the false value for this stat in the filter. For example, if the stat name is "Is magic", you might want to have the true_name be "Magical" and the false_name be "Non-magical". | |
options | String | For string or resource values, you should include what options should be available for the stat filter. These can be an enumerated type id (for string) or the id of a resource (for resource). For the latter, you need to also specify the options_display_stat property. | |
options_display_stat | String | For resource-type stat filters, you need to provide the resource id of the values that the stat will contain in the options property, and you also need to specify what stat of this resource should be used to display its option value in the filter. For example, if this is a search filter for a species on its source stat, and source is a resource of type source that contains a stat called the_source_name, you could set this property to the_source_name as you would want to display that when showing the player the options they can choose from. |