Yhilin battle guide

The Battle of Yhilin is a long sequence at the start of Chapter 3 in which Simon and his allies stage an armed takeover of the Kingdom of Yhilin, with the covert collaboration of its queen. This is the first phase of the long awaited Doomed King plan conceived at the end of Chapter 1. It's not possible to lose based on your command decisions, but it is possible to have bad outcomes, such as devastating sectors of Ari-Yhilina and losing access to the quests and resources located therein.

This page is a detailed guide to this part of the game. If you're looking for a guide that WILL NOT SPOIL any of the variables involved, you'll want to use this guide instead. It's just as professionally presented as this one, it just won't give away the mechanics.

''' MASSIVE SPOILERS FOLLOW! YOU'VE BEEN WARNED. '''

The outcome of the battle is determined directly through 3 variables: And indirectly through 3 more:
 * Victory Points
 * Chaos
 * Collateral Damage
 * Enemy Forces
 * Army Size
 * Army Quality

Many of your past decisions come into play as well. These are:
 * Suppliers: Eustrin Supplier, Special Supplier (AKA Gift to Megail), Yhilin Supplier.
 * Mine Processing.
 * Premium Steel (ONLY if funded in the first round of investments; if you fund at the reunion they won't have had time to shift production and will be no help.)
 * Rebel's Pass Bridge Repair (ONLY if funded in the first round of investments; if you fund at the reunion it won't be repaired in time for the battle, so no later "bridge checks" will count it as repaired.)
 * Mercenaries: Iron Cudgel, Dusty Horde, AriGarda, both if and when you paid them.
 * Simon's level.
 * House Jade Sabotage (we'll show how this is determined further down).
 * Mine resolution.
 * Orc Extermination pass/fail status.
 * New Unpeople motion pass/fail status.
 * Affection values: Aka, Janine, Megail, Carina, Yarra and Qum.
 * What, if anything, Robin researched aside from Aka's cure.
 * Impaler status.
 * Altina status.
 * Varia variant.

'''That gives you a general idea what you're managing. For detailed mechanics spoilers, read on.''' A piece of paper and a pen/pencil are recommended if you want to calculate optimal decisions for your game.

A gracious thanks to Augustus Commodus for his work mining the code for this information, and Decanter, who repeated the exercise in order to verify the results.

Setup
Before you talk to Janine and start the battle, make sure you've shifted your good equipment to Hilstara, Aka, Nalili, and (if you didn't repair the bridge) Yarra, because they'll be doing some combat and you won't have a chance to access the menu. You'll probably want DEF, MDF, and stun/poison protection (so use the proper Pins for them). Also give Varia something half-decent. You can strip everyone else because you want to see them naked they don't fight. You won't have a healer, so take that into account.

Also, don't forget to talk with Dari, to explain the Plan to her.

After you tell Janine it's time to start the battle, you'll witness Aka complete her transformation, along with an accompanying to her affection score. We haven't been able to see her score since we left to attend the Ardford Summit, but, because it directly determines the outcome of an event in the upcoming battle, it would be useful to know. The relevant information can be found either on Aka's page or in Decanter's excellent guide. One thing to note: While for many players, this affection increase may raise Aka's affection to 100 or more, this conversation does not serve to lock her affection at 100, meaning it may fall below 100 depending on the results of the battle. Speaking of which, let the battle begin.

At the beginning of the battle, the primary variables are set to 0, and Enemy Forces is set to 100, but there are set points during the battle where there are unavoidable increases to Chaos and Collateral Damage. Specifically a +1 for each during the first Ari-Relhana sequence, a +3 for each after the airship sequence, and a +5 for each immediately after the battle. Since there aren't any checks for either between now and then, let's go ahead and add them.

At Beginning of Battle (accounting for unavoidable changes):
 * Victory Points = 0
 * Chaos = 9
 * Collateral Damage = 9
 * Enemy Forces = 100

Obviously, this means there are target values that you may want to aim for. Being too low in Victory Points will raise Chaos and Collateral Damage, while being too high in Chaos and Collateral Damage will shut down parts of the city and cause separate flags to be flipped, such as "Societal Chaos" and "Economic Chaos." These are all covered in depth later, but here's the best possible outcome. You may want to keep this in mind when planning your calls.

Optimal Battle Outcome: Enemy Forces has an indirect effect, but there's no further benefit to lowering past 29, and it is never raised by more than 6 after setup, dependent on route. There is a +1 increase if you resolve the mine dispute in House Jade's favor. Furthermore, there is a +3 and a +5 increase for the Mixed and Clustered routes, respectively (see below). For the Widespread route, there is no change. Therefore, in a worst case scenario, Enemy Forces can be ignored afterward if lowered to 23.
 * Victory Points >= 10 (this will boost army quality)
 * Chaos < 5 (Janine is satisfied, various consequences avoided)
 * Collateral Damage < 5 (Janine is satisfied, various consequences avoided)

Good outcomes here raise affections of all girls. Different girls care about different variables, detailed later.

There is a single switch which is checked during outcome calculation but not mentioned until later in the aftermath:

If Trin copied Big Man You can see whom Trin copied by talking to her - also useful later for calculating House Jade sabotage.
 * Chaos -1
 * Collateral Damage -1

Before the battle some refactoring is done on your army. We'll detail it next, but you could just check with Orcent for your current numbers and skip to the next section. The two variables (Army Size and Army Quality) will be checked multiple times, so you'll want to keep track of them along with the others.

Army Recalculation
Alright, details. Check the army page to understand your initial situation, and then come back here to proceed!

First, for the purposes of the battle the game mostly only considers your nonhuman forces, so human mercenaries are removed from the total: You couldn't directly hire the AriGarda at the reunion, so that didn't affect your army in the first place.

Then some automatic boosts are given:
 * Army Size +10
 * Army Quality +3

And finally several changes based on past decisions, mostly good:

Those two variables (size and quality) will be checked multiple times, so try to keep track of them. If you're lost, don't worry; remember the above just tells you what you could've done differently. Talk to Orcent at Janine's Retreat, and he'll give you the current value for the start of the battle.

Anyway, save and go speak to Janine on 2F to begin the invasion!

Ari-Relhana 1
Some areas will be visited multiple times. We've numbered them individually for your convenience. The battle begins with a calculation to determine the results of your initial engagement:

Simon's level is checked to determine obedience among the orc troops:

Note the last one is not a mistake. Sierra Lee left a note in the code, paraphrased here: "If people are at such a low level, I don't want to give them too much of a disadvantage due to the hits they'll suffer from not having accomplished various things." Next, Simon is given the choice of how he'll help out:

Assist in the battle Enforce orc discipline Target enemy nobles Assault mage tower (only possible if Robin researched essence shielding)
 * Enemy Forces -5
 * IF Army Size + Army Quality &lt; 24 then Victory Points +1
 * Collateral Damage -1
 * IF Army Size + Army Quality &ge; 32 then Victory Points +1
 * Enemy Forces -2
 * IF Army Size + Army Quality &lt; 32 then Victory Points +1
 * Victory Points +1
 * Chaos -1
 * Collateral Damage -1
 * Enemy Forces -1

We now return to Hilstara and Orcent at the field command center.

Field Headquarters 1
We begin this section with Orcent being given a command of his own. Decide what he'll do with it.

Guard Ari-Yhilina Intercept Ari-Khan Attack Nobles
 * Victory Points +1
 * Chaos -1
 * Collateral Damage -1
 * Dependent on later choices but at least +1 Victory Points and at least -5 Enemy Forces
 * Victory Points +3
 * Chaos +1
 * Army Size -1

Now the paths diverge a bit, depending on whether the orc extermination motion passed or not, but in any case, you have a mandatory fight against the Redlight Mercenaries. The choices you are given depend on which scenario has been triggered:

Paths rejoin. It seems the enemy has launched an airship, and it's up to Aka to take it down:

Aka Affection = 100 Aka Affection 80-99 Aka Affection &lt; 80
 * Victory Points +2
 * Enemy Forces -5 (explained in the report as the airship falling onto them)
 * Victory Points +1
 * Chaos +1
 * Collateral Damage +1
 * Simon will forfeit his next choice of action, due to the airship demanding his time and attention.

This concludes events during the first Field HQ phase.

Ari-Relhana 2
We get news of Aka's Airship Assault, and Simon may have another opportunity to take action. If Aka failed, the following options are forfeited. Otherwise, take your pick:

Hit Main Army Lead Orcs Destroy Enemy Position
 * Enemy Forces -5
 * Victory Points +1
 * Collateral Damage -1
 * Enemy Forces -2
 * Victory Points +2
 * Chaos +1
 * Collateral Damage +1
 * Enemy Forces -2

At this point, background calculations are made, with related commentary. Note the "Jade Sabotage" variable—we'll take you through a quick summary so you can calculate your own value right now. All the clerks replaced with duplicates are worth 1 point, with Andrew (the scum clerk), the Kingsman clerk (he buys a portrait), and the head clerk (talk to Megail to find him at the bank) being worth an additional 1 (total 2) each. Regardless of how she was persuaded (talked to or copied) the halfling House Rose clerk is worth 1 point.


 * If resolved mine situation in House Jade's favor, no additional comment, but Enemy Forces +1
 * If in House Thelon's favor, no change.
 * If the rift amplification spell was used (slums solution), "House Adamant sent fewer troops than Janine predicted", Enemy Forces -5

Now there is another slight divergence:
 * If the bridge was repaired, Yarra sets up an ambush of the approaching forces, for Victory Points +1
 * If not, Yarra returns to the field command center, but can assist with an optional boss battle that is available either way.

Field Headquarters 3
Another problem arises: a group of mages too strong for your troops to handle, who turn out to be the Magekillers. If she wasn't busy with the ambush, Yarra rejoins you in time to assist, but the battle is not much different from before. You're offered a fairly obvious choice:

Stay here Fight them
 * Victory Points -1
 * Receive a Green Hat

Now things become very divergent depending on the spread of enemy forces. The spread, or "scatter", is determined like so:


 * Initial value: 0
 * If Bridge was not repaired in time: +1
 * If Orc Extermination passed: +1

Now you get to make a decision that affects the shape of the battle. You can either keep your current position, keeping the enemy distribution the same, or you can, depending on their current distribution, attempt to either scatter them more or group them together. This decision decides the course of the battle from here on out, so you may want to look ahead to find which path you prefer.

Events begin with background variable modifications due to the enemy disposition, and then it's time to party. Each scenario includes the healers' clearing being discovered, although the results of your choice here are different in each, and another subsequent, scenario-exclusive event. Army Size is checked for another background variable change, and then Enemy Forces are checked for differing results in each scenario.

Click the applicable link for your situation to jump there:
 * Widespread
 * Mixed
 * Clustered

Enemy Formation: Widespread
As mentioned above, the scenario begins with its own specific boosts:

Automatic
 * Victory Points +2
 * Chaos +2
 * Collateral Damage +2

And then moves into a check of whether Orcent was directed to intercept the Ari-Khan forces:

Orcent intercepting Ari-Khan
 * Victory Points +2
 * Enemy Forces -5

And if not, no change takes place. A short scene in a clearing depicts your healers (Carina and Qum!) being discovered. You'll need to choose what happens to the two, and all the injured with them:

Rescue party members Hold the position
 * Victory Points +1
 * Army Size +1
 * Victory Points -1
 * Army Size -1

In this scenario, rescuing your healers and letting the others die off is clearly superior. Next, the game will check on the status of the Impaler. If you killed him, there is no change, but, if he is still alive, he now arrives on the battlefield.

The Impaler joins the fray
 * Victory Points +1
 * Collateral Damage +1

The Supplier investments now come into play. Note that "Special Supplier" refers to the mystery investment offered by Megail immediately following her rescue.

We now move into the unique event for this path: "A large group of orcs has become isolated!" What to do? Your decision will depend on your own game, and there isn't quite an optimal choice to be had:

Trade-offs are definitely a recurring theme in this tale. That said, it's time for a check of your remaining army:

Now that the enemy has taken their licks, it's time to see what kind of mischief they managed.

At this point the scenarios converge again. Click to jump.

Enemy Formation: Mixed
As mentioned above, the scenario begins with its own specific boosts:

Automatic
 * Victory Points +1
 * Chaos +1
 * Collateral Damage +1
 * Enemy Forces +3

And then moves into a check of whether Orcent was directed to intercept the Ari-Khan forces:

Orcent intercepting Ari-Khan
 * Victory Points +1
 * Enemy Forces -5
 * Army Size +2

And if not, no change takes place. A short scene in a clearing depicts your healers (Carina and Qum!) being discovered. You'll need to choose what happens to the two, and all the injured with them:

Rescue party members Hold the position
 * Victory Points +1
 * Army Size +1

In this scenario, the choice is more of an actual choice. Still, unless that +1 Army Size increase results in crossing a threshold in the following Army Size check, it is probably better to take the Victory point. Next, the game will check on the status of the Impaler. If you killed him, there is no change, but, if he is still alive, he now arrives on the battlefield.

The Impaler joins the fray
 * Chaos -1
 * Collateral Damage +1

The Supplier investments now come into play. Note that "Special Supplier" refers to the mystery investment offered by Megail immediately following her rescue.

We now move into the unique event for this path: "The enemy has breached the walls of Ari-Relhana!" What to do? Your decision will depend on your own game, and there isn't quite an optimal choice to be had. To aid this choice, we've tabled the results:

Trade-offs are definitely a recurring theme in this tale. That said, it's time for a check of your remaining army:

Now that the enemy has taken their licks, it's time to see what kind of mischief they managed.

At this point the scenarios converge again. Click to jump.

Enemy Formation: Clustered
As mentioned above, the scenario begins with its own specific boosts:

Automatic
 * Chaos -1
 * Collateral Damage -1
 * Enemy Forces +5

And then moves into a check of whether Orcent was directed to intercept the Ari-Khan forces:

Orcent intercepting Ari-Khan
 * Victory Points +1
 * Enemy Forces -10

And if not, no change takes place. A short scene in a clearing depicts your healers (Carina and Qum!) being discovered. You'll need to choose what happens to the two, and all the injured with them:

Rescue party members Hold the position
 * Victory Points -1
 * Army Size -1
 * Victory Points +1
 * Army Size +1

In this scenario, holding the position instead of solely extracting your compatriots is clearly superior. Next, the game will check on the status of the Impaler. If you killed him, there is no change, but, if he is still alive, he now arrives on the battlefield.

The Impaler joins the fray
 * Victory Points +1
 * Chaos +1

The Supplier investments now come into play. Note that "Special Supplier" refers to the mystery investment offered by Megail immediately following her rescue.

We now move into the unique event for this path: "The enemy is attempting a pincer attack!" What to do? Your decision will depend on your own game, and there isn't quite an optimal choice to be had. To aid this choice, we've tabled the results:

Trade-offs are definitely a recurring theme in this tale. That said, it's time for a check of your remaining army:

Now that the enemy has taken their licks, it's time to see what kind of mischief they managed.

At this point the scenarios converge again. Click to jump.

Scenarios Converge
That ends the section of divergent scenario processing.

At this point an unavoidable loss is applied, Army Size -5

Now Simon wonders: "How much collateral damage did we cause?" The answer depends on army quality:

It may seem like the bulk of the fighting is done, but an emergency missive from Janine arrives: someone's attempting a coup in the middle of an invasion - how rude of them! The immediate repercussions depend upon your mercenary hiring practices.

Janine or Simon will broach the subject sending orcs into Ari-Yhilina itself, to fight the coup army because they're causing chaos and collateral damage in the attempt.

Keep orcs out:
 * Chaos +1
 * Collateral Damage +1

Send orcs into Ari-Yhilina The acceptance variable will come into play later; take note of it.
 * Outcome determined by Army Quality; see table:

Ari-Yhilina Elf Ghetto
Now the scene jumps to the elves in the slums of Ari-Yhilina. The way events unfold depend upon Altina's fate.

Kingsmen Bar
Now we take a look at Varia in the Kingsmen bar. The results vary depending on which Varia variant you have.

Dominated Varia
 * Chaos -1
 * Fight 5 weak enemies
 * Kingsmen Massacred

Reshaped Varia
 * Collateral Damage -1
 * Fight 1 weak enemy

She resolves the situation, and Simon and Yarra prepare to engage the orchestrator of the coup.

Hidden Stronghold
Nothing in this section has any effect on the variables of the battle—you simply succeed or it's game over.

When selecting your party, take heed of Simon's words. You will be able to take equipment off other party members, but not change your party. You will be fighting one successful and one failed Unperson at the end of this dungeon, and both are heavily powered-up. Yarra is mandatory despite this, but Qum is not recommended, and Nalili is only practical if she has stored SP and AGI to cast Sexual Aegis first thing. Carina is a great choice as a healer and for her MDF buff, plus she can remove Sexbind.

This is also a timed section. While it is possible to complete this section with the default settings, it is recommended, especially if you wish to do everything, to switch to Instant Text and turn off Battle Animations.

You begin in a locked storeroom. There's a Shining Sword in the chest, but it can't yet be accessed. Interacting with the grate to the south begins a 3 minute timer, as soon as the relevant conversation ends. Now if interacted with, the chest will begin a battle with 4 demons—Yarra can use Incubus King's Emissary to make short work of them, and you'll get the sword.

Proceed to the southwest room with 4 boxes at the corners. There are 2 knights (their battles include 2 enemies each) patrolling along the way. Each battle is worth 537 exp—but make sure to keep an eye on the clock. Loot each box except the northeast, and you'll find some Sx and a key. Heading east reveals a room with a crystal, 4 pentagrams, and no visible entrance. The second-southernmost wall tile is a hidden door, allowing you to go interact with the crystal. This shuts down the mastermind's teleportation network and prevents a later game-over.

Head northeast, and interact with the portrait. The key from the southeast room will open a passage. Following it stops the timer for a fight with the two aforementioned Unpeople. Everything plays out automatically from here, and this section of the battle ends.

Ari-Yhilina Outskirts
Also, Orcent will duel with another orc to keep control in a one-on-one battle. That is all. No changes take place.

Throne Room: Aftermath
It's time to see the fruits of our labors.

Here we are officially introduced to a new variable: Acceptance. You may have noticed it earlier if you chose to send orcs into Ari-Yhilina. As you may expect, it reflects how readily the Yhilini people accept life under the Doom King.

Another variable applies to just this segment: Janine Overall. It renders a small impact to Janine's affection stat.

There are many other hidden variables that will be included for the sake of completionism, but they may not have an impact for some time. Affection changes are many and will be covered in a separate table at the end of this guide. Acceptance starts at ten: Remember to factor in any acceptance changes that may have occurred if you sent your orcs into Ari-Yhilina.

Acceptance = 10

The scene begins when Janine briefly mentions surprise at the identity of the mastermind, and mentions a speech that was given offscreen. Outcome depends on how much she likes you:

Independent of Janine's own feelings, Simon will declare that she spoke well before Janine moves on to the topic of battle reports. Having more Victory Points than the sum of Chaos and Collateral Damage will provide affection bonuses further on. Victory points, Chaos, and Collateral Damage are each individually checked. Simon will speak first. This is the Victory Point check:

Janine will continue the report with the Chaos check. Note Janine's comment for two results is the same, but you can differentiate by whether she says the Merchant Quarter was shut down.

Janine will continue the report with the Collateral Damage check.

If you never gave money to the Iron Cudgel or AriGarda, for any reason, Janine says the Court is devastated. Otherwise it was saved.

Janine will mention whether you sent orcs into Ari-Yhilina, and if so report on whether it was a good idea after all. Mechanical details were covered earlier in this article, but a negative opinion means the Outskirts are devastated.

The Janine variable we've been tracking decides whether she has another affection rise based on her "overall feelings" about the battle.

If Janine Overall > 0
 * "Honestly, relieved. I expected everything to be so much worse..."
 * Janine Affection

And that concludes the battle review, but everyone else has feelings, too.

If Victory Points >= (Chaos + Collateral Damage)
 * Balia
 * Robin, "Despite the cost, I feel as though what we accomplished was worth it."
 * Dari, "Sounds like the battle went great overall!"
 * Esthera

After such a turbulent and emotionally draining upheaval, it's only right that you take a moment to reconnect with those you love. This results in a few more variable modifications, which are included in the table below. You are given a choice in this sequence, and all outcomes of that decision will be listed below.

Also, Yarra will gain +5 affection if sent to seduce.

You may have noticed the Victory Point modifications. While all the major calculations using Victory Points have passed, it seems they will still continue to represent your control of Yhilin and accomplishment of core goals, especially with regard to the nobility. Chaos and Collateral Damage will continue to matter as well, in more obvious ways, as you rebuild Yhilin.

Petitioners
After we've reconnected with everyone, it's time to deal with some petitioners. The number of petitioners you have depends on past actions. The House Adamant petitioner has variant dialogue if you used the slum mages to shut down the mine, but, either way, she makes no demands of your resources.

Some petitioners require military aid. There are consequences for overextending each group: If you lack the resources to meet the needs of all of the supplicants, it's better to overextend only one group rather than both.
 * By default, you have 1 human and 1 nonhuman detachment you can spend.
 * If you hired the Dusty Horde at any point, you'll have an additional human detachment.
 * If your Army Size is 20 or more, you have an additional detachment of nonhumans.
 * If nonhuman forces overextended, Acceptance -1
 * If humans overextended, Yhilin -1

If Bridge Is Repaired: Ardoheim Delegation Petitioner
 * Send a human escort


 * Available Humans -1
 * Acceptance +1
 * Send an orc escort


 * Available Nonhumans -1
 * Acceptance -1

If Dusty Horde Never Hired: Dusty Horde Petitioner
 * Send royal army


 * Available Humans -1
 * Send orcs


 * Available Nonhumans -1

If Jade Sabotage < 6: House Jade Petitioner
 * Send a human escort


 * Available Humans -1
 * Send an orc escort


 * Available Nonhumans -1

If AriGarda Not Serving House Rose: House Rose Petitioner
 * Available Orcs -1

If Orc Extermination Motion Failed:  Orcish Raiders Petitioner
 * Use humans


 * Available Humans -1
 * Use orcs


 * Available Nonhumans -1

House Thelon Petitioner
 * Refuse request


 * Acceptance -1
 * Send Qum


 * If Qum Affection &lt; 100


 * Collateral Damage -1
 * Acceptance -1
 * Head of House Thelon dies.
 * If Qum Affection = 100 but was whored in Stineford


 * Collateral Damage -1
 * Head of House Thelon dies.
 * If Qum Affection = 100 and was not whored in Stineford


 * Collateral Damage -1
 * Acceptance +2
 * Head of House Thelon lives.
 * Later, you gain a recruit for the Forging Ties quest. Also, that would help the crown during the war.
 * Send Carina


 * Collateral Damage -1
 * Head of House Thelon lives.
 * Later would help the crown during the war.

Slum Riots Petitioner
 * Send royal army


 * Available Humans -1
 * Send orcs


 * Available Nonhumans -1
 * Send succubi


 * Available Nonhumans -1
 * Acceptance +1

Talk to Janine again. Now it's time to listen to a few more reports and enjoy a couple of scenes with your intimate associates. Congratulations on winning the Battle of Yhilin.