"Baptism by Fire" Rant

Those were advices. You can do something or do it differently of course.

In my opinion training with Cpt. Bernard shouldn’t be done too much, since you better learn from mistakes against several enemies ; Bernard “only” teaches 1 vs 1.
Plus it’s a bit boring. He will never teach you mounted fight.

No you don’t. You can lure them one by one, or poison the food, or whistle, or sneak attack. Multiple choices.

After 10 hours of working on it, I finally found a solution!

You need to install 7-zip so you can edit a file in the game folder without unzipping a pak file.
Here is the solution that finally fixes this otherwise game-breaking bug:

  1. Open the folder named Data in the installation directory. ( KingdomComeDeliverance\Data )

  2. Make a backup copy of Scripts.pak on your desktop. (Just in case - so you don’t need to validate all your game files if you make a mistake).

  3. Right-click on the file Scripts.pak and use 7-zip to “open archive” (do not try to extract or unzip the pak file. Doing so will corrupt it and apparently add some unwanted metadata to it).

  4. In the 7-zip file browser, go to Scripts.pak\Libs\AI\quests\

  5. Select the file q_pribBattle.xml and press F4 - this lets you edit the file without extracting/unzipping it. (Do not attempt to make a backup of q_pribBattle.xml, as you cannot re-insert the backup back into Scripts.pak without corrupting it).

  6. Delete the following lines from the file and save your changes. (You will be asked again if you want to save the xml file inside Scripts.pak after you close the editor. Say Yes).

The code below must be deleted to stop the “Too many casualties” bug:

<IfCondition failOnCondition="&quot;false&quot;" condition="&quot;$questObjectiveUpdate.ObjectiveName == &apos;battleLost&apos; &amp; $questObjectiveUpdate.State == $enum:ObjectiveState.Started&quot;">
                        <SetQuestObjective quest="&quot;&quot;" objective="&quot;battleLost&quot;" function="&quot;CompleteObjective&quot;" />
                      </IfCondition>
                      <IfCondition failOnCondition="&quot;false&quot;" condition="&quot;$questObjectiveUpdate.ObjectiveName == &apos;gameOver&apos; &amp; $questObjectiveUpdate.State == $enum:ObjectiveState.Completed&quot;">
                        <Sequence>
                          <QuestObjectiveCondition quest="&quot;&quot;" objective="&quot;playerFled&quot;" function="&quot;IsObjectiveCompleted&quot;" failSubtMissing="&quot;false&quot;" saveVersion="2">
                            <Then canSkip="1">
                              <GameOver Reason="&quot;Q_IR_FledBattle&quot;" />
                            </Then>
                          </QuestObjectiveCondition>
                          <QuestObjectiveCondition quest="&quot;&quot;" objective="&quot;battleLost&quot;" function="&quot;IsObjectiveCompleted&quot;" failSubtMissing="&quot;false&quot;" saveVersion="2">
                            <Then canSkip="1">
                              <GameOver Reason="&quot;TooManyCausalties&quot;" />
                            </Then>
                          </QuestObjectiveCondition>
                          <QuestObjectiveCondition quest="&quot;&quot;" objective="&quot;killPlayer&quot;" function="&quot;IsObjectiveCompleted&quot;" failSubtMissing="&quot;false&quot;" saveVersion="2">
                            <Then canSkip="1">
                              <GameOver Reason="&quot;LostABattle&quot;" />
                            </Then>
                          </QuestObjectiveCondition>
                        </Sequence>
                      </IfCondition>

You can also see my solution here (listed under callsign FIREFLY): https://steamcommunity.com/app/379430/discussions/0/1777136225026409755/

I hope this will help everyone enjoy the game again. It took me all night to finally find this solution. And boy was I happy when I finally beat “Baptism of Fire”. Because nothing else worked for me. No trainer. No Mods. Not Cheat Engine. Not rewriting the reputation mods to grant negative reputation. Not spawning villagers into prebyslev to kill them to decrease reputation with the village. Nothing. Only the solution above.

Or simply do some training with bandits before continuing Baptism On Fire. You can plunder bandits without any regrets. Take everythingrthey have, sell what you don’t need. Find the bandit camps, so you can take them out one by one. Bandits from random encounters are much harder. There is a map here in the forum with nearly all static bandit camps. Those bandits will respawn after 7 till 14 ingame days. Maybe you have to unlock the chest to allow respawn. At the first bandit camp east of Rattay is a very hard locked chest. The bandits there did not respawn before i was able to unlock the chest

Let me explain. The game has a bug where some players with old save-files from earlier patches of the game cannot beat this mission due to a bug. The bug happens when players accidentally become allied with the non-existing villagers of pribyslav by killing off bandits during the recon mission before baptism of fire. I myself had a positive standing of 66 with pribyslav. So when the battle starts, the cuman and bandits are registered as allies by the game, and as soon as ten of them dies, it gives the player a game over due to “too many friendly casualties”. This happens even if your own team has zero casualties.

This means that some players will get a game over every time they kill the first wave of bandits. And the only solution that does not end with a game over, is if you use cheats to enable you to knock out the bandits with your fists, since unconcious bandits do not count as casualties for your team.

So please stop telling people to level up further. I tried cheating and punching out 20 bandits before my men killed enough “friendly” bandits to cause a game over.

Also, the devs cannot solve the issue, but they have created 3 add-on scripts for the battle, depending on your game version, and if you look inside the xml file, you will see the devs even make the player invisible to the enemy (yes, you can run straight up to the bandits and punch them in their face, they still won’t attack the player). Unfortunately the devs never figured out what is causing the game to give you a game over when “Too many friendly (bandits) have died”. I figure it could be caused by a single faction ID from the script being mixed up, so bandit casualties count towards friendly casualties, but whatever the case is, my solution is the only solution that fixes the bug. I fear the developer who wrote the original battle script may not be working at Warhorse studio, or he would certainly have fixed the bug by now.

Captain flies away.

1 Like

Also, I can send you my savefile if you want to see the bug in action.

Hi, you seem knowledgeable about the scripting part. Is there a way to increase the numbers of troops that are spawned in? I finally got a decent pc and would like to greatly increace the battle size, especially of the final battles. I’ve done it with the ambushes, maybe too much so I cant fight my way into skalitz due to too many enemies

Sorry. It took me all of 10 hours just to find the right pak and quest file. Every time I thought I had found the right line, I had to start over. (That’s why I ended up deleting all 3 Game Over condition and both lines with “battleLost”. Otherwise I probably only needed to edit a single condition to fix the bug, instead of deleting the Game Over conditions.

Okay, I can think of one way to add more soldiers to battles. You could copy-paste existing soldiers from the xml file and let them spawn at the same coordinates as the originals. The game’s collission-boxes should then force them apart automatically.

The following code specifies the type and nicknames of some of the squads in the battle:

<SuppressFailure>
                <Sequence>
                  <Expression expressions="'$t_category = ´main´,'" />
                  <IncludeTree File="'quests/q_pribBattle.xml'" Name="'battle_indexedGraphSearch'" nodeLabel="60535784" />
                  <VarOperation varName="'t_output'" targetVarName="'cumanMainSquads'" operation="'Copy'" argument="''" />
                </Sequence>
              </SuppressFailure>
              <SuppressFailure>
                <Sequence>
                  <Expression expressions="'$t_category = ´heavy´,'" />
                  <IncludeTree File="'quests/q_pribBattle.xml'" Name="'battle_indexedGraphSearch'" nodeLabel="76940015" />
                  <VarOperation varName="'t_output'" targetVarName="'cumanHeavySquads'" operation="'Copy'" argument="''" />
                </Sequence>
              </SuppressFailure>
              <SuppressFailure>
                <Sequence>
                  <Expression expressions="'$t_category = ´bow´,'" />
                  <IncludeTree File="'quests/q_pribBattle.xml'" Name="'battle_indexedGraphSearch'" nodeLabel="76569998" />
                  <VarOperation varName="'t_output'" targetVarName="'cumanBowSquads'" operation="'Copy'" argument="''" />
                </Sequence>
              </SuppressFailure>
              <SuppressFailure>
                <Sequence>
                  <Expression expressions="'$t_category = ´leader´,'" />
                  <IncludeTree File="'quests/q_pribBattle.xml'" Name="'battle_indexedGraphSearch'" nodeLabel="86508295" />
                  <VarOperation varName="'t_output'" targetVarName="'cumanLeaderSquads'" operation="'Copy'" argument="''" />
                </Sequence>
              </SuppressFailure>

This code says that ‘main’ is the nickname for “CumanMainSquads” and ‘bow’ is the nickname for cumanBowSquads.
The file (q_pribBattle.xml) contains lots of these ‘nicknames’ - Like ‘shield’ for ‘soldierShieldSquads’, etc.

The problem now is: How to increase the amount of soldiers in a battle? Well I did find the code I think is responsible for spawning soldiers (soldiers is a nickname for one of the allied squads in the battle). Do notice that there is a reference to the units nickname, followed by a bunch of coordinates. This is probably the start location of each ‘soldier’ in the battle):

<Sequence editorPosX="730" editorPosY="4180" isCollapsed="0" hasInputBreakpoint="0" comment="soldiers" breakpointFlags="0">
                <OutputBreakpoints />
                <Expression editorPosX="890" editorPosY="4180" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                  <OutputBreakpoints />
                </Expression>
                <SuppressFailure editorPosX="890" editorPosY="4260" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                  <OutputBreakpoints />
                  <Sequence editorPosX="1050" editorPosY="4260" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                    <OutputBreakpoints />
                    <Expression editorPosX="1190" editorPosY="4260" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </Expression>
                    <IncludeTree editorPosX="1190" editorPosY="4370" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </IncludeTree>
                    <VarOperation editorPosX="1190" editorPosY="4470" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </VarOperation>
                  </Sequence>
                </SuppressFailure>
                <SuppressFailure editorPosX="890" editorPosY="4580" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                  <OutputBreakpoints />
                  <Sequence editorPosX="1050" editorPosY="4580" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                    <OutputBreakpoints />
                    <Expression editorPosX="1190" editorPosY="4580" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </Expression>
                    <IncludeTree editorPosX="1190" editorPosY="4690" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </IncludeTree>
                    <VarOperation editorPosX="1190" editorPosY="4790" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </VarOperation>
                  </Sequence>
                </SuppressFailure>
                <SuppressFailure editorPosX="890" editorPosY="4890" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                  <OutputBreakpoints />
                  <Sequence editorPosX="1060" editorPosY="4890" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                    <OutputBreakpoints />
                    <Expression editorPosX="1190" editorPosY="4890" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </Expression>
                    <IncludeTree editorPosX="1190" editorPosY="5000" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </IncludeTree>
                    <VarOperation editorPosX="1190" editorPosY="5100" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </VarOperation>
                  </Sequence>
                </SuppressFailure>
                <SuppressFailure editorPosX="890" editorPosY="5200" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                  <OutputBreakpoints />
                  <Sequence editorPosX="1060" editorPosY="5200" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                    <OutputBreakpoints />
                    <Expression editorPosX="1190" editorPosY="5200" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </Expression>
                    <IncludeTree editorPosX="1190" editorPosY="5310" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </IncludeTree>
                    <VarOperation editorPosX="1190" editorPosY="5410" isCollapsed="0" hasInputBreakpoint="0" comment="" breakpointFlags="0">
                      <OutputBreakpoints />
                    </VarOperation>
                  </Sequence>

Notice that the first line mentions ‘soldiers’. Try and copy-paste the entire code block and see if the game now spawns twice the amount of soldiers.

Unfortunately you would have to manually guess which xml files contain the battles you want to ‘spice up’. Then you would have to locate the that spawns soldiers. So good luck and let me know if you try it out.

What an amazing answer. I’ll check it out