upsert_datatable_rows
Create or update DataTable rows in the active mod, then call save_all to persist the changes.
Instructions
Create or update rows in the active mod. Call save_all afterwards.
Mods add one asset per row, stored at //DataTables//<row_name>. Each entry is {"row_name": str, "override_existing_row": bool, "values": {...}}, with values in the snake_case form that read_asset returns.
Fields left out of a new row keep struct defaults, not vanilla values. To change part of a vanilla row, use clone_row with override_existing_row=True and the same row name, then set only what differs. When a row refers to another row in this mod, use <mod_prefix>_<row_name> (see editor_status).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| table | Yes | ||
| row_asset_class | Yes |