Tools forum


Post your suggestions, ideas, comments on the tool's forum!

Visit Tools forum

 
 
Callum NPC
 
 
 
 

Modding Section / Editors and Tools / Variable Checker

Variable Checker

Author: Vlasák
Description: Variable checker
Current version: 1.4 beta
Status: RELEASED
Get the source code HERE.


Overview

This tool was originally developed for the testing and debugging purposes of BG2 add-on CZ TC - Dalelands: Nemesis of the Black Knight. However, I've decided to put it public because it can be useful for other modders/players.

I know that other tools such as DLTCEP or Near Infinity can manage all the stuff what Variable checker does. But none of these tools can do it in compact, direct and fast way as Variable Checker does - it was the reason why I've developed it, for fast and comfortable check and edit all game variables. I hope that I've managed to fulfill that goal with this piece of my work.


Features

Variable checker can load and edit all game variables from saved games of the following games: BG2, IWD1, PST and BG1: TotSC. It can handle variables from .gam file (GLOBAL variables and LOCALS variables of characters stored in .gam - mostly the characters that are/can be in party) and .sav file (AREA variables and LOCALS variables of NPCs).

Variable checker remembers the last opened save game, so you have fast and direct access to your testing save game position.

Opened files are immediately saved with .bak extension after their loading in Variable Checker. If any problems occur (corrupting the files or just undesired changing of values), you will have the possibility to restore original files.

The area NPCs have displayed their "Actor's Name" as is in IESDP called the 32-byte character array on the offset 0x0 of each actor in actor's section in .are file. It seems that in this array is really stored some "description" or "name" of the area actor - but in normal .are. In .are files stored in .sav it looks like the death variable of the actor is stored in this field. As we know, many creatures have set their death variable to NONE what is quite confusing for browsing. Because of that, I've implemented the possibility to switch NPC list to the mode where are displayed actors' .cre resources - .cre resource explains the creature generally better than death variable. To switch the mod of displaying NPCs check the checkbox in Setting menu or just press ALT+C.

Variable checker can run a simple analysis of Global variables in saved game - there is a possibility to compare Globals of two saved games. You can run this feature from 'File->Compare files' menu or by ALT+R.


Installation

First of all, you have to have Java Runtime Environment (JRE) installed. It doesn't matter whether the latest 1.5 version or older 1.4.2 (or even 1.4.1 should work).
You can get JRE here: http://www.java.com/en/download/manual.jsp
If you are not sure whether you have JRE installed, you can test your PC for Java compatibility on the page mentioned above.

Then just extract varchecker.zip archive to desired directory (as you've probably already did ;) and keep the directory structure. No other actions are necessary.
Don't try to extract varchecker.jar file - yes, it is really archive but not designed to extracting, it is Java executable file and must remain compressed.

To run Variable checker, double-click to varchecker.jar file.