DiffText
This view allows you to display a text showing where the differences are between two strings (texts). This is particularly useful when showing the player what their progression unlocked for them (e.g: when levelling up and feature descriptions vary slightly).
JSON Format
{
  "type": "diffText",
  "id": ...,
  "type": ...,
  "margin_left": ...,
  "margin_right": ...,
  "margin_top": ...,
  "margin_bottom": ...,
  "is_visible": ...,
  "validation_message": ...,
  "original_text": ...,
  "new_text": ...,
  "added_color": ...,
  "deleted_color": ...
}
Fields
| Field | Type | Required | Description | 
|---|---|---|---|
| id | String | ✓ | A unique identifier for the view. You can use it to reference view values in stat formulas by doing $view.view_id(whereview_idis the id that was assigned to this view by you in the system definition) | 
| type | RPGViewType | ✓ | The type of this view. Note that these are all in camelCase. | 
| margin_left | double | Optional. How much margin to add to the left of this view. | |
| margin_right | double | Optional. How much margin to add to the right of this view. | |
| margin_top | double | Optional. How much margin to add to the top of this view. | |
| margin_bottom | double | Optional. How much margin to add to the bottom of this view. | |
| is_visible | StatFormulaComponent | Optional. A formula to specify if the view should be visible or not. Must return a bool. | |
| validation_message | StatFormulaComponent | Optional. If this view is an input, you can define this formula to return a message when the input value is invalid. If the input is valid, you should return null. Otherwise, make the formula return the string that should be shown to the user. | |
| original_text | StatFormulaComponent | ✓ | The original (old) text. | 
| new_text | StatFormulaComponent | ✓ | The new version of the text. Things added to this text will display in the added_color, and things removed from theoriginal_textwill display in thedeleted_color. | 
| added_color | String | Optional. Defaults to green. The color to display added text in. | |
| deleted_color | String | Optional. Defaults to red. The color to display removed / deleted text in. |