Friday 2 November 2012

Witcher 2 - Using CEO with Armour Texture Mods

Complete Equipment Overhaul (CEO for short) is a mod by Kindo that has balancing tweaks to every piece of equipment in The Witcher 2. It's a very popular mod, with good reason, but as it touches so many files, there can be compatibility issues if you also want to use other mods at the same time.

So this is how to use CEO at the same time as armour texture mods. I'm using my Hoodless Armours as the example, but the same technique should be possible with other mods.

For a simple texture mod, it'll take less than 5 minutes to make the change, not counting download time.

At the end of it, you'll have a combined mod. This is expected to be for your personal use and should not be published at mod sites without permission both from Kindo and from whoever made the second mod.

Step 1 - Work out what you need to change


The changes for my Hoodless Armours are listed below, but if you're using this with other mods, you'll need to find out what the modder changed in the xml file. This might be listed in the mod description at The Nexus, or in the readme, or you can ask the modder, or you can use software like ExamDiff to compare the two files.

Step 2 - Install the mods


If you already have the mods installed, and are using the unpacked version of CEO, you can skip this part, but it's important that CEO is installed after you install the texture mod. If you're not sure, reinstall CEO to be certain.
  1. Install the texture mod. 
  2. Install CEO - unpacked, which is listed under the MISCELLANEOUS section of the files list. CEO is available at http://witcher.nexusmods.com/mods/89

Step 3 - Make the Change

  1. Go to CookedPC/items and find the file def_item_armor.xml 
  2. Make a backup copy in case you make a mistake later
  3. Open def_item_armor.xml by right-clicking on the file and selecting Edit. If Windows doesn't know what software to use to edit xml files, tell it to use Notepad or Notepad+.
  4. Use the search function (Ctrl-F) to find the line that needs to be changed. For my Hoodless Armours, this will be:
    • Hoodless Elven Jacket - search for Elven Armor 
    • Hoodless Kayran Carapace - search for Tentadrake Armor 
    • Hoodless Kinslayer - search for DarkDifficultyArmorA3 
    • Hoodless Blue Stripes - search for Roche Commando Jacket 
  5. In the line that you find when searching, there'll be something that says equip_template="Name of the template". Change the bit inside the quotation marks to whatever is needed for the texture mod.
    • Hoodless Elven Jacket - change it to equip_template="08_kaedwenian_jacket"
    • Hoodless Kayran Carapace - change it to equip_template="18_quilted_leather"
    • Hoodless Kinslayer (Thyssen Version) - change it to equip_template="19_thyssen_leather"
    • Hoodless Kinslayer (Tir Na Lia Version) - change it to equip_template="26_tir_armor"
    • Hoodless Blue Stripes - change it to equip_template="23_kaedwenian_armor
  6. Save the file.

That's all you need to do. If for some reason it doesn't work, just revert back to the copy and try again.

Tuesday 23 October 2012

Witcher 2 Texture Swaps


Introduction


This is a quick guide for anyone who wants to swap the texture of one item of Geralt's clothing (armour, boots, trousers, gauntlets) for another. This is something you would do if you like the visual appearance of one item, but for some reason you're equipped with another. (Maybe because you prefer the stats, or because the nice-looking item isn't available to you). So if, for example, you like the look of Thyssen armour, but want to use the stats of Vran, this will give you a Vran armour that looks like Thyssen. I'll use this particular change as the example in the instructions below.

The base instructions work for everything except the original DLC items (Blue-Stripes Armour, Herbalist Gloves, Mage Pants). They're a little more complicated because the game stores the data in a different way, so there's separate instructions for changing them to look like something else. The base method works for the later DLC, such as the Dark Mode items.

Edit: If you're also using Kindo's CEO mod, you can use the standard method for changing the original DLC files too, as Kindo merged the data into the main files.

TW2 has a folder called CookedPC. This is in your main program directory where the game itself is and is NOT the one where the gamesaves are. The folder should already exist - if you don't know where it is, do a search.

Sometimes the files get changed when the game version is updated. You will need to re-do the mod on the latest version of the files when that happens.

Texture swap mods are made to xml files. These are stored in the CookedPC folder either as the xml files themselves, or in a compressed format (dzip). When the game loads, it only unpacks the dzip files if the xml isn't there, so a mod will usually be in xml format. To remove a mod, you just need to remove the xml file, and the game will go back to using the original dzip version.

If you're using other mods that change the same files, you can probably keep them both going. Just make the change to the modded xml file instead of to the vanilla version. But if you're using a complex mod that is in dzip format, your texture mod will override it, so you may get strange things happening. I'm NOT covering how to deal with this, so don't ask.

Getting the XML files - The Easy Way


If you just want to do a quick mod and don't want to get into modding, the easiest way to get the xml files you need is from an existing mod. Find a mod at a site such as The Nexus that changes items in the same category (armor, pants, whatever) and is for the same game version, and download that to use as your base file. (Blatant self-promotion - use the "Extras" files from my Santa Witcher mod, without installing the base mod itself)

Download the files and put them somewhere while you work on them.

Getting the XML files - The Full Set


Use this if you can't find the xml files you need, or if you're planning to do a lot of mods, or if you're planning to change the DLC mods, or any other reason why you prefer to start with a clean set. This involves extracting the files from the game, and takes time and a fair amount of space if you do the full set. But you only have to do it once for each version of the game.

You'll need either the Gibbed RED tools or QuickBMS to do the extraction from the main data files (pack(0).dzip). I'd recommend QuickBMS as it's the easier to use, There are instructions on how to get it, and how to use it at the Gog forums. Warning: Do NOT extract to your program folder. The total set of files extracted can be huge.

Making the Change


1. Find the xml file you want to change. If you used QuickBMS, they'll be in the "items" folder with names starting def_item
(Example: items/def_item_armour.xml)

2. Make a backup before you go any further.

3. Right-click on the file and select to edit it using Notepad (Do NOT left-click as this will probably open it in the browser).

If you want to change your armour to look like Blue Stripes, you can skip the next three steps, because you won't find it. The equipment template value for Blue Stripes is"30_dlc_roche_armor" and the belt value is "belt_5".
Now jump straight to #7.


4. Each item in the category starts with the tag <item name=, so search for this to try to find the one that matches your desired item, i.e. the one that you want it to look like. So for my example where I want to change Vran to look like Thyssen, I'll be looking for Thyssen. Most of the time, you'll be able to work it out from the description, but there are some cryptic ones (for example, "Tentadrake" is actually "Kayran Carapace"). You can also try searching for the in-game name, but this doesn't always work.
(Example: <item name="Thyssen Armor")

5. When you find the destination item, find the value for equip_template and copy what's inside the quotes
(Example: copy 19_thyssen_leather)

6. If you're changing armour, I recommend you also take note of the value for the belt, which will a couple of lines lower down in tags, such as <item>belt_4</item>. You'll probably want to change this too so that it matches the armour. If you're changing a sword, look for the scabbard value (e.g. <item>scabbard_silver</item>) and take a note of that too.

7. Find the item that's actually equipped, the same way, then paste over the equip_template value.
(Example: paste over the top of 31_vran_armor)

8. For armour and swords, replace the text for the belt or scabbard with the one you took note of a couple of minutes earlier.

9. Save the file.

10. Copy it into the CookedPC/items folder in your main program directory. You may need to create the items folder if it doesn't already exist.

11. Play and enjoy.

Replacing the DLC textures


This applies only to the Blue Stripes Armour, Herbalist Gloves and Mage Pants, as these aren't in the def_item files. For the Dark Mode items, the method described above works.

1. Use the QuickBMS method to extract the content of the DLC file you want to change. The dzip file is
roche_jacket.dzip for Blue Stripes Armour
alchemy_suit.dzip for Herbalist Gloves
magical_suit.dzip for Mage Pants

2. Follow steps 1-6 from "Making the Change" to get the name of your desired armour (for example, if you want to change Blue Stripes to look like Raven, you'll be picking up "16_ravens_leather")

3. Edit the dlc file by right-clicking on the extracted xml file and using notepad.

4. Change the equip_template value to match. If you're changing the armour, change the belt value too.

5. Save the modified xml file.

6. Copy to the correct location. You'll almost certainly need to create the subfolders (CookedPC will already exist)
Armour - CookedPC/game/dlc/roche_jacket/roche_jacket.xml
Gloves - CookedPC/game/dlc/alchemy_suit/def_herbalist_gloves.xml
Pants - CookedPC/game/dlc/magical_suit/def_item_unique_pants.xml

Again, to uninstall just remove the file from CookedPC.

What you can't do


You can use this method to make a "Normal" item look like its Dark Mode equivalent, but you can't use it to get the full Dark Mode stats in an Easy/Normal/Hard/Insane mode. The game engine recognises the Dark Mode items as such and will still unequip them if you're in the wrong mode, regardless of what they look like.

In theory, you can use this method to make a sword look like a secondary weapon, such as a pickaxe or the succubus staff, but they're still carried in scabbards so you may not like the results. Most of the secondary weapons are in items/geralt/geralt_secondary_wepons (no, that's not a typo)

The hard-to-find names


Blue Stripes - 30_dlc_roche_armor and belt_5 (Doesn't appear in the file)

Kayran Carapace Armor - 17_tentadrake_leather and belt_2 (Called tentadrake in the file)

Hunter's Amor - 10_shiadhal_jacket and belt_3 (Called "Unique Jacket 1" in the file)

The Dark Mode items all have names like Dark Difficulty Armor A1 (i.e. Dark Mode for Chapter 1)

Witcher 2 Choices and Consequences

Do NOT read any further unless you've already played the game at least twice, and have taken both paths.
You have been warned.


This list only includes choices where you see the consequences only later in the game, so the many decisions that you make within individual quests, that affect only the current quest, are excluded. Quests where you may expect a later consequence, but there is none, are also included.


Vizima

(choices from the first game that affect the second)

Adda - Kill or Cure
  • May affect the endings (only for Roche Path/Rescue Anais)
  • Changes dialogues at La Valette, Pontar Valley and Loc Muinne regarding the succession in Temeria
Thaler vs De Wett

If you defended Thaler, you receive a gift from him in Flotsam (NB: This is bugged - you receive the gift with an imported game regardless of your decision)

Order, Scoia'tel or Witcher's Path
  • Minor dialogue changes in Vergen
  • If you supported the Order, you get easier access to Loc Muinne on your arrival there, don't need to fight the knights after rescuing Anais, have a single meeting with the Order's armourer and a possibility to trade, and have some conversations with Siegfried.
  • If you supported the Scoia'tel, you get money from Vivaldi's Bank in Vergen
  • An encounter with an Order Knight in the Kaedweni camp has different outcomes depending on the path you took.

La Valette Castle

Your Response to Newboy

The quest Melitele's Heart is available in Flotsam only if you get the talisman from Newboy. To get the talisman, you must either
  • Ask for details, then advise the Reavers that the talisman is cursed, or
  • Tell them that you're unsure, then, when you meet Newboy after the prison escape, make sure you're seen and loot it from his body after the fight.
Defend the Peasants at La Valette

If you defend them and choose not to ask for any reward, you receive one later in Flotsam from their relatives.

Kill Aryan or persuade him to surrender
  • Changes in the gameplay for the Prison Escape - either Aryan, or his mother and Shilard, assist you to leave.
  • If Aryan is alive, he sets fire to La Valette Castle as you leave. It's unclear how much damage is done.
  • Changes the dialogue with Radovid in Loc Muinne (Roche Path). The precise details of how and why the children left La Valette Castle and what happened to them afterwards is different. However, it's not clear on whether there really is any difference, or if Radovid has been fed false information by the Nilfgaardians.
  • If Aryan is alive, you have a conversation with him in Loc Muinne
  • Possible impact in future games/expansions, as this is defined as a "major decision". Aryan is known to oppose the Nilfgaardians. His mother feels the same way, but is forced into cutting a deal with them in order to protect her younger children.

Flotsam

Return Iorveth's sword to him, or knock him out

If you give him his sword:
  • There is an anti-nonhuman riot in Flotsam on your return.
  • The quest for the start of the Iorveth Path is given by Iorveth, and is "Capture the prison barge".
  • You have an option to go to the aid of the nonhumans during the riot. If you do so, and take Iorveth Path, you will get a reward later in Vergen.
If you knock him out:
  • Roche takes Iorveth prisoner, and Flotsam is celebrating on your return.
  • The quest for the start of the Iorveth Path is given by Zoltan, and is "Free Iorveth from the prison barge, and capture the barge".
  • The minor quest "Margot's Disappearance" becomes available.
The choice also changes the conversation you have with Iorveth in Vergen if you take the Roche path but opt to go to Iorveth's assistance.

At a Crossroads

Your decision here totally changes the quests for the rest of the storyline in Flotsam, everything in the Pontar Valley (including your location), your entry into Loc Muinne and the Rescue quest, and your allies and companions throughout the game. It also has major impact on the possible endings, and is the most significant choice made in the game. Other consequences are:
  • On Iorveth Path, Loredo may live or die, depending on a later decision. On Roche Path, he will always die.
  • On Iorveth Path, Dethmold will be executed by Saskia at the end of the Battle for Vergen. On Roche Path, he will live or die, depending on later decisions.
  • On Iorveth Path, Philippa will be blinded by Radovid. On Roche path, we hear that he captured her, but have no other information.
  • Anais may only be rescued on Roche Path. 
  • Saskia may only be cured on Iorveth Path. On Roche Path, you never find out the truth about her identity.
  • Your opponent in A Score to Settle will be different, although the outcome will be the same.
The Eternal Battle is the same for both paths, and the Triss rescue is almost the same, except for the start of the quest.

Free the Elven Women or Kill Loredo (Iorveth Path only)
  • Changes the gameplay for the rest of the chapter
  • Quest reward in Vergen if you free the Elven Women

Vergen (Iorveth Path)

Let the peasants kill Stennis, or insist on a trial
  • If he's alive, you have an additional quest when you cross the mist, to get blood from Henselt. If he's dead, you get the blood from his corpse.
  • Major decision with impact on the endings
Investigate Baltimore's Disappearance

The "Suspect: Thorak" quest becomes available only if you complete the investigation into Baltimore's disappearance before investigating Stennis.

Kaedweni Camp (Roche Path)

Give the Manuscript to Dethmold, or keep it

If you keep the manuscript, the quest "From a Bygone Era" will be available in Loc Muinne.

Allow Roche to kill Henselt, or talk him out of it
  • Changes the dialogue in the rest of the storyline in Vergen.
  • Major decision with impact on the endings
Go to Iorveth's assistance, or don't
  • No subsequent impact

Loc Muinne

Rescue Anais, Philippa or Triss
  • Major decision with impact on the endings, and on Roche or Iorveth's future.
  • Rescuing Anais will result in Dethmold's death. Otherwise, he will survive on Roche Path.
  • Rescuing Triss will result in Shilard and Renuald's deaths.
  • Rescuing Philippa will result in Saskia being cured. Otherwise, she will be either spellbound or dead, depending on your later decision.
  • Changes the encounters you have between your return to Loc Muinne after the dragon fight and your meeting with Letho.
  • If you don't rescue Triss, Letho will.
Persuade Roche to hand Anais to Natalis, or keep silent (Roche Path, Rescue Anais only)
  • Impact on the endings and Roche's future.
Kill Sile or let her escape
  • Change the dialogue with Letho, otherwise no impact
Kill the dragon or walk away
  • On Iorveth Path, killing Saskia makes the state of the Pontar Valley unclear.
  • Changes the dialogue with Iorveth, Roche or Triss on your return to Loc Muinne
Kill Letho or let him live
  • No subsequent impact


Witcher 2 Endings

Do NOT read any further unless you've already played the game at least twice, and have taken both paths.
You have been warned.


What is an "ending"?

In these notes, I'm defining an "ending" as the end-state of the Northern Kingdoms and the Council of Mages. The end-state of each is due, directly or indirectly, to the decisions you make for Geralt in the game. These decisions also affect the end-state of Iorveth and Roche, but I don't consider the state of other NPCs such as Loredo, Shilard, Sile or Letho as being especially important, nor do I include choices that are fully resolved within the game, such as whether or not you return Iorveth's sword.

In most cases, the endings are based on the status of the kingdoms as described by the participants at the Loc Muinne Peace Summit, or just before it takes place, but in some cases, later events mean that the situation can't be the same any more, but we don't get a further update.

When someone in the game says "This is what will happen to Country X", it doesn't mean that it's cast in stone. Kings don't always tell the truth, events at the end of the summit change the situation, and Nilfgaard is about to launch an attack on the North, which will change everything.

All endings leave Geralt and Triss in the same state. Geralt will have recovered most of his memories, and will apparently be planning to find Yennefer and solve the mystery of the Wild Hunt. Triss will be accompanying him. Even if Iorveth or Roche is with Geralt as he leaves Loc Muinne, he's not expected to accompany the Witcher for long, as each has plans of his own.

The Sixteen Endings

CDR themselves claimed that there were sixteen endings to the game. The endings were later confirmed to reflect four major choices in the game, which ties in fairly well with the "political differences" definition:
  • Whether you kill Aryan or persuade him to surrender at La Valette Castle
  • Which path you take in Flotsam (Iorveth or Roche)
  • Whether or not you allow the killing of a king or prince to take place in your presence
  • Whether you rescue Triss or the other prisoner in Loc Muinne
Your choice with Aryan La Valette only affects events within the prologue itself, and some minor dialogue changes in Loc Muinne. Given his political importance (and the fact that CDR included this in their list), it's possible that this decision will have an impact in future games/expansion packs, but for now I'm excluding it as it doesn't impact on Temeria's end-state within the game itself.

So that means we now have eight endings, instead of sixteen. However, your Loc Muinne decision on who to rescue has more than two branches.

On the Roche path, if you rescue Anais, you get a second decision point on whether to hand her over to Radovid or Natalis. If you choose Radovid, the result will also be dependent on a decision you made way back in Vizima, if you imported a savegame from The Witcher, as Radovid's plans for Anais will depend on whether or not Adda is alive. (If you don't import, the game will assume Adda is dead).

On the Iorveth path, if you rescue Triss, your final choice regarding Saskia will also clearly have consequences on the political status, although this isn't addressed within the game itself.

So the endings are based on the following decisions:

Roche Path

  • Henselt Alive or Henselt Dead (2 branches)
  • Rescue Anais and hand her over to Natalis, or to Radovid with Adda alive (import only), or to Radovid with Adda dead, or rescue Triss (4 branches with an import, 3 branches without)
Total: 8 endings (6 if you're not importing)

Iorveth Path

  • Stennis Alive or Stennis Dead (2 branches)
  • Rescue Philippa, rescue Triss and kill Saskia, or rescue Triss and let Saskia live (3 branches)
Total: 6 endings

So the final count is fourteen endings if you're importing a savegame, twelve if you're starting from scratch.

Temeria

Your decision regarding Anais has the biggest impact. If you don't rescue Anais, the state of Temeria will depend on whether or not Henselt is alive.

  • If Anais is with Natalis, the kingdom remains intact, with Anais as the intended Queen and Natalis as regent.
  • If Anais is with Radovid, he will take control of Temeria in her name, but the kingdom will remain intact and he will promise to reinstate Anais when she's of age. If Adda is dead, he will declare his intention to marry Anais later and unite the two kingdoms.
  • If you choose the Roche path, allow him to kill Henselt, and rescue Triss instead of Anais, Temeria will remain in a state of internal conflict, with the barons vying for power and no monarch. Anais will be in hiding with Roche, so may return in the future.
  • If you stop Roche from killing Henselt and then rescue Triss, or if you take the Iorveth Path, Radovid and Henselt will join forces to take over Temeria and partition it between them.

Pontar Valley

The most important factor is who wins the battle for Vergen, which depends on whether you take Roche or Iorveth Path. This is then varied by whether or not the intended ruler survives.

  • On Iorveth Path, Saskia wins the battle, and should become Queen. 
    • If you rescue Philippa, you'll cure Saskia. 
    • If you rescue Triss and let Saskia live, she'll presumably still become Queen but will be spellbound by Philippa. 
    • If you rescue Triss and kill Saskia, the status of the Pontar Valley is unknown - it's still free, but has no clear leader.
  • On Roche Path, Henselt wins the battle and should become King. If you allow Roche to kill Henselt, the future of the Pontar Valley is unknown.

Aedirn

This is determined by whether or not Stennis and Henselt survive.

  • On Iorveth Path, if you prevent Stennis from being killed, he'll escape and be crowned King of Aedirn. If you allow his death, Aedirn will be in a state of internal conflict, with no monarch.
  • On Roche Path, Stennis dies when the mist first appears outside Vergen. If Henselt survives, the Aedirnians will submit to him as their king after his victory at Vergen. Otherwise, Aedirn still has no king.

Kaedwen

This is dependent only on whether or not Henselt survives. If he does, he will continue to rule Kaedwen. If he dies, Kaedwen will have no king. Henselt will always survive on Iorveth Path. On Roche Path, it depends on your decision when Roche wants to kill him.

The Council of Mages

This is dependent only on your decision on who to rescue in Loc Muinne. If you choose Triss, she will be the one to denounce the Lodge, and the Council will still be formed. If you choose Anais or Philippa, the Nilfgaardians and Letho will denounce the Lodge with a distorted story, the Council will not be formed, and there may be a pogrom against mages and sorceresses.

Roche

If you take the Iorveth path, you only get an update if you rescue Triss, but it's probably the same either way. Roche will still be working to protect Temeria.

On Roche path, if you rescue Anais, Roche will go into service with whoever has custody, to protect her in the future. If you rescue Triss, he will rescue Anais himself, but will fail to kill Dethmold, who then denounces Roche as a criminal. Roche will be an outlaw.

Iorveth

If you take the Roche path, again, you only get an update if you rescue Triss. Iorveth will be Public Enemy #1, still free, but with everyone searching for him.

On Iorveth Path, if you rescue Philippa, Iorveth will return to Vergen with Saskia to build his life as a free elf. If you rescue Triss, he will go for the dagger on his own, and succeed but be badly injured. Triss takes him to safety at Vergen, but it's unclear what will happen next.