This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [SOLVED] [QUESTION] Change texture path of M2  (Read 2279 times)

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
[SOLVED] [QUESTION] Change texture path of M2
« on: June 05, 2014, 02:43:44 pm »
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.
« Last Edit: June 05, 2014, 05:29:33 pm by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] Change texture path of M2
« Reply #1 on: June 05, 2014, 02:54:21 pm »
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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
Re: [QUESTION] Change texture path of M2
« Reply #2 on: June 05, 2014, 05:29:17 pm »
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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »