Script Warning: Texture References Itself as Patch

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
ReX
Posts: 1578
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Script Warning: Texture References Itself as Patch

Post by ReX »

Would someone please tell me what this warning means, and how to fix it?

Code: Select all

Script Warning, "Temple_00.pk3: Textures" Line 127:
Texture 'Window01' references itself as patch
I started getting the warning and related in-game graphical errors after I reorganized my game resources. I started with 2 files, one a wad with maps and graphic resources and the other a pk3 with various folders. This combination correctly displays all graphics.
Original Wad
Original Wad
Original pk3
Original pk3
In-Game Textures are Fine
In-Game Textures are Fine
Once I reorganized the files the warning began, and the graphics get messed up in-game. [I will put those pictures in another post, as the forum software limits each post to 3 attachments.]
User avatar
ReX
Posts: 1578
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Script Warning: Texture References Itself as Patch

Post by ReX »

Here are the reorganized resources, and the messed up in-game textures:
Modified Wad
Modified Wad
Modified pk3
Modified pk3
Messed Up Textures
Messed Up Textures
Note, that the result is the same if the 3 textures in the "root" directory of the pk3 are moved into the TEXTURES folder, or if they are put into another folder named PATCHES

I am using GZDooM v3.1.0

[EDIT: I switched to GZDooM v3.2.5, and now those textures have disappeared entirely.]

[Second EDIT: I moved those 3 textures into the TEXTURES folder, and I no longer get the warning message, but now the messed-up textures have returned.]

I don't know if this matters, but the problem appears to be happening just with scaled textures.
User avatar
RiboNucleic Asshat
Posts: 501
Joined: Thu May 09, 2013 8:15 pm
Preferred Pronouns: No Preference
Graphics Processor: nVidia with Vulkan support
Location: Exactly where I am
Contact:

Re: Script Warning: Texture References Itself as Patch

Post by RiboNucleic Asshat »

I think I see what's happening here-- I'm assuming that you're scaling the textures down via the TEXTURES lump and not directly using the JPEGs as textures?

TEXTURES allows you to use other composite textures as a patch. Since the name of the JPEG file is the same as the entry in TEXTURES, it's getting confused about which is supposed to be referenced: basically an infinite recursion (Texture "Window01" has a patch "Window01", it looks for that name only to find itself). I'm not sure why this worked in a WAD but I'm guessing it shouldn't :P .

Try changing the names of the JPEGs (you should put them in the patches folder, as well) and updating the TEXTURES entries with the new names.
User avatar
ReX
Posts: 1578
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Script Warning: Texture References Itself as Patch

Post by ReX »

PermaNoob wrote:I think I see what's happening here-- I'm assuming that you're scaling the textures down via the TEXTURES lump and not directly using the JPEGs as textures?
That is correct.
TEXTURES allows you to use other composite textures as a patch. Since the name of the JPEG file is the same as the entry in TEXTURES, it's getting confused about which is supposed to be referenced: basically an infinite recursion (Texture "Window01" has a patch "Window01", it looks for that name only to find itself). I'm not sure why this worked in a WAD but I'm guessing it shouldn't :P .
That would ordinarily make sense. However, in other TEXTURE lumps I've used successfully, I've scaled down textures using the same names for the patch as well as the final texture.
Try changing the names of the JPEGs (you should put them in the patches folder, as well) and updating the TEXTURES entries with the new names.
I'll give it a shot. But it just seems very flaky that I need to do things differently that what I used to do before.

Regardless, thanks for your suggestions.
BenFable
Posts: 2
Joined: Sun May 19, 2019 12:34 pm

Re: Script Warning: Texture References Itself as Patch

Post by BenFable »

Hi All,

I have the same issue with Slade and a simple WAD file. Back then there was no issues with these steps I used to do to import textures, now I get the same error message when testing the map, running it in any Doom despite the textures are visible in the editor and 3d view. GZDB Editor.
Once I drag drop a texture into Slayer I select any file and add them into TEXTUREx, hence they will be added in the texture definitions. See below. Now this is not working. I'm not scaling the core png images, all the draged files have the same sizes mentioned in the Textures.

Any idea ?


// Texture definitions generated by SLADE3
// on Sun May 19 20:24:04 2019

Texture "BHPADO01", 64, 72
{
Patch "BHPADO01", 0, 0
}

Texture "BHPADO02", 64, 72
{
Patch "BHPADO02", 0, 0
}

Texture "BHPADO03", 64, 72
{
Patch "BHPADO03", 0, 0
}

// End of texture definitions
BenFable
Posts: 2
Joined: Sun May 19, 2019 12:34 pm

Re: Script Warning: Texture References Itself as Patch

Post by BenFable »

I Found the problem, the textures were in 16 bit, once converted into 8bit RGB png file it worked.
Post Reply

Return to “Mapping”