Friday, January 13, 2012

Modding Puzzle Quest 2 - Quick Battle Monster List




The enemies available for Quick Battles in Puzzle Quest 2 depend on your character's level. As you level up, lower-level enemies drop off the list, probably because you don't earn much experience for it. However, you may actually want to do this to just harvest resources easily and not inflate your level (which causes enemies to level up in the campaign).
This post will brief you on how to change this.

General Modding
The basics of modding Puzzle Quest 2 is to unzip the Assets.zip file, change what you want, then zip it back up. The trick is in finding where to make the changes.

Monster List for Quick Battles
The game uses two separate lists, and omits certain special enemies, such as bosses you haven't encountered in the game (thus protecting you from SPOILERS). To simplify things and include the omissions, you can modify two files.

Part 1
First, look at ..\Assets\Scripts\Monsters\Monsters.lua and go to the end of the file to find function GetListOfMonsters(referenceHero, quickBattle).

It contains a big IF-ELSE-END block. You can just delete it (make a backup of this file first!) and replace it with...

for _, monster in ipairs(monsters) do
  local data = MONSTERS[monster]
  if data then
    table.insert(monsterCandidates, monster)
  end
end

What this does is force the script to just grab all the monsters in the file ..\Assets\Scripts\Monsters\MonstersList.lua, regardless of whether the creature is a boss and regardless of its level.

Part 2
After you have made the change and saved it, open ..\Assets\Scripts\Monsters\MonstersList.lua. Notice that some entries are commented out with a "--" in front of it. To make those entries valid again, remove the "--". Some entries like "Fire" CAN be put back, but it really makes no sense. You do not play the putting-out-a-fire challenge. Instead, it is treated as a creature. Looks harmless to do this, however.

No comments:

Post a Comment