BL Coding Creating a method that outputs the Name of a faction that is at war with me

Users who are viewing this thread

XDaron

Sergeant Knight
I am attempting to create a mod that adds more flavor dialog to the game, I wanted to create something similar to warband ''how goes the war dialog", where the lord would first say ''yes we are at war with (insert faction)", the only problem being I'm stupid and don't understand how to create a method that checks if a faction is at war with other factions, and outputs a string containing the factions name

here is some example of the code I used to create the dialog:

private void AddDialogs(CampaignGameStarter starter)
{

starter.AddPlayerLine("HowGoesTheWar", "lord_talk_speak_diplomacy_2", "HowGoesTheWar2", "How goes the war?", new ConversationSentence.OnConditionDelegate(this.conversation_player_has_question_on_condition), null, 101, null, null);
starter.AddDialogLineWithVariation("HowGoesTheWar2_Talk", "HowGoesTheWar2", "HowGoesTheWar3", null, null, 100, "", "", "", "", null).Variation(new object[]
{
"Yes, we are at war against." + FACTION,
"DefaultTag",
0
}).Variation(new object[]
{
"We are at war against" + FACTION + ", those bastards will get what's coming for them",
"ImpulsiveTag",
1
}).Variation(new object[]
{
"I suppose you are refering to our conflict with ." + Kingdom.toString(),
"CalculatingTag",
1,

}
now how can I replace FACTION with the actual name of the faction the person I'm having the conversation with is at war with?

I tried to find a preexisting method, like the one the game uses to display the kingdom wars in the diplomacy page, with little sucess


 
Last edited:
Top Bottom