Skip to content

Dependent objects have misleading viewmodel/information #140

@LeftofZen

Description

@LeftofZen

When objects have dependent objects, like TTRAIL2, the CompatibleVehicles property will show this dependency. However CS has made a mistake-in-process with vanilla objects.

For example:
Image

Of course TTRAIL2 is not a Custom object, it is a Vanilla one. But the way vanilla objects are listed here is that only the Name and ObjectType (as part of Flags) are filled in, and every other value is defaulted to 0, ie Checksum and the SourceGame part of Flags. Unfortunately an oversight in the DAT format/values means that the default value of 0 means Custom object type, not Vanilla. So in this screenshot, the UI is correctly displaying the value of Custom, ie 0, because that's what the DAT file actually contains.

In lieu of a new object format, we will need to unfortunately add some manual correction when reading these dependent-object fields in SawyerStreamReader.LoadVariableCountS5Headers() so that the value is changed to 2 (which is Vanilla) and then again written back to 0 when the object is saved.

We also need to be careful about when true Custom objects are linked - these will have a Checksum set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions