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

Users who are viewing this thread


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,
}).Variation(new object[]
"We are at war against" + FACTION + ", those bastards will get what's coming for them",
}).Variation(new object[]
"I suppose you are refering to our conflict with ." + Kingdom.toString(),

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