change .utx name

Discussions about UT99
Post Reply
User avatar
Tater
Average
Posts: 69
Joined: Sat May 25, 2013 3:28 pm

change .utx name

Post by Tater »

Is there a way to change the name of a texture package after the map is built. Somehow a space got into the name and I didn't notice it until I loaded it to the server. It can't be played as is but the map is dependent on that package with that name. If I change the name and try to open and rebuild it the editor crashes because it can't find the original package. I'm just trying to avoid having to "re-texture" all over again.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: change .utx name

Post by Higor »

Upload both map and UTX file
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: change .utx name

Post by Barbie »

What also works within 15 minutes (but only if you don't have MyLevel stuff):
1) Export the map as T3D
2) Memorize all used resources: Music, Textures, Sounds
3) Close UnrealEd
4) Rename the UTX file
5) Open UnrealEd and load all resources from step 2, but load the renamed UTX file instead of the original
6) Import the T3D file of step 1 in UnrealEd and rebuild map
-----------
PS: This hack may be also worth a try: Make a copy of the map, use a binary editor and replace all occurrences of the texture name, but don't change the length of the string (eg replace space with underscore).
Last edited by Barbie on Tue Dec 12, 2017 8:17 pm, edited 1 time in total.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: change .utx name

Post by nogardilaref »

Well, the simplest way is to just replace the space by an underscore in the texture package name itself, and then hex-edit the map file itself, and search for the texture package old name in there and do the same (replace the space by an underscore), and save it.
Not sure if this is what Higor is going to do for you though.

Unless you want to remove or add characters from the name though, at which point something like what Barbie suggested might be a way.
User avatar
Tater
Average
Posts: 69
Joined: Sat May 25, 2013 3:28 pm

Re: change .utx name

Post by Tater »

The package in question is -=SoP=-pizza v2.utx This is a variation of the DM-AMLPPizzaShop. I'll upload the whole zip package.

If I was to "clone" the package in question and then just "select matching textures" and replace from the cloned package would it still depend on the wrongfully named package?
Attachments
DM--=SoP=-DylansPizzaShop_v2.zip
(19.81 MiB) Downloaded 48 times
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: change .utx name

Post by Higor »

Barbie wrote:What also works within 15 minutes (but only if you don't have MyLevel stuff):
1) Export the map as T3D
2) Memorize all used resources: Music, Textures, Sounds
3) Close UnrealEd
4) Rename the UTX file
5) Open UnrealEd and load all resources from step 2, but load the renamed UTX file instead of the original
6) Import the T3D file of step 1 in UnrealEd and rebuild map
-----------
PS: This hack may be also worth a try: Make a copy of the map, use a binary editor and replace all occurrences of the texture name, but don't change the length of the string (eg replace space with underscore).
About 120 seconds on a HEX editor will do.


===================

Code: Select all

Rename:
-=SoP=-pizza v2.utx
To
-=SoP=-pizza_v2.utx

Code: Select all

Open with hex editor (XVI32 if you don't have any):
-=SoP=-pizza_v2.utx
Go to offset 0x1E7 (487 dec)
Replace the space char with a underscore char [0x20 with 0x5F]
Save 

Code: Select all

Open with hex editor:
DM--=SoP=-DylansPizzaShop_v2.unr
Go to offset 0x34CB (13515 dec)
Replace the space char with a underscore char [0x20 with 0x5F]
Save 
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: change .utx name

Post by Barbie »

Not to forget to mention @Tater: If you already have released the map to public, please us another name for the fixed map to avoid file mismatches.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: change .utx name

Post by nogardilaref »

Barbie wrote:Not to forget to mention @Tater: If you already have released the map to public, please us another name for the fixed map to avoid file mismatches.
It's also best for the map and texture files to be opened and saved again from UEd, to generate a new GUID.
User avatar
Tater
Average
Posts: 69
Joined: Sat May 25, 2013 3:28 pm

Re: change .utx name

Post by Tater »

I just tried it on my server last night with only a few people on but I'll definitely rename it. Luckily the utx package will already have a different name.

Higor it seems like your solution might have worked, thanks
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: change .utx name

Post by Chamberly »

Dang it, a solution was already posted before I get to do this one! :loool:

I do my way a little bit different, just open the map in notepad and rename all texture as needed, set up a new copy of the .utx with a different name and it should be good to go.

Good to hear another map getting released though! :rock:
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
Leo(T.C.K.)
Inhuman
Posts: 868
Joined: Sat Aug 13, 2011 10:26 pm

Re: change .utx name

Post by Leo(T.C.K.) »

Yea this is simple. However, what kind of...oh nevermind, the space was accident. Was about to rant about never put spaces in filenames(even though I often see it in case of maps alone where it's not as critical but it's still a wrong thing to do) Yea well..:/
Post Reply