Tweak Inline Records
What's Inline8, and how do I change it?
Last updated
Was this helpful?
What's Inline8, and how do I change it?
Last updated
Was this helpful?
Created: 22 May 2024 by manavortex Last documented update: 22 May 2024 by manavortex
TL;DR: The names are generated at compile-time with every patch, so the order may change. Don't use them, rather create a full copy.
Sometimes, you will come across records with names like Items.Preset_Overture_River_inline0
. That tells us exactly nothing, so what are they?
As we have learned in How to YAML: Tweak modding basics -> Records, it is possible to nest records like Russian dolls. Inline records are exactly that: nested records, which are not defined anywhere but in the context that uses them.
Browsing the tweak databasecontains the full intel on how to find your way around.
Let's take a quick look. This is the tweak as read from the Tweak DB:
If you want to use these effectors, you should define a copy in your yaml.
If you modify a record (e.g. VehicleStatPreset.BaseCar
) or one of its properties, then all records inheriting from it will be affected.
To learn how to avoid that, just keep reading.
Let's assume that we want to tweak the Hellhound's vehicle health. Here is the record:
As you can see, its health is based on the shared record VehicleStatPreset.BaseCar_inline0
.
If you modify it directly, it will change the health of all vehicles. Therefore, to make changes, a new record must be created. You can see VehicleStatPreset.BaseCar
in the statmodifierGroups, and VehicleStatPreset.BaseCar_inline0 in its statModifiers:
To make the change, create a new VehicleStatPreset.Octant
to replace VehicleStatPreset.BaseCar
:
Next, define VehicleStatPreset.Octant
. This record will have VehicleStatPreset.Octant_inline0
in its stat modifiers:
When inheriting a new base, you only need to include the information that is actually different:
Finally, modify the value itself:
This way, it won't affect other vehicles and you can still modify it.
You can use Wolvenkit's to take a look at the properties: