ConstA new record, as a copy of another one, through TweakXL. Change its flats with tweakdb.set. Records stay until the game closes: TweakDB cannot remove them.
A new, empty record of a type, through TweakXL. Most mods clone an existing record instead, which comes with every flat its type needs.
A flat's value, or null when TweakDB has no such flat. TweakDB ids in the
value come back as paths when their names are known.
The flat's path, such as "Items.money.quality", or its id as "0x...".
Tells REDnode the names of ids, such as a list of the records your mod uses, so they come back as paths.
The path of an id, when REDnode knows its name, or null.
Changes a flat, through TweakXL, and applies it to its record. The flat keeps
its own type; a flat that does not exist yet needs type, such as "Int32",
"String" or "array:CName". Resolves with TweakXL's answer: true when it
took the value.
REDnode undoes the change when your package stops. Changes made at once (with
Promise.all) run in the same game frame.
Objects already in the game, such as an item in V's inventory, may keep the values they copied when they were made. Unverified which ones.
A record's type, its native name such as "gamedataVehicle_Record", or null
when there is no such record.
Applies a record's changed flats to the record object. tweakdb.set does this itself; call it after changing flats some other way.
import { tweakdb } from "rednode";
const name = await tweakdb.get("Items.Preset_Lexington_Default.friendlyName"); // "w_handgun_militech_lexington"
const weapon = await tweakdb.record("Items.Preset_Lexington_Default", "WeaponItem");
const vehicles = await tweakdb.records("Vehicle"); // every vehicle record's id
Reading TweakDB from the running game.