From e89867489cce464919b1ddf73821d8020759226c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 11 May 2006 12:11:59 +0000 Subject: [PATCH] - Fixed: Strife's MiniMissile pickup amount was still incorrect. - Moved Strife's random dialogs into the string table. Now it should also be possible to define dialogs for other actors as well. SVN r109 (trunk) --- docs/rh-log.txt | 5 ++ src/g_strife/a_strifeammo.cpp | 2 +- src/p_conversation.cpp | 103 ++++---------------------------- wadsrc/languages/english-us.txt | 62 +++++++++++++++++++ 4 files changed, 80 insertions(+), 92 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index a2d12c66a..6e6f0ca89 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +May 11, 2006 (Changes by Graf Zahl) +- Fixed: Strife's MiniMissile pickup amount was still incorrect. +- Moved Strife's random dialogs into the string table. Now it should also be + possible to define dialogs for other actors as well. + May 10, 2006 - Fixed: When revisiting a map in a hub, the player could spawn at the wrong height if the floor had moved while they were there before. This was because diff --git a/src/g_strife/a_strifeammo.cpp b/src/g_strife/a_strifeammo.cpp index e77b2f9e5..ae181b60c 100644 --- a/src/g_strife/a_strifeammo.cpp +++ b/src/g_strife/a_strifeammo.cpp @@ -133,7 +133,7 @@ IMPLEMENT_ACTOR (AMiniMissiles, Strife, 2010, 140) PROP_StrifeType (181) PROP_StrifeTeaserType (175) PROP_StrifeTeaserType2 (179) - PROP_Inventory_Amount (8) + PROP_Inventory_Amount (4) PROP_Inventory_MaxAmount (100) PROP_Ammo_BackpackAmount (4) PROP_Ammo_BackpackMaxAmount (200) diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 52488347f..9cdbd7894 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -15,6 +15,7 @@ #include "a_strifeglobal.h" #include "a_keys.h" #include "p_enemy.h" +#include "gstrings.h" #include "sound/i_music.h" // The conversations as they exist inside a SCRIPTxx lump. @@ -84,90 +85,9 @@ static brokenlines_t *DialogueLines; static AActor *ConversationNPC, *ConversationPC; static angle_t ConversationNPCAngle; -#define NUM_RANDOM_TALKERS 5 #define NUM_RANDOM_LINES 10 #define NUM_RANDOM_GOODBYES 3 -static char *const RandomGoodbyes[NUM_RANDOM_GOODBYES] = -{ - "Bye!", - "Thanks, bye!", - "See you later!" -}; - -static const char *const RandomLines[NUM_RANDOM_TALKERS][NUM_RANDOM_LINES+1] = -{ - { - "PEASANT", - "Please don't hurt me.", - "If you're looking to hurt me, I'm not really worth the effort.", - "I don't know anything.", - "Go away or I'll call the guards!", - "I wish sometimes that all these rebels would just learn their place and stop this nonsense.", - "Just leave me alone, OK?", - "I'm not sure, but sometimes I think that I know some of the acolytes.", - "The order's got everything around here pretty well locked up tight.", - "There's no way that this is just a security force.", - "I've heard that the order is really nervous about the front's actions around here." - }, - - { - "REBEL", - "There's no way the order will stand against us.", - "We're almost ready to strike. Macil's plans are falling in place.", - "We're all behind you, don't worry.", - "Don't get too close to any of those big robots. They'll melt you down for scrap!", - "The day of our glory will soon come, and those who oppose us will be crushed!", - "Don't get too comfortable. We've still got our work cut out for us.", - "Macil says that you're the new hope. Bear that in mind.", - "Once we've taken these charlatans down, we'll be able to rebuild this world as it should be.", - "Remember that you aren't fighting just for yourself, but for everyone here and outside.", - "As long as one of us still stands, we will win." - }, - - { - "AGUARD", - "Move along, peasant.", - "Follow the true faith, only then will you begin to understand.", - "Only through death can one be truly reborn.", - "I'm not interested in your useless drivel.", - "If I had wanted to talk to you I would have told you so.", - "Go and annoy someone else!", - "Keep moving!", - "If the alarm goes off, just stay out of our way!", - "The order will cleanse the world and usher it into the new era.", - "Problem? No, I thought not." - }, - - { - "BEGGAR", - "Alms for the poor?", - "What are you looking at, surfacer?", - "You wouldn't have any extra food, would you?", - "You surface people will never understand us.", - "Ha, the guards can't find us. Those idiots don't even know we exist.", - "One day everyone but those who serve the order will be forced to join us.", - "Stare now, but you know that this will be your own face one day.", - "There's nothing more annoying than a surfacer with an attitude!", - "The order will make short work of your pathetic front.", - "Watch yourself, surfacer. We know our enemies!" - }, - - { - "PGUARD", - "We are the hands of fate. To earn our wrath is to find oblivion!", - "The order will cleanse the world of the weak and corrupt!", - "Obey the will of the masters!", - "Long life to the brothers of the order!", - "Free will is an illusion that binds the weak minded.", - "Power is the path to glory. To follow the order is to walk that path!", - "Take your place among the righteous, join us!", - "The order protects its own.", - "Acolytes? They have yet to see the full glory of the order.", - "If there is any honor inside that pathetic shell of a body, you'll enter into the arms of the order." - } -}; - //============================================================================ // // GetStrifeType @@ -224,7 +144,8 @@ void P_FreeStrifeConversations () { if (StrifeTypes[i] != NULL) { - GetDefaultByType (StrifeTypes[i])->Conversation = NULL; + AActor * ac = GetDefaultByType (StrifeTypes[i]); + if (ac != NULL) ac->Conversation = NULL; } } @@ -742,14 +663,11 @@ void P_StartConversation (AActor *npc, AActor *pc) toSay = CurNode->Dialogue; if (strncmp (toSay, "RANDOM_", 7) == 0) { - for (i = 0; i < NUM_RANDOM_TALKERS; ++i) - { - if (strcmp (RandomLines[i][0], toSay + 7) == 0) - { - toSay = RandomLines[i][1 + (pr_randomspeech() % NUM_RANDOM_LINES)]; - break; - } - } + FString dlgtext; + + dlgtext.Format("TXT_%s_%02d", toSay, 1+(pr_randomspeech() % NUM_RANDOM_LINES)); + toSay = GStrings[dlgtext.GetChars()]; + if (toSay==NULL) toSay = "Go away!"; // Ok, it's lame - but it doesn't look like an error to the player. ;) } DialogueLines = V_BreakLines (screen->GetWidth()/CleanXfac-24*2, toSay); @@ -774,7 +692,10 @@ void P_StartConversation (AActor *npc, AActor *pc) } ++i; } - item.label = RandomGoodbyes[pr_randomspeech() % NUM_RANDOM_GOODBYES]; + char goodbye[25]; + sprintf(goodbye, "TXT_RANDOMGOODBYE_%d", 1+(pr_randomspeech() % NUM_RANDOM_GOODBYES)); + item.label = (char*)GStrings[goodbye]; + if (item.label == NULL) item.label = "Bye."; item.b.position = i; item.c.extra = NULL; ConversationItems.Push (item); diff --git a/wadsrc/languages/english-us.txt b/wadsrc/languages/english-us.txt index a877da89e..5c80816f6 100644 --- a/wadsrc/languages/english-us.txt +++ b/wadsrc/languages/english-us.txt @@ -1046,6 +1046,68 @@ TXT_MINEKEY = "You picked up the Mine Key."; TXT_NEWKEY5 = "You picked up the New Key5."; TXT_ORACLEPASS = "You picked up the Oracle Pass."; +// Random dialogs + +TXT_RANDOM_PEASANT_01 = "Please don't hurt me."; +TXT_RANDOM_PEASANT_02 = "If you're looking to hurt me, I'm not really worth the effort."; +TXT_RANDOM_PEASANT_03 = "I don't know anything."; +TXT_RANDOM_PEASANT_04 = "Go away or I'll call the guards!"; +TXT_RANDOM_PEASANT_05 = "I wish sometimes that all these rebels would just learn their place and stop this nonsense."; +TXT_RANDOM_PEASANT_06 = "Just leave me alone, OK?"; +TXT_RANDOM_PEASANT_07 = "I'm not sure, but sometimes I think that I know some of the acolytes."; +TXT_RANDOM_PEASANT_08 = "The order's got everything around here pretty well locked up tight."; +TXT_RANDOM_PEASANT_09 = "There's no way that this is just a security force."; +TXT_RANDOM_PEASANT_10 = "I've heard that the order is really nervous about the front's actions around here."; + +TXT_RANDOM_REBEL_01 = "There's no way the order will stand against us."; +TXT_RANDOM_REBEL_02 = "We're almost ready to strike. Macil's plans are falling in place."; +TXT_RANDOM_REBEL_03 = "We're all behind you, don't worry."; +TXT_RANDOM_REBEL_04 = "Don't get too close to any of those big robots. They'll melt you down for scrap!"; +TXT_RANDOM_REBEL_05 = "The day of our glory will soon come, and those who oppose us will be crushed!"; +TXT_RANDOM_REBEL_06 = "Don't get too comfortable. We've still got our work cut out for us."; +TXT_RANDOM_REBEL_07 = "Macil says that you're the new hope. Bear that in mind."; +TXT_RANDOM_REBEL_08 = "Once we've taken these charlatans down, we'll be able to rebuild this world as it should be."; +TXT_RANDOM_REBEL_09 = "Remember that you aren't fighting just for yourself, but for everyone here and outside."; +TXT_RANDOM_REBEL_10 = "As long as one of us still stands, we will win."; + +TXT_RANDOM_AGUARD_01 = "Move along, peasant."; +TXT_RANDOM_AGUARD_02 = "Follow the true faith, only then will you begin to understand."; +TXT_RANDOM_AGUARD_03 = "Only through death can one be truly reborn."; +TXT_RANDOM_AGUARD_04 = "I'm not interested in your useless drivel."; +TXT_RANDOM_AGUARD_05 = "If I had wanted to talk to you I would have told you so."; +TXT_RANDOM_AGUARD_06 = "Go and annoy someone else!"; +TXT_RANDOM_AGUARD_07 = "Keep moving!"; +TXT_RANDOM_AGUARD_08 = "If the alarm goes off, just stay out of our way!"; +TXT_RANDOM_AGUARD_09 = "The order will cleanse the world and usher it into the new era."; +TXT_RANDOM_AGUARD_10 = "Problem? No, I thought not."; + +TXT_RANDOM_BEGGAR_01 = "Alms for the poor?"; +TXT_RANDOM_BEGGAR_02 = "What are you looking at, surfacer?"; +TXT_RANDOM_BEGGAR_03 = "You wouldn't have any extra food, would you?"; +TXT_RANDOM_BEGGAR_04 = "You surface people will never understand us."; +TXT_RANDOM_BEGGAR_05 = "Ha, the guards can't find us. Those idiots don't even know we exist."; +TXT_RANDOM_BEGGAR_06 = "One day everyone but those who serve the order will be forced to join us."; +TXT_RANDOM_BEGGAR_07 = "Stare now, but you know that this will be your own face one day."; +TXT_RANDOM_BEGGAR_08 = "There's nothing more annoying than a surfacer with an attitude!"; +TXT_RANDOM_BEGGAR_09 = "The order will make short work of your pathetic front."; +TXT_RANDOM_BEGGAR_10 = "Watch yourself, surfacer. We know our enemies!"; + +TXT_RANDOM_PGUARD_01 = "We are the hands of fate. To earn our wrath is to find oblivion!"; +TXT_RANDOM_PGUARD_02 = "The order will cleanse the world of the weak and corrupt!"; +TXT_RANDOM_PGUARD_03 = "Obey the will of the masters!"; +TXT_RANDOM_PGUARD_04 = "Long life to the brothers of the order!"; +TXT_RANDOM_PGUARD_05 = "Free will is an illusion that binds the weak minded."; +TXT_RANDOM_PGUARD_06 = "Power is the path to glory. To follow the order is to walk that path!"; +TXT_RANDOM_PGUARD_07 = "Take your place among the righteous, join us!"; +TXT_RANDOM_PGUARD_08 = "The order protects its own."; +TXT_RANDOM_PGUARD_09 = "Acolytes? They have yet to see the full glory of the order."; +TXT_RANDOM_PGUARD_10 = "If there is any honor inside that pathetic shell of a body, you'll enter into the arms of the order."; + +TXT_RANDOMGOODBYE_1 = "Bye!"; +TXT_RANDOMGOODBYE_2 = "Thanks, bye!"; +TXT_RANDOMGOODBYE_3 = "See you later!"; + + // Bloodbath announcer BBA_BONED = "%k boned %o like a fish";