Forum > Texturing and 2D Art

[SOLVED] [QUESTION] Change texture path of M2

(1/1)

Kiun:
I'm trying to change hardcoded texture path of a M2 but I'm not having success.

All I can do is edit the path text with 010 editor but this only allows me to set a path with lesser or equal lenght as the original path.

E. g.
   Standard texture path: WORLDGENERICORCPASSIVE DOODADSBRAZIERSTALLBRAZIER01.BLP
   Desired texture path (1): MyCustomObjectsCustomTexturesCustomDoodadsCustomMaterialsCustomTexture.blp <- Longer than standard texture path - will mess up the m2

  Desired texture path (2): MyCustomTexturesCustomTexture.blp <- Shorter than standard texture path - will work BUT I want longer custom paths in some m2 that have short standard paths

I'm asking if there is a way to change texture path with no restrictions. I hope you understand me.
Thank you.

schlumpf:
I'm not sure if offsets in texture entries are relative or absolute. if relative:

* copy the data (16*nTextures + whatever size the stringblock is) at ofsTextures
* insert at end
* set ofsTextures to new offset (where inserted)
* add path you want at the end of the file
* change ofsFilename and lenFilename of your entry to match
if they are absolute:

* add path you want at the end of the file
* change ofsFilename and lenFilename of your entry to match

Kiun:
Much appreciated schlumpf, fast and clear answer.

Adding path at the end of the file and changing FileName lenght and FileName offset was enough so I guess offsets in texure entries are absolute.

Thanks!  :D

Navigation

[0] Message Index

Go to full version