Tweak Inline Records

What's Inline8, and how do I change it?

Summary

Created: 22 May 2024 by manavortex Last documented update: 22 May 2024 by manavortex

What are inline records?

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.

Let's take a quick look. This is the tweak as read from the Tweak DB:

The record's properties in The Wolvenkit Tweak Browser. Screenshot kindly provided by Seberoth

You can use Wolvenkit's Tweak Browser to take a look at the properties:

If you want to use these effectors, you should define a copy in your yaml.

Safely modifying inline records

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:

Vehicle.v_standard3_militech_hellhound:
  statModifierGroups:
    - VehicleStatPreset.BaseCar

To make the change, create a new VehicleStatPreset.Octant to replace VehicleStatPreset.BaseCar:

Vehicle.av_zetatech_octant_dav_dummy:
  statModifierGroups:
    - VehicleStatPreset.Octant
    - VehicleStatPreset.Strong 

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:

VehicleStatPreset.Octant:
  $base: VehicleStatPreset.BaseCar
  statModifiers:
    - !append-once VehicleStatPreset.Octant_inline0

Finally, modify the value itself:

VehicleStatPreset.Octant_inline0.value: 7600

This way, it won't affect other vehicles and you can still modify it.

Last updated

Was this helpful?