TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 17 of 17

Thread: ObjTxtReplace Error Solution?

  1. #1
    Member
    Registered: Feb 2021

    ObjTxtReplace Error Solution?

    I swear I had this working before, and now I can't seem to get it to function. I've duplicated the mesh, .bin., .e, et al of the human model I want to retexture and put them in the MESH folder. I have the texture saved in a Dromed-friendly size and placed in the txt16 folder. I've done both with the help of 7Zip, and I've tried saving the texture in both .PNG and .GIF formats. Despite this, the Monolog gives me an "ObjTxtReplace can't load texturename.png/gif" error whenever I try to replace the human mesh's texture with a custom one. If I try to load a texture that came with the base game, on the other hand, it works. I seem to only have this problem with the AI models so far.

    Edit: Another facet of this error is that the original file, when replaced back into MESH.crf, will load as normal. Yet a file with the exact same name and file type won't, resulting in the model in question having a texture I can best describe as "Jorge mixed with rainbow vomit".

    Edit 2: Solution found. The first problem was that, to attach textures to meshes, you add the Property Renderer - > Mesh via the editing function in the Object Hierarchy. Next, the texture image needed to be saved as a 32-bit image for it to work in Dromed. If you have a program like Photoshop or Krita, there should be options to pick which bit rate you want to save the image with under an Image Conversion section, or something similarly-named.
    Last edited by Esse; 31st Jul 2021 at 10:27.

  2. #2
    You don't use Shape -> Tex replace on AIs. Instead add the property Renderer -> Mesh textures and enter the original texture name and the one to replace it with.

    Warning: You have to enter the entire file name in both lines, i.e. if it's a hammerite you can't just put in hamsol, it would have to be hamsol.gif for example.

  3. #3
    Member
    Registered: Feb 2021
    That seems to have helped somewhat. The texture is now trying to map, but it does so improperly. The result is a weird flesh-golem of the texture I wanted to use:



    This is what the Object Hierarchy looks like for the Human AI I'm trying to retexture:

    Code:
    PaganWoman2
    Creature
    Creature Type: Humanoid
    
    Position: { 0.00, 0.00, 0.00; 0; 0; 0; -1; -1;}
    Renderer
    Mesh Textures: { pagWom01.GIF; paganw02.gif;;;; ...} (ellipsis is mine, denoting repeating ;s)
    Shape
    Model Name: PaganW01
    
    [+] PaganWoman (-2261)
    Last edited by Esse; 30th Jul 2021 at 23:57.

  4. #4
    Any way you can show us the new paganw02.gif file you created? i.e. put it up for download so we can examine it.

  5. #5
    Member
    Registered: Feb 2021
    Quote Originally Posted by RippedPhreak View Post
    Any way you can show us the new paganw02.gif file you created? i.e. put it up for download so we can examine it.
    Sure, here's an Imgur link: https://i.imgur.com/oiChyAZ.gif

    My current hypothesis on why this is happening is something involving the color channels in a picture saved now vs. back in 2000.

  6. #6
    Member
    Registered: Sep 2008
    Location: Deutschland/Germany
    Can't see any picture under that URL.

    I assume that the dimensions of that GIF are OK since you are familiar with those texture rules.

    Actually I experienced similar problems. Usually the replacement works fine for OM meshes, but replacing textures on DEDX meshes did not work for me, so I found myself constrained to copy the BIN and CAL files and change the GIF description with the hex editor. Is your new paganw02.bin taken from DEDX?
    My FM campaigns Garrett's Young Years XTra, Reunion With Basso
    Want your upcoming FM translated in foreign languages?

  7. #7
    Member
    Registered: Feb 2021
    Quote Originally Posted by zappenduster View Post
    Can't see any picture under that URL.

    I assume that the dimensions of that GIF are OK since you are familiar with those texture rules.

    Actually I experienced similar problems. Usually the replacement works fine for OM meshes, but replacing textures on DEDX meshes did not work for me, so I found myself constrained to copy the BIN and CAL files and change the GIF description with the hex editor. Is your new paganw02.bin taken from DEDX?
    Here's a mirror, let me know if this doesn't work: https://cdn.imgchest.com/files/my8xcl9xk4l.gif

    It's an OM mesh, taken from the Thief 2 files after being accessed via 7-Zip. The dimensions of the texture are okay, I think. I used the dimensions of the original base game texture it's derived from, 256x256 (or 256x128, something like that). I haven't tried a hex editor yet, so if all else fails, that might be my only option. There's an online one I know of that saves the need for downloading a program for hex edits.

    Glad to know I'm not the only one with this kind of problem. Hopefully this thread will be helpful to others in the future with troubleshooting this error.

  8. #8
    It will still look shite even using the hex editor. Try this: Using Photoshop, increase color depth to 24-bit 16 million colors, then save it as a .png.
    Last edited by RippedPhreak; 31st Jul 2021 at 09:36.

  9. #9
    Member
    Registered: Feb 2021
    It seems to have worked! I don't have Photoshop, so I found a freeware clone and used its image rendering to increase the bit-channel to 32 bit. Now the texture is showing up, and I don't have to duplicate the .bin and other files if I want to attach a texture to an in-game model. Thank you guys so much for your help!

  10. #10
    Member
    Registered: Jan 2001
    Location: Constantly losing tug o'war
    Quote Originally Posted by Esse View Post
    when replaced back into MESH.crf
    Glad you solved the problem. Regarding the above, I hope you know editing crf contents is a bad idea and you were just doing that as a test (and you have a backup) in order to work out what was wrong.

  11. #11
    Member
    Registered: Feb 2021
    Quote Originally Posted by R Soul View Post
    Glad you solved the problem. Regarding the above, I hope you know editing crf contents is a bad idea and you were just doing that as a test (and you have a backup) in order to work out what was wrong.
    It was. I only edit the CRF when I'm testing out textures in Dromed or using 7-Zip to get base textures out of them. Otherwise, I don't touch those files at all. You did remind me, however, to check and make sure I still have a backup. If you know of another way to import textures into Dromed without popping them into the game's base txt16 files, I mean it sincerely when I say I'm all ears.
    Last edited by Esse; 31st Jul 2021 at 16:57.

  12. #12
    I only edit the CRF when I'm testing out textures in Dromed
    uh...what?

    If you know of another way to import textures into Dromed without popping them into the game's base txt16 files

    I might be misinterpreting this, but you make it sound as if you're always zipping up your models and textures into a mesh.crf before running DromEd and looking at the files in-game.

    You do know to create a Mesh folder under the main Thief directory...and put the .bin and .cal files in that, then create a txt16 folder under Mesh and put the .gif and .png files in that, right? No zipping needed.

  13. #13
    Member
    Registered: Jan 2001
    Location: Constantly losing tug o'war
    Quote Originally Posted by Esse View Post
    If you know of another way to import textures into Dromed without popping them into the game's base txt16 files, I mean it sincerely when I say I'm all ears.
    If you mean to test things without cluttering up your FM folder, you could use the mod system.
    Create a folder in the main T2 folder, e.g. called ResTest
    In cam_mod.ini find the mod_path line and put +.\ResTest at the end

    Inside the ResTest folder you'd use the exact same folder structure as an FM (e.g. ResTest\mesh\txt16)

    Bear in mind that Dromed won't like it if you move files from ResTest to your FM's own folder while it's still running. It tends to think they've been deleted.

  14. #14
    Member
    Registered: Feb 2021
    Quote Originally Posted by RippedPhreak View Post
    uh...what?




    I might be misinterpreting this, but you make it sound as if you're always zipping up your models and textures into a mesh.crf before running DromEd and looking at the files in-game.

    You do know to create a Mesh folder under the main Thief directory...and put the .bin and .cal files in that, then create a txt16 folder under Mesh and put the .gif and .png files in that, right? No zipping needed.
    No, I didn't, LOL. You're not misinterpreting anything. Everything I've been doing so far is knowledge hacked together from archived threads and Dromed tutorials. Thank you for the pointers.

    Quote Originally Posted by R Soul View Post
    If you mean to test things without cluttering up your FM folder, you could use the mod system.
    Create a folder in the main T2 folder, e.g. called ResTest
    In cam_mod.ini find the mod_path line and put +.\ResTest at the end

    Inside the ResTest folder you'd use the exact same folder structure as an FM (e.g. ResTest\mesh\txt16)

    Bear in mind that Dromed won't like it if you move files from ResTest to your FM's own folder while it's still running. It tends to think they've been deleted.
    This is also very helpfull! I didn't see this before I posted originally. Thank you.

  15. #15
    Member
    Registered: Feb 2021
    I hate to come back to this thread again, but it appears Dromed isn't recognizing any of my custom textures in the ResTest file. I'm getting instead the error that it can't find the texture I want to swap out the base game texture with. I've saved the files in question as 24-bit or greater, there is no transparency in them, and I've added +.\ResTest at the end of my cam_mod.ini file, like so:

    Code:
    ;mod_path MyBowMod+.\TexturePack+.\ResTest
    This is the same name as the folder which has the custom resources I test. I had this working before, and the one difference between then and now is that I had to remove the ResTest line and resave my cam_mod.ini because it was causing some FMs to crash. I went and put it back in after I was done playing those FMs. From what I remember, I didn't have any duplicated .bin files for the textures to work on meshes, just the textures themselves in the ResTest folder.
    Last edited by Esse; 8th Aug 2021 at 13:14.

  16. #16
    The semicolon at the start of the line tells Windows to ignore that line. Delete the ; and try again.

  17. #17
    Member
    Registered: Feb 2021
    Quote Originally Posted by RippedPhreak View Post
    The semicolon at the start of the line tells Windows to ignore that line. Delete the ; and try again.
    It halfway worked. Dromed recognized the texture and tried to load it, but the object turned into a white wedge when the texture was applied.

    Edit: And it turns out I was misspelling the line and didn't see that at first. Now it's fixed.
    Last edited by Esse; 10th Aug 2021 at 23:04.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •