From 4cce37f7ff6fe571748dc269e8ec9144d1e066d2 Mon Sep 17 00:00:00 2001 From: The Force <2040992+TheForce172@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:53:59 +0100 Subject: [PATCH 1/2] Load table Based texture replacements on ship create --- qtfred/src/mission/Editor.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/qtfred/src/mission/Editor.cpp b/qtfred/src/mission/Editor.cpp index 8fd9ec659b2..161dd798aef 100644 --- a/qtfred/src/mission/Editor.cpp +++ b/qtfred/src/mission/Editor.cpp @@ -767,7 +767,17 @@ int Editor::create_ship(matrix* orient, vec3d* pos, int ship_type) { } Ai_info[shipp->ai_index].kamikaze_damage = (int) std::min(1000.0f, 200.0f + (temp_max_hull_strength / 4.0f)); - + auto replacements = sip->replacement_textures; + for (auto& tr : replacements) { + if (!stricmp(tr.new_texture, "invisible")) { + // invisible is a special case + tr.new_texture_id = REPLACE_WITH_INVISIBLE; + } else { + // try to load texture or anim as normal + tr.new_texture_id = bm_load_either(tr.new_texture); + } + } + shipp->apply_replacement_textures(replacements); missionChanged(); return obj; From fd9b9951e49e90b9791fbac767b49a6f20e44441 Mon Sep 17 00:00:00 2001 From: The Force <2040992+TheForce172@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:55:48 +0100 Subject: [PATCH 2/2] do FRED as well --- fred2/management.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fred2/management.cpp b/fred2/management.cpp index 462b408b1c0..885e561d861 100644 --- a/fred2/management.cpp +++ b/fred2/management.cpp @@ -616,7 +616,17 @@ int create_ship(matrix *orient, vec3d *pos, int ship_type) } Ai_info[shipp->ai_index].kamikaze_damage = (int) std::min(1000.0f, 200.0f + (temp_max_hull_strength / 4.0f)); - + auto replacements = sip->replacement_textures; + for (auto& tr : replacements) { + if (!stricmp(tr.new_texture, "invisible")) { + // invisible is a special case + tr.new_texture_id = REPLACE_WITH_INVISIBLE; + } else { + // try to load texture or anim as normal + tr.new_texture_id = bm_load_either(tr.new_texture); + } + } + shipp->apply_replacement_textures(replacements); return obj; }