View Issue Details

IDProjectCategoryView StatusLast Update
0002842FSSCPFREDpublic2014-06-26 16:08
ReporterFUBAR-BDHR Assigned ToFUBAR-BDHR  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.19 
Summary0002842: Hard coded retail message head .ani file names need disabled for TCs
DescriptionThere are several hard coded head .ani files in FRED that retail makes use of. Some of these are auto assigned based on what the messages file names start with. Both of these are unwanted for TCs which don't have these retail .ani files.
Steps To ReproduceTake any TC and note the head .ani files defined by +Avi Name in messages.tbl. In TBP there are 4 of these. Go into the event editor in FRED and create a new message. Under .ani file note all the extra .ani files for Terran and Vasudan ships.
Additional InformationAttaching path that adds a game_setting.tbl entry to remove the hard coded entries.
TagsNo tags attached.

Activities

FUBAR-BDHR

2013-04-11 04:07

developer  

game_setting_hc_ani_disable.patch (3,898 bytes)   
Index: fred2/eventeditor.cpp
===================================================================
--- fred2/eventeditor.cpp	(revision 9625)
+++ fred2/eventeditor.cpp	(working copy)
@@ -20,6 +20,7 @@
 #include "cfile/cfile.h"
 #include "sound/audiostr.h"
 #include "localization/localize.h"
+#include "mod_table/mod_table.h"
 
 #ifdef _DEBUG
 #undef THIS_FILE
@@ -223,20 +224,22 @@
 	}
 
 	// add new heads, if not already in
-	maybe_add_head(box, "Head-TP2");
-	maybe_add_head(box, "Head-VC2");
-	maybe_add_head(box, "Head-TP4");
-	maybe_add_head(box, "Head-TP5");
-	maybe_add_head(box, "Head-TP6");
-	maybe_add_head(box, "Head-TP7");
-	maybe_add_head(box, "Head-TP8");
-	maybe_add_head(box, "Head-VP2");
-	maybe_add_head(box, "Head-VP2");
-	maybe_add_head(box, "Head-CM2");
-	maybe_add_head(box, "Head-CM3");
-	maybe_add_head(box, "Head-CM4");
-	maybe_add_head(box, "Head-CM5");
-	maybe_add_head(box, "Head-BSH");
+	if (!Disable_hc_message_ani) {
+		maybe_add_head(box, "Head-TP2");
+		maybe_add_head(box, "Head-VC2");
+		maybe_add_head(box, "Head-TP4");
+		maybe_add_head(box, "Head-TP5");
+		maybe_add_head(box, "Head-TP6");
+		maybe_add_head(box, "Head-TP7");
+		maybe_add_head(box, "Head-TP8");
+		maybe_add_head(box, "Head-VP2");
+		maybe_add_head(box, "Head-VP2");
+		maybe_add_head(box, "Head-CM2");
+		maybe_add_head(box, "Head-CM3");
+		maybe_add_head(box, "Head-CM4");
+		maybe_add_head(box, "Head-CM5");
+		maybe_add_head(box, "Head-BSH");
+	}
 
 /*
 	box->AddString("Head-VC");  // force it in, since Sandeep wants it and it's not used in built-in messages
@@ -1394,6 +1397,11 @@
 
 void event_editor::update_persona()
 {
+	// if not using hard coded retail message ani hacks bail.
+	if (Disable_hc_message_ani) { 
+		return;
+	}
+
 	int i, mask;
 
 	if ((m_wave_filename[0] >= '1') && (m_wave_filename[0] <= '9') && (m_wave_filename[1] == '_') ) {
Index: fred2/management.cpp
===================================================================
--- fred2/management.cpp	(revision 9625)
+++ fred2/management.cpp	(working copy)
@@ -64,6 +64,7 @@
 #include "iff_defs/iff_defs.h"
 #include "menuui/techmenu.h"
 #include "missionui/fictionviewer.h"
+#include "mod_table/mod_table.h"
 
 #include <direct.h>
 #include "cmdline/cmdline.h"
@@ -422,6 +423,7 @@
 	ship_init();
 	parse_init();
 	techroom_intel_init();
+	mod_table_init();
 
 	// initialize and activate external string hash table
 	// make sure to do here so that we don't parse the table files into the hash table - waste of space
Index: mod_table/mod_table.cpp
===================================================================
--- mod_table/mod_table.cpp	(revision 9625)
+++ mod_table/mod_table.cpp	(working copy)
@@ -24,8 +24,8 @@
 int Default_detail_level = 3; // "very high" seems a reasonable default in 2012 -zookeeper
 bool Full_color_head_anis = false;
 bool Weapons_inherit_parent_collision_group = false;
+bool Disable_hc_message_ani = false;
 
-
 void parse_mod_table(char *filename)
 {
 	int rval;
@@ -130,6 +130,17 @@
 		}
 	}
 
+	optional_string("#FRED SETTINGS"); 
+
+	if (optional_string("$Disable Hard Coded Message Head Ani Files:")) { 
+		stuff_boolean(&Disable_hc_message_ani);
+		if (Disable_hc_message_ani) {
+			mprintf(("Game Settings Table: FRED - Disabling Hard Coded Message Ani Files\n"));
+		} else {
+			mprintf(("Game Settings Table: FRED - Using Hard Coded Message Ani Files\n"));
+		}
+	}
+
 	optional_string("#GRAPHICS SETTINGS");
 
 	if (optional_string("$Enable External Shaders:")) {
Index: mod_table/mod_table.h
===================================================================
--- mod_table/mod_table.h	(revision 9625)
+++ mod_table/mod_table.h	(working copy)
@@ -21,5 +21,6 @@
 extern int Default_detail_level;
 extern bool Full_color_head_anis;
 extern bool Weapons_inherit_parent_collision_group;
+extern bool Disable_hc_message_ani;
 
 void mod_table_init();

The_E

2013-04-11 16:43

administrator   ~0014914

Looks good to me

The_E

2014-06-26 16:08

administrator   ~0015923

Committed to trunk in revision 10842

Issue History

Date Modified Username Field Change
2013-04-11 04:07 FUBAR-BDHR New Issue
2013-04-11 04:07 FUBAR-BDHR Status new => assigned
2013-04-11 04:07 FUBAR-BDHR Assigned To => FUBAR-BDHR
2013-04-11 04:07 FUBAR-BDHR File Added: game_setting_hc_ani_disable.patch
2013-04-11 04:07 FUBAR-BDHR Status assigned => code review
2013-04-11 16:43 The_E Note Added: 0014914
2014-06-26 16:08 The_E Note Added: 0015923
2014-06-26 16:08 The_E Status code review => resolved
2014-06-26 16:08 The_E Resolution open => fixed