ruarai / CompilePal

A tool to assist in the compiling of source engine maps
GNU General Public License v3.0
220 stars 25 forks source link

PD HUD icons set by SetCountdownImage input in TF2 are not automatically packed #199

Open 14bit opened 1 year ago

14bit commented 1 year ago

In the mode Player Destruction in TF2, the texture used for the timer in the HUD can be changed mid-round via map logic. This is done by sending the tf_logic_player_destruction entity a SetCountdownImage input, similar to how the SetModel input works. Custom textures specified in this way function, but are not caught by CompilePal's automatic packing.

Exactol commented 1 year ago

Can you try this build? https://www.dropbox.com/s/27gwbexhqdbwmeq/Compile%20Pal%20028.1.zip?dl=0

Exactol commented 11 months ago

Has your issue been resolved?

14bit commented 5 months ago

In both this build and the one you gave me in #228, the textures are now caught by CompilePal and packed correctly in most cases, provided they are in the /vgui folder.

Everything below is an edge case that causes the textures to be packed incorrectly:

In some cases, PD HUD textures can be placed in the wrong locations in the .BSP due to the inputs using ../ at the start to specify the file path. In this case, the .vtfs are put in the correct places, but the .vmts have an added vgui/../ at the start. Moving the files to be packed into /vgui, modifying the materials to match, and changing the inputs in hammer to remove the ../hud/ resulted in them packing correctly, so you can probably claim this is "user error."

Below is the setup that does not work:

Here was one of the old inputs in Hammer before I moved the textures: image

Here is what got packed in CompilePal before I moved the textures: CompilePalX_2024-01-18_14-44-54

Here's where the custom textures were in my /custom folder before I moved the textures: image

And here's what it looked like in the final packed .BSP (looking at it with GCFScape) before I moved the textures: GCFScape_2024-01-18_14-40-59

Exactol commented 5 months ago

If the relative paths work in game I'd say its probably a bug on my side, this build should fix the issue https://www.dropbox.com/scl/fi/izhbxvjcj6knk27ezl00l/Compile-Pal-028.2.zip?rlkey=iiekwopnn2tpbbwdu98nu0erp&dl=0 . If it's not too difficult could you move your files back to the hud folder and test it for me?