private void OnSessionLaunched(CampaignGameStarter campaignStarter) { campaignStarter.AddPlayerLine("zendzee_legacy_start_leader", "companion_role", "zendzee_legacy_leader_pretalk", "{=zeeD75C6D0E}I want you to lead our clan.", ConditionChangeClanLeader, null, 110); campaignStarter.AddDialogLine("zendzee_legacy_candidate_pretalk", "zendzee_legacy_leader_pretalk", "zendzee_legacy_leader_need_confirm", "{=zee4E3D805F}Are you sure? This is a serious change...", null, null); campaignStarter.AddPlayerLine("zendzee_legacy_pretalk_confirm", "zendzee_legacy_leader_need_confirm", "zendzee_legacy_leader_confirm", "{=zee1E20B79B}Yes. I am absolutely sure.", null, null); campaignStarter.AddPlayerLine("zendzee_legacy_pretalk_nevermind", "zendzee_legacy_leader_need_confirm", "companion_okay", "{=mdNRYlfS}Nevermind.", null, null); campaignStarter.AddDialogLine("zendzee_legacy_candidate_accept", "zendzee_legacy_leader_confirm", "hero_main_options", "{=5hhxQBTj}I will be honored.[rb:positive]", null, ConsequenceChangeClanLeader); campaignStarter.AddPlayerLine("zendzee_charcter_window_open", "companion_role", "zendzee_charcter_window_active", "{=zee9065692B}Let me check your progress.", ConditionOpenCharacterWindow, ConsequenceCharacterWindowOpen, 110); campaignStarter.AddPlayerLine("zendzee_inventory_window_open", "companion_role", "zendzee_charcter_window_active", "{=zeeA3B242F4}Do you need new equipment?", ConditionOpenCharacterWindow, ConsequenceInventoryWindowOpen, 110); campaignStarter.AddDialogLine("zendzee_charcter_window_reply1", "zendzee_charcter_window_active", "zendzee_charcter_window_close", "{=zee376CA300}Is everything alright?", null, null); campaignStarter.AddPlayerLine("zendzee_charcter_window_reply2", "zendzee_charcter_window_close", "companion_okay", "{=zee5F9A2B79}Yes.", null, ConsequenceCharacterWindowClose); }
private void OnSessionLaunched(CampaignGameStarter obj) { obj.AddPlayerLine("tavernkeeper_talk_to_buy_drinks", "tavernkeeper_talk", "tavernkeeper_buy_drinks_condition", "I would like to buy drinks to every customer today.", new ConversationSentence.OnConditionDelegate(this.conversation_tavernkeep_offers_drinks_on_condition), null, 100, null, null); obj.AddDialogLine("tavernkeeper_buy_drinks", "tavernkeeper_buy_drinks_condition", "tavernkeeper_offer_buy_drinks", "That would cost you {DRINKSCOST}{GOLD_ICON}", null, null, 100, null); obj.AddPlayerLine("tavernkeeper_confirm_buy_drinks", "tavernkeeper_offer_buy_drinks", "tavernkeep_confirm_buy_drinks", "Yes, I can pay that.", new ConversationSentence.OnConditionDelegate(this.conversation_tavernkeep_can_afford_drinks), new ConversationSentence.OnConsequenceDelegate(this.conversation_tavernkeep_bought_drinks), 100, null, null); obj.AddPlayerLine("tavernkeeper_deny_buy_drinks", "tavernkeeper_offer_buy_drinks", "tavernkeeper_pretalk", "Nevermind.", null, null, 100, null, null); obj.AddDialogLine("tavernkeeper_thank_for_drinks", "tavernkeep_confirm_buy_drinks", "tavernkeeper_pretalk", "Thank you.", null, null, 100, null); }
public void OnSessionLaunched(CampaignGameStarter starter) { starter.AddDialogLine("sms_sneak_talk", "start", "sms_sneak_talk_resquest", "我会使用爬绳工具, 如果你邀请我加入,0点过后,我们将可以对城镇进行袭击。不过绳子有限只能带20个英雄", this.IsConversationAgentBarber, null, 100, null); starter.AddPlayerLine("sms_sneak_talk_resquest", "sms_sneak_talk_resquest", "sms_sneak_talk_resquest_answer", "你是个天才,我需要你", null, ConversationResuelt, 100, null); starter.AddPlayerLine("sms_sneak_talk_resquest", "sms_sneak_talk_resquest", "close_window", GameTexts.FindText("sue_more_spouses_prisoner_punish_cancel", null).ToString(), null, null, 100, null); starter.AddDialogLine("sms_sneak_talk_resquest_answer", "sms_sneak_talk_resquest_answer", "close_window", "偷袭别人使我快乐", null, null, 100, null); starter.AddDialogLine("sms_sneak_talk_again", "start", "sms_sneak_talk_again_none", "我身上带有20条绳子,我们可以出发了", this.IsConversationAgentBarber2, null, 100, null); starter.AddPlayerLine("sms_sneak_talk_again_none", "sms_sneak_talk_again_none", "close_window", "做的好, 为你鼓掌", null, null, 100, null); }
private void OnSessionLaunched(CampaignGameStarter starter) { starter.AddPlayerLine(TavernWorkQuery.Id, TavernWorkQuery.entry, TavernWorkQuery.next, TavernWorkQuery.message.ToString(), null, null); starter.AddDialogLine(TavernWorkResponse.Id, TavernWorkResponse.entry, TavernWorkResponse.next, TavernWorkResponse.message.ToString(), new ConversationSentence.OnConditionDelegate(NoQuestCheck), null); // Jawwal Questline starter.AddDialogLine(TavernWorkJawwalResponse1.Id, TavernWorkJawwalResponse1.entry, TavernWorkJawwalResponse1.next, TavernWorkJawwalResponse1.message.ToString(), new ConversationSentence.OnConditionDelegate(JawwalCheck), null); starter.AddDialogLine(TavernWorkJawwalResponse2.Id, TavernWorkJawwalResponse2.entry, TavernWorkJawwalResponse2.next, TavernWorkJawwalResponse2.message.ToString(), new ConversationSentence.OnConditionDelegate(JawwalResponse2Setup), new ConversationSentence.OnConsequenceDelegate(JawwalResponse2Consequence)); }
public void AddPatrolDialog(CampaignGameStarter obj) { obj.AddDialogLine("mod_recruiter_talk_start", "start", "mod_recruiter_talk", "Hello my lord. What do you need us to do?", new ConversationSentence.OnConditionDelegate(this.patrol_talk_start_on_conditional), null, 100, null); obj.AddPlayerLine("mod_recruiter_donate_troops", "mod_recruiter_talk", "mod_recruiter_after_donate", "Donate Troops", null, new ConversationSentence.OnConsequenceDelegate(this.conversation_patrol_donate_troops_on_consequence), 100, null, null); obj.AddPlayerLine("mod_recruiter_disband", "mod_recruiter_talk", "close_window", "Disband.", null, new ConversationSentence.OnConsequenceDelegate(this.conversation_patrol_disband_on_consequence), 100, null, null); obj.AddPlayerLine("mod_recruiter_leave", "mod_recruiter_talk", "close_window", "Carry on, then. Farewell.", null, new ConversationSentence.OnConsequenceDelegate(this.conversation_patrol_leave_on_consequence), 100, null, null); obj.AddDialogLine("mod_recruiter_after_donate", "mod_recruiter_after_donate", "mod_recruiter_talk", "Anything else?", null, null, 100, null); //obj.AddPlayerLine("mod_leaderless_party_answer", "disbanding_leaderless_party_start_response", "close_window", "Disband now.", null, new ConversationSentence.OnConsequenceDelegate(this.conversation_patrol_disband_now_on_consquence), 100, null, null); }
protected void AddDialogs(CampaignGameStarter starter) { // Children starter.AddPlayerLine("adoption_discussion_MA", "town_or_village_children_player_no_rhyme", "adoption_child_MA", "{=adoption_offer_child}I can tell you have no parents to go back to child. I can be your {?PLAYER.GENDER}mother{?}father{\\?} if that is the case.", new ConversationSentence.OnConditionDelegate(conversation_adopt_child_on_condition), null, 120, null, null); starter.AddDialogLine("character_adoption_response_MA", "adoption_child_MA", "close_window", "{=adoption_response_child}You want to be my {?PLAYER.GENDER}Ma{?}Pa{\\?}? Okay then![rf:happy][rb:very_positive]", null, new ConversationSentence.OnConsequenceDelegate(conversation_adopt_child_on_consequence), 100, null); // Teens starter.AddPlayerLine("adoption_discussion_MA", "town_or_village_player", "adoption_teen_MA", "{=adoption_offer_teen}Do you not have any parents to take care of you young {?CONVERSATION_CHARACTER.GENDER}woman{?}man{\\?}? You are welcome to be a part of my family.", new ConversationSentence.OnConditionDelegate(conversation_adopt_child_on_condition), null, 120, null, null); starter.AddDialogLine("character_adoption_response_MA", "adoption_teen_MA", "close_window", "{=adoption_response_teen}Thanks for allowing me to be a part of your family {?PLAYER.GENDER}milady{?}sir{\\?}. I gratefully accept![rf:happy][rb:very_positive]", null, new ConversationSentence.OnConsequenceDelegate(conversation_adopt_child_on_consequence), 100, null); }
private void OnSessionLaunched(CampaignGameStarter game) { game.BlockSentences( () => !TelepathyBehaviour.MeetingInProgress, "main_option_discussions_1" // joining army ); game.BlockSentences( () => !TelepathyBehaviour.MeetingInProgress || !TelepathySettings.Instance.HideQuestDialogLines, "hero_give_issue", // taking a quest "hero_task_given", // discuss a quest "caravan_create_conversation_1" // form a caravan ); game.AddPlayerLine( "lord_talk_ask_something_2", "lord_talk_ask_something_2", "telepathy_tell_location", new TextObject("{=Telepathy_Where_Are_You}Where are you?", null).ToString(), new ConversationSentence.OnConditionDelegate(() => meetingEncounter != null), null, 101, null, null); game.AddDialogLine( "telepathy_tell_location", "telepathy_tell_location", "lord_talk_ask_something_again", "{LORD_LOCATION_ANSWER}", new ConversationSentence.OnConditionDelegate(() => { HeroHelper.SetLastSeenLocation(meetingHero, true); var answer = meetingHero.LastSeenInSettlement ? new TextObject("{=Telepathy_Im_In}I'm in {Settlement}.", null) : new TextObject("{=Telepathy_Im_Near}I'm near {Settlement}.", null); answer.SetTextVariable("Settlement", meetingHero.LastSeenPlace.EncyclopediaLinkWithName); MBTextManager.SetTextVariable("LORD_LOCATION_ANSWER", answer, false); return(true); }), null, 100, null); game.AddPlayerLine( "lord_talk_ask_something_2", "lord_talk_ask_something_2", "telepathy_tell_objective", new TextObject("{=Telepathy_What_Are_You_Doing}What are you doing?", null).ToString(), new ConversationSentence.OnConditionDelegate(() => meetingEncounter != null), null, 101, null, null); game.AddDialogLine( "telepathy_tell_objective", "telepathy_tell_objective", "lord_talk_ask_something_again", "{LORD_OBJECTIVE_ANSWER}", new ConversationSentence.OnConditionDelegate(() => { string answer = meetingHero.PartyBelongedTo == null ? new TextObject("{=Telepathy_Nothing}Nothing actually.", null).ToString() : CampaignUIHelper.GetMobilePartyBehaviorText(meetingHero.PartyBelongedTo); MBTextManager.SetTextVariable("LORD_OBJECTIVE_ANSWER", answer, false); return(true); }), null, 100, null); }
protected void AddDialogs(CampaignGameStarter starter) { // To begin the dialog for companions starter.AddPlayerLine("main_option_discussions_MA", "hero_main_options", "lord_talk_speak_diplomacy_MA", "{=lord_conversations_343}There is something I'd like to discuss.", new ConversationSentence.OnConditionDelegate(conversation_begin_courtship_for_hero_on_condition), null, 120, null, null); starter.AddDialogLine("character_agrees_to_discussion_MA", "lord_talk_speak_diplomacy_MA", "lord_talk_speak_diplomacy_2", "{=OD1m1NYx}{STR_INTRIGUE_AGREEMENT}", new ConversationSentence.OnConditionDelegate(conversation_character_agrees_to_discussion_on_condition), null, 100, null); // From previous iteration starter.AddDialogLine("persuasion_leave_faction_npc_result_success_2", "lord_conclude_courtship_stage_2", "close_window", "{=k7nGxksk}Splendid! Let us conduct the ceremony, then.", new ConversationSentence.OnConditionDelegate(conversation_finalize_courtship_for_hero_on_condition), new ConversationSentence.OnConsequenceDelegate(conversation_courtship_success_on_consequence), 140, null); starter.AddDialogLine("hero_courtship_persuasion_2_success", "lord_start_courtship_response_3", "lord_conclude_courtship_stage_2", "{=xwS10c1b}Yes... I think I would be honored to accept your proposal.", new ConversationSentence.OnConditionDelegate(conversation_finalize_courtship_for_hero_on_condition), null, 120, null); starter.AddPlayerLine("hero_romance_task", "hero_main_options", "lord_start_courtship_response_3", "{=cKtJBdPD}I wish to offer my hand in marriage.", new ConversationSentence.OnConditionDelegate(conversation_finalize_courtship_for_hero_on_condition), null, 140, null, null); starter.AddDialogLine("persuasion_leave_faction_npc_result_success_2", "lord_conclude_courtship_stage_2", "close_window", "{=k7nGxksk}Splendid! Let us conduct the ceremony, then.", new ConversationSentence.OnConditionDelegate(conversation_finalize_courtship_for_hero_on_condition), new ConversationSentence.OnConsequenceDelegate(conversation_courtship_success_on_consequence), 140, null); }
public void AddCustomLines(CampaignGameStarter campaignGameStarter, List <CEScene> CECustomScenes) { try { foreach (CEScene CustomScene in CECustomScenes) { foreach (Line CustomLine in CustomScene.Dialogue.Lines) { if (CustomLine.Ref != null && CustomLine.Ref.ToLower() == "ai") { campaignGameStarter.AddDialogLine(CustomLine.Id, CustomLine.InputToken, CustomLine.OutputToken, CustomLine.Text, () => { return(ConversationCECustomScenes(CustomScene.Name)); }, null); } else { campaignGameStarter.AddPlayerLine(CustomLine.Id, CustomLine.InputToken, CustomLine.OutputToken, CustomLine.Text, null, null); } } } } catch (Exception e) { TextObject textObject = new TextObject("{=CEEVENTS0999}Error: failed to initialize scenes"); InformationManager.DisplayMessage(new InformationMessage(textObject.ToString(), Colors.Red)); CECustomHandler.ForceLogToFile("Error: failed to initialize scenes"); CECustomHandler.ForceLogToFile(e.Message + " : " + e); } }
private void GenerateDialogueForSelectClan() { PlayerLineUtils.cleanRepeatableLine(CampaignGameStarter, FLAG_CLAN_CREATE_CHOICE_CLAN_ITEM); Kingdom kindom = Hero.MainHero.MapFaction as Kingdom; List <Clan> clans = kindom.Clans.Where((clan) => clan != Clan.PlayerClan).ToList(); int maxNumber = 10; if (clans.Count() <= maxNumber) { clans.ForEach((clan) => addPlayerLineToSelectClan(clan)); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_CLAN_ITEM, "sue_clan_create_from_family_change_clan_answer_select", "close_window", GameTexts.FindText("sue_clan_create_from_family_of_forget", null).ToString(), null, null, 100, null); } else { List <int> canAddIndexs = RandomUtils.RandomNumbers(maxNumber, 0, clans.Count(), new List <int>() { }); int index = 0; clans.ForEach((clan) => { if (canAddIndexs.Contains(index)) { addPlayerLineToSelectClan(clan); } index++; }); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_CLAN_ITEM, "sue_clan_create_from_family_change_clan_answer_select", "sue_clan_create_from_family_take_clan_change", GameTexts.FindText("sue_clan_create_from_family_choice_spouse_item_change", null).ToString(), null, new ConversationSentence.OnConsequenceDelegate(() => { GenerateDialogueForSelectClan(); }), 100, null); CampaignGameStarter.AddDialogLine(FLAG_CLAN_CREATE_CHOICE_CLAN_ITEM, "sue_clan_create_from_family_take_clan_change", "sue_clan_create_from_family_change_clan_answer_select", GameTexts.FindText("sue_clan_create_from_family_choice_spouse_item_change_tip", null).ToString(), null, null, 100, null); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_CLAN_ITEM, "sue_clan_create_from_family_change_clan_answer_select", "close_window", GameTexts.FindText("sue_clan_create_from_family_of_forget", null).ToString(), null, null, 100, null); } }
private void ShowSelectSettlement() { List <Settlement> settlements = Hero.MainHero.Clan.Settlements.Where((settlement) => (settlement.IsTown || settlement.IsCastle)).ToList(); int maxNumber = 10; if (settlements.Count() <= maxNumber) { settlements.ForEach((settlement) => addPlayerLineToSelectSettlement(settlement)); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_SETTLEMENT_ITEM, "sue_clan_create_from_family_start", "close_window", GameTexts.FindText("sue_clan_create_from_family_of_forget", null).ToString(), null, null, 100, null); } else { List <int> canAddIndexs = RandomUtils.RandomNumbers(maxNumber, 0, settlements.Count(), new List <int>() { }); int index = 0; settlements.ForEach((settlement) => { if (canAddIndexs.Contains(index)) { addPlayerLineToSelectSettlement(settlement); } index++; }); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_SETTLEMENT_ITEM, "sue_clan_create_from_family_start", "sue_clan_create_from_family_take_settlement_change", GameTexts.FindText("sue_clan_create_from_family_choice_spouse_item_change", null).ToString(), null, new ConversationSentence.OnConsequenceDelegate(() => { GenerateDataForCreateClan(); }), 100, null); CampaignGameStarter.AddDialogLine(FLAG_CLAN_CREATE_CHOICE_SETTLEMENT_ITEM, "sue_clan_create_from_family_take_settlement_change", "sue_clan_create_from_family_start", GameTexts.FindText("sue_clan_create_from_family_choice_spouse_item_change_tip", null).ToString(), null, null, 100, null); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_SETTLEMENT_ITEM, "sue_clan_create_from_family_start", "close_window", GameTexts.FindText("sue_clan_create_from_family_of_forget", null).ToString(), null, null, 100, null); } }
private void _addSexDialogs(CampaignGameStarter starter) { // ISSUE: method pointer starter.AddPlayerLine("hero_sex_nor_ask", "hero_main_options", "hero_sex_nor_reply", "{SEX_NOR_ASK}", new ConversationSentence.OnConditionDelegate(conversation_player_sex_nor_ask_on_condition), (ConversationSentence.OnConsequenceDelegate)null, 100, (ConversationSentence.OnClickableConditionDelegate)null, (ConversationSentence.OnPersuasionOptionDelegate)null); // ISSUE: method pointer starter.AddDialogLine("hero_sex_nor_reply", "hero_sex_nor_reply", "lord_pretalk", "{SEX_NOR_RESP}", new ConversationSentence.OnConditionDelegate(conversation_player_sex_nor_reply_on_condition), (ConversationSentence.OnConsequenceDelegate)null, 100, (ConversationSentence.OnClickableConditionDelegate)null); }
private void AddDialouge(CampaignGameStarter gameStarter) { gameStarter.AddPlayerLine("clan_support_1", "hero_main_options", "clan_support_1_exit", "I would like you to support my clan", new ConversationSentence.OnConditionDelegate(town_notable_support_condition), (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddDialogLine("clan_support_2", "clan_support_1_exit", "clan_support_2_exit", "If you want my support, I need your support as well", (ConversationSentence.OnConditionDelegate)null, (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddPlayerLine("clan_support_3a", "clan_support_2_exit", "clan_support_3_exit", "I will provide you with my political support", new ConversationSentence.OnConditionDelegate(town_notable_political_bribe_condition), new ConversationSentence.OnConsequenceDelegate(town_notable_political_bribe_consequence)); gameStarter.AddPlayerLine("clan_support_3b", "clan_support_2_exit", "clan_support_3_exit", "I will provide you with my finicial support", new ConversationSentence.OnConditionDelegate(town_notable_cash_bribe_condition), new ConversationSentence.OnConsequenceDelegate(town_notable_cash_bribe_consequence)); gameStarter.AddPlayerLine("clan_support_3c", "clan_support_2_exit", "close_window", "Never mind", (ConversationSentence.OnConditionDelegate)null, (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddDialogLine("clan_support_4", "clan_support_3_exit", "hero_pretalk", "You have my support[rb:positive][rf:happy]", (ConversationSentence.OnConditionDelegate)null, (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddPlayerLine("notable_rebellion_town_conversation_1", "hero_main_options", "notable_rebellion_town_conversation_1_exit", "I need your help in overthrowing {FACTION_NAME}", new ConversationSentence.OnConditionDelegate(town_notable_rebellion_condition), (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddDialogLine("notable_rebellion_town_conversation_2", "notable_rebellion_town_conversation_1_exit", "notable_rebellion_town_conversation_2_exit", "The people of {TOWN_NAME} have suffered under the rule of {FACTION_NAME}, but I am putting my life in danger by doing this.", new ConversationSentence.OnConditionDelegate(rebellion_2_condition), (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddPlayerLine("notable_rebellion_town_conversation_3a", "notable_rebellion_town_conversation_2_exit", "notable_rebellion_town_conversation_3_exit", "I will provide you with additional political support", new ConversationSentence.OnConditionDelegate(town_notable_political_bribe_condition), new ConversationSentence.OnConsequenceDelegate(town_notable_political_bribe_consequence)); gameStarter.AddPlayerLine("notable_rebellion_town_conversation_3b", "notable_rebellion_town_conversation_2_exit", "notable_rebellion_town_conversation_3_exit", "I will provide you with additional finicial support", new ConversationSentence.OnConditionDelegate(town_notable_cash_bribe_condition), new ConversationSentence.OnConsequenceDelegate(town_notable_cash_bribe_consequence)); gameStarter.AddPlayerLine("notable_rebellion_town_conversation_3c", "notable_rebellion_town_conversation_2_exit", "close_window", "Never Mind", new ConversationSentence.OnConditionDelegate(town_notable_rebellion_condition), (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddDialogLine("notable_rebellion_town_conversation_4", "notable_rebellion_town_conversation_3_exit", "hero_pretalk", "I will begin building a resistance network. We will strike once we are ready[rb:positive][rf:happy]", (ConversationSentence.OnConditionDelegate)null, new ConversationSentence.OnConsequenceDelegate(town_notable_rebellion_consquence)); gameStarter.AddPlayerLine("notable_rebellion_ask_1", "hero_main_options", "notable_rebellion_ask_1_exit", "How are the preperations for the rebellion?", new ConversationSentence.OnConditionDelegate(town_notable_rebellion_ask_condition), (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddDialogLine("notable_rebellion_ask_2a", "notable_rebellion_ask_1_exit", "hero_pretalk", "There are still many loyal to the regime. We need more time to prepare (current loyalty : {LOYALTY} > 25)", new ConversationSentence.OnConditionDelegate(town_notable_rebellion_ask_2a_condition), (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddDialogLine("notable_rebellion_ask_2b", "notable_rebellion_ask_1_exit", "hero_pretalk", "The forces in the garrison are too strong. We need more time to prepare (Rebel Strength: {REBEL} < Garrison Strength : {GARRISON})", new ConversationSentence.OnConditionDelegate(town_notable_rebellion_ask_2b_condition), (ConversationSentence.OnConsequenceDelegate)null); gameStarter.AddDialogLine("notable_rebellion_ask_2c", "notable_rebellion_ask_1_exit", "hero_pretalk", "Preparations are done. Our men are stroming the keep right now", new ConversationSentence.OnConditionDelegate(town_notable_rebellion_ask_2c_condition), new ConversationSentence.OnConsequenceDelegate(triggerRebellion)); }
private void OnSessionLaunched(CampaignGameStarter obj) { messengerSettlement = new Settlement { Name = new TextObject("Messenger Task") }; obj.AddPlayerLine("messenger_ask_to_find_companion", "hero_main_options", "messenger_ask_to_find_companion_ask", "Could you help me bring someone to me?", new ConversationSentence.OnConditionDelegate(conversation_is_companion_on_global_map), null, 100, new ConversationSentence.OnClickableConditionDelegate(exist_companion_not_in_party)); obj.AddDialogLine("messenger_ok_on_ask_to_find_companion", "messenger_ask_to_find_companion_ask", "messenger_who_is", "Yes, of course, who would you like to find?", null, new ConversationSentence.OnConsequenceDelegate(open_menu_to_choice), 100, null); }
private void AddDialogLine(CampaignGameStarter starter, DialogueData d, string in_token) { if (d.InjectedToTaleworlds) { return; } d.InjectedToTaleworlds = true; ConversationSentence.OnConditionDelegate cond = null; if (d.Condition != null) { cond = delegate { return(EvalulateDialogueCondition(d.Condition)); }; } ConversationSentence.OnConsequenceDelegate conseq = null; if (d.Consequence != null) { conseq = delegate { ExecuteDialogueConsequence(d.Consequence); }; } if (d.IsPlayerDialogue) { starter.AddPlayerLine(d.Dialogue_ID, in_token, d.Children.Count == 0? "close_window" : d.Dialogue_ID, d.DialogueText, cond, conseq, int.MaxValue ); } else { starter.AddDialogLine(d.Dialogue_ID, in_token, d.Children.Count == 0 ? "close_window" : d.Dialogue_ID, d.DialogueText, cond, conseq, int.MaxValue ); } foreach (DialogueData child in d.Children) { AddDialogLine(starter, child, d.Dialogue_ID); } }
protected void AddPreDialogues(CampaignGameStarter campaignGameStarter) { // Pre-weapons list campaignGameStarter.AddPlayerLine("mwax_arena_choose_weapon", "arena_master_enter_practice_fight_confirm", "mwax_arena_weapons_list", "{=mwax_arena_1}I'll choose my gear.", (ConversationSentence.OnConditionDelegate)null, (ConversationSentence.OnConsequenceDelegate)null, 200, (ConversationSentence.OnClickableConditionDelegate)null, (ConversationSentence.OnPersuasionOptionDelegate)null); campaignGameStarter.AddDialogLine("mwax_arena_choose_weapons_master_confirm", "mwax_arena_weapons_list", "mwax_arena_weapons_list", "{=mwax_arena_2}Alright, which weapon are you taking?", (ConversationSentence.OnConditionDelegate)null, (ConversationSentence.OnConsequenceDelegate)null, 100, (ConversationSentence.OnClickableConditionDelegate)null); // Post-match list campaignGameStarter.AddPlayerLine("mwax_arena_rematch_previous", "arena_master_post_practice_fight_talk", "close_window", "{=mwax_arena_3}Yeah. I'll take my previous loadout.", new ConversationSentence.OnConditionDelegate(this.MWAX_conversation_post_fight), new ConversationSentence.OnConsequenceDelegate(this.MWAX_conversation_join_arena_with_previous_loadout), 200, (ConversationSentence.OnClickableConditionDelegate)null, (ConversationSentence.OnPersuasionOptionDelegate)null); campaignGameStarter.AddPlayerLine("mwax_arena_rematch_new", "arena_master_post_practice_fight_talk", "mwax_arena_weapons_list", "{=mwax_arena_4}Sure. I'll take a new loadout.", new ConversationSentence.OnConditionDelegate(this.MWAX_conversation_post_fight), (ConversationSentence.OnConsequenceDelegate)null, 200, (ConversationSentence.OnClickableConditionDelegate)null, (ConversationSentence.OnPersuasionOptionDelegate)null); }
public void CreateAndAdd(CampaignGameStarter campaignGameStarter) { if (this.isPlayer) { campaignGameStarter.AddRepeatablePlayerLine(this.id, this.inputOrder, this.outOrder, this.text, NewCondition(this.condition), NewResult(this.result), 100, null); } else { campaignGameStarter.AddDialogLine(this.id, this.inputOrder, this.outOrder, this.text, NewCondition(this.condition), NewResult(this.result), 100, null); } }
// TAVERN CODE protected void AddDialogs(CampaignGameStarter campaignGameStarter) { campaignGameStarter.AddDialogLine("custom_merc_talk_start_plural", "start", "custom_merc_tavern_talk", "Do you have a need for fighters, {?PLAYER.GENDER}madam{?}sir{\\?}? Me and {?CMERCS_PLURAL}{CMERCS_MERCENARY_COUNT} of my mates{?}one of my mates{\\?} looking for a master. You might call us mercenaries, like. We'll join you for {CMERCS_GOLD_AMOUNT}{GOLD_ICON}", new ConversationSentence.OnConditionDelegate(custom_mercenary_plural_start_condition), null, 150, null); campaignGameStarter.AddDialogLine("custom_merc_talk_start_singlular", "start", "custom_merc_tavern_talk", "Do you have a need for fighters, {?PLAYER.GENDER}madam{?}sir{\\?}? I am looking for a master. I'll join you for {CMERCS_GOLD_AMOUNT}{GOLD_ICON}", new ConversationSentence.OnConditionDelegate(custom_mercenary_single_start_condition), null, 150, null); campaignGameStarter.AddPlayerLine("custom_merc_talk_hire_one", "custom_merc_tavern_talk", "custom_merc_tavern_talk_hire_one", "All right. I would only like to hire one of you. Here is {CMERCS_GOLD_AMOUNT_FOR_ONE}{GOLD_ICON}", new ConversationSentence.OnConditionDelegate(custom_mercenary_hire_one_condition), delegate() { HireCustomMercenariesInTavern(true); }, 110, null, null); campaignGameStarter.AddDialogLine("custom_merc_talk_hire_one_response", "custom_merc_tavern_talk_hire_one", "custom_merc_tavern_talk", "Deal, One of us will report to your party outside the gates after gathering their gear. Need anything else?", null, null, 100, null); campaignGameStarter.AddPlayerLine("custom_merc_talk_hire_all", "custom_merc_tavern_talk", "custom_merc_tavern_talk_hire", "All right. I will hire {?CMERCS_PLURAL}all of you{?}you{\\?}. Here is {CMERCS_GOLD_AMOUNT_ALL}{GOLD_ICON}", new ConversationSentence.OnConditionDelegate(custom_mercenary_hire_all_condition), delegate() { HireCustomMercenariesInTavern(false, false); }, 100, null, null); campaignGameStarter.AddPlayerLine("custom_merc_talk_hire_all_past_limit", "custom_merc_tavern_talk", "custom_merc_tavern_talk_hire", "All right. I will hire {?CMERCS_PLURAL}all of you{?}you{\\?}. Here is {CMERCS_GOLD_AMOUNT_ALL}{GOLD_ICON} (Hires Past Party Limit)", new ConversationSentence.OnConditionDelegate(custom_mercenary_hire_all_past_limit_condition), delegate() { HireCustomMercenariesInTavern(false, true); }, 110, null, null); campaignGameStarter.AddPlayerLine("custom_merc_talk_hire_some_past_limit", "custom_merc_tavern_talk", "custom_merc_tavern_talk_hire", "All right. But I can only hire {CMERCS_MERCENARY_COUNT_SOME_AFFORD} of you. Here is {CMERCS_GOLD_AMOUNT_SOME_AFFORD}{GOLD_ICON} (Hires Past Party Limit)", new ConversationSentence.OnConditionDelegate(custom_mercenary_afford_hire_some_past_limit_condition), delegate() { HireCustomMercenariesInTavern(false, true); }, 110, null, null); campaignGameStarter.AddPlayerLine("custom_merc_talk_hire_some", "custom_merc_tavern_talk", "custom_merc_tavern_talk_hire", "All right. But I can only hire {CMERCS_MERCENARY_COUNT_SOME} of you. Here is {CMERCS_GOLD_AMOUNT_SOME}{GOLD_ICON}", new ConversationSentence.OnConditionDelegate(custom_mercenary_hire_some_on_condition), delegate() { HireCustomMercenariesInTavern(false, false); }, 100, null, null); campaignGameStarter.AddPlayerLine("custom_merc_talk_reject_no_gold", "custom_merc_tavern_talk", "close_window", "That sounds good. But I can't hire any more men right now.", new ConversationSentence.OnConditionDelegate(custom_mercenary_reject_gold_or_party_size_condition), null, 100, null, null); campaignGameStarter.AddPlayerLine("custom_merc_talk_reject_party_full", "custom_merc_tavern_talk", "close_window", "Sorry. I don't need any other men right now.", new ConversationSentence.OnConditionDelegate(custom_mercenary_dont_need_men_condition), null, 100, null, null); campaignGameStarter.AddDialogLine("custom_merc_talk_hired_end", "custom_merc_tavern_talk_hire", "close_window", "{RANDOM_HIRE_SENTENCE}", new ConversationSentence.OnConditionDelegate(custom_mercenary_end_condition), null, 100, null); campaignGameStarter.AddDialogLine("custom_merc_talk_start_post_hire", "start", "close_window", "Don't worry, I'll be ready. Just having a last drink for the road.", new ConversationSentence.OnConditionDelegate(custom_mercenary_post_hire_start_condition), null, 150, null); }
private void OnSessionLaunched(CampaignGameStarter campaignStarter) { campaignStarter.AddPlayerLine("zendzee_companion_start_mission", "hero_main_options", "zendzee_companion_mission_pretalk", "{=zee04AA1262}Let's talk about improving the position of our clan.", ConditionImroveClanPosition, null); campaignStarter.AddDialogLine("zendzee_companion_pretalk_patrolling", "zendzee_companion_mission_pretalk", "zendzee_companion_mission", "{=zeeFA5B9477}I patrol our lands.", ConditionCompaionInPatrol, null); campaignStarter.AddDialogLine("zendzee_companion_pretalk", "zendzee_companion_mission_pretalk", "zendzee_companion_mission", "{=7EoBCTX0}What do you want me to do?[rb:unsure]", ConditionCompaionHaveNoMission, null); campaignStarter.AddPlayerLine("zendzee_companion_mission_patrol", "zendzee_companion_mission", "companion_okay", "{=zeeE0CBDC67}You should patrol our lands to improve relations with notables.", ConditionMissionPatrol, AssignCompanionToPatrolPlayerLands); campaignStarter.AddPlayerLine("zendzee_companion_mission_stop", "zendzee_companion_mission", "companion_okay", "{=zee8F9F16B4}You can stop doing it.", ConditionMissionStop, CompanionMissionStopPatrolling); campaignStarter.AddPlayerLine("zendzee_nevermind", "zendzee_companion_mission", "companion_okay", "{=mdNRYlfS}Nevermind.", null, null); }
private void OnSessionLaunched(CampaignGameStarter starter) { currentQuests = new Dictionary <Settlement, QuestBase>(); starter.AddPlayerLine("armor_craft_player_line", "weaponsmith_talk_player", "armor_craft_request", "Can you craft me an armor ?", new ConversationSentence.OnConditionDelegate(ArmorSmithDialogCondition), null); //add armor types dialogs starter.AddDialogLine("armor_craft_response_1", "armor_craft_request", "armor_type_choice", "What kind of armor ?", null, new ConversationSentence.OnConsequenceDelegate(ArmorSmithDialogOnTypeChoiceConsequence), 100, null); starter.AddRepeatablePlayerLine("armor_craft_type_choice", "armor_type_choice", "armor_tier_choice", "{TYPE}", new ConversationSentence.OnConditionDelegate(ArmorSmithDialogOnTypeChoiceCondition), new ConversationSentence.OnConsequenceDelegate(ArmorSmithDialogOnTypeChoiceUpdateSelected)); starter.AddPlayerLine("armor_craft_type_choice_return", "armor_type_choice", "weaponsmith_begin", "Nevermind", null, null); //add armor tier dialogs starter.AddDialogLine("armor_craft_tier_choice", "armor_tier_choice", "armor_tier_choice_repeat", "So you want {TYPE}? Fine. Help me narrow it down, which armor tier are you going for ?", new ConversationSentence.OnConditionDelegate(ArmorSmithDialogOnTierChoiceDialogCondition), new ConversationSentence.OnConsequenceDelegate(ArmorSmithDialogOnTierChoiceConsequence)); starter.AddRepeatablePlayerLine("armor_craft_tier_choice", "armor_tier_choice_repeat", "armor_item_choice", "{TIER}", new ConversationSentence.OnConditionDelegate(ArmorSmithDialogOnTierchoiceCondition), new ConversationSentence.OnConsequenceDelegate(ArmorSmithDialogOnTierChoiceUpdateSelected)); starter.AddPlayerLine("armor_craft_tier_choice_return", "armor_tier_choice_repeat", "weaponsmith_begin", "Nevermind", null, null); //add armor item dialogs starter.AddDialogLine("armor_craft_item_choice", "armor_item_choice", "armor_item_choice_repeat", "So that will be {TYPEANDTIER}. What are you looking for in particular ?", new ConversationSentence.OnConditionDelegate(ArmorSmithDialogOnTypeAndTierChoiceCondition), new ConversationSentence.OnConsequenceDelegate(ArmorSmithDialogOnItemChoiceConsequence)); starter.AddRepeatablePlayerLine("armor_craft_type_choice", "armor_item_choice_repeat", "armor_pay", "{ITEM}", new ConversationSentence.OnConditionDelegate(ArmorSmithDialogOnItemChoiceCondition), new ConversationSentence.OnConsequenceDelegate(ArmorSmithDialogOnItemChoiceUpdateSelected)); starter.AddPlayerLine("armor_craft_type_choice_return", "armor_item_choice_repeat", "weaponsmith_begin", "Nevermind", null, null); //add pay half dialog starter.AddDialogLine("armor_craft_pay", "armor_pay", "armor_pay_choice", "{ITEM} it is then, that will cost you {COST}.\nYou will have to pay half of the price now, wait a week for me to finish your piece then come back here to pick it up and pay the rest of the price.", new ConversationSentence.OnConditionDelegate(ArmorSmithDialogOnPayCondition), null); starter.AddPlayerLine("armor_craft_pay_response", "armor_pay_choice", "quest_starter_dialog", "Sounds good, here's your money.", null, new ConversationSentence.OnConsequenceDelegate(ArmorSmithDialogOnPay), 100, new ConversationSentence.OnClickableConditionDelegate(ArmorSmithDialogCanPayCondition)); starter.AddPlayerLine("armor_craft_pay_response_return", "armor_pay_choice", "weaponsmith_begin", "I changed my mind", null, null); }
public override void CompileToken(CampaignGameStarter campaign) { var inputToken = InputToken?.TokenName ?? "start"; if (InputToken is IBarterResultToken) { inputToken += "_result"; } if (InputToken is IInputDialogToken) { inputToken = InputToken.TokenName; } campaign.AddDialogLine(TokenName, inputToken, OutputToken, GetText() + Expressions?.Tag, Condition, Consequence, Priority); }
private void ShowSelectSpouseList() { IEnumerable <TroopRosterElement> spouses = MobileParty.MainParty.MemberRoster.GetTroopRoster().Where(new Func <TroopRosterElement, bool>((obj) => (obj.Character.IsHero && obj.Character.HeroObject.Spouse == null && obj.Character.HeroObject.IsPlayerCompanion))); int maxNumber = 10; if (spouses.Count() <= maxNumber) { spouses.ToList().ForEach((obj) => { Hero spouse = obj.Character.HeroObject; addPlayerLineToSelectSpouse(spouse); }); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_SPOUSE_ITEM, "sue_clan_create_from_family_take_spouse", "sue_clan_create_from_family_request_money", GameTexts.FindText("sue_clan_create_from_family_need_spouse_not", null).ToString(), null, null, 100, null); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_SPOUSE_ITEM, "sue_clan_create_from_family_take_spouse", "close_window", GameTexts.FindText("sue_clan_create_from_family_of_forget", null).ToString(), null, null, 100, null); } else { Hero hero = Hero.OneToOneConversationHero; List <CharacterObject> targets = new List <CharacterObject>(); foreach (TroopRosterElement troopRosterElement in spouses) { if (troopRosterElement.Character.IsHero && troopRosterElement.Character.HeroObject.Spouse == null && troopRosterElement.Character.HeroObject.IsPlayerCompanion) { targets.Add(troopRosterElement.Character); } } int excludeIndex = targets.IndexOf(hero.CharacterObject); List <int> canAddIndexs = RandomUtils.RandomNumbers(maxNumber, 0, targets.Count(), new List <int>() { excludeIndex }); int index = 0; targets.ForEach((obj) => { Hero spouse = obj.HeroObject; if (canAddIndexs.Contains(index)) { addPlayerLineToSelectSpouse(spouse); } index++; }); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_SPOUSE_ITEM, "sue_clan_create_from_family_take_spouse", "sue_clan_create_from_family_take_spouse_change", GameTexts.FindText("sue_clan_create_from_family_choice_spouse_item_change", null).ToString(), null, new ConversationSentence.OnConsequenceDelegate(() => { GenerateDataForCreateClan(); }), 100, null); CampaignGameStarter.AddDialogLine(FLAG_CLAN_CREATE_CHOICE_SPOUSE_ITEM, "sue_clan_create_from_family_take_spouse_change", "sue_clan_create_from_family_take_spouse", GameTexts.FindText("sue_clan_create_from_family_choice_spouse_item_change_tip", null).ToString(), null, null, 100, null); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_SPOUSE_ITEM, "sue_clan_create_from_family_take_spouse", "sue_clan_create_from_family_request_money", GameTexts.FindText("sue_clan_create_from_family_need_spouse_not", null).ToString(), null, null, 100, null); CampaignGameStarter.AddRepeatablePlayerLine(FLAG_CLAN_CREATE_CHOICE_SPOUSE_ITEM, "sue_clan_create_from_family_take_spouse", "close_window", GameTexts.FindText("sue_clan_create_from_family_of_forget", null).ToString(), null, new ConversationSentence.OnConsequenceDelegate(() => { }), 100, null); } }
private void OnSessionLaunched(CampaignGameStarter gameStarter) { Campaign.Current.ConversationManager.ConsequenceRunned += OnConsequenceRunnedEvent; lord_propose_marriage_to_clan_leader_options = Campaign.Current.ConversationManager.GetStateIndex("lord_propose_marriage_to_clan_leader_options"); lord_propose_marriage_to_clan_leader_response = Campaign.Current.ConversationManager.GetStateIndex("lord_propose_marriage_to_clan_leader_response"); lord_propose_marriage_to_clan_leader_response_self = Campaign.Current.ConversationManager.GetStateIndex("lord_propose_marriage_to_clan_leader_response_self"); lord_start_courtship_response = Campaign.Current.ConversationManager.GetStateIndex("lord_start_courtship_response"); lord_propose_marriage_to_clan_leader_response_other = Campaign.Current.ConversationManager.GetStateIndex("lord_propose_marriage_to_clan_leader_response_other"); lord_propose_marriage_to_clan_leader_confirm = Campaign.Current.ConversationManager.GetStateIndex("lord_propose_marriage_to_clan_leader_confirm"); lord_talk_speak_diplomacy_2 = Campaign.Current.ConversationManager.GetStateIndex("lord_talk_speak_diplomacy_2"); gameStarter.AddDialogLine("zendzee_lord_refuses_barter", "lord_propose_marriage_to_clan_leader", "lord_start", "{=3L8xN9uC}I believe it hasn't been long since we've last bartered.", ConditionRefuseBarterDueCoolDown, null, 200, null); }
public void AddPrisonerLines(CampaignGameStarter campaignGameStarter) { campaignGameStarter.AddDialogLine("CELordDefeatedLord", "start", "CELordDefeatedLordAnswer", "{=pURE9lFV}{SURRENDER_OFFER}", ConversationCEEventLordCaptureOnCondition, null, 200, null); campaignGameStarter.AddPlayerLine("CELordDefeatedLordAnswerCapture", "CELordDefeatedLordAnswer", "defeat_lord_answer_1", "{=g5G8AJ5n}You are my prisoner now.", null, null, 100, null, null); campaignGameStarter.AddPlayerLine("CELordDefeatedLordAnswerRelease", "CELordDefeatedLordAnswer", "defeat_lord_answer_2", "{=vHKkVkAF}You have fought well. You are free to go.", null, new ConversationSentence.OnConsequenceDelegate(LCELordDefeatedLordAnswerReleaseOnConsequence), 100, null, null); campaignGameStarter.AddPlayerLine("CELordDefeatedLordAnswerStrip", "CELordDefeatedLordAnswer", "LordDefeatedCaptureCEModAnswer", "{=CEEVENTS1107}Time to strip you of your belongings.", null, ConversationCEEventLordCaptureOnConsequence); campaignGameStarter.AddPlayerLine("LordDefeatedCaptureCEMod", "defeated_lord_answer", "LordDefeatedCaptureCEModAnswer", "{=CEEVENTS1107}Time to strip you of your belongings.", null, ConversationCEEventLordCaptureOnConsequence); campaignGameStarter.AddDialogLine("LordDefeatedReturn", "LordDefeatedCaptureCEModAnswer", "close_window", "{=!}{RESPONSE_STRING}", ConversationCEEventResponseInPartyOnCondition, null); campaignGameStarter.AddDialogLine("start_wanderer_unmet_party", "start", "prisoner_recruit_start_player", "{=!}{RESPONSE_STRING}", ConversationConditionTalkToPrisonerInParty, null, 120); campaignGameStarter.AddDialogLine("start_wanderer_unmet_party", "lord_introduction", "prisoner_recruit_start_player", "{=!}{RESPONSE_STRING}", ConversationConditionTalkToPrisonerInParty, null, 120); campaignGameStarter.AddDialogLine("start_wanderer_unmet_cell", "start", "CEPrisonerInCell", "{=!}{RESPONSE_STRING}", ConversationConditionTalkToPrisonerInCell, null, 120); campaignGameStarter.AddDialogLine("start_wanderer_unmet_cell", "lord_introduction", "CEPrisonerInCell", "{=!}{RESPONSE_STRING}", ConversationConditionTalkToPrisonerInCell, null, 120); campaignGameStarter.AddPlayerLine("PrisonerPrisonerInParty_01", "CEPrisonerInParty", "PrisonerPrisonerInPartyResponse", "{=CEEVENTS1108}Time to have some fun.", null, ConversationCEEventInPartyOnConsequence); campaignGameStarter.AddPlayerLine("PrisonerPrisonerInParty_02", "CEPrisonerInParty", "close_window", "{=CEEVENTS1051}Nevermind.", null, null); campaignGameStarter.AddPlayerLine("PrisonerPrisonerInParty", "prisoner_recruit_start_player", "PrisonerPrisonerInPartyResponse", "{=CEEVENTS1108}Time to have some fun.", null, ConversationCEEventInPartyOnConsequence); campaignGameStarter.AddDialogLine("PrisonerPrisonerInPartyResponseChat", "PrisonerPrisonerInPartyResponse", "close_window", "{=!}{RESPONSE_STRING}", ConversationCEEventResponseInPartyOnCondition, null); campaignGameStarter.AddPlayerLine("CEPrisonerInCell_01", "CEPrisonerInCell", "CEPrisonerInCell_01_response", "{=CEEVENTS1052}You are coming with me.", null, null); if (CESettings.Instance.ProstitutionControl) { campaignGameStarter.AddPlayerLine("CEPrisonerInCell_02", "CEPrisonerInCell", "CEPrisonerInCell_02_response", "{=CEBROTHEL0979}Time to make you work at the brothel.", null, null, 100, ConversationCEEventBrothelOnCondition); } campaignGameStarter.AddDialogLine("CEPrisonerInCell_01_r", "CEPrisonerInCell_01_response", "close_window", "{=!}{RESPONSE_STRING}", ConversationCEEventResponseInPartyOnCondition, ConversationCEEventInCellOnConsequence); campaignGameStarter.AddDialogLine("CEPrisonerInCell_02_r", "CEPrisonerInCell_02_response", "close_window", "{=!}{RESPONSE_STRING}", ConversationCEEventResponseInPartyOnCondition, ConversationCEEventBrothelOnConsequence); campaignGameStarter.AddPlayerLine("CEPrisonerInCell_02", "CEPrisonerInCell", "close_window", "{=CEEVENTS1051}Nevermind.", null, null); }
private void OnSessionLaunched(CampaignGameStarter starter) { starter.AddPlayerLine(MinorFactionTroopRecruitmentQuery.Id, MinorFactionTroopRecruitmentQuery.entry, MinorFactionTroopRecruitmentQuery.next, MinorFactionTroopRecruitmentQuery.message.ToString(), () => Hero.OneToOneConversationHero.IsMinorFactionHero, null); // Main Flow starter.AddDialogLine(MinorFactionTroopRecruitmentResponsePositive.Id, MinorFactionTroopRecruitmentResponsePositive.entry, MinorFactionTroopRecruitmentResponsePositive.next, MinorFactionTroopRecruitmentResponsePositive.message.ToString(), RecruitmentCondition, null); starter.AddPlayerLine(MinorFactionTroopRecruitmentAgreement.Id, MinorFactionTroopRecruitmentAgreement.entry, MinorFactionTroopRecruitmentAgreement.next, MinorFactionTroopRecruitmentAgreement.message.ToString(), null, null); starter.AddDialogLine(MinorFactionTroopRecruitmentResponseSuccess.Id, MinorFactionTroopRecruitmentResponseSuccess.entry, MinorFactionTroopRecruitmentResponseSuccess.next, MinorFactionTroopRecruitmentResponseSuccess.message.ToString(), null, RecruitmentConsequence); // Player Cancel Flow starter.AddPlayerLine(MinorFactionTroopRecruitmentDecline.Id, MinorFactionTroopRecruitmentDecline.entry, MinorFactionTroopRecruitmentDecline.next, MinorFactionTroopRecruitmentDecline.message.ToString(), null, null); // Negative Flows starter.AddDialogLine(MinorFactionTroopRecruitmentResponseNegativeRenown.Id, MinorFactionTroopRecruitmentResponseNegativeRenown.entry, MinorFactionTroopRecruitmentResponseNegativeRenown.next, MinorFactionTroopRecruitmentResponseNegativeRenown.message.ToString(), LacksRenown, null); starter.AddDialogLine(MinorFactionTroopRecruitmentResponseNegativeRelation.Id, MinorFactionTroopRecruitmentResponseNegativeRelation.entry, MinorFactionTroopRecruitmentResponseNegativeRelation.next, MinorFactionTroopRecruitmentResponseNegativeRelation.message.ToString(), LacksRelationship, null); starter.AddDialogLine(MinorFactionTroopRecruitmentResponseNegativeAlreadyRecruited.Id, MinorFactionTroopRecruitmentResponseNegativeAlreadyRecruited.entry, MinorFactionTroopRecruitmentResponseNegativeAlreadyRecruited.next, MinorFactionTroopRecruitmentResponseNegativeAlreadyRecruited.message.ToString(), HasRecruits, LowerRelationConsequence); starter.AddDialogLine(MinorFactionTroopRecruitmentResponseNegativeNoMoney.Id, MinorFactionTroopRecruitmentResponseNegativeNoMoney.entry, MinorFactionTroopRecruitmentResponseNegativeNoMoney.next, MinorFactionTroopRecruitmentResponseNegativeNoMoney.message.ToString(), LacksMoney, null); }
private static bool Prefix(ArenaMaster __instance, CampaignGameStarter campaignGameStarter) { campaignGameStarter.AddDialogLine("mwax_arena_entered_from_menu", "start", "mwax_arena_weapons_list", "{=mwax_arena_2}Alright, which weapon are you taking?", new ConversationSentence.OnConditionDelegate(MWAXArenaMasterDialoguePatch.MWAX_conversation_choose_weapon_condition), (ConversationSentence.OnConsequenceDelegate)null, 100, (ConversationSentence.OnClickableConditionDelegate)null); return(true); }
private void OnSessionLaunched(CampaignGameStarter starter) { currStarter = starter; InformationManager.DisplayMessage(new InformationMessage("MoreSpouses OnSessionLaunched")); //修正过去BUG 导致 英雄状态还是囚犯状态 starter.AddPlayerLine("conversation_prisoner_chat_start", "start", "close_window", LoactionText("sue_more_spouses_female_spouses_status_prisoner_become_active"), new ConversationSentence.OnConditionDelegate(isSpouseAndPrisoner), new ConversationSentence.OnConsequenceDelegate(changeSpousePrisonerStatusToActive), 100, null, null); //campaignGameStarter.AddDialogLine("conversation_prisoner_chat_fix", "female_prisoner_fix_status", "", GameTexts.FindText("sue_more_spouses_thanks", null).ToString(), new ConversationSentence.OnConditionDelegate(isSpouseAndPrisoner), new ConversationSentence.OnConsequenceDelegate(changeSpousePrisonerStatusToActive), 1000, null); //同伴开始 starter.AddPlayerLine("conversation_prisoner_chat_player", "hero_main_options", "sue_more_spouses_companion_become_spouse", LoactionText("sue_more_spouses_companion_become_spouse"), Condition(IsPlayerCompanionAndCanBecomeSpouse), null, 100, null, null); starter.AddDialogLine("sue_more_spouses_companion_choice_result", "sue_more_spouses_companion_become_spouse", "sue_more_spouses_companion_become_spouse_accept", LoactionText("sue_more_spouses_companion_become_spouse_accept"), null, Result(() => { Hero target = Hero.OneToOneConversationHero; HeroRlationOperation.ChangeCompanionToSpouse(target); }), 100, null); //囚禁事件的 starter.AddPlayerLine("sms_tavernmaid_chat_player", "cprostitute_talk_00_response", "sue_more_spouses_tavernmaid_start", LoactionText("sue_more_spouses_npc_becomes_spouse"), Condition(IsNormalNPC), null, 100, null, null); starter.AddPlayerLine("sms_tavernmaid_chat_player", "cprostitute_talk_02_response", "sue_more_spouses_tavernmaid_start", LoactionText("sue_more_spouses_npc_becomes_spouse"), Condition(IsNormalNPC), null, 100, null, null); starter.AddPlayerLine("sms_tavernmaid_chat_player", "cprostitute_talk_01_response", "sue_more_spouses_tavernmaid_start", LoactionText("sue_more_spouses_npc_becomes_spouse"), Condition(IsNormalNPC), null, 100, null, null); starter.AddPlayerLine("sms_tavernmaid_chat_player", "tcustomer_00", "sue_more_spouses_tavernmaid_start", LoactionText("sue_more_spouses_npc_becomes_spouse"), Condition(IsNormalNPC), null, 100, null, null); starter.AddPlayerLine("sms_tavernmaid_chat_player", "ccustomer_00", "sue_more_spouses_tavernmaid_start", LoactionText("sue_more_spouses_npc_becomes_spouse"), Condition(IsNormalNPC), null, 100, null, null); //城镇和农村 人员 starter.AddPlayerLine("sms_tavernmaid_chat_player", "town_or_village_player", "sue_more_spouses_tavernmaid_start", LoactionText("sue_more_spouses_npc_becomes_spouse"), Condition(IsNormalNPC), null, 100, null, null); //酒馆女仆 starter.AddPlayerLine("sms_tavernmaid_chat_player", "tavernmaid_talk", "sue_more_spouses_tavernmaid_start", LoactionText("sue_more_spouses_npc_becomes_spouse"), Condition(IsNormalNPC), null, 100, null, null); starter.AddDialogLine("sms_tavernmaid_ask_what", "sue_more_spouses_tavernmaid_start", "sms_tavernmaid_ask_what", LoactionText("sms_tavernmaid_ask_what"), null, null, 100, null); starter.AddPlayerLine("sms_tavernmaid_ask_what_result", "sms_tavernmaid_ask_what", "sms_tavernmaid_accept_result", LoactionText("sue_more_spouses_prisoner_punish_lord_become_spouse"), Condition(IsNormalNPC), Result(() => { CharacterObject character = CharacterObject.OneToOneConversationCharacter; if (null != character) { HeroRlationOperation.NPCToSouse(character, currStarter); } }), 100, null, null); starter.AddPlayerLine("sms_tavernmaid_ask_what_result", "sms_tavernmaid_ask_what", "sms_tavernmaid_accept_result", LoactionText("sue_more_spouses_prisoner_punish_lord_become_wanderer_companion"), Condition(IsNormalNPC), Result(() => { CharacterObject character = CharacterObject.OneToOneConversationCharacter; if (null != character) { // ConversationManager manager = ConversationUtils.GetConversationManager(currStarter); HeroRlationOperation.NPCToCompanion(character, currStarter); } }), 100, null, null); starter.AddRepeatablePlayerLine("sms_tavernmaid_ask_what_result", "sms_tavernmaid_ask_what", "close_window", GameTexts.FindText("sue_more_spouses_prisoner_punish_cancel", null).ToString(), null, null, 100, null); starter.AddDialogLine("sms_tavernmaid_accept_result", "sms_tavernmaid_accept_result", "sue_more_spouses_companion_become_spouse_accept", LoactionText("sms_tavernmaid_accept_result"), null, null, 100, null); //囚犯开始 starter.AddPlayerLine("conversation_prisoner_chat_player", "prisoner_recruit_start_player", "sue_more_spouses_prisoner_punish_start", LoactionText("sue_more_spouses_prisoner_punish_start"), Condition(IsPrisioner), null, 100, null, null); starter.AddDialogLine("sue_more_spouses_prisoner_beg_for_mercy", "sue_more_spouses_prisoner_punish_start", "sue_more_spouses_prisoner_beg_for_mercy", LoactionText("sue_more_spouses_prisoner_beg_for_mercy"), null, null, 100, null); starter.AddPlayerLine("sue_more_spouses_prisoner_punish_lord_become_spouse", "sue_more_spouses_prisoner_beg_for_mercy", "sue_more_spouses_prisoner_punish_result", LoactionText("sue_more_spouses_prisoner_punish_lord_become_spouse"), Condition(IsLord), Result(() => { ChangePrisonerLordToSpouse(); }), 100, null, null); starter.AddPlayerLine("sue_more_spouses_prisoner_punish_lord_become_wanderer_companion", "sue_more_spouses_prisoner_beg_for_mercy", "sue_more_spouses_prisoner_punish_result", LoactionText("sue_more_spouses_prisoner_punish_lord_become_wanderer_companion"), Condition(IsLord), Result(() => { ChangePrisonerLordToFamily(); }), 100, null, null); starter.AddRepeatablePlayerLine("sue_more_spouses_prisoner_punish_cancel", "sue_more_spouses_prisoner_beg_for_mercy", "close_window", GameTexts.FindText("sue_more_spouses_prisoner_punish_cancel", null).ToString(), null, null, 100, null); starter.AddDialogLine("sue_more_spouses_prisoner_punish_result", "sue_more_spouses_prisoner_punish_result", "sue_more_spouses_companion_become_spouse_accept", LoactionText("sue_more_spouses_prisoner_punish_accept"), null, null, 100, null); // starter.AddPlayerLine("sue_more_spouses_female_companion_become_spouse", "sue_more_spouses_female_companion_become_spouse", "female_prisoner_choice_accept", LoactionText("sue_more_spouses_punish_start"), null, null, 100, null, null); // campaignGameStarter.AddPlayerLine("conversation_prisoner_chat_player", "prisoner_recruit_start_player", "female_prisoner_choice", GameTexts.FindText("sue_more_spouses_female_prisoner_become_spouse_ask", null).ToString(), new ConversationSentence.OnConditionDelegate(isSuitableFemale), new ConversationSentence.OnConsequenceDelegate(ConversationResult), 100, null, null); //campaignGameStarter.AddPlayerLine("conversation_prisoner_chat_player", "hero_main_options", "female_prisoner_choice", GameTexts.FindText("sue_more_spouses_female_prisoner_become_spouse_ask", null).ToString(), new ConversationSentence.OnConditionDelegate(isSuitableFemale), new ConversationSentence.OnConsequenceDelegate(ConversationResult), 1000, null, null); //starter.AddDialogLine("female_prisoner_choice_result", "female_prisoner_choice", "female_prisoner_choice_refuse", GameTexts.FindText("sue_more_spouses_female_prisoner_become_spouse_result_refuse", null).ToString(), new ConversationSentence.OnConditionDelegate(() => this.acceptFlag != 1), null, 100, null); }
protected void AddDialogs(CampaignGameStarter starter) { starter.AddPlayerLine("ml_mercfaction_question_start", "lord_talk_ask_something_2", "ml_mercfaction_ask_for_men", "{ML_PLAYER_ASK_MERCS}", delegate { return(this.ml_ask_for_men_condition()); }, null, 150, null, null); starter.AddDialogLine("ml_mercfaction_response_to_player", "ml_mercfaction_ask_for_men", "ml_mercfaction_player_consider_payment", "{ML_MERCENARY_LORD_RESPONSE}", delegate { bool keyPresent = false; if (_mlLastRecruitedFromMercPartyTime.ContainsKey(Hero.OneToOneConversationHero.StringId)) { keyPresent = true; if (_mlLastRecruitedFromMercPartyTime[Hero.OneToOneConversationHero.StringId].ElapsedDaysUntilNow > 14) { _mlLastRecruitedFromMercPartyTime.Remove(Hero.OneToOneConversationHero.StringId); keyPresent = false; } } return(this.ml_lord_response_to_player_condition(keyPresent)); }, null, 100, null); starter.AddPlayerLine("ml_player_buy_small_group", "ml_mercfaction_player_consider_payment", "ml_player_buy_group", "{=ml.purchase.mercdetachment.sml}I'd like a group of {SM_TROOP_NUM} recruits and {SM_OFF_NUM} officers ({SM_GOLD_AMOUNT}{GOLD_ICON})", delegate { bool keyPresent = true; if (!_mlLastRecruitedFromMercPartyTime.ContainsKey(Hero.OneToOneConversationHero.StringId)) { keyPresent = false; } return(this.ml_player_purchase_small_group_condition(keyPresent)); }, delegate { if (!_mlLastRecruitedFromMercPartyTime.ContainsKey(Hero.OneToOneConversationHero.StringId)) { _mlLastRecruitedFromMercPartyTime.Add(Hero.OneToOneConversationHero.StringId, CampaignTime.Now); } this.ml_player_purchase_small_group_consequence(); }, 100, null, null); starter.AddPlayerLine("ml_player_buy_med_group", "ml_mercfaction_player_consider_payment", "ml_player_buy_group", "{=ml.purchase.mercdetachment.mdm}I'd like a group of {MD_TROOP_NUM} recruits and {MD_OFF_NUM} officers ({MD_GOLD_AMOUNT}{GOLD_ICON})", delegate { bool keyPresent = true; if (!_mlLastRecruitedFromMercPartyTime.ContainsKey(Hero.OneToOneConversationHero.StringId)) { keyPresent = false; } return(this.ml_player_purchase_med_group_condition(keyPresent)); }, delegate { if (!_mlLastRecruitedFromMercPartyTime.ContainsKey(Hero.OneToOneConversationHero.StringId)) { _mlLastRecruitedFromMercPartyTime.Add(Hero.OneToOneConversationHero.StringId, CampaignTime.Now); } this.ml_player_purchase_medium_group_consequence(); }, 100, null, null); starter.AddPlayerLine("ml_player_leave_buy_menu", "ml_mercfaction_player_consider_payment", "ml_player_leave_buy_tok", "{ML_EXIT_PLAYER_BUY_COMMENT}", delegate { bool keyPresent = true; if (!_mlLastRecruitedFromMercPartyTime.ContainsKey(Hero.OneToOneConversationHero.StringId)) { keyPresent = false; } return(ml_player_leave_purchase_condition(keyPresent)); }, null, 100, null, null); starter.AddDialogLine("ml_mercfaction_player_bought", "ml_player_buy_group", "hero_main_options", "Very well, it's all arranged. They'll be joining you shortly. Now... was there anything else?", delegate { return(true); }, null, 100, null); starter.AddDialogLine("ml_mercfaction_player_didnt_buy", "ml_player_leave_buy_tok", "hero_main_options", "Well alright then. Was there anything else?", delegate { return(true); }, null, 100, null); }
public override void CompileToken(CampaignGameStarter campaign) { _context.AdditionalConsequence = Consequence; campaign.AddDialogLine(TokenName, InputToken?.TokenName + "_barter", TokenName + "_result", "" + Expressions?.Tag, Condition, _context.Consequence); }
private static void OnSessionLaunched(CampaignGameStarter campaignStarter) { campaignStarter.AddDialogLine("start_wanderer_unmet", "start", "zendzee_repopulate_prisoner0", "{=BaeqKlQ6}I am not allowed to talk with you.[rb:very_negative]", ConditionTalkToPrisonerInCell, null, 120, null); campaignStarter.AddDialogLine("start_wanderer_unmet", "lord_introduction", "zendzee_repopulate_prisoner0", "{=BaeqKlQ6}I am not allowed to talk with you.[rb:very_negative]", ConditionTalkToPrisonerInCell, null, 120, null); campaignStarter.AddPlayerLine("zendzee_repopulate_prisoner0_0", "zendzee_repopulate_prisoner0", "close_window", "{=zee427439A1}Go to my chambers.", null, ConsequenceGoToChambers, 100, null); campaignStarter.AddPlayerLine("zendzee_repopulate_prisoner0_1", "zendzee_repopulate_prisoner0", "close_window", "{=mdNRYlfS}Nevermind.", null, null, 100, null); campaignStarter.AddWaitGameMenu("zendzee_settlement_prisoner_wait", "{=zee2A38FB4E}{CAPTIVITY_TEXT}\nThe guards dragged you into the lord's rooms. You can only hope that they will not harm you.", new OnInitDelegate(settlement_wait_on_init), new OnConditionDelegate(args => true), null, new OnTickDelegate(wait_menu_settlement_wait_on_tick), GameMenu.MenuAndOptionType.WaitMenuHideProgressAndHoursOption, GameOverlays.MenuOverlayType.None, 0f, GameMenu.MenuFlags.none, null); campaignStarter.AddWaitGameMenu("zendzee_town_wait_menus", "{=zee56CA3AF1}You are waiting in {CURRENT_SETTLEMENT}.\nHaving fun with the prisoner.", null, new OnConditionDelegate(game_menu_town_wait_on_condition), null, null, GameMenu.MenuAndOptionType.WaitMenuHideProgressAndHoursOption, GameOverlays.MenuOverlayType.SettlementWithBoth, 0f, GameMenu.MenuFlags.none, null); campaignStarter.AddGameMenuOption("zendzee_town_wait_menus", "wait_leave", "{=UqDNAZqM}Stop waiting", new GameMenuOption.OnConditionDelegate(game_menu_stop_waiting_at_town_on_condition), delegate(MenuCallbackArgs args) { if (Hero.MainHero.CurrentSettlement.IsTown) { GameMenu.SwitchToMenu("town"); return; } if (Hero.MainHero.CurrentSettlement.IsCastle) { GameMenu.SwitchToMenu("castle"); } }, true, -1, false); }