textures set in txdRelationships won´t load

  • Hi all,


    in my current project i wan´t to not dump all of the textures in the vehicles.ytd instead for performance reasons use the txdRelationships in the vehicle.meta.

    The car needs to load 3 ytds ion order to work properly. In my case its the vehicle.ytd (lspd6) the interior.ytd and a polshare.ytd i created to share lightbar and other misc textures throughout my police pack. The code in the vehicles.meta is as seen below.


    The outcome is that the polshare is loaded perferctly fine but the interior as well as the vehshare are not. Vehshare is included by the interior.ytd.


    I used this to set everything up: Shared Textures


    thanks for your help in advance

    best regards Hobe

    Code
      <txdRelationships>
        <Item>
          <parent>vehicles_muscle_n_w_interior</parent>
          <child>lspd6</child>
        </Item>
        <Item>
          <parent>polshare</parent>
          <child>vehicles_muscle_n_w_interior</child>
        </Item>
      </txdRelationships>
  • It is not possible to overwrite the relationships for existing textures, in this case vehicles_muscle_n_w_interior. If you instead assign polshare to the vehicle and the interior textures polshare, it should work:

    XML
      <txdRelationships>
        <Item>
          <parent>polshare</parent>
          <child>lspd6</child>
        </Item>
        <Item>
          <parent>vehicles_muscle_n_w_interior</parent>
          <child>polshare</child>
        </Item>
      </txdRelationships>
  • Hi CJ,


    thanks a lot for your quick answer. It works like a charme!!

    Am I understanding it right, that if I create a car pack with several cars using the same polshare.ytd but different interiors, that every interior is loaded as soon as the polshare is loaded?


    So i have 3 cars with different interior ytds. Are all 3 interior ytds loaded by one car spawned through the polshare?

  • As each child can only have a single parent, I don't see how it would be possible to include different interior textures for different cars. Depending on how many shared interior texture each car uses and how many textures your polshare texture includes, it may still be advantageous to use the polshare while simply including the interior textures directly in the vehicles' ytd.

  • Ok I understand. The polshare has 1.5mb and the cars arround 3-5mb. Everything doable but would have been nice because this is gooing to be a 5M resouce, and i want everythiong to be as small as possible.

    But somehow it needs to work, because in my exhample multiple different cars use the "vehicles_muscle_n_w_interior.ytd". Otherwise creating shared textures doesn´t make any sense.

    Also i found this: https://forums.gta5-mods.com/t…alphabetical-all-vehicles

  • But somehow it needs to work, because in my exhample multiple different cars use the "vehicles_muscle_n_w_interior.ytd". Otherwise creating shared textures doesn´t make any sense.

    You can assign multiple cars to the vehicles_muscle_n_w_interior texture, you just cannot assign multiple cars to the polshare texture and assign this polshare texture to multiple interiors as well. Multiple children can have the same parent, but a child can only have one parent.



    Also, regarding the ytd size: It is not a useful metric for memory usage, as ytds are compressed similarly to zip archives to decrease disc space, the size of the dds textures themselves is what matters. Because of the ytd compression, it is possible that smaller textures with more varying content can result in a higher ytd size than larger but more repetitive textures, even though the smaller textures require less memory.

  • Ahhh ok, makes sense. So i´ve put all the interior textures into the corresponding vehicle.ytd and now i want to share my polshare to every car in the carpack. A´m i right that it now has to look like this??


    XML
      <txdRelationships>
        <Item>
          <parent>triopolshare</parent>
          <child>lspd1</child>
        </Item>
        <Item>
          <parent>triopolshare</parent>
          <child>lspd2</child>
        </Item>
      </txdRelationships>

    or can i just do it like this:


    XML
      <txdRelationships>
        <Item>
          <parent>triopolshare</parent>
          <child>lspd1</child>
          <child>lspd2</child>
          <child>lspd3</child>
        </Item>
      </txdRelationships>

Don’t have an account yet? Register yourself now and be a part of our community!