View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001785 | FSSCP | gameplay | public | 2008-09-28 06:01 | 2009-04-22 17:25 |
Reporter | KeldorKatarn | Assigned To | Goober5000 | ||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.9 | ||||
Fixed in Version | 3.6.10 | ||||
Summary | 0001785: Revision 4835 don't hide information when displaying ship callsign etc. breaks WC SAGA | ||||
Description | SF2_USE_ALT_NAME_AS_CALLSIGN was never meant to have anything to do with the target box. Neither was the alt-name supposed to be used as ADDITIONAL information in the target box. It's original use was to replace the class name, and SF2_USE_ALT_NAME_AS_CALLSIGN was later added to be able to also use it as a message sender name. The latest commit completely change the information in the target box and totally breaks Saga. We extensively replace class names with alt-names like for our Ace ship classes or multiple versions of other classes. We also replace some classes by "Unknown type" in some missions where we introduce new enemy ships. The latest commit completely breaks that since it doesn't replace the class of the ship with alt-name anymore as soon as SF2_USE_ALT_NAME_AS_CALLSIGN is used. But since we use that for ALL enemy fighters, since we want the enemy ship class as the sender and not stuff like "zulu 1" or "Enemy Darket Wing 1 3" or somthing, this breaks the entire concept. Please roll this back, this is bound to also break other mods that use both flags combined. Alt names should ALWAYS replace a ship's class in the target box. It's use as a callsign was JUST intended for messages, NOT the target box. This breaks the entire mod. Not even renaming all classnames in our ships.tbl would fix this since even then we couldn't freely replace a classname by alt-name and use SF2_USE_ALT_NAME_AS_CALLSIGN at the same time for messages. | ||||
Tags | No tags attached. | ||||
|
Well, you're thinking from a WCS-centric perspective. Including the callsign next to the target name is required for other mods that heavily use callsigns, such as BWO. However I agree with the basic problem here. The alt name and the callsign are two fundamentally different fields that should not be conflated. I will look into fixing this tomorrow. |
|
This also doesn't include the info activated by Cmdline_targetinfo. That one is still printed old style. And you bet we see this from a Saga only perspective. I do not care one bit about what other MODs need if that new feature is totally breaking our MOD. This is a release blocker for us and I demand an immediate rollback of this until this can be implemented in a way that doesn't change current behavior, If people want callsigns, then add a callsign to the ship structure and add a field to the ship editor dialogue. But it can't be that you simply completely change the meaning of alt-names without even consulting us first to make sure that doesn't break anything, which it does. It's true that it would be nice to have alt-name and callsign as two seperate informations, but right now that is not the case and you cannot simply change the usage of alt-names. Besides. I thought you are in a code freeze and just bug fixing. I don't see what changing alt-names is going to fix. We only consider it an additional bug that will keep us from releasing. |
|
Calm down. We need to consider all mods that use the SCP, not just WCS. The original flag, "use alt name as callsign", means that the alt name no longer means an alt name: it means a callsign. That was a bad design decision, as we both agree. Obviously the temporary solution I committed yesterday was unacceptable. So I have redesigned the callsign feature to be completely independent of alt names. You should see a new "callsign" field on the ship editor dialog now. And I have also fixed the -targetinfo feature to use the same information as the target box. Finally, it's true that we're in a code freeze. That means we fix bugs: both functionality errors and (within reason) design problems. It does not mean we ignore problems. |
|
Thanks for fixing this |
|
Just tested it. works ok except for one issue. We usually used "use alt name as callsign" not just for callsigns. We also used it to make enemy ships transmit messages with their class (alt-name which we typed in to be equal to the class) as prefix. Meaning: "Dralthi MK4: Die, you furless freak!" or even "Unknown type: Die, you furless freak!" instead of "Zulu 1: Die, you furless freak!" So to make this really work we need that now missing flag back. Maybe rename it to: use-altname-for-messages In that case if a ship has a callsign and an alt-name AND this flag set, it should use the altname instead of the present callsign in messages. Saga needs to be able to send message with shipname prefix, altname prefix and callsign prefix. If you could add this small detail to this then it would be working fine for us again. |
|
Suggested fix added |
2008-09-29 03:07
|
use_altnames_for_messages.patch (10,221 bytes)
Index: code/fred2/fred.rc =================================================================== --- code/fred2/fred.rc (revision 4838) +++ code/fred2/fred.rc (working copy) @@ -2246,7 +2246,9 @@ CONTROL "AutoNav Needs Link",IDC_NAV_NEEDSLINK,"Button", BS_3STATE | WS_TABSTOP,166,124,97,10 CONTROL "Hide Ship Name",IDC_HIDE_SHIP_NAME,"Button",BS_3STATE | - WS_TABSTOP,166,135,99,10 + WS_TABSTOP,166,134,99,10 + CONTROL "Use Alt Name For Messages",IDC_ALTNAME_FOR_MESSAGES,"Button",BS_3STATE | + WS_TABSTOP,166,144,110,10 END IDD_ADD_VARIABLE DIALOG DISCARDABLE 0, 0, 422, 102 Index: code/fred2/missionsave.cpp =================================================================== --- code/fred2/missionsave.cpp (revision 4838) +++ code/fred2/missionsave.cpp (working copy) @@ -1874,6 +1874,8 @@ fout(" \"nav-needslink\""); if (Ships[i].flags2 & SF2_HIDE_SHIP_NAME) fout(" \"hide-ship-name\""); + if (Ships[i].flags2 & SF2_USE_ALTNAME_FOR_MESSAGES) + fout(" \"use-altname-for-messages\""); fout(" )"); } // ----------------------------------------------------------- Index: code/fred2/resource.h =================================================================== --- code/fred2/resource.h (revision 4838) +++ code/fred2/resource.h (working copy) @@ -1082,7 +1082,7 @@ #define IDC_ENTRY_FORMAT 1590 #define IDC_NO_REPLACE 1591 #define IDC_SKYBOX_MODEL 1592 -#define IDC_ALT_AS_CALLSIGN 1593 +#define IDC_ALTNAME_FOR_MESSAGES 1593 #define IDC_DEACTIVATE_AUTOPILOT 1594 #define IDC_HIDE_SHIP_NAME 1594 #define ID_FILE_MISSIONNOTES 32771 Index: code/fred2/shipflagsdlg.cpp =================================================================== --- code/fred2/shipflagsdlg.cpp (revision 4838) +++ code/fred2/shipflagsdlg.cpp (working copy) @@ -69,6 +69,7 @@ DDX_Control(pDX, IDC_NAV_CARRY, m_nav_carry); DDX_Control(pDX, IDC_NAV_NEEDSLINK, m_nav_needslink); DDX_Control(pDX, IDC_HIDE_SHIP_NAME, m_hide_ship_name); + DDX_Control(pDX, IDC_ALTNAME_FOR_MESSAGES, m_alt_for_messages); //}}AFX_DATA_MAP if (pDX->m_bSaveAndValidate) { // get dialog control values @@ -125,6 +126,7 @@ ON_BN_CLICKED(IDC_NAV_CARRY, OnNavCarry) ON_BN_CLICKED(IDC_NAV_NEEDSLINK, OnNavNeedslink) ON_BN_CLICKED(IDC_HIDE_SHIP_NAME, OnHideShipName) + ON_BN_CLICKED(IDC_ALTNAME_FOR_MESSAGES, OnAltNameForMessages) //}}AFX_MSG_MAP END_MESSAGE_MAP() @@ -145,7 +147,7 @@ int toggle_subsystem_scanning = 0, scannable = 0, kamikaze = 0, no_dynamic = 0, red_alert_carry = 0; int special_warp = 0, disable_messages = 0, guardian = 0, vaporize = 0, stealth = 0, friendly_stealth_invisible = 0; int no_death_scream = 0, always_death_scream = 0; - int nav_carry = 0, nav_needslink = 0, hide_ship_name = 0; + int nav_carry = 0, nav_needslink = 0, hide_ship_name = 0, alt_for_messages = 0; object *objp; ship *shipp; bool ship_in_wing = false; @@ -185,6 +187,7 @@ nav_carry = (shipp->flags2 & SF2_NAVPOINT_CARRY) ? 1 : 0; nav_needslink = (shipp->flags2 & SF2_NAVPOINT_NEEDSLINK) ? 1 : 0; hide_ship_name = (shipp->flags2 & SF2_HIDE_SHIP_NAME) ? 1 : 0; + alt_for_messages = (shipp->flags2 & SF2_USE_ALTNAME_FOR_MESSAGES) ? 1 : 0; destroy_before_mission = (shipp->flags & SF_KILL_BEFORE_MISSION) ? 1 : 0; m_destroy_value.init(shipp->final_death_time); @@ -237,6 +240,7 @@ nav_carry = tristate_set(shipp->flags2 & SF2_NAVPOINT_CARRY, nav_carry); nav_needslink = tristate_set(shipp->flags2 & SF2_NAVPOINT_NEEDSLINK, nav_needslink); hide_ship_name = tristate_set(shipp->flags2 & SF2_HIDE_SHIP_NAME, hide_ship_name); + alt_for_messages = tristate_set(shipp->flags2 & SF2_USE_ALTNAME_FOR_MESSAGES, alt_for_messages); // check the final death time and set the internal variable according to whether or not // the final_death_time is set. Also, the value in the edit box must be set if all the @@ -303,6 +307,7 @@ m_nav_carry.SetCheck(nav_carry); m_nav_needslink.SetCheck(nav_needslink); m_hide_ship_name.SetCheck(hide_ship_name); + m_alt_for_messages.SetCheck(alt_for_messages); m_kdamage.setup(IDC_KDAMAGE, this); m_destroy_value.setup(IDC_DESTROY_VALUE, this); @@ -795,6 +800,22 @@ break; } + switch (m_alt_for_messages.GetCheck()) { + case 1: + if ( !(shipp->flags2 & SF2_USE_ALTNAME_FOR_MESSAGES) ) + set_modified(); + + shipp->flags2 |= SF2_USE_ALTNAME_FOR_MESSAGES; + break; + + case 0: + if ( shipp->flags2 & SF2_USE_ALTNAME_FOR_MESSAGES ) + set_modified(); + + shipp->flags2 &= ~SF2_USE_ALTNAME_FOR_MESSAGES; + break; + } + switch (m_guardian.GetCheck()) { case 1: if ( !(shipp->ship_guardian_threshold) ) @@ -1155,4 +1176,13 @@ } else { m_hide_ship_name.SetCheck(1); } +} + +void ship_flags_dlg::OnAltNameForMessages() +{ + if (m_alt_for_messages.GetCheck() == 1) { + m_alt_for_messages.SetCheck(0); + } else { + m_alt_for_messages.SetCheck(1); + } } \ No newline at end of file Index: code/fred2/shipflagsdlg.h =================================================================== --- code/fred2/shipflagsdlg.h (revision 4838) +++ code/fred2/shipflagsdlg.h (working copy) @@ -59,6 +59,7 @@ CButton m_nav_carry; CButton m_nav_needslink; CButton m_hide_ship_name; + CButton m_alt_for_messages; CSpinButtonCtrl m_destroy_spin; numeric_edit_control m_kdamage; numeric_edit_control m_destroy_value; @@ -110,6 +111,7 @@ afx_msg void OnNavNeedslink(); afx_msg void OnAltAsCallsign(); afx_msg void OnHideShipName(); + afx_msg void OnAltNameForMessages(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: Index: code/fred2/voiceactingmanager.cpp =================================================================== --- code/fred2/voiceactingmanager.cpp (revision 4838) +++ code/fred2/voiceactingmanager.cpp (working copy) @@ -421,8 +421,13 @@ strcpy(sender, get_message_sender(message->name)); int shipnum = ship_name_lookup(sender); + // we may have to use the alt-name + if ((shipnum >= 0) && (Ships[shipnum].flags2 & SF2_USE_ALTNAME_FOR_MESSAGES) && (*Fred_alt_names[shipnum])) + { + entry.Replace("$sender", Fred_alt_names[shipnum]); + } // we may have to use the callsign - if ((shipnum >= 0) && (*Fred_callsigns[shipnum])) + else if ((shipnum >= 0) && (*Fred_callsigns[shipnum])) { entry.Replace("$sender", Fred_callsigns[shipnum]); } Index: code/mission/missionmessage.cpp =================================================================== --- code/mission/missionmessage.cpp (revision 4838) +++ code/mission/missionmessage.cpp (working copy) @@ -1988,7 +1988,9 @@ strncpy (who_from, q->who_from, NAME_LENGTH); // if this is a ship do we use name or callsign? - if ( Message_shipnum >= 0 && Ships[Message_shipnum].callsign_index >= 0 ) { + if ( Message_shipnum >= 0 && Ships[Message_shipnum].flags2 & SF2_USE_ALTNAME_FOR_MESSAGES && Ships[Message_shipnum].alt_type_index >= 0 ) { + mission_parse_lookup_alt_index(Ships[Message_shipnum].alt_type_index, who_from); + } else if ( Message_shipnum >= 0 && Ships[Message_shipnum].callsign_index >= 0 ) { mission_parse_lookup_callsign_index(Ships[Message_shipnum].callsign_index, who_from); } Index: code/mission/missionparse.cpp =================================================================== --- code/mission/missionparse.cpp (revision 4838) +++ code/mission/missionparse.cpp (working copy) @@ -1492,6 +1492,7 @@ "always-death-scream", "nav-needslink", "hide-ship-name", + "use-altname-for-messages", }; @@ -3436,6 +3437,9 @@ if (parse_flags2 & P2_SF2_HIDE_SHIP_NAME) shipp->flags2 |= SF2_HIDE_SHIP_NAME; + + if (parse_flags2 & P2_SF2_USE_ALTNAME_FOR_MESSAGES) + shipp->flags2 |= SF2_USE_ALTNAME_FOR_MESSAGES; } // Mp points at the text of an object, which begins with the "$Name:" field. Index: code/mission/missionparse.h =================================================================== --- code/mission/missionparse.h (revision 4838) +++ code/mission/missionparse.h (working copy) @@ -742,12 +742,12 @@ #define MAX_GOAL_TYPE_NAMES 3 // alternate ship type names -#define MAX_ALT_TYPE_NAMES 25 +#define MAX_ALT_TYPE_NAMES 100 extern char Mission_alt_types[MAX_ALT_TYPE_NAMES][NAME_LENGTH]; extern int Mission_alt_type_count; // callsign -#define MAX_CALLSIGNS 25 +#define MAX_CALLSIGNS 100 extern char Mission_callsigns[MAX_CALLSIGNS][NAME_LENGTH]; extern int Mission_callsign_count; @@ -958,7 +958,7 @@ // same caveat: This list of bitfield indicators MUST correspond EXACTLY // (i.e., order and position must be the same) to its counterpart in MissionParse.cpp!!!! -#define MAX_PARSE_OBJECT_FLAGS_2 13 +#define MAX_PARSE_OBJECT_FLAGS_2 14 #define P2_SF2_PRIMITIVE_SENSORS (1<<0) #define P2_SF2_NO_SUBSPACE_DRIVE (1<<1) @@ -973,6 +973,7 @@ #define P2_SF2_ALWAYS_DEATH_SCREAM (1<<10) #define P2_SF2_NAV_NEEDSLINK (1<<11) #define P2_SF2_HIDE_SHIP_NAME (1<<12) +#define P2_SF2_USE_ALTNAME_FOR_MESSAGES (1<<13) // and again: these flags do not appear in the array //#define blah (1<<29) Index: code/ship/ship.h =================================================================== --- code/ship/ship.h (revision 4838) +++ code/ship/ship.h (working copy) @@ -1281,6 +1281,7 @@ #define SF2_NAVPOINT_NEEDSLINK (1<<14) // Kazan - This ship requires "linking" for autopilot (when player ship gets within specified distance SF2_NAVPOINT_NEEDSLINK is replaced by SF2_NAVPOINT_CARRY) #define SF2_HIDE_SHIP_NAME (1<<15) // Karajorma - Hides the ships name (like the -wcsaga command line used to but for any selected ship) #define SF2_AFTERBURNER_LOCKED (1<<16) // KeldorKatarn - This ship can't use its afterburners +#define SF2_USE_ALTNAME_FOR_MESSAGES (1<<17) // KeldorKatarn - This ship uses its alt-name as message prefix (if no alt-name is specified, this does nothing) // If any of these bits in the ship->flags are set, ignore this ship when targetting |
|
Actually I noticed that there is *already* a flag in the code which would solve this problem: hide-ship-name. If the ship name is hidden on the HUD, then it should be hidden in the messages also. So I have committed a patch. Try it now. |
|
- The voice acting manager doesn't include this yet. - If an alt-name is present that one should be used in the message instead of the class. - Please increase the alt-names and callsign limit from 25 to 100 again. 25 is not enough, we are not using the callsigns yet, and will still run into that limit upon mission load. Even after changing everything to now use callsigns, we still extensively use alt-names, so please keep a higher limit here. Also an additonal flag "hide-shipname-only" would be nice so that we can have ships that send messages with their callsign and have only the callsign in the target box: Sandman F-27B Arrow instead of Alpha 2 (Sandman) F-27B Arrow This would be very useful for our enemy aces. if you can implement that and correct above three issues we'll be happy with this change. |
|
I also noticed that the #-feature is not used for altnames and callsigns so I changed the code slightly to fix that, added alt-name usage to voice acting manager and introduces a "hide-shipname-only" flag that hides the name and keeps the callsign. Patch attached PS: Keep those limits this high (100). Saga will run into major problems if the limit it lowered Edit: Check issue 0001786 in the process. Should be very easy to fix by replacing min by MIN |
2008-09-29 18:03
|
altnames_fix_and_hide_name_only_flag.patch (12,478 bytes)
Index: code/fred2/fred.rc =================================================================== --- code/fred2/fred.rc (revision 4839) +++ code/fred2/fred.rc (working copy) @@ -2245,8 +2245,10 @@ WS_TABSTOP,166,114,97,10 CONTROL "AutoNav Needs Link",IDC_NAV_NEEDSLINK,"Button", BS_3STATE | WS_TABSTOP,166,124,97,10 - CONTROL "Hide Ship Name",IDC_HIDE_SHIP_NAME,"Button",BS_3STATE | - WS_TABSTOP,166,135,99,10 + CONTROL "Hide Ship Name And Callsign",IDC_HIDE_SHIP_NAME,"Button",BS_3STATE | + WS_TABSTOP,166,134,110,10 + CONTROL "Hide Ship Name Only",IDC_HIDE_SHIP_NAME_ONLY,"Button",BS_3STATE | + WS_TABSTOP,166,144,100,10 END IDD_ADD_VARIABLE DIALOG DISCARDABLE 0, 0, 422, 102 Index: code/fred2/missionsave.cpp =================================================================== --- code/fred2/missionsave.cpp (revision 4839) +++ code/fred2/missionsave.cpp (working copy) @@ -1874,6 +1874,8 @@ fout(" \"nav-needslink\""); if (Ships[i].flags2 & SF2_HIDE_SHIP_NAME) fout(" \"hide-ship-name\""); + if (Ships[i].flags2 & SF2_HIDE_SHIP_NAME_ONLY) + fout(" \"hide-ship-name-only\""); fout(" )"); } // ----------------------------------------------------------- Index: code/fred2/resource.h =================================================================== --- code/fred2/resource.h (revision 4839) +++ code/fred2/resource.h (working copy) @@ -1082,7 +1082,7 @@ #define IDC_ENTRY_FORMAT 1590 #define IDC_NO_REPLACE 1591 #define IDC_SKYBOX_MODEL 1592 -#define IDC_ALT_AS_CALLSIGN 1593 +#define IDC_HIDE_SHIP_NAME_ONLY 1593 #define IDC_DEACTIVATE_AUTOPILOT 1594 #define IDC_HIDE_SHIP_NAME 1594 #define ID_FILE_MISSIONNOTES 32771 Index: code/fred2/shipflagsdlg.cpp =================================================================== --- code/fred2/shipflagsdlg.cpp (revision 4839) +++ code/fred2/shipflagsdlg.cpp (working copy) @@ -69,6 +69,7 @@ DDX_Control(pDX, IDC_NAV_CARRY, m_nav_carry); DDX_Control(pDX, IDC_NAV_NEEDSLINK, m_nav_needslink); DDX_Control(pDX, IDC_HIDE_SHIP_NAME, m_hide_ship_name); + DDX_Control(pDX, IDC_HIDE_SHIP_NAME_ONLY, m_hide_ship_name_only); //}}AFX_DATA_MAP if (pDX->m_bSaveAndValidate) { // get dialog control values @@ -125,6 +126,7 @@ ON_BN_CLICKED(IDC_NAV_CARRY, OnNavCarry) ON_BN_CLICKED(IDC_NAV_NEEDSLINK, OnNavNeedslink) ON_BN_CLICKED(IDC_HIDE_SHIP_NAME, OnHideShipName) + ON_BN_CLICKED(IDC_HIDE_SHIP_NAME_ONLY, OnHideShipNameOnly) //}}AFX_MSG_MAP END_MESSAGE_MAP() @@ -145,7 +147,7 @@ int toggle_subsystem_scanning = 0, scannable = 0, kamikaze = 0, no_dynamic = 0, red_alert_carry = 0; int special_warp = 0, disable_messages = 0, guardian = 0, vaporize = 0, stealth = 0, friendly_stealth_invisible = 0; int no_death_scream = 0, always_death_scream = 0; - int nav_carry = 0, nav_needslink = 0, hide_ship_name = 0; + int nav_carry = 0, nav_needslink = 0, hide_ship_name = 0, hide_ship_name_only = 0; object *objp; ship *shipp; bool ship_in_wing = false; @@ -185,6 +187,7 @@ nav_carry = (shipp->flags2 & SF2_NAVPOINT_CARRY) ? 1 : 0; nav_needslink = (shipp->flags2 & SF2_NAVPOINT_NEEDSLINK) ? 1 : 0; hide_ship_name = (shipp->flags2 & SF2_HIDE_SHIP_NAME) ? 1 : 0; + hide_ship_name_only = (shipp->flags2 & SF2_HIDE_SHIP_NAME_ONLY) ? 1 : 0; destroy_before_mission = (shipp->flags & SF_KILL_BEFORE_MISSION) ? 1 : 0; m_destroy_value.init(shipp->final_death_time); @@ -237,6 +240,7 @@ nav_carry = tristate_set(shipp->flags2 & SF2_NAVPOINT_CARRY, nav_carry); nav_needslink = tristate_set(shipp->flags2 & SF2_NAVPOINT_NEEDSLINK, nav_needslink); hide_ship_name = tristate_set(shipp->flags2 & SF2_HIDE_SHIP_NAME, hide_ship_name); + hide_ship_name_only = tristate_set(shipp->flags2 & SF2_HIDE_SHIP_NAME_ONLY, hide_ship_name_only); // check the final death time and set the internal variable according to whether or not // the final_death_time is set. Also, the value in the edit box must be set if all the @@ -303,6 +307,7 @@ m_nav_carry.SetCheck(nav_carry); m_nav_needslink.SetCheck(nav_needslink); m_hide_ship_name.SetCheck(hide_ship_name); + m_hide_ship_name_only.SetCheck(hide_ship_name_only); m_kdamage.setup(IDC_KDAMAGE, this); m_destroy_value.setup(IDC_DESTROY_VALUE, this); @@ -795,6 +800,22 @@ break; } + switch (m_hide_ship_name_only.GetCheck()) { + case 1: + if ( !(shipp->flags2 & SF2_HIDE_SHIP_NAME_ONLY) ) + set_modified(); + + shipp->flags2 |= SF2_HIDE_SHIP_NAME_ONLY; + break; + + case 0: + if ( shipp->flags2 & SF2_HIDE_SHIP_NAME_ONLY ) + set_modified(); + + shipp->flags2 &= ~SF2_HIDE_SHIP_NAME_ONLY; + break; + } + switch (m_guardian.GetCheck()) { case 1: if ( !(shipp->ship_guardian_threshold) ) @@ -1155,4 +1176,13 @@ } else { m_hide_ship_name.SetCheck(1); } +} + +void ship_flags_dlg::OnHideShipNameOnly() +{ + if (m_hide_ship_name_only.GetCheck() == 1) { + m_hide_ship_name_only.SetCheck(0); + } else { + m_hide_ship_name_only.SetCheck(1); + } } \ No newline at end of file Index: code/fred2/shipflagsdlg.h =================================================================== --- code/fred2/shipflagsdlg.h (revision 4839) +++ code/fred2/shipflagsdlg.h (working copy) @@ -59,6 +59,7 @@ CButton m_nav_carry; CButton m_nav_needslink; CButton m_hide_ship_name; + CButton m_hide_ship_name_only; CSpinButtonCtrl m_destroy_spin; numeric_edit_control m_kdamage; numeric_edit_control m_destroy_value; @@ -110,6 +111,7 @@ afx_msg void OnNavNeedslink(); afx_msg void OnAltAsCallsign(); afx_msg void OnHideShipName(); + afx_msg void OnHideShipNameOnly(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: Index: code/fred2/voiceactingmanager.cpp =================================================================== --- code/fred2/voiceactingmanager.cpp (revision 4839) +++ code/fred2/voiceactingmanager.cpp (working copy) @@ -421,22 +421,29 @@ strcpy(sender, get_message_sender(message->name)); int shipnum = ship_name_lookup(sender); - // we may have to use the callsign - if ((shipnum >= 0) && (*Fred_callsigns[shipnum])) + // we may have to use the alt name + if ((shipnum >= 0) && (Ships[shipnum].flags2 & SF2_HIDE_SHIP_NAME) && (*Fred_alt_names[shipnum])) { - entry.Replace("$sender", Fred_callsigns[shipnum]); + strcpy(sender, Fred_alt_names[shipnum]); } - // use the regular sender text - else + // we may have to use the class + else if ((shipnum >= 0) && (Ships[shipnum].flags2 & SF2_HIDE_SHIP_NAME) && !(*Fred_alt_names[shipnum])) { - // skip past the first # when truncating a name, - // in case of something like #Command or #Alpha 1 - end_string_at_first_hash_symbol(&sender[1]); - - // replace sender - entry.Replace("$sender", sender); + strcpy(sender, Ship_info[Ships[shipnum].ship_info_index].name); } + // we may have to use the callsign + else if ((shipnum >= 0) && (*Fred_callsigns[shipnum])) + { + strcpy(sender, Fred_callsigns[shipnum]); + } + + // skip past the first # when truncating a name, + // in case of something like #Command or #Alpha 1 + end_string_at_first_hash_symbol(&sender[1]); + // replace sender + entry.Replace("$sender", sender); + fout("%s\n\n\n", (char *) (LPCTSTR) entry); } } Index: code/hud/hudtarget.cpp =================================================================== --- code/hud/hudtarget.cpp (revision 4839) +++ code/hud/hudtarget.cpp (working copy) @@ -6750,8 +6750,10 @@ // print ship name if ( (Iff_info[shipp->team].flags & IFFF_WING_NAME_HIDDEN) && (shipp->wingnum != -1) ) { *ship_name_text = 0; - } else if (shipp->flags2 & SF2_HIDE_SHIP_NAME) { + } else if (shipp->flags2 & SF2_HIDE_SHIP_NAME || shipp->flags2 & SF2_HIDE_SHIP_NAME_ONLY && !(*callsign)) { *ship_name_text = 0; + } else if (shipp->flags2 & SF2_HIDE_SHIP_NAME_ONLY && (*callsign)) { + sprintf(ship_name_text, "%s", callsign); } else if (*callsign) { sprintf(ship_name_text, "%s (%s)", ship_name, callsign); } else { Index: code/mission/missionmessage.cpp =================================================================== --- code/mission/missionmessage.cpp (revision 4839) +++ code/mission/missionmessage.cpp (working copy) @@ -1987,15 +1987,19 @@ strncpy (who_from, q->who_from, NAME_LENGTH); - // if this is a ship do we use name or callsign or ship class? + // if this is a ship do we use name or callsign or alt name or ship class? if ( Message_shipnum >= 0 ) { - if ( Ships[Message_shipnum].callsign_index >= 0 ) { + if ( Ships[Message_shipnum].flags2 & SF2_HIDE_SHIP_NAME ) { + if (Ships[Message_shipnum].alt_type_index >= 0) { + mission_parse_lookup_alt_index(Ships[Message_shipnum].alt_type_index, who_from); + } else { + hud_stuff_ship_class(&Ships[Message_shipnum], who_from); + } + } else if ( Ships[Message_shipnum].callsign_index >= 0 ) { mission_parse_lookup_callsign_index(Ships[Message_shipnum].callsign_index, who_from); - } else if ( Ships[Message_shipnum].flags2 & SF2_HIDE_SHIP_NAME ) { - hud_stuff_ship_class(&Ships[Message_shipnum], who_from); - } else { - end_string_at_first_hash_symbol(who_from); } + + end_string_at_first_hash_symbol(who_from); } HUD_sourced_printf( q->source, NOX("%s: %s"), who_from, buf ); Index: code/mission/missionparse.cpp =================================================================== --- code/mission/missionparse.cpp (revision 4839) +++ code/mission/missionparse.cpp (working copy) @@ -1492,6 +1492,7 @@ "always-death-scream", "nav-needslink", "hide-ship-name", + "hide-ship-name-only", }; @@ -3436,6 +3437,9 @@ if (parse_flags2 & P2_SF2_HIDE_SHIP_NAME) shipp->flags2 |= SF2_HIDE_SHIP_NAME; + + if (parse_flags2 & P2_SF2_HIDE_SHIP_NAME_ONLY) + shipp->flags2 |= SF2_HIDE_SHIP_NAME_ONLY; } // Mp points at the text of an object, which begins with the "$Name:" field. Index: code/mission/missionparse.h =================================================================== --- code/mission/missionparse.h (revision 4839) +++ code/mission/missionparse.h (working copy) @@ -742,12 +742,12 @@ #define MAX_GOAL_TYPE_NAMES 3 // alternate ship type names -#define MAX_ALT_TYPE_NAMES 25 +#define MAX_ALT_TYPE_NAMES 100 extern char Mission_alt_types[MAX_ALT_TYPE_NAMES][NAME_LENGTH]; extern int Mission_alt_type_count; // callsign -#define MAX_CALLSIGNS 25 +#define MAX_CALLSIGNS 100 extern char Mission_callsigns[MAX_CALLSIGNS][NAME_LENGTH]; extern int Mission_callsign_count; @@ -958,7 +958,7 @@ // same caveat: This list of bitfield indicators MUST correspond EXACTLY // (i.e., order and position must be the same) to its counterpart in MissionParse.cpp!!!! -#define MAX_PARSE_OBJECT_FLAGS_2 13 +#define MAX_PARSE_OBJECT_FLAGS_2 14 #define P2_SF2_PRIMITIVE_SENSORS (1<<0) #define P2_SF2_NO_SUBSPACE_DRIVE (1<<1) @@ -973,6 +973,7 @@ #define P2_SF2_ALWAYS_DEATH_SCREAM (1<<10) #define P2_SF2_NAV_NEEDSLINK (1<<11) #define P2_SF2_HIDE_SHIP_NAME (1<<12) +#define P2_SF2_HIDE_SHIP_NAME_ONLY (1<<13) // and again: these flags do not appear in the array //#define blah (1<<29) Index: code/ship/ship.h =================================================================== --- code/ship/ship.h (revision 4839) +++ code/ship/ship.h (working copy) @@ -1280,7 +1280,8 @@ #define SF2_ALWAYS_DEATH_SCREAM (1<<13) // Goober5000 - for WCS #define SF2_NAVPOINT_NEEDSLINK (1<<14) // Kazan - This ship requires "linking" for autopilot (when player ship gets within specified distance SF2_NAVPOINT_NEEDSLINK is replaced by SF2_NAVPOINT_CARRY) #define SF2_HIDE_SHIP_NAME (1<<15) // Karajorma - Hides the ships name (like the -wcsaga command line used to but for any selected ship) -#define SF2_AFTERBURNER_LOCKED (1<<16) // KeldorKatarn - This ship can't use its afterburners +#define SF2_HIDE_SHIP_NAME_ONLY (1<<16) // KeldorKatarn - Hides the ships name but keeps showing the callsign +#define SF2_AFTERBURNER_LOCKED (1<<17) // KeldorKatarn - This ship can't use its afterburners // If any of these bits in the ship->flags are set, ignore this ship when targetting |
|
K, all fixed. |
|
This is NOT fixed. You neither implemented alt-name usage instead of ship-class if present in messages and you also didn't implement the additional flag I asked you for, which Saga wants to use if this new behavior is going to stay. I submitted a fully written out patch which implements all of the above.. use it or implement it on your own. This is NOT fixed and it won't be untill everything above is implemented. I'm beginning to really get pissed by the way SCP is supporting Saga |
|
Your patch didn't account for all the possibilities, so I had to write my own. You're right that the alt names didn't work in the voice acting manager. That was due to one small detail that I forgot to add; and they should work now. I'll add the extra flag shortly. |
|
Turns out an extra flag didn't need to be added. If a callsign is supplied AND hide-ship-name is checked, then only the callsign will be displayed. So, everything in this report should now be fixed. |
|
FRED now doesn't show the callsigns in the ship editor for some ships. (Possibly for ships that have an alt-name already, haven't checked that) |
|
I think I found the problem. Patch attached Also callsigns, altnames and probably also shipclasses are still not #-filtered. Neither in the target-box/info nor in the message-source. |
2008-10-06 15:44
|
FRED_callsign_fix.patch (533 bytes)
Index: code/fred2/freddoc.cpp =================================================================== --- code/fred2/freddoc.cpp (revision 4865) +++ code/fred2/freddoc.cpp (working copy) @@ -818,7 +818,8 @@ // also zero it Ships[objp->instance].alt_type_index = -1; - } else if (Ships[objp->instance].callsign_index >= 0) { + } + if (Ships[objp->instance].callsign_index >= 0) { mission_parse_lookup_callsign_index(Ships[objp->instance].callsign_index, Fred_callsigns[objp->instance]); // also zero it |
|
You should double check the # filtering, because it works for both me and Tolwyn. A screenshot would also help. Also, your patch doesn't fix the FRED problem, but it does show me where the problem actually occurs. Thanks. :) |
|
I DID double check. (Also Tolwyn just told me he never tested this, so don't claim he did) The FRED thing worked for me but I don't care how you fix it. The callsigns, classes AND altnames however are NOT filterd. I DID double check this, I am right now compiling a new version with a fix of me and will upload a patch soon |
2008-10-06 16:30
|
hash_filter_fix.patch (3,123 bytes)
Index: code/fred2/voiceactingmanager.cpp =================================================================== --- code/fred2/voiceactingmanager.cpp (revision 4865) +++ code/fred2/voiceactingmanager.cpp (working copy) @@ -419,31 +419,33 @@ // determine sender char sender[NAME_LENGTH+1]; - strcpy(sender, get_message_sender(message->name)); int shipnum = ship_name_lookup(sender); // we may have to use the callsign if ((shipnum >= 0) && (*Fred_callsigns[shipnum])) { - entry.Replace("$sender", Fred_callsigns[shipnum]); + strcpy(sender, Fred_callsigns[shipnum]); + end_string_at_first_hash_symbol(sender); } // account for hidden ship names else if ((shipnum >= 0) && (Ships[shipnum].flags2 & SF2_HIDE_SHIP_NAME)) { hud_stuff_ship_class(&Ships[shipnum], sender); - entry.Replace("$sender", sender); + end_string_at_first_hash_symbol(sender); } // use the regular sender text else { + strcpy(sender, get_message_sender(message->name)); + // skip past the first # when truncating a name, // in case of something like #Command or #Alpha 1 end_string_at_first_hash_symbol(&sender[1]); - - // replace sender - entry.Replace("$sender", sender); } + // replace sender + entry.Replace("$sender", sender); + fout("%s\n\n\n", (char *) (LPCTSTR) entry); } } Index: code/hud/hudtarget.cpp =================================================================== --- code/hud/hudtarget.cpp (revision 4865) +++ code/hud/hudtarget.cpp (working copy) @@ -6743,9 +6743,6 @@ } } - // handle hash symbol - end_string_at_first_hash_symbol(ship_name); - // handle translation if (Lcl_gr) { lcl_translate_targetbox_name(ship_name); @@ -6764,6 +6761,9 @@ } else { strcpy(ship_name_text, ship_name); } + + // handle hash symbol + end_string_at_first_hash_symbol(ship_name_text); } extern char Fred_alt_names[MAX_SHIPS][NAME_LENGTH+1]; @@ -6782,9 +6782,6 @@ } } - // handle hash symbol - end_string_at_first_hash_symbol(ship_class); - // handle translation if (Lcl_gr) { lcl_translate_targetbox_name(ship_class); @@ -6797,4 +6794,7 @@ } else { strcpy(ship_class_text, ship_class); } + + // handle hash symbol + end_string_at_first_hash_symbol(ship_class_text); } Index: code/mission/missionmessage.cpp =================================================================== --- code/mission/missionmessage.cpp (revision 4865) +++ code/mission/missionmessage.cpp (working copy) @@ -1993,9 +1993,12 @@ mission_parse_lookup_callsign_index(Ships[Message_shipnum].callsign_index, who_from); } else if ( Ships[Message_shipnum].flags2 & SF2_HIDE_SHIP_NAME ) { hud_stuff_ship_class(&Ships[Message_shipnum], who_from); - } else { - end_string_at_first_hash_symbol(who_from); } + end_string_at_first_hash_symbol(who_from); + } else { + // skip past the first # when truncating a name, + // in case of something like #Command or #Alpha 1 + end_string_at_first_hash_symbol(&who_from[1]); } HUD_sourced_printf( q->source, NOX("%s: %s"), who_from, buf ); |
|
Hash filtering fix added |
|
This looks really close, should be able to get done by 3.6.10 |
|
Okay, update and compile a new build. See if you like this one any better. |
|
Yes except one thing: The non-ship message source "#Sandman" should be written as "Sandman" by the Voice acting manager. Ingame it is displayed ok but the VAM still writes it as "#Sandman" |
|
Ok. Easy change. I think we can call this fixed. :) |
|
Nope not fixed.. the new position of the Callsign is not acceptable. I didn't notice this on the first test.. Why on Earth did you move it to such an awkward position below the distance data?? |
2008-10-22 08:08
|
|
2008-10-22 08:11
|
|
|
Just took a look. The callsign system does not work in the intended way. It still breaks HUD in Saga. I've attached two pictures for you to take a look. Originally we had Wing X Alt name for Confed ships and empty line Alt name For Kilrathi ships. With the new system a possible solution might look this way: Wing X (Callsign (if exists)) OR Callsign (if hide ship name activated) OR empty line (if hide ship name activated) Ship OR altname (if altname specified) Then again, Diaspora (I talked to kara regarding this matter) and Saga would function better with the old system. |
|
I think this system can work, and I actually liked the way it was with either Shipname (Callsign) or Shipname or <empty> in the first line, as it was until the last change. Why on Earth did you move the Callsign into the Cargo section?? It looks horrible there |
|
The multiplayer callsign has always been in that location, ever since FS1 was released in 1998. With the latest fix, the callsigns now use the multiplayer code, so as to be compatible with what players have come to expect. You'll have to explain what's wrong with the pictures, and how the HUD is broken, because they look fine to me. |
|
please read my last note, this solution is simply not acceptable. |
|
I've looked at this and personally I think that the best solution is simply to move the callsign to the top of those of those four lines and move all the others down one. Thus the section above the target box would now look like this Callsign (if any) Ship Name Ship Class Distance : Speed : In the case of confed ships you would now get Callsign Ship Name Class and in the case of Kilrathi you'd get Callsign Class/Alt Name This change would actually make the callsign feature usable by Diaspora too. Cause at the moment it's virtually worthless to us as it is. Yes it's a change from the way FS2 did it. But as far as I'm concerned FS2 did it wrong. In multiplayer you care much more about a ship's callsign than it's name cause what you care about most is if the ship is piloted by a human and who it is. Besides it's such a minor change that I doubt most people would notice if you didn't tell them. |
|
Tolwyn and I agreed on a solution a few weeks ago, but I haven't been able to implement it yet. (I forget exactly what we decided. When I get back to this I'll have Tolwyn jog my memory.) |
|
Maybe he could update everyone here? I know you're busy right now and if he posted what he wants done someone else could do it and save you the trouble so you can work on...other...stuff. :) |
|
Okay, I talked to Tolwyn again today and we agreed on the "Ship name (Callsign)" format. It's now in SVN. |
|
This is still not working correctly. I wll have to do more testing to find all issues. But one issue: Hide-ship-name should hide only the ship name and still display the Callsign (wihtout braces). However right now it hides both ship name AND callsign. |
|
I have fixed that issue and emailed Tolwyn a test build. The fix is now in SVN. |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-09-28 06:01 | KeldorKatarn | New Issue | |
2008-09-28 06:17 | Goober5000 | Status | new => assigned |
2008-09-28 06:17 | Goober5000 | Assigned To | => Goober5000 |
2008-09-28 06:26 | Goober5000 | Note Added: 0009730 | |
2008-09-28 15:13 | KeldorKatarn | Note Added: 0009732 | |
2008-09-28 15:44 | KeldorKatarn | Note Edited: 0009732 | |
2008-09-28 23:11 | Goober5000 | Note Added: 0009734 | |
2008-09-29 01:17 | KeldorKatarn | Note Added: 0009735 | |
2008-09-29 01:53 | KeldorKatarn | Note Added: 0009736 | |
2008-09-29 01:54 | KeldorKatarn | Note Edited: 0009736 | |
2008-09-29 02:39 | KeldorKatarn | Note Edited: 0009736 | |
2008-09-29 03:07 | KeldorKatarn | Note Added: 0009737 | |
2008-09-29 03:07 | KeldorKatarn | File Added: use_altnames_for_messages.patch | |
2008-09-29 04:47 | Goober5000 | Note Added: 0009738 | |
2008-09-29 14:29 | KeldorKatarn | Note Added: 0009739 | |
2008-09-29 14:29 | KeldorKatarn | Note Edited: 0009739 | |
2008-09-29 14:36 | KeldorKatarn | Note Edited: 0009739 | |
2008-09-29 14:36 | KeldorKatarn | Note Edited: 0009739 | |
2008-09-29 14:38 | KeldorKatarn | Note Edited: 0009739 | |
2008-09-29 17:04 | KeldorKatarn | Note Edited: 0009739 | |
2008-09-29 18:03 | KeldorKatarn | Note Added: 0009741 | |
2008-09-29 18:03 | KeldorKatarn | File Added: altnames_fix_and_hide_name_only_flag.patch | |
2008-09-29 19:02 | KeldorKatarn | Note Edited: 0009741 | |
2008-09-29 19:02 | KeldorKatarn | Note Edited: 0009741 | |
2008-09-30 04:40 | KeldorKatarn | Note Edited: 0009741 | |
2008-09-30 23:50 | Goober5000 | Note Added: 0009750 | |
2008-09-30 23:50 | Goober5000 | Status | assigned => resolved |
2008-09-30 23:50 | Goober5000 | Resolution | open => fixed |
2008-09-30 23:50 | Goober5000 | Fixed in Version | => 3.6.10 |
2008-10-01 15:27 | KeldorKatarn | Status | resolved => feedback |
2008-10-01 15:27 | KeldorKatarn | Resolution | fixed => reopened |
2008-10-01 15:27 | KeldorKatarn | Note Added: 0009756 | |
2008-10-01 17:02 | KeldorKatarn | Note Edited: 0009756 | |
2008-10-05 21:30 | Goober5000 | Note Added: 0009818 | |
2008-10-05 21:59 | Goober5000 | Note Added: 0009820 | |
2008-10-06 06:03 | KeldorKatarn | Note Added: 0009824 | |
2008-10-06 06:04 | KeldorKatarn | Note Edited: 0009824 | |
2008-10-06 15:22 | KeldorKatarn | Note Edited: 0009824 | |
2008-10-06 15:44 | KeldorKatarn | Note Added: 0009826 | |
2008-10-06 15:44 | KeldorKatarn | File Added: FRED_callsign_fix.patch | |
2008-10-06 15:54 | KeldorKatarn | Note Edited: 0009826 | |
2008-10-06 15:56 | Goober5000 | Note Added: 0009827 | |
2008-10-06 16:08 | KeldorKatarn | Note Added: 0009828 | |
2008-10-06 16:10 | KeldorKatarn | Note Edited: 0009828 | |
2008-10-06 16:30 | KeldorKatarn | File Added: hash_filter_fix.patch | |
2008-10-06 16:30 | KeldorKatarn | Note Added: 0009829 | |
2008-10-09 20:26 | chief1983 | Note Added: 0009909 | |
2008-10-09 20:26 | chief1983 | Priority | normal => high |
2008-10-21 06:18 | Goober5000 | Note Added: 0010079 | |
2008-10-21 20:09 | KeldorKatarn | Note Added: 0010082 | |
2008-10-21 21:36 | Goober5000 | Note Added: 0010085 | |
2008-10-21 21:36 | Goober5000 | Status | feedback => resolved |
2008-10-21 21:36 | Goober5000 | Resolution | reopened => fixed |
2008-10-22 08:01 | KeldorKatarn | Status | resolved => feedback |
2008-10-22 08:01 | KeldorKatarn | Resolution | fixed => reopened |
2008-10-22 08:01 | KeldorKatarn | Note Added: 0010093 | |
2008-10-22 08:08 | Tolwyn | File Added: screen0054.png | |
2008-10-22 08:11 | Tolwyn | File Added: screen0053.png | |
2008-10-22 08:14 | Tolwyn | Note Added: 0010094 | |
2008-10-22 08:16 | Tolwyn | Note Edited: 0010094 | |
2008-10-22 08:17 | KeldorKatarn | Note Added: 0010095 | |
2008-10-23 00:32 | Goober5000 | Note Added: 0010098 | |
2008-10-23 06:45 | Tolwyn | Note Added: 0010104 | |
2008-12-11 20:21 | karajorma | Note Added: 0010395 | |
2008-12-11 21:02 | Goober5000 | Note Added: 0010396 | |
2008-12-11 21:31 | chief1983 | Note Added: 0010397 | |
2009-01-19 20:55 | Goober5000 | Note Added: 0010544 | |
2009-01-19 20:57 | Goober5000 | Status | feedback => resolved |
2009-01-19 20:57 | Goober5000 | Resolution | reopened => fixed |
2009-03-25 16:22 | KeldorKatarn | Status | resolved => feedback |
2009-03-25 16:22 | KeldorKatarn | Resolution | fixed => reopened |
2009-03-25 16:22 | KeldorKatarn | Note Added: 0010768 | |
2009-03-26 02:41 | Goober5000 | Note Added: 0010771 | |
2009-04-22 17:25 | Goober5000 | Status | feedback => resolved |
2009-04-22 17:25 | Goober5000 | Resolution | reopened => fixed |