# VPW Studio

## Program Manual

Version 0.0.0.36 (October 10th, 2024)
Program and Manual by freem
https://vpw.ajworld.net/
https://github.com/AKI-Club/VPWStudio

## Table of Contents

Sections in bold are considered important; don't skip them.

### Chapter 1: Introductory Material

1. Warning
2. Introduction
3. Requirements and Notes
4. Hacking Workflow
5. Main Interface
6. Program Options
7. Project Files
8. Which Game To Hack?
9. Common Data Formats
10. Texture and Palette Workflow
    1. Texture Sources
    2. Color Format
    3. Palette Formats
    4. Costume Color Changing
    5. Skin Color Changing
    6. Texture Layering
    7. AkiTexture Transparency Fix
    8. Font Workflow
11. Code, Data, and Pointers

### Chapter 2: Program Functionality

1. Arenas
2. Championships
3. Costume Items
4. Demo Matches
5. Entrances
6. File Table
   1. File Table Entry Information
   2. Viewers and Editors
      1. Hex Viewer
      2. CI4/CI8 Palettes
      3. CI4/CI8 Textures
      4. I4 Textures
      5. AkiTexture/"TEX"
      6. AkiText
      7. ModelTool2
      8. AnimTest
      9. Fonts
7. Game Introduction
8. Match Rulesets
9. Menus
10. Moves
11. Sound/Music
12. Stables
13. Story Mode
14. Weapons
15. Wrestlers
16. Tools
    1. Model Tool
    2. PNG Conversion
17. Danger Zone

### Chapter 3: "No, seriously, how do I..."

1. Edit Wrestler Movesets and Parameters
2. Prepare a Finished Project for Distribution
3. (something that isn't possible with this program)

### Chapter 4: Everything Else

1. External Tools
   1. VPW Studio Palette Conversion Tools
2. Credits

### Game-Specific Documentation

Though each game shares a similar design, the implementation, data structures, and other details can be different for each game.
(All game-specific sections are external (i.e. separate from the main manual).)

1. WCW vs. nWo: World Tour
2. Virtual Pro-Wrestling 64
3. WCW/nWo Revenge
4. WWF WrestleMania 2000
5. Virtual Pro-Wrestling 2
6. WWF No Mercy

### Appendices

1. Glossary
2. Program Formats (external section)
3. Common Data Format Details (external section)

### External Resources/Tutorials

- gmspectre's No Mercy CI4 Tutorial Part 1 and Part 2
- gmspectre's No Mercy Face Tutorial
- KWG's Menu Background Replacement Tutorial

Chapter 1: Introductory Material

## Warning

VPW Studio was primarily created for my own use. I have spent over two decades learning about the internals of these games, and a lot of this program assumes that you either know the necessary information, or you know where to get it.

I can't remember every single assumption made, either, which doesn't help matters. For example, palette and texture loading differs between World Tour/VPW64/Revenge and WM2K/VPW2/No Mercy. (In the latter three games, palettes are stored directly before CI4 and CI8 texture types, which can complicate file replacement.)

This program does NOT hold your hand, is not complete, and is not particularly user-friendly at this time. You have been warned.

### Base ROM Warning

VPW Studio is only intended to work with unmodified original base ROMs. While alternate base ROM support is available, I cannot fully guarantee support for it. There are various hardcoded assumptions in the program that will break when an unsupported base ROM is used.

- RetroRandy's WWF No Mercy Plus is not (yet) supported. Once a final version is available, support will be added, as this hack is meant to be used as a base for future projects.
- Virtual Pro-Wrestling 2 freem Edition is not supported, and will not be supported. However, some project materials may be released in the future.
- None of the other known AKI ROM hacks are supported.
- Support for prototypes/pre-release versions is read-only.

## Introduction

VPW Studio is a ROM hacking tool for the games in AKI Corporation's Virtual Pro-Wrestling series. The initial focus is on AKI's Nintendo 64 games, though support for the PlayStation 1 AKI wrestling games is planned for later. The primary inspiration for VPW Studio is the Goldeneye Setup Editor, which works directly on game data. This allows hacks to work on console, assuming you follow all of the internal "rules" of the game and the various (console and game-specific) data formats.

When work on this program began in 2018, the primary method of making changes to AKI's N64 wrestling games involved GameShark codes and emulator-only plugin-based texture replacements. Anyone who wanted to play projects using these methods on the original hardware could not fully do so. The replacement textures in these projects are often higher resolution than the originals and typically use more than 256 colors. Both of these attributes combine to make a situation that can't reasonably be handled with the N64's limited amount of texture RAM. GameShark codes pose their own problems, as you have to decide if you want to use a real GameShark, or rely on your flash cart's support for GameShark codes. It's possible to use GameShark hardware with the 64drive, for example, but you have to load the ROM over USB via a command line tool, and you still have to deal with the GameShark's finicky hardware, which can freeze the game if you look at it wrong or mess up when pressing the GS button. The stock Everdrive64 OS supports GameShark codes, but only a limited amount, and without any clear way to separate and label codes. (Perhaps a third party OS fixes this; I am not sure.) No matter what route you take, you'd be best served finding a way to import codes from a text file, as the amount of GameShark codes these projects typically have is in the thousands. That's not an exaggeration, either:

> Every attire [in AKI Evolution] requires anywhere between 842 and 1,043 lines of [GameShark] code[s].

> -Chuckiepk on twitter, September 4th, 2021

VPW Studio aims to make it easier to change the existing game data, reducing the need for GameShark codes that do the same thing. However, VPW Studio can't replace all the features of a GameShark, as it works on the ROM level, and doesn't interact with the game while it's running. This means you should not expect VPW Studio to let you create new match types or AI behavior, among other things. Another key point is the term "change", as adding new items to the game can require editing multiple sections, and is 99% likely to require various pointers to be rewritten to point to new locations. That's even before you account changing the game code to deal with file ID assumptions (e.g. the games assume that the animation file IDs lie in certain ranges), which are different per game, and not all the same, either. VPW Studio is not equipped to handle this situation, which is better handled by a full disassembly of the game(s).

Even with these limitations, it's possible to use VPW Studio (along with some other tools) to create a ROM hack of AKI's wrestling games on Nintendo 64 that will work on real hardware. In fact, VPW Studio largely owes its existence to the Virtual Pro-Wrestling 2 freem Edition hack, and vice versa.

### Supported Games

Currently, only the AKI wrestling games on the Nintendo 64 are supported:

Game Name | Supported Releases
--- | ---
WCW vs. nWo: World Tour | NTSC-U v1.0, NTSC-U v1.1, PAL
バーチャル・プロレス64 (Virtual Pro-Wrestling 64) | NTSC-J
WCW/nWo Revenge | NTSC-U, PAL
WWF WrestleMania 2000 (WWFレッスルマニア2000) | NTSC-U, NTSC-J, PAL
バーチャル・プロレス2 〜王道継承〜 (Virtual Pro-Wrestling 2) | NTSC-J
WWF No Mercy | NTSC-U v1.0, NTSC-U v1.1, PAL v1.0, PAL v1.1 Partial read-only support for prototypes/pre-releases: June 2000; July 19, 2000; August 2000; September 11, 2000

Note that not every game supports every portion of VPW Studio. Supported games are listed in the specific sections for each tool.

Support can only be guaranteed for the original unmodified ROMs. Attempting to use a different base ROM (e.g. S.K.'s VPW2 English Patch or RetroRandy's No Mercy Plus) is not officially supported. If you attempt to use them as a base ROM despite this warning, you do so at your own risk, and you will likely run into problems.

Nintendo 64 games are relatively easier to edit and rebuild, being a single ROM image. When it comes to hacking games on disc-based systems (e.g. PlayStation, GameCube, XBox), extra challenges are added (such as building a proper disc image so the game can run on real hardware).

Support for AKI's PS1 wrestling games (Virtual Pro-Wrestling and WCW vs. the World) is not the primary focus at the moment, but small steps are being taken towards supporting formats the PS1 games use. Adding proper support for hacking the PS1 games in VPW Studio would require a number of non-trivial UI changes, as well as Project File differences and various other under-the-hood details that need changing. "Full" PS1 game editing support support will rely on external tools, especially for video, music, and disc image creation.

Originally, support was also planned for the AKI-developed Def Jam games (primarily Def Jam Vendetta and Def Jam: Fight for NY) after adding support for the two PlayStation 1 games. As of August 2021, the Def Jam games are officially out of scope for VPW Studio. A new, purpose-built tool would be a better solution for the Def Jam games.

There will be no attempt to allow project building for prototype versions of the games. This may or may not change in the future.

## Requirements and Notes

In order to use VPW Studio, you'll need a few things.

### Requirements

- .NET Framework 4.7.2 or higher.
- Any of the above listed games in Z64 ROM format. No other N64 ROM formats are supported at this time. Please convert non-Z64 format ROMs with a tool, such as uCON64, Tool64 (instructions for Tool64), or Hack64's online Web Swapper.
  More information about N64 ROM formats can be found on n64dev.org.
- OpenGL 3.3 support (for ModelTool2 dialog and any other 3D-displaying stuff)
- An image editor that can create and edit paletted PNG images. (Ideally, one that allows for exporting palettes in JASC Paint Shop Pro format.)
- A hex editor, to do things that aren't (easily) possible in VPW Studio yet. Some recommended hex editors include:
  - HxD (Windows-only)
  - xwMEdit (cross-platform; supports EUC-JP and Shift-JIS encodings)
- A calculator that can work in hex and binary modes. Your operating system's calculator may fit the bill (guaranteed on Windows, though you might need to switch to Programmer view).
- Japanese IME/text entry, if you plan on editing Virtual Pro-Wrestling 64 or Virtual Pro-Wrestling 2.
- Patience. (This program is not yet complete, and has a long way to go.)

### Recommended Extra Tools

Aside from a hex editor, an image editor, and a hex-capable calculator, you'll probably want some other tools on hand.

- A Nintendo 64 emulator, for testing builds of your projects. An emulator with debugging tools is highly recommended, and currently required for some changes.
- A 3D modeler, for viewing models exported in Wavefront OBJ format. If you haven't already bought into a specific 3D editor ecosystem, Blender is free and supported on multiple platforms.
  - And if you decide to use Blender (v2.93), grab the `AkiModel` import/export plugins by Grix. Not sure if they work on Blender v3.0 or later.
- Texture64 by queueRAM – handles various Nintendo 64 texture formats.
- N64 Midi Tool and N64 Sound Tool, originally by SubDrag and Ice Mario. As the names suggest, these handle sequenced and streaming sounds.
- VPW Studio Palette Tools, for quickly converting and merging JASC PSP palette files to VPW Studio palette format. Binaries are included with VPW Studio in the "Tools" folder. They are command-line programs, so use the Command Prompt to launch them. Documentation for these tools can be found in the External Tools section of this manual.
- xdelta patch creation tool

### Notes

- This program is currently a GIANT work in progress. Many features are not implemented yet, various safeguards are not put in place, and so on.
- Since the program is a work in progress, any and all VPW Studio-originated file formats are subject to change. Don't get too attached to your projects.
- Knowledge of hexadecimal is assumed.
- Some general knowledge of at least one of the supported games is also assumed.
- This program has not been tested on non-Windows OSes. Your mileage may vary.
- Make sure to check the documentation of your emulator and/or flash cart for other important information.

### Technical Support (or lack thereof)

This program is provided as-is, with no warranties or technical support given.

The program is primarily the work of one person, and they do not have the capabilities to be both the primary developer and personal/private technical support (without detriment to development time and/or developer sanity).

The few times I have tried to offer private one-on-one technical support, I ended up getting angry at myself for not having enough patience to deal with people. Therefore, I (freem) can not offer private one-on-one technical support for VPW Studio. Please do not contact me directly for technical support. This includes, but is not limited to, e-mails and direct/private messages. Yes, I made the program, but that does not mean I have the time to solve everyone's problems, nor do I have the patience to walk everyone through every possible situation that could come up.

Since there is no "official" technical support channel, you will have to turn to the community. Though a large number of gaming communities have abandoned web forums as a communication/information source, the AKI hacking community has too much of a history with them ("HACKERS CLUB", "The No Mercy Zone", JamStubbs' archive, and many more) to just abandon them for the "fancy new thing". Or, to put it another way, Discord didn't exist back in 2000, and ezBoard was a decent enough free forum host, so we all just went with that. Fast forward two decades, and we're still primarily using forums, because information rot is a very real problem.

With all of that said, here are some forums where you can ask for VPW Studio technical support:

- GitHub Discussions
- Old Skool Reunion
- AKI Live
- VPW2 Dojo

Posting your problems and questions in a public place has a few benefits:

- Testers and other users of the program may have run into the same issue as you (and can possibly help solve it).
- People who have the same problem in the future can see your post, which hopefully by then, has a solution as well.

### "What about program bugs?"

Any bugs with the program should be reported on the GitHub Issues page. When filing a bug report, please make it a point to include the following information:

- The version of VPW Studio being used (found in Help → About VPW Studio).
- The game being edited, including region and revision information (important!! see also: region naming issues)
- What you're attempting to do (please provide as much detail as reasonably possible)
- What you expect to happen
- What actually happens

Also, if what you're trying to do worked in a previous version of VPW Studio, please note that, along with the last known version where it worked.

You may be asked to provide an example project (and files) if the problem can not be easily replicated by the development team. To prevent various issues on all ends, please make a new project demonstrating the issue, and submit that (along with any other relevant files) if requested. We do not want to be responsible for anyone's project being "leaked" via bug reports.

Note: If VPW Studio tells you something is currently unimplemented, that is not exactly a program bug. It's merely a reminder that the program is incomplete. There is no need to report these items on the Issues page, unless there is no "incomplete" message given when using them.

## Hacking Workflow

VPW Studio's usage conventions are largely dictated by external factors. Some of it is caused by VPW Studio being incomplete, while others are dictated by the game's internals.

If you are planning to make changes to elements that are not editable in VPW Studio, it is very important to understand the order of events when "Build ROM" is called:

1. Base ROM – The Base ROM is the original ROM that will be edited by VPW Studio. If you want your ROM changes to appear in the built/output ROM, you MUST make the changes in the Base ROM. Any changes made to the built/output ROM will disappear once you (re-)build the project in VPW Studio.
   You do not have to worry about the internal checksums of the Base ROM, as they are re-calculated at the end of the build process.
2. Non-Filetable Changes – Anything that appears before the Filetable and its contents gets changed first. This includes Wrestlers, Stables, Costumes, and so on.
3. Filetable Changes – Anything that involves the game's internal Filetable (which contains a lot of things you'll want to edit) happens next.
4. Fix-ups – Changing the Filetable will cause the data after the Filetable to be in unexpected positions. The fix-up phase does what you would expect from its name: fix up any values that reference them.
5. Checksums – N64 games have two internal checksums that need to be validated. This step is where the proper checksum values are calculated and placed in the built/output ROM.

The main takeaway from this section: If you're going to make changes that VPW Studio can't do (yet), make them in the Base ROM.

## Main Interface

The main form appears when you boot VPW Studio. Most of the functionality is disabled until a project file is opened or created, though there are a few tools that don't require a project.

## Program Options

VPW Studio has a small set of options, primarily targeted towards the building and playing process. Select Tools → Program Options to open the dialog.

### N64 Emulator

The "N64 Emulator" section of the Program Options dialog allows you to set up an N64 emulator to use for testing the changed ROM.

- Path – Path to the emulator executable file.
- Arguments – Any additional arguments to be passed to the emulator.

### Build

The "Build" portion of the Program Options dialog currently only contains an option to modify the verbosity of the build log. The default option is "Quiet" (as of Pre-Alpha Preview 18).

Setting the Build Log Verbosity to "Quiet" can significantly shorten build times, especially on older and/or slower computers. If you have used VPW Studio before Pre-Alpha Preview 18 (v0.0.0.18), it is highly recommended to change the Build Log Verbosity option to "Quiet".

## Project Files

VPW Studio operates on the concept of Project Files. A project file represents a "total conversion" hack, as this is the primary project type created by the AKI hacking community over the past two decades. Each project file currently targets a single game version and region combination. Locations in the ROM can change between regions and revisions, and certain versions of the games have more external documentation than others.

Project Files have the extension `.vpwsproj`. Technical information about the Project File format can be found in Appendix B.

### Project Structure

Aside from the Project File itself, the project expects a specific directory structure for storing files. Upon saving a project for the first time, two directories will be made in the location the project was saved:

- Assets – Assets are the raw files that get converted to various game formats. This is typically where your PNG textures live.
- ProjectFiles – Anything in the ProjectFiles directory is meant to be ready to insert (i.e. already in formats the game is expecting).

VPW Studio expects these directories to exist for any saved project. By default, the program looks for the directories in the same directory as the Project File. You can change their locations via the Project Properties dialog.

### Creating a New Project

Getting started with the main portion of the program requires creating a new project. Select "New Project..." from the File menu, which will bring up the New Project dialog.

The options presented are:

- Project Name – The name of this project.
- Author(s) – Names of people involved in the project. Optional, but recommended.
- Game Type – Select the game your project is based on. Be sure to match the proper region and revision.
- Base ROM File – Set the location of the base/input Z64 format ROM.
- Output ROM File – Set the location of the built/output Z64 format ROM. Defaults to `built.z64` in pre-Alpha Preview 28 and later.
- Custom Location File – When checked, allows you to use a custom Location File. Helpful if you've already made changes to the base ROM that result in differences from the default Location File for the specified Game Type. Most people will not need to use this.
- Custom FileTableDB File – When checked, allows you to use a custom FileTableDB file. Helpful if you're using a base ROM that has more files in it than the normal version. Most people will not need to use this.

All of these may be changed later in the Project Properties dialog. Upon pressing OK, you will be sent back to the main screen, with the main form updating to reflect the new project.

After creating a new project, the first thing you should do is save it. This is required for various functions of VPW Studio to work correctly. Future versions of the program may force a save upon starting a new project, but this is currently not implemented.

#### Base ROM and Game Type

The Base ROM must match the selected Game Type. VPW Studio checks a few values to ensure the correct ROM has been selected: the two letter game code, the region, and the version/revision value.

Each Nintendo 64 game is identified by a two letter game code (as a part of a four letter product code). VPW Studio makes a cursory check to ensure you're loading something that even remotely resembles the game you're trying to edit. Unless you're intentionally trying to use the wrong ROM, you shouldn't run into any issues here.

It is also important to note that the two letter game code is often used by emulators and flash carts to determine the save type, so modifying it is not recommended. This goes quintuple for WWF No Mercy, which is the only game in the series to save to Flash memory.

For the region, it's important to note that the region codes used by various popular ROM renaming tools/datfile providers do not match the internal region codes used by Nintendo 64 games. A small conversion chart is provided below:

Region Name | TV Standard | N64 Region Code | GoodTools | No-Intro | TOSEC
--- | --- | --- | --- | --- | ---
North America | NTSC-U | E | U | USA | US
Europe | PAL | P | E | Europe | EU
Japan | NTSC-J | J | J | Japan | JP

(Other regions and TV standards exist, but all six of the N64 games AKI Corporation released only use these three regions, as far as we're aware.)

The game version/revision value is only relevant for two games, but since data and code locations change between versions, it is important to specify and use the correct revision. You should only run into this when editing WWF No Mercy (all regions) and the NTSC-U version of WCW vs. nWo World Tour.

### Open an Existing Project

To open a VPW Studio Project File, choose "Open Project..." from the File menu. After selecting a project file, the program interface will update to reflect what game is being edited.

### Save, Save As

When you want to save changes to a project, there are two options: "Save Project", and "Save Project As". Both are available from the File menu.

#### Save Project

The first time you save a new project, the program will ask you for a location and name to save the file. Upon doing so, two directories will be created in the directory where the project file is saved: "Assets" and "ProjectFiles". "Assets" is meant for unconverted items (such as `.png` images), while "ProjectFiles" will store any files that are in game-native formats.

#### Save Project As

"Save Project As" is similar to saving normally, but it always asks for a filename and doesn't automatically create the "Assets" and "ProjectFiles" directories. Therefore, you should only use this option after saving the project normally. This option is most useful when adapting the same project for multiple input ROMs (e.g. different regions and/or revisions).

### Project Properties

If you need to edit any of the project's properties, you can do so from Project → Project Properties. While some of these options are set from creating a new project, others can only be changed in this dialog.

#### Main Tab

The options in this section are the same as the matching entries in the New Project dialog.

#### Output ROM

- Output ROM File – Set the location of the built Z64 format ROM.
- Internal Game Name – Set the internal game name. 20 characters maximum; anything shorter will be padded with spaces. (Japanese characters are converted to Shift-JIS encoding when building the project.)
- Product Region – Pick a pre-set region, or set a custom letter.

The Internal Game Name is only meant to use a limited set of characters. For non-Japanese games, this is a subset of ASCII, from character IDs `0x20` to `0x7E` (inclusive). Some emulators will attempt to use the Internal Game Name as the filename for any save data (e.g. SRAM, Flash, Controller Pak). On some platforms, valid characters for the Internal Character Name are not allowed in file names.

For Windows, the following "allowed" Internal Game Name characters are not valid:

- < (less than, often used for redirecting input/output on the command line)
- > (greater than, often used for redirecting input/output on the command line)
- : (colon, used for drive names in Windows)
- " (double quote, which causes enough nightmares for programmers as is)
- / (forward slash, the default directory separator on most non-Windows platforms; often used as an "option switch" on Windows command line applications)
- \ (backslash, the default directory separator on Windows)
- | (vertical bar/pipe)
- ? (question mark, sometimes used as a wildcard character)
- * (asterisk, often used as a wildcard character)

If any of these characters are used in your project's Internal Game Name, you will likely run into issues when saving data.

#### Project Files

- Project Files Path – Path to files that are already in game-native formats.
- Asset Files Path – Path to files that will be converted to game-native formats.
- Custom Location File – Path to a custom location file. Only useful if you're working from a ROM that has non-trivial code changes. Most people will not need to use this.
- Custom FileTableDB File – Path to a custom FileTableDB file. Only useful if you're working from a ROM that has extended the filetable. Most people will not need to use this.
- Wrestler Names File – Path to the Wrestler Name file for this project. (Currently unused/unimplemented; not particularly "needed" for No Mercy)

### Build ROM

To build a ROM with the changes you've made, select "Build ROM" from the "Project" menu (Keyboard shortcut: `Shift`+`Ctrl`+`B`). This will bring up a build log window, which provides updates on the build process.

Depending on the speed of your computer, the number of File Table entries being modified, and the Build Log Verbosity setting, this process may be relatively short (around 10 seconds) or long.

Currently, building the ROM will lock the UI thread, meaning the program will look like it's frozen. Fear not, as it's still working in the background. This will be changed in the future.

### Play ROM

If you want to test the changes in an emulator, select "Play ROM" from the "Project" menu (Keyboard shortcut: `F5`). If the changed ROM hasn't been built yet, it will build the ROM before playing it. Otherwise, it will load the last built version of the ROM.

For this to work, you must set up the emulator details in the Program Options section.

## Which Game To Hack?

If you are not already familiar with the capabilities of each of the supported games, you may have trouble picking a base game to start your project. Some features only exist in certain games, and if you are banking on the presence of one of those features, you need to pick your game wisely.

Some games are easier to work with than others. Realistically, I expect most people will want to choose WWF WrestleMania 2000 or WWF No Mercy, as creating movesets in those games is easier than Revenge and earlier. VPW2 is less likely to be picked, due to needing to be translated from Japanese to English.

The Game-Specific documentation can also give you insights into what game to pick, as well as issues you might run into. It also goes into more detail into some of the points mentioned below.

Regardless of which game you pick, be prepared to put in a decent amount of work.

### WCW vs. nWo World Tour

Largely superseded by Virtual Pro-Wrestling 64, though the fact that it's in English means you don't have to do any translation work on top of the hacking.

- 43 wrestler slots available.
- Only game in series to require Controller Pak for saving.
- Short in-ring introductions, no theme music.
- Allows for two-out tag match elimination format.
- Boxing fighting style available. (Joe Bruiser)
- One woman character available. (BlackWidow)
- Moveset format largely unknown.
- Parameters format largely unknown.
- Four arenas available. Arena data largely unknown.
- Text largely resides in ROM, mostly ASCII encoded (some EUC-JP).
- Text and graphics are in English.
- Wrestler face textures are mirrored, and represent half of the head (including the hair).

### Virtual Pro-Wrestling 64

Superior to WCW vs. nWo World Tour in most ways, despite only being released a month after it. (The truth is that development on this game started first, and World Tour was based off an earlier version of this game.)

- 99 wrestler slots available, including most of World Tour's roster. (Glacier, Wrath, and "Sting"/nWo Sting do not appear in VPW64.)
- Wrestler Edit mode (costume changing, name editing) available.
- Only game in series to allow for changing three colors in Edit Mode for costumes.
- Primary game save is on SRAM. Controller Pak saving is optional (used for match results).
- Only game in series to have a detailed post-match statistics interface.
- Short in-ring introductions, no theme music.
- Allows for two-out tag match elimination format.
- Combo fighting style introduced in this game.
- Boxing and Kickboxing fighting styles available.
- One woman character available. (Pretty Tomoko, the equivalent of BlackWidow in World Tour)
- Only N64 game in the series to hide secret characters on the wrestler selection screen. (Accessed via holding the Z button on certain wrestlers.)
- Moveset format largely unknown.
- Parameters format largely unknown.
- Eight arenas available (one forces a monochrome display; must be unlocked to be used). Arena data largely unknown.
- Text largely resides in ROM, mostly EUC-JP encoded (some ASCII in non-critical locations).
- Most text and graphics are in Japanese. Some elements are in English, but these are usually secondary.
- Wrestler face textures are mirrored, and represent half of the head (including the hair).

### WCW/nWo Revenge

A substantial upgrade of World Tour and VPW64.

- 63 wrestler slots available.
- 16 manager slots available.
- Wrestler Edit mode (costume changing, name editing) available.
- Primary game save is on SRAM. No Controller Pak saving.
- Has a post-match scoring screen, different from VPW64's statistics.
- Extended pre-match introductions (both on stage and in the ring), but only two sequenced theme songs (assigned by the game based on entrance order).
- First game in series with elimination Battle Royal matches.
- Combo fighting style available. (Goldberg, AKI man, and a few others)
- Kickboxing fighting style available. (Eric Bischoff)
- Women only available in manager slots.
- Moveset format mostly unknown; some progress is being made.
- Parameters format mostly unknown.
- Six arenas available. Arena data semi-known.
- Text largely resides in ROM, ASCII encoded.
- Text and graphics are in English.
- Wrestler face textures only take up the facial area.
- Corner and Irish Whip Special Grapples added.

### WWF WrestleMania 2000

The first of two WWF (now WWE) licensed games.

- 50 male wrestler slots available.
- 9 female wrestler slots available, with caveats.
- Wrestler Edit mode ("full-featured") available.
- Primary game save is on SRAM. Controller Pak saving is optional, used for custom belts and wrestlers.
- Pre-match introduction sequence now includes Titantron "videos" and streamed theme songs, along with the on-stage and in-ring portions of the introduction sequence from Revenge.
- Neither Boxing nor Kickboxing styles are available.
- Combo fighting style not available (without hacking).
- Moveset and Parameters formats are largely unknown. This is somewhat mitigated by being able to create a character, then putting them in a match and dumping their data.
- Seven arenas available. Arena data semi-known.
- Some text is in ROM, while others are in `AkiText` archives in the File Table. Most text is ASCII encoded. The rest is Shift-JIS.
- Text and graphics are in English. The Japanese release contains some Japanese messages, but they are implemented as textures.
- Wrestler face textures only take up the facial area.
- Wrestler CPU Logic editor only available via GameShark code.
- Cage match introduced in this game.
- Multiple streamed theme music slots at lower quality.

### Virtual Pro-Wrestling 2

A Japanese-only direct descendant of WCW/nWo Revenge that ended up inheriting (or possibly originating) a number of features from WrestleMania 2000.

- 98 wrestler slots available.
- Wrestler Edit mode ("full-featured") available.
- Primary game save is on SRAM. Controller Pak saving is optional, used for custom belts and wrestlers.
- Pre-match introduction sequence includes streamed theme songs (at higher quality than WM2000, but with less songs included) and a walk to the ring. All arenas have a multi-stage entrance, where wrestlers start in the locker room, then head to the ring. Unlike WM2000, only one arena (Dome Road) contains a "traditional" stage.
- Combo fighting style available.
- Only game in the series with MMA fighting style.
- Only game in the series with MMA match rules.
- Women not available.
- Only game in the series with customizable masks.
- Moveset and Parameters formats are largely unknown. This is somewhat mitigated by being able to create a character, then putting them in a match and dumping their data. However, VPW2's extra fighting styles means you have to be careful how you dump the moveset data.
- Five arenas available (one is unlockable). Arena data semi-known.
- Some text is in ROM, while others are in `AkiText` archives in the File Table. Most text is Shift-JIS encoded. There are a few ASCII strings, mainly in the "Global" text area.
- Text and graphics are mainly Japanese.
- Wrestler face textures only take up the facial area.
- Running grapples are introduced in this game.
- Wrestler CPU Logic editor available by default, though lacking the "Type" option found in WM2000.
- Cage match not available.
- Only game in the series with second-level Special grapples.
- Less streamed theme music slots at higher quality.

### WWF No Mercy

The last of AKI's six N64 wrestling games. Porting some content to and from No Mercy is slightly harder, due to a number of internal changes made.

- 64 wrestler slots available. (A 65th slot is available, but with caveats towards its usage.)
- Wrestler Edit mode ("full-featured") available.
- Primary game save is on Flash. Controller Pak saving is optional, used for custom wrestlers.
- The only game in the series where dropped weapons don't disappear and can be picked up.
- Pre-match introduction sequence still includes Titantron "videos" and streamed theme songs, along with the on-stage introduction portion. The in-ring section has been removed, though it was included in earlier development versions of the game. Full entrances must be hacked in, which is non-trivial.
- The only game in the series with post-match celebration scenes (for certain wrestlers).
- Combo fighting style not available.
- Women available as first-class wrestler slots.
- Moveset and Parameters formats are largely unknown. This is somewhat mitigated by being able to create a character, then putting them in a match and dumping their data.
- Costume and body part models have been modified to make texture mapping easier. Porting costume textures from previous games is harder, as a result.
- Text is in ROM, `AkiText` archives, and some new No Mercy-specific text archives. All relevant/visible text is ASCII encoded. Some unused/non-visible strings are Shift-JIS.
- Text is 99.9% English; the only Japanese text appears in normally non-visible areas.
- Wrestler face textures take up the facial area and some of the adjacent edges of the head.
- Double Team Irish Whip Specials (read: Dudley Death Drop) added.
- Running grapples can now connect when an opponent is in the corner.
- Wrestler CPU Logic editor not available.
- Cage match available.
- Only game in the series to contain Ladder, Guest Referee, and Ironman match types.
- Only game in the series with ground grapple Specials.
- Only game in the series with breakable tables.
- Introduced "Losing It" downed-but-not-TKO'd state.
- Multiple streamed theme music slots at lower quality.

## Common Data Formats

When editing the AKI wrestling games, there are a number of common data formats that appear throughout the series. The official names of most of these formats are unknown, so VPW Studio attempts to give them reasonable names. Knowing about these formats is essential for navigating the various entries in the File Table.

This section only covers formats that are shared between multiple games (even if implementation details may differ between games). For game-specific formats, please see the documentation for the corresponding game.

If you are looking for specific format information (e.g. how the files are laid out, binary-wise), please refer to Appendix C.

### `AkiAnimation`

`AkiAnimation` defines animation data, as you might expect from the name. Animation data is largely the same across all 6 of AKI's N64 titles.

The format used for the PS1 games (Virtual Pro-Wrestling and WCW vs. the World) has not been located or figured out. It does not appear to be standard "TOD" format, as scanning the data files has produced 0 such animations.

Currently, there are no animation editing or creation facilities in VPW Studio. Creating new animations from scratch (as opposed to splicing together existing animations via GameShark codes) is still considered relatively "new" technology.

### `AkiArchive`

An `AkiArchive` contains multiple files packed into a single File Table entry. The game code is responsible for handling the data inside of the archive, so it's tricky to provide automatic support. This file type first appeared in WCW/nWo Revenge.

Zoinkity originally called these `TEXarchive`, since the examples he found primarily contained TEX (`AkiTexture`) files. Further review has shown that other file types can appear inside of these archives, hence the change to a more generic name.

VPW Studio has read-only support for `AkiArchive` files, but there are a number of corner cases that are not properly handled. There is also no error handling for opening an entry as the wrong type, so be sure to view the target file in the hex editor before attempting to view it as a specific type.

### `AkiModel`

`AkiModel` defines data for a single 3D mesh. This includes vertex location, texture positioning (U/V) values, and three other values which either mean "vertex color" or "normal vector", depending on certain header values.

Where possible, tools in VPW Studio allows for export to Wavefront OBJ format, despite the fact that it does not officially support vertex colors.

Until recently (September 2021), there was no reasonably simple workflow for importing models back into the game. The release of `AkiModel` import/export plugins for Blender by Grix has changed this situation significantly.

### `AkiTexture`

`AkiTexture` files start with the magic word "`TEX`", and are typically used in the user interface. They are essentially a wrapper around the CI4 and CI8 texture and palette formats.

VPW Studio can convert PNG images to `AkiTexture`, but they must have a 16 or 256-color palette. Furthermore, images with transparency need to be manually converted and modified with a hex editor, due to assumptions the .NET Framework makes about transparent images. (Yes, it's possible to code around this, but until it gets implemented, you'll have to follow the linked instructions.)

### `AkiText`

`AkiText` files contain multiple strings used for text display.

AkiText archives only appear in WWF WrestleMania 2000, Virtual Pro-Wrestling 2, and WWF No Mercy (though the latter game has moved away from `AkiText` for some purposes).

### Font-Related Formats

The `AkiLargeFont`, `AkiSmallFont`, and `AkiFontChars` formats are grouped together:

- `AkiLargeFont` has characters that are 24 pixels wide.
- `AkiSmallFont` has characters that are 16 pixels wide.
- `AkiFontChars` defines what characters show up in the font.

Each font glyph is defined as a 1bpp image. An `AkiFontChars` entry may not always exist in the file table; it only seems to be used in certain games.

### `MenuBackground`

A `MenuBackground` is a collection of unheadered `Ci4Palette` and `Ci4Texture` data split up over multiple files, making up a 320x240 pixel background. Implementation details differ per game, though they only appear in WWF WrestleMania 2000 and later.

VPW Studio allows for "simple" import of new data for `MenuBackground`, but it relies on the replacement PNG image being set only in the entry that is marked `MenuBackground`, and not any entry after it. For more information, see the game-specific documentation for the game you're editing.

### `Ci4Palette` and `Ci8Palette`

Nintendo 64-specific palette formats. A `Ci4Palette` normally contains 16 colors, and `Ci8Palette` contains 256 colors. AKI performs some trickery when dealing with palettes, so this doesn't explain the full story.

For `Ci4Palette` data, multiple sets of 16-color palettes can be defined. VPW Studio handles these extra color sets as "sub-palettes".

In WWF No Mercy, AKI pulled a similar trick with `Ci8Palette` files, but `Ci8Palette` sub-palettes are not currently supported in VPW Studio.

To facilitate user editing, `Ci4Palette` and `Ci8Palette` data can be converted from other palette formats. The primary non-binary palette format supported by VPW Studio (`.vpwspal`) is a modification of the text-based JASC Paint Shop Pro palette format, allowing for sub-palettes and transparent values. More information on this format can be found in Appendix B.

### `Ci4Texture` and `Ci8Texture`

Nintendo 64-specific texture formats. Much like the corresponding palette types, these can either use 16 (`Ci4Texture`/`Ci4Palette`) or 256 (`Ci8Texture`/`Ci8Palette`) colors. The textures usually don't define a palette, so one must be loaded.

VPW Studio can convert PNG images to `Ci4Texture` and `Ci8Texture`, but they must have a 16-color (for `Ci4Texture`) or 256-color (for `Ci8Texture`) palette. Images with transparency do not need to be manually converted, but the matching palette file must have the relevant colors marked as transparent. Some games even have specific rules about palette indices, which can be found in the game-specific documentation.

### `I4Texture`

Nintendo 64-specific "intensity" texture format. Allows for 16 steps of intensity. There are other "intensity"-based texture formats used on the N64, but so far, only the "I4" format has been found in AKI's games.

VPW Studio provides no support for converting images to `I4Texture`. The current recommended workflow is to use Texture64 to save the I4 format texture and import that data via the File Table.

## Texture and Palette Workflow

(Notice: This section primarily deals with workflows targeting the Nintendo 64. Information on targeting PlayStation 1 will be added once VPW Studio is capable of handling it.)

Replace textures in a ROM hack-based project is different from using replacement textures with emulator plugins. This is due to various techniques used by AKI to handle costume layering and color changing. Each game handles these systems slightly differently, and implementation-specific details are found in the game-specific documentation. This section covers general information applicable to multiple games.

The program you use to edit textures also matters. Most modern image editing programs are focused on supporting 8bpp (bits per pixel) and higher color depths, and are ill-suited to creating paletted textures. Some programs will claim to make a 16 color (4bpp) paletted image, but actually store 256 colors in the palette, making it an 8bpp image. Due to VPW Studio's current setup, it is required to have proper 4bpp images when replacing a Ci4Texture. This may change in the future, but results cannot be guaranteed.

Programs known to properly support 16 color/4bpp textures, and the steps needed to create them:

- JASC Paint Shop Pro 7 – Colors → Decrease Color Depth → 16 Colors (4 bit)
- GIMP – Image → Mode → Indexed; ensure "Generate optimum palette" is selected, set "Maximum number of colors" to 16.

There are likely other programs that support proper 4bpp images, but these are the two that have been tested with VPW Studio and known to work.

Do not save images using an "optimize" feature, as this may cause palette order to be changed, resulting in textures that look wrong. The order of the colors in the palette is very important, and should be the same between the texture and corresponding palette file (if necessary).

### Texture Sources

Dumping the game's original textures using an emulator is often a starting point for modders. If you attempt to do this with VPW Studio, however, you're going to end up having a lot of trouble.

An emulator texture dump represents the FINAL result after running through all the pre-processing steps (e.g. skin color, costume color, hair color, and so on). When you use VPW Studio or do texture changes via ROM hacking, you're not working from the final result, you're working from the composite parts that end up making the final result. This means you'll have to get your textures and palettes from VPW Studio, then work from there.

When exporting images from VPW Studio, they are not assigned a palette by default. This means you will have to re-palettize the image before you can import it again. How you handle the image's palette depends on many factors, including (but not limited to) the texture you're replacing and the game you're working with. The palette indices must match with the ones used in the texture, otherwise your images will look wrong.

### Color Format

The Nintendo 64 and PlayStation 1 both use a 16bpp color format for most purposes. This gives a range of 0-31 for each of the red, green, and blue values, which can be converted to 0-255 by multiplying the value by 8. It is important to know this information when making textures and palettes, as some colors from the 0-255 range can't be properly represented. Furthermore, it's imperative to notice and merge perceptually similar colors when creating 16-color textures/palettes, as palette space is limited.

For the Nintendo 64 games, a full black color (RGB 0,0,0) is often considered transparent. To get a non-transparent black, use RGB 8,8,8.

### Palette Formats

Palettes come in many different formats, and it's important to understand them if you plan on changing any graphical elements.

#### Raw CI4/CI8 Palettes

Raw CI palettes are the formats used by the game. They only contain the available colors, and no headers or other information.

CI8 palettes have 256 colors, while CI4 palettes are meant to store 16 colors. However, you will often find CI4 palettes with more than 16 colors. This is used for changing colors in Edit Mode, and is explained further below.

#### VPW Studio Palette

Even though there are many external palette formats available, none of the existing solutions matched the desired criteria:

- Text-based format (for easy editing outside of the program)
- Ability to define the number of entries in the palette (16 or 256)
- Ability to define the alpha/transparency on a per-palette entry level
- Support for CI4 sub-palettes

The existing palette format that came closest to these criteria was the JASC Paint Shop Pro palette format, specifically from Paint Shop Pro 7. Seeing as it was already text-based, it seemed reasonable to modify it for the above purposes. VPW Studio palette files have the file extension `.vpwspal`.

More specific details about the VPW Studio Palette format can be found in Appendix B.

#### Other Formats

It feels a bit unreasonable for Paint Shop Pro 7 to be required for palette work, so support for other palette formats is available. However, the other formats are not guaranteed to support per-color transparency or sub-palettes. Please see the CI Palette Editor section for more detailed information on support for these types:

- JASC Paint Shop Pro `.pal` – the non-VPW Studio-specific version.
- GIMP `.gpl` – palette format from The GIMP.
  (For some reason, GIMP doesn't allow you to export this format directly from an image, necessitating the need for the next option in this list...)
- GIMP `.txt` – text-based palette format from The GIMP.
- Adobe `.act` – palette format from Adobe Photoshop.

#### Unsupported Formats

Other palette formats are currently unsupported. This includes the Microsoft palette format, which unfortunately shares the `.pal` extension with the JASC PSP format.

### Costume Color Changing

The ability for players to change the colors on costumes was first implemented in Virtual Pro-Wrestling 64. The developers at AKI decided to use "pure" red, green, and blue colors to signify different color-able parts of the texture. By "pure" colors, we mean that the values for other channel components are set to 0. All colors that are not related to costume color changing can be set as you like (making sure they're not "pure" colors). The "pure" colors are then replaced with the custom color by looking up the corresponding value in a palette file.

As mentioned in the Common Data Formats section, a `Ci4Palette` can have multiple "sub-palettes", and this is key to allowing the costume color changing system to work (in all games after VPW64). The first 16 colors of a costume texture's palette is dedicated to the colors you'd see if you set the custom color to 0 (WM2K/VPW2/No Mercy). The colors used in the first set do not need to be found in the custom color palette. The second set of 16 colors should use the "pure" green and blue values that define the changeable colors. (The handling of "pure" red values is game-specific.)

Some of the original textures in the games don't bother with a custom palette in the first set, and just use the "pure" green/blue values in both the main and sub-palettes. In this case, you will need to find the location of the default custom colors for the costume item. This is somewhere in ROM, and is in a different location for each game.

Mask editing, while using a similar system, is exclusive to Virtual Pro-Wrestling 2, and is explained in its game-specific documentation.

### Skin Color Changing

Even though you are not able to change the skin color of a wrestler in WCW/nWo Revenge in-game, the costume textures take skin color into account using the red channel.

Starting with WWF WrestleMania 2000 and Virtual Pro-Wrestling 2, you can customize the skin color of wrestlers. This is handled with multiple CI4 sub-palettes.

In WWF No Mercy, each face has its own palette, which can be a pro and a con for people who want to edit them. If you are working on a No Mercy project, it is recommended to create a set of shared face palettes for most faces.

### Texture Layering

Costume items are often layered on top of other textures. This includes regular costume items, as well as various facial features (fringe hair, facial hair, facepaint). In games before WWF WrestleMania 2000, this was a non-issue, as all face and costume textures are pre-composed, and there was no full-featured Edit Mode to allow for customization.

#### Body

The textures for the body are comprised of the skin, any tattoos, and the costume items, generally displayed in that order.

#### Face

Faces are a bit more complex, with the following components:

- The base face texture
- Fringe/"front" hair
- Facial hair
- Facepaint and Accessories

The ordering and location of these elements is not always obvious. For example, accessories can be positioned over or under the facial and fringe hair layers. Accessories can also wrap around the back of the head, requiring an additional texture. The base vertical locations of facial hair can be set both per-face and per-facial hair item.

### `AkiTexture` Transparency Fix

Since the .NET Framework has issues with transparent PNG files (namely, assuming they can't possibly be paletted), you have to manually fix the transparency in any `AkiTexture` formatted texture. This involves changing a palette entry to be transparent via a hex editor. Start by using the "PNG to AKI TEX" option in the Tools menu. This will create a `.tex` file which can be edited.

TEX files start with 16 bytes of header data, which is followed by the palette data (starting at file offset `0x10`). Each color takes up two bytes in the palette. If it's a 16-color texture, there will be 32 bytes of palette data. If it's a 256-color texture, there will be 512 bytes of palette data. The key to transparency is the least significant bit of the second byte of a palette entry. For example, non-transparent full black would have the hex values `00 01`. To make this transparent, you would change it to `00 00`. For other colors, it's best to throw the second byte into a hex-capable calculator, then switch to binary mode and modify the least significant bit to be 0.

If you're having trouble determining which palette entry represents the color that needs to be transparent, check the pixel data for the most common value. In a 256-color picture, each byte represents a single color, which is simple enough. For 16-color pictures, each byte represents two colors, packing the color index into a "nibble". For example, a hex value of `23` would draw two pixels using palette index 2 and 3.

After finishing the hex edit, be sure to set the Replacement File to the new `.tex` file in the File Table dialog.

### Font Workflow

Both the Large and Small font types are 1bpp format. VPW Studio currently has no workflow for handling font replacement, but they can be edited using a program that understands 1bpp format tiles and has flexible display options.

Two programs have been tested and used:

- Tile Molester
- Crystal Tile 2

A complete guide to these tools is out of the scope of this manual. Getting the fonts to display properly requires some work, though.

First, export the Font using the File Table editor. If the File Type has been set correctly, this will export a `.smallfont` or `.largefont` file. From there, the instructions differ based on what program you're using.

The line of pixels separating each character is related to leading spacing and character width. The format of these values differs between Large and Small fonts, and is not fully understood yet.

- Small Fonts – two bytes; first byte always `0x00`; second byte leading pixels mask `0xF0`, character width mask `0x0F`.
- Large Fonts – three bytes; first byte is leading pixels; second byte is character width; third byte always `0x00`.

#### Tile Molester

1. Open the extracted file in Tile Molester.
2. View → Codec → 1bpp Planar
3. View → Mode → 2-Dimensional
4. Press the "Decrease Width" button (found on the top toolbar; an arrow pointing left into three vertical lines) until you only see one "column" of the font data. Alternatively, go to Image → Canvas Size, and use the following settings based on font type:
   - Small Fonts – columns 2, rows 16
   - Large Fonts – columns 3, rows 16

You can start editing at this point, but the default colors are slightly odd, so you may want to change them. Double click on each color swatch (between the large arrow buttons) to set the color.

#### Crystal Tile 2

1. Open the extracted file in Crystal Tile 2.
2. View → Tile Viewer (keyboard shortcut F5)
3. In the "Tile Property" area, set character width and height based on font type:
   - Small Fonts – width 16, height 14
   - Large Fonts – width 24, height 22

(Crystal Tile 2 editing instructions are still todo)

## Code, Data, and Pointers

Having low level knowledge is not 100% required to get use out of VPW Studio, but it is helpful to know how things work when making certain types of changes (and for some things in the older games, it's currently required).

Games for the fifth generation of consoles (Nintendo 64, PlayStation 1, and Saturn) load code into RAM and execute it. For the disc-based systems, this is required, as accessing the disc constantly is bad for the lifespan of the CD-ROM drive. (Exceptions exist, but this isn't a manual for a Crash Bandicoot editor.) However, for the cartridge-based Nintendo 64, code execution in RAM may seem like an odd choice.

Consoles from the fifth generation are not typically immediately able to access anything at any time, as their available memory does not allow for the maximum size of their storage medium. For CD-based games, you would need at least 650 megabytes of RAM. For the Nintendo 64, you would need around 64 megabytes of RAM for the largest games. Therefore, games have to specifically load what they need when they want to use it.

For AKI's Nintendo 64 games, the game code is generally split up into a few sections:

- Global; code and data that's always loaded.
- "Cutscene" (e.g. game introduction and ending sequences, wrestler entrances)
- Menus (sometimes multiple segments)
- Gameplay; the code and data used during matches.

As you might expect, the non-Global segments aren't loaded/run at the same time, so they're not always in memory. This is why some GameShark codes have "activators" to ensure the correct region of memory is loaded.

The game code needs access to data loaded into RAM, but it may not always be in a static location. This is where "pointers" come in. A pointer is a value that points to a location in memory. Pointers are used for both code and data locations. Since code and data needs to be loaded into RAM, ROM locations may not always map cleanly to RAM locations. Thus, some care is required when trying to edit pointers, especially outside of the Global segment. It is also important to note that pointers can be different between different regions and versions/revisions of a game.

Specific information on how each game handles this can be found in the Game-Specific Information section.

Chapter 2: Program Functionality

## Arenas

(todo: this portion of the program requires a 3D renderer capable of handling multiple objects, along with being able to select and move them, and I'm not fully there yet. -f)

## Championships

The Championships editor differs for each game:

- WCW vs. nWo World Tour, Virtual Pro-Wrestling 64, and WCW/nWo Revenge – This doubles as the Story Mode/Champion Road editor.
- WWF WrestleMania 2000 and Virtual Pro-Wrestling 2 – Edit the possible designs available when making a new belt.
- WWF No Mercy – Edit the default championship data.

(todo)

### Game Support

Game | Support
--- | ---
WCW vs. nWo World Tour | Partial
Virtual Pro-Wrestling 64 | Partial
WCW/nWo Revenge | Partial
WWF WrestleMania 2000 | No
Virtual Pro-Wrestling 2 | No
WWF No Mercy | No

## Costume Items

The costume viewer allows you to view the values used for each costume in the game. This is not to be confused with default wrestler costumes in WrestleMania 2000 and later, which can be found in the Wrestlers section.

(todo: this is different per game and isn't fully designed)

## Demo Matches

(todo: only seems to exist in VPW2 and No Mercy? doesn't actually edit values yet)

## Entrances

(todo: primarily Titantron-related; not yet designed)

## File Table

The File Table editor, accessed from Project → File Table, allows you to view and edit the entries in the game's File Table. A large portion of the game's data is found here, including wrestler movesets, parameters, move data, animations, textures, palettes, models, and more.

Due to various hardcoded file IDs in the game's code, it is not straightforward to add, remove, or move files around.

### Game Support

Game | Read | Write
--- | --- | ---
WCW vs. nWo World Tour | Yes | Yes
Virtual Pro-Wrestling 64 | Yes | Yes
WCW/nWo Revenge | Yes | Yes
WWF WrestleMania 2000 | Yes | Yes
Virtual Pro-Wrestling 2 | Yes | Yes
WWF No Mercy | Yes | Yes*

* Prototype/pre-release versions of WWF No Mercy do not support changing files/building projects.

Double left clicking on a single File Table entry will attempt to preview or edit the selected item. This does not always work, and you may be presented with a Hex Viewer instead. The preview and/or editor dialog that comes up depends on the entry's File Type. More information about these tools can be found in the "Viewers and Editors" section of the manual.

Right clicking on a File Table entry will bring up a context menu with a few options:

- Set Type – Change the File Type for the selected entry. Available options depend on what game you're editing. Some common types are mentioned in the Common Data Formats section, and game-specific types are mentioned in game-specific documentation.
- Edit Information – Opens the File Table Entry Information dialog for the selected entry.
- View Hex → ROM Data... – Opens a Hex Viewer with the selected entry's data in the base ROM.
- View Hex → ReplacementFile Data... – Opens a Hex Viewer with the replacement file's data. Only enabled if an entry has a replacement file set.
  NOTICE: This is how the unconverted file is stored on disk, and is not necessarily the format that will be written to ROM!
- Extract File – Extracts the selected entry to a file, decompressing it if necessary.
- Extract Raw – Extracts the compressed version of the selected entry without decompressing it. (Only available if "LZSS" is set to "True" for this entry. Most people will not need to use this.)

If you right click on an entry that is set as `MenuBackground`, an additional option, "MenuBackground Replacement..." will appear. This option converts a 320x240 16-color PNG file into the requisite menu background files, and set the relevant entries in the File Table. The output files are put in the ProjectFiles directory, in a sub-directory called "Backgrounds". Each converted `MenuBackground` creates a sub-directory based on the original PNG's filename, so be careful when converting a background with the same file name as another `MenuBackground` replacement.

### Navigation Menu

The Navigation menu contains various functions to help you find entries in the File Table.

#### Go To

The "Go To" option (keyboard shortcut `Ctrl`+`G`) allows you to jump to a specific file number. The value is in hexadecimal, so be aware of that.

#### Search and Find Next

You can search for a file based off of its comment text using the Search function (keyboard shortcut `Ctrl`+`F`). Once a search has begun, you can use "Find Next" (keyboard shortcut `F3`) to search for the next comment. Holding `Shift` while pressing `F3` moves backwards.

Note: Currently, the search can not be told to skip over item numbers. If you wish to skip past a portion of the list, start a search, then scroll down and select an item that is located past the area you wish to skip. Any further "Find Next" commands issued will continue searching from the selected item.

#### Search FileType

You can also search for a specific FileType. Selecting this option brings up a dialog with a list of possible FileTypes. Choose your desired FileType and press OK. You can also use `F3` to continue the FileType search.

### Database Menu

The Database menu contains functionality related to File Table Databases.

#### Reload File Table Database

"Reload File Table Database" will let you update your project's File Table with the current data in the FileTableDB file for the current game. When selecting this option, you will be asked if you want to overwrite any of your existing comments with the comments in the FileTableDB.

#### FTDB Info

Provides the number of "labeled" entries in the current game's FileTableDB. Primarily intended for internal use.

### Export Menu

The Export Menu is something most people won't ever need to touch, but it is documented here anyways:

- Export Midwaydec File List... – Exports a file list for Midwaydec, a program by Zoinkity. (However, Zoinkity has declared Midwaydec "dead".)
- Export Asset Conversion CSV... – Only of use for people dealing with disassemblies. Output is meant to target a tool that has yet to be written (by freem or anyone else).
- Export JSON... – Export the current project's FileTable as a JSON file for use with the "akifiletable" tool.
- Export FileTableDB... – Exports the current project's FileTable in VPW Studio's FileTableDB format. Most people won't need this, but for people who do, it's helpful.

## File Table Entry Information

There are two versions of the File Table Entry Information dialog, depending on how many entries are selected.

#### Single Entry

The "Main" tab contains the following settings:

- File Type – File type for this entry. Like the context menu, the available options depend on the game being edited.
- Force File Type – If this box is checked, this entry has a different File Type than what's normally in the table. (This is only used to prevent freem from having to debug issues previewing things.)
- Comment – General comment for this entry. Typically filled out from the FileTableDB for the relevant game.
- Project-specific Comment – Project-specific comment for this entry. Useful for noting what you've changed something to.
- Replacement Encoding – Choose the encoding for this entry. Only the "Force" options work as intended. ("Pick Best" is meant to test both options and select the smallest one, but it's not implemented yet.)
- Replacement File Path – Path to the replacement file for this entry. You can use the "Browse" button to pick a file.

The single entry dialog has an "Extra" tab, which includes a few options for specific file types.

- Image Width – Set the width of an image. Primarily used with `I*Texture` and `RawCi*` types. "Unset" value is -1.
- Image Height – Set the height of an image. Primarily used with `I*Texture` and `RawCi*` types. "Unset" value is -1.
- Transparent Color Index – Currently unused, likely to get repurposed. "Unset" value is -1.
- Default Palette ID – Set the default palette ID, used for previewing `CI*Texture` format images. The value corresponds to an index in the File Table, and is hexadecimal. The "Unset" value is `FFFFFFFFFFFFFFFF`, since File Table IDs are unsigned.
- Horizontal Mirroring – Force horizontal mirroring for a texture. Primarily used with `CI*Texture`s.
- Vertical Mirroring – Force vertical mirroring for a texture. Primarily used with `CI*Texture`s.

These options are not disabled based on the entry's file type, so be careful when using them.

#### Multiple Entries

If multiple entries are selected, the multi-entry version of the dialog is displayed. Each file table entry is given its own row in a grid, with the following columns:

- File ID – The index/ID of this file table entry. Read-only.
- File Type – File type for this entry. Like the context menu and single entry dialog, the available options depend on the game being edited.
- Encoding – (currently broken, don't touch it!)
- Comment – General comment for this entry. Typically filled out from the FileTableDB for the relevant game.
- Project-specific Comment – Project-specific comment for this entry. Useful for noting what you've changed something to.
- Replacement File – Path to the replacement file for this entry.
- Browse – Browse for a replacement file.

Since various types of files can be selected, the contents of the "Extra" tab from the single entry dialog do not appear here.

## Viewers and Editors

When double left clicking on a single entry in the File Table editor, VPW Studio will attempt to show an editor or previewing tool for the file in question. This section covers the various tools available.

### Hex Viewer

The Hex Viewer is used to display data for "Binary" file types, but it can also be requested via the File Table context menu ("View Hex"). The data is read-only, so an external hex editor must be used to make changes. In-program editing will be implemented in a future version.

### CI4/CI8 Palettes

Target Filetypes: `Ci4Palette`, `Ci8Palette`

The CI4 and CI8 Palette Editor allows you to view and change palette values.

Select the color to change using the Current Color drop-down box. Modify the values using the Red, Green, and Blue numeric boxes on the upper right hand side. You can also toggle the transparency of a color with the "Transparent" checkbox.

The Palette Set option is only available with CI4 palettes, and only usable if the CI4 palette has any sub-palettes.

#### Supported Palette Formats

There are multiple palette formats available for import and export:

- The game-native formats, "CI4 Palette"/`.ci4pal` and "CI8 Palette"/`.ci8pal`. Supports sub-palettes and multiple transparent colors.
- The text-based VPW Studio palette format/`.vpwspal` (recommended for editing). Supports sub-palettes and multiple transparent colors.
- JASC Paint Shop Pro palette format/`.pal`. Does not support sub-palettes; each sub-palette must be manually imported/exported.
- GIMP palette format/`.gpl`. Does not support sub-palettes; each sub-palette must be manually imported/exported.
- GIMP text palette format/`.txt`. Does not support sub-palettes; each sub-palette must be manually imported/exported. Supports multiple transparent colors for import only.
- Adobe palette format/`.act`. Does not support sub-palettes; each sub-palette must be manually imported/exported.

### CI4/CI8 Textures

(todo: screenshots)

Target Filetypes: `Ci4Texture`, `Ci8Texture`

CI4 and CI8 Textures use a similar viewer, with the ability to change what palette is being used. `CI4Texture`s additionally support sub-palettes, which are alternate sets of 16 colors.

### I4 Textures

Target Filetype: `I4Texture`

The viewer for I4 textures is a bit more complicated than the CI4/CI8 texture viewer, as I4 textures don't have a width or height set in the file. Unless the file you're previewing has set up the required Extra Data values (see the "File Table Entry Information" section), you'll need to play with the width and height values to find the proper settings. Be sure to press the Redraw button to update the image preview.

Right clicking on the image brings up a context menu with three options:

- Save PNG – Exports the texture as a 32-bit (RGBA) PNG.
- Background Color – Change the background color. Useful for seeing things better.
- Foreground Color – Change the foreground/drawing color, which defaults to white.

### "TEX" Textures

(todo: screenshot?)

Target Filetype: `AkiTexture`

A simple previewer for the "TEX"/AkiTexture format. Since this format is a container for multiple image types, the available options are limited.

Scroll the mouse wheel to change the zoom level. Right clicking on the image brings up a context menu with two options:

- Save PNG – Exports the texture as a 32-bit (RGBA) PNG.
- Background Color – Change the background color, useful for images with transparency.

The `Esc` button can be used to close the TEX previewer, in case the size of the loaded texture makes it hard to click on the close window button.

### AKIText

Target Filetype: `AkiText`

The AKIText editor is used for text archives. These archives were first used in WWF WrestleMania 2000, and are also found in Virtual Pro-Wrestling 2 and WWF No Mercy.

#### Import/Export

There are two options for importing and exporting AKIText archives to/from different formats:

- Tab-separated CSV – CSV format, using tabs instead of commas. Meant to be used with Zoinkity's toolset.
- akitext Tool Format – Format used by the `akitext` command line tool.

#### Go To

Opens a dialog allowing you to jump to a specific entry.

#### Control Code Reference

Pressing the Control Codes button shows a dialog box with the various control codes (typically) available for text display. The list is replicated below:

- `@B` – Blue text color
- `@C` – Cyan text color
- `@D` – Default text color (usually white)
- `@G` – Green text color
- `@H` – Hidden costume item?
- `@h` – Hidden move item?
- `@K` – Black text color
- `@O` – Orange text color
- `@P` – Gray text color
- `@R` – Red text color
- `@W` – White text color
- `@Y` – Yellow text color
- `%###` – Short name of Wrestler with ID4 `0###`
- `$0` – A Button
- `$1` – B Button
- `$2` – L Button
- `$3` – R Button
- `$4` – Z Button
- `$5` – Control Stick/3D Stick
- `$6` – C Up Button
- `$7` – C Down Button
- `$8` – C Left Button
- `$9` – C Right Button
- `$a` – D-Pad Up
- `$b` – D-Pad Down
- `$c` – D-Pad Left
- `$d` – D-Pad Right
- `$e` – Start Button
- `$f` – D-Pad

There are a few more values than the ones known here, but they have not been properly documented yet. This primarily concerns the spacing values (codes starting with `#`).

### ModelTool2

Target Filetype: `AkiModel`

This is a very incomplete tool for dealing with 3D model data (File Type `AkiModel`). Not to be confused with the Model Tool found via Tools → Model Data. The end goal is to be a quick and dirty 3D model previewer, so you don't need to export the model to figure out what it is.

The available menu items:

- Export Wavefront OBJ – Exports the model to Wavefront OBJ format, for importing into other tools.
- Texture → Load Texture – Brings up a texture selection dialog, further explained below.
- Texture → Texture Enabled – Enable/disable texture mapping. Only really works if a texture has been loaded.
- Texture → Horizontal Mirroring – Change the horizontal texture repeat style. Loading a Ci4/Ci8 texture can set this option as well, depending on the value in the texture header.
- Texture → Vertical Mirroring – Change the vertical texture repeat style. Loading a Ci4/Ci8 texture can set this option as well, depending on the value in the texture header.

#### Load Texture

The "Load Texture" dialog does what it suggests, allowing you to choose a texture to map to the model. The available choices depend on what's in the File Table, so any texture file without a specific file type set won't show up in here.

It is also important to note that the replacement path is not checked for the selected File Table entries, so it's currently not possible to preview your custom textures with this tool.

The three Texture Type options are:

- Ci4Texture – 4bpp/16 color images
- Ci8Texture – 8bpp/256 color images
- AkiTexture – Typically used for user interface stuff, but provided here just in case.

Texture File ID works for all modes, while Palette File ID can only be set with Ci4Texture or Ci8Texture. Sub-palettes are not supported in this dialog.

### AnimTest

Target Filetype: `AkiAnimation`

"AnimTest" is a tool that breaks down animation data into separate frames and components. As this tool is very early in development, it requires external knowledge to understand the displayed data.

The "Copy Hex" option is meant to be used with S.K. Stylez's Animation Editor spreadsheet. Paste it into cell D3 (main) or D43 (secondary).

### Fonts

FileTable entries marked as `AkiSmallFont` and `AkiLargeFont` bring up this dialog. You are able to view each of the characters stored in the font, as well as the "header" bytes. If the "header" text box has a light blue color, one of the fallback character sets is being used. The fallback character set may or may not line up with the actual glyphs in the font file.

Editing the fonts requires a separate program (see the Font Workflow section for more details).

## Game Introduction

The Game Introduction dialog is a crude information viewer for mulitple parts of the game's introduction sequence. Right now, this isn't really working as an Editor, so all changes must be done to the base ROM in a hex editor.

### Game Support

All games are currently read-only.

Game | Support
--- | ---
WCW vs. nWo World Tour | No
Virtual Pro-Wrestling 64 | Partial (very early WIP)
WCW/nWo Revenge | Partial (no Sequence data)
WWF WrestleMania 2000 | Partial (no Sequence data)
Virtual Pro-Wrestling 2 | Partial
WWF No Mercy | Partial (no Sequence data)

## Match Rulesets

View the various match rulesets in the game data.

### Game Support

All games are currently read-only.

Game | Support
--- | ---
WCW vs. nWo World Tour | No
Virtual Pro-Wrestling 64 | No
WCW/nWo Revenge | No
WWF WrestleMania 2000 | Partial
Virtual Pro-Wrestling 2 | Partial
WWF No Mercy | Partial

Data needs to be found (or re-found) for the other games.

## Menus

The Menus option (Project → Menus) allows you to change how the items are laid out on various game menus.

(todo: haven't even designed this because I don't have the data mapped, plus it's pretty different for each of the games)

## Moves

The Moves section (Project → Moves) deals with every move and animation found in the game. This is not to be confused with wrestler movesets.

(todo: this takes a lot of work to get right, considering moves are composed of multiple parts (toki1, damage, actual animation data, data required for things to be selectable in menus...), and most of the formats change per-game)

## Sound/Music

The Sound and Music editor (Project → Sound/Music) will eventually allow you to preview and change sounds. (This includes the streamed music found in WM2K, VPW2, and No Mercy.)

(todo: I haven't even begun to think about this; you're better off using SubDrag and Ice Mario's N64 sound/music tools right now)

## Stables

The Stable Editor (Project → Stables) allows you to change the default stable data. The stable data controls how the wrestlers are grouped and displayed in the menus.

### Game Support

Game | Support
--- | ---
WCW vs. nWo World Tour | Partial
Virtual Pro-Wrestling 64 | Partial
WCW/nWo Revenge | Partial
WWF WrestleMania 2000 | Partial
Virtual Pro-Wrestling 2 | Yes
WWF No Mercy | Yes

### WCW vs. nWo World Tour, Virtual Pro-Wrestling 64

Since the Stable data structures in these two games are the same, they're grouped together.

WCW vs. nWo World Tour | Virtual Pro-Wrestling 64
--- | ---

- Wrestler Definitions – Pointer to the wrestler definition data for this stable.
- Wrestler Count – Number of wrestlers in this stable.
- Championship Text Pointer – Pointer to Championship-related text for this stable.
- Championship Count – Number of Championships this stable has.

If the selected stable has any championships, the "View Championships" button will be enabled. Clicking it will open the Championships dialog with the active stable.

### WCW/nWo Revenge

- Wrestler Definitions – Pointer to the wrestler definition data for this stable.
- Wrestler Count – Number of wrestlers in this stable.
- Header Graphic – File ID of the stable graphic.

In WCW/nWo Revenge, the wrestler list is defined by pointers to the wrestler data. Due to this, not all features work at this time. Some features may appear to work, but data is not written back to ROM during the build process.

### WWF WrestleMania 2000, Virtual Pro-Wrestling 2, WWF No Mercy

Since the data structures in these three games are similar, they're grouped together.

WWF WrestleMania 2000 | Virtual Pro-Wrestling 2 | WWF No Mercy
--- | --- | ---

- Wrestler Definitions – Pointer to the wrestler definition data for this stable.
- Name Pointer (WM2K only) – Pointer to the stable name.
- Text Index (VPW2 and No Mercy only) – Index of the stable name in the relevant AkiText archive.
- Stable Name – Stable name, either from ROM (WM2K) or AkiText (VPW2, No Mercy)
- Wrestler Count (WM2K only) – Number of wrestlers in this stable.

Wrestler lists in these three games consist of ID2 values. The available buttons in the "Wrestlers" portion are:

- Move Up – Moves the selected wrestler upwards in the list.
- Move Down – Moves the selected wrestler downward in the list.
- Switch Group – Attempt to move the selected wrestler to another stable.
- Swap Wrestler – Swap the selected wrestler with another.

#### Switch Group

The Switch Group dialog is a bit odd to use since the relevant information is displayed as numbers instead of names. This will be fixed later.

#### Swap Wrestler

Much like the Switch Group dialog, the Swap Wrestler dialog displays the relevant information using numbers. This will be fixed later.

First, select the destination stable using the drop-down box. Then, select the ID2 value of the wrestler you want to swap.

## Story Mode

"Project → Story Mode" (todo)

This feature is not fully implemented, as not all data has been found. The table below shows what games will be supported once the feature is completed. For now, please disregard the table below; only VPW2 is meaningfully supported at this time.

### Game Support

Game | Support
--- | ---
WCW vs. nWo World Tour | No*
Virtual Pro-Wrestling 64 | No*
WCW/nWo Revenge | No*
WWF WrestleMania 2000 | Yes
Virtual Pro-Wrestling 2 | Yes
WWF No Mercy | Yes

Note: The Story Mode editor for World Tour, VPW64, and Revenge can be found in the Championships section, as the Championships and Story Mode are intertwined in those games.

### WWF WrestleMania 2000

(todo)

### Virtual Pro-Wrestling 2

(todo)

### WWF No Mercy

(todo)

## Weapons

"Project → Weapons" (todo)

This feature is not yet implemented. Weapon data consists of models, textures, and damage values. WWF No Mercy is different from the other games in this regard, due to its upgraded weapon system.

## Wrestlers

The Wrestler Editor (Project → Wrestlers) allows you to view information about wrestlers. Editing support is slowly being added as the program progresses.

### Game Support

Game | Support
--- | ---
WCW vs. nWo World Tour | Partial
Virtual Pro-Wrestling 64 | Partial
WCW/nWo Revenge | Partial
WWF WrestleMania 2000 | Partial
Virtual Pro-Wrestling 2 | Partial
WWF No Mercy | Partial

Most wrestler data is currently read-only. With the introduction of the Wrestler Definition file (similar to the Stable Definition file), this situation is changing.

### WCW vs. nWo World Tour, Virtual Pro-Wrestling 64

Currently read-only.

- Unknown 1 – Two-byte value with unknown purpose.
- Wrestler ID4 – Two-byte wrestler identifier.
- Wrestler ID2 – One-byte wrestler identifier.
- Flags 1 – One-byte value defining some flags.
- Unknown 2 – Two-byte value with unknown purpose.
- Name Pointer – Pointer to a string with the wrestler's name.
- Profile Pointer – Pointer to a string with the wrestler's profile text.
- Height String Pointer – Pointer to a string with the wrestler's height.
- Weight String Pointer – Pointer to a string with the wrestler's Weight.

### WCW/nWo Revenge

Currently read-only.

- Wrestler ID4 – Two-byte wrestler identifier.
- Wrestler ID2 – One-byte wrestler identifier.
- Unknown 1 – One-byte value with unknown purpose.
- Unknown 2 – Two-byte value with unknown purpose.
- Unknown 3 – Two-byte value with unknown purpose.
- Name Pointer – Pointer to a string with the wrestler's name.
- Height Pointer – Pointer to a string with the wrestler's height.
- Weight Pointer – Pointer to a string with the wrestler's Weight.
- Unknown 4 – One-byte value with unknown purpose.
- Manager ID2 – ID2 value for the manager assigned to this wrestler.
- Unknown 5 – One-byte value with unknown purpose.
- Unknown 6 – One-byte value with unknown purpose.

### WWF WrestleMania 2000

Largely read-only.

- Wrestler Name – The wrestler's name, including control characters for defining the short name. (read-only)
- Wrestler ID4 – Two-byte wrestler identifier. (read-only)
- Wrestler ID2 – One-byte wrestler identifier. (read-only)
- Height – Wrestler's height, displayed in hex and in feet/inches.
- Weight – Wrestler's weight, displayed in hex and in pounds.
- Moveset Index – File ID of the wrestler's moveset. (read-only)
- Params Index – File ID of the wrestler's parameters. (read-only)
- Theme Music – Theme song used by this wrestler.
- Entrance Video – Titantron "video" used by this wrestler.
- Unknown – Two-byte value with unknown purpose. (read-only)
- Costume Pointer 1-4 – Pointers to the default costume data for this wrestler. Pressing "View/Edit" will bring up the WM2K default costume editor. (read-only, including the costume "editor")

### Virtual Pro-Wrestling 2

Largely read-only. (I had to do all these changes with a hex editor for VPW2 freem Edition.)

- Wrestler ID4 – Two-byte wrestler identifier. (read-only)
- Wrestler ID2 – One-byte wrestler identifier. (read-only)
- Theme Music – Theme song used by this wrestler.
- Name Call – The name the ring announcer uses during introductions.
- Height – Wrestler's height, displayed in hex and in centimeters.
- Weiight – Wrestler's weight, displayed in hex and in kilograms.
- Voice A – Voice used for (attack or taunt).
- Voice B – Voice used for (attack or taunt).
- Moveset Index – File ID of the wrestler's moveset. (read-only)
- Params Index – File ID of the wrestler's parameters. (read-only)
- Appearance Index – Index of the wrestler's first costume in the default costume data. Value is read-only. Pressing "View/Edit" will bring up the VPW2 default costume editor.
- Profile Index – Index of the wrestler's first entry in the default wrestler name `AkiText` archive.

### WWF No Mercy

Largely read-only.

- Wrestler ID4 – Two-byte wrestler identifier. (read-only)
- Wrestler ID2 – One-byte wrestler identifier. (read-only)
- Theme Music – Theme song used by this wrestler.
- Entrance Video – Titantron "video" used by this wrestler.
- Height – Wrestler's height, displayed in hex and in feet/inches.
- Unknown – One-byte value with unknown purpose. (read-only)
- Weight – Wrestler's weight, displayed in hex and in pounds. Unlike previous games, uses two bytes.
- Moveset Index – File ID of the wrestler's moveset. (read-only)
- Params Index – File ID of the wrestler's parameters. (read-only)
- Appearance Index – Index of the wrestler's first costume in the default costume data. Value is read-only. Pressing "View/Edit" will bring up the No Mercy default costume editor.
- Profile Index – Index of the wrestler's first entry in the default wrestler name `AkiText` archive.

## Tools

VPW Studio also provides tools that aren't tied to the concept of Projects. The tools in this section can be used without needing an open Project.

### Model Tool

The original Model Tool (not to be confused with ModelTool2) was the first attempt at providing model data information. Unlike ModelTool2, it shows the list of vertices and faces.

Much like ModelTool2, you can export the model to Wavefront OBJ format via the "Export OBJ..." button.

### PNG Conversion

Though the preferred way to convert PNG files is to include them in the project via the File Table, sometimes you need to generate target files separately from the build process.

- PNG to AKI TEX – Converts a PNG to TEX format. PNG must be 16 or 256 colors.
- PNG to CI4Texture – Converts a PNG to CI4 format. PNG must be 16 colors.
- PNG to CI8Texture – Converts a PNG to CI8 format. PNG must be 256 colors.
- PNG to Menu Background – Converts a 320x240 PNG to binary menu background chunks.

Aside from needing to use "PNG to AKI TEX" to fix transparency problems, you will likely not need to use these tools.

(These items formerly appeared in the Danger Zone menu. They were moved out of the Danger Zone menu in pre-Alpha Preview 23.)

## Danger Zone

The Danger Zone is a collection of tools that is not necessarily meant for end users. These tools are typically rough and unfinished, and usually serve as the base for the final, more polished features. Starting with pre-Alpha Preview 15, items are grouped by their general purpose.

### LZSS-related

- lzss compress test – LZSS compress a file. File is exported as `(filename).lzss`.
- lzss decompress test – Decompress an LZSS file. File is exported as `(filename).bin`.

### Others

- name encoder/decoder – Tool for encoding and decoding the name format used from WCW vs. nWo World Tour through WWF WrestleMania 2000.
- toki 1 test – View Toki1 info. Requires an open project.
- vpw2/wm2k face test – Attempts to render faces given specific values. Requires an open VPW2 or WM2K project. Originally designed for VPW2; WM2K support is WIP.
- stable parse test – Internal test of parsing the text StableDefinition format. Only properly handles VPW2 and No Mercy formats.
- rom slice test – Test the HexViewerManager by getting a specific slice of ROM data. Requires an open project.
- open file in hex viewer – Open an external file in the hex viewer.
- move damage test – Show move damage values. Requires an open project.
- move anim/prop test – Show move animation and property values. Requires an open project.
- text index tool – Convert from WM2K, VPW2, and No Mercy text index values to location and index.
- vpw64/revenge costume test – attempt to read default costume data. only works with VPW64 and Revenge.
- tim test – Tests loading of TIM files (PlayStation textures) and their internal CLUT/palette values.
- test scene 3d – attempting to display multiple models at once. requires an open project file. incomplete and very awkward to use, only recommended for experts and the terminally curious.
- param unpack test – attempt to test wrestler parameter unpacking. only works properly with vpw2, wm2k, and no mercy. all other N64 AKI games use unpacked parameters.
- string render test – eventually this will be used to test string rendering using the available game fonts.
- client test – don't use this unless your name is "freem". seriously, it requires other moving parts that I haven't finalized yet.
- code segment test – displays code segment information and also provides a "pointer to ROM" address calculator that takes the code sections into account. Explained further below.
- split model test – attempt to convert split model files (as found in AkiArchive files) to Wavefront OBJ format. (key word "attempt"; there are still some issues.)

### code segment test

This tool shows code segment information for the current game. The combo box at the top of the form contains the available code segments. (Global/"main" segment not included.)

Explanations for each displayed item:

- ROM start address – Starting address of this segment in the ROM file.
- ROM end address – Ending address of this segment in the ROM file.
- Segment RAM start address – Starting address where this segment is loaded into RAM.
- Segment RAM code start address – Starting address of the code portion of this segment.
- Segment RAM code end address – Ending address of the code portion of this segment.
- Segment RAM data start address – Starting address of the data portion of this segment.
- Segment RAM data end address – Ending address of the data portion of this segment.
- Segment BSS vars start address – Starting address of any uninitialized RAM variables used in this segment.
- Segment BSS vars end address – Ending address for the aforementioned uninitialized RAM variables.

It is important to note that data in BSS areas can not be found in the ROM.

The arguably more useful function of this tool is the "Pointer to ROM" conversion. This attempts to convert a RAM pointer (an address of the form `80xxxxxx`) to its location in ROM. However, some care must be taken in order to enure the conversion will work properly.

First, you must determine where the pointer "lives". This is typically either the main segment, or one of the other code segments. If searching for a main segment pointer, you do not need to worry about the current segment selection. For the other code segments, you must select the segment that the pointer exists in. If the pointer falls between the "Segment RAM start address" and "Segment RAM data end address" values mentioned above, you're good to go. Keep in mind, though, that multiple segments can be loaded to the same location (not at the same time, obviously).

Once you have determined the location of the pointer you want to convert, type the address into the textbox, then press the Convert button or Enter key. If the conversion was successful, the ROM address will appear on the other side of the Convert button. Otherwise, it will display an error message.

Error messages include:

- "(BSS; no ROM address)" – The address is in the BSS area of this segment. There is no ROM address available.
- "(main BSS; no ROM address)" – Like the previous message, but for the main segment.
- "(not in cur segment)" – This pointer is in a different code segment than the one selected.

It is still possible to get false positives, as not every memory location is easily "findable" per-game. (Examples include the `malloc` area and any framebuffers).

Chapter 3: "No, seriously, how do I..."

For various reasons, some common/expected tasks have non-obvious directions. This section attempts to cover these tasks, as well as things that have been asked for in the past, but are not possible with the program.

## Edit Wrestler Movesets and Parameters

Editing wrestler movesets and parameters is different per-game. It is easiest to accomplish in the later three N64 games (WWF WrestleMania 2000 and later), but requires a small bit of work on your part.

The overall method is similar, but details differ per game:

1. Create your character with the desired parameters and moveset in Edit Mode/Smackdown Mall.
2. Load a match with your CAW/edited character in the first slot (or wherever, or with multiple edits...)
3. Dump the moveset and parameters data from RAM into two separate files.
4. Replace the existing moveset and param files in the File Table with the newly dumped data.

For Project64 v2.4 and later, ensure the debugger is enabled. If it's not enabled, go to Options → Settings → Options and uncheck "Hide advanced settings. Then, go to the Advanced section and make sure "Enable debugger" is checked. This should enable the "Debugger" menu. While the game is loaded, select Debugger → Memory → Dump, and a dialog should appear.

dump instructions

- Set "Start VAddress" to one of the values in the tables below, based on what you want to dump. The beginning `0x` (as seen in the screenshot) is required.
- "End VAddress" needs to be calculated based on what you're dumping. Take the base value from the table, then add the data length to it. Using a hex-capable calculator is highly recommended. Again, `0x` is required at the beginning of the address.
- Ensure "Use alternate PC" is unchecked.
- Set the filename based on what you're dumping (e.g. `wrestler_moves.bin`, `wrestler_params.bin`). Using the "..." button next to the filename box is recommended.
- "Format" should be "RAW - Big Endian (N64)".

### WCW/nWo Revenge and earlier

Information on movesets and parameters in these games is scarce. RagDas and Melonbread know something about them, but I haven't gotten around to actually reading/taking in the information.

### WWF WrestleMania 2000

Since WrestleMania 2000 has multiple regional releases, the locations you need to dump from will change based on which version you're using. The good news is that Parameter data will always be 30 (`0x1E`) bytes, and Moveset data will always* be 180 (`0xB4`) bytes.

NTSC-U and PAL
Player | Moveset | Parameters
--- | --- | ---
P1 | 8008DC34 | 8008DCFC
P2 | 8008DD28 | 8008DDF0
P3 | 8008DE1C | 8008DEE4
P4 | 8008DF10 | 8008DFD8

NTSC-J
Player | Moveset | Parameters
--- | --- | ---
P1 | 8008BF84 | 8008C04C
P2 | 8008C078 | 8008C140
P3 | 8008C16C | 8008C234
P4 | 8008C260 | 8008C328

* This exception is for RagDas; I don't have the necessary details offhand for dealing with Combo or Shootfighting styles in WM2K.

### Virtual Pro-Wrestling 2

VPW2 is trickier to deal with, due to having multiple Fighting Styles. The length of the moveset data differs depending on the Fighting Style set in the Parameters.

Parameter data is 30 (`0x1E`) bytes long. As for movesets...

- Wrestling – 176 (`0xB0`) bytes
- Combo – 180 (`0xB4`) bytes
- Shootfighting – 126 (`0x7E`) bytes

Player | Moveset | Parameters
--- | --- | ---
P1 | 800980D4 | 8009819C
P2 | 80098205 | 800982CD
P3 | 80098336 | 800983FE
P4 | 80098467 | 8009852F

A semi-automated dumping method is available for versions of Project64 that support JavaScript. Two relevant files are available in the "Tools" folder: `memdump.js` and `moveparam_vpw2.html`. Put `memdump.js` in Project64's `Scripts` directory, run the memdump script in Project64, then open `moveparam_vpw2.html` in a web browser and save the links on the page after loading a match with the desired wrestler(s).

### WWF No Mercy

Two regions, two revisions. Luckily, there's only one Fighting Style available.

Parameter data is 32 (`0x20`) bytes long. Movesets are 184 (`0xB8`) bytes long.

NTSC-U and PAL v1.0
Player | Moveset | Parameters
--- | --- | ---
P1 | 80099514 | 800995CC
P2 | 80099628 | 800996E0
P3 | 8009973C | 800997F4
P4 | 80099850 | 80099908

NTSC-U v1.1/Revision A
Player | Moveset | Parameters
--- | --- | ---
P1 | 80097FE4 | 8009809C
P2 | 800980F8 | 800981B0
P3 | 8009820C | 800982C4
P4 | 80098320 | 800983D8

PAL v1.1/Revision A
Player | Moveset | Parameters
--- | --- | ---
P1 | 80097EE4 | 80097F9C
P2 | 80097FF8 | 800980B0
P3 | 8009810C | 800981C4
P4 | 80098220 | 800982D8

## Prepare a Finished Project for Distribution

Note: This only covers the patch creation process. You are responsible for any hosting, documentation, etc.

Let's say you've finished a project and want to share it with the rest of the world. The easiest way would be to distribute the built ROM file, but that runs afowl of copyright laws. ROM hacks are often distributed as patches, which are applied to unmodified versions of the game. This way, the hack's creator does not redistribute the original copyrighted ROM content, only a file with the "instructions" for making changes. The end user is meant to supply their own ROM (ideally, legally backed up from their own copy).

There are many patch formats out there. Some are better suited than others. The Goldeneye and Perfect Dark hacking communities have agreed on the `xdelta` format, which makes it a good fit for our purposes as well. Other suitable formats exist, but they will not be covered here.

### ROM Formats

Since VPW Studio only supports editing Z64 format ROMs, the base ROMs (for both editing and patch creation) must be in Z64 format as well. Creating patches for other N64 ROM formats is out of scope of this manual.

### ROM Padding

This step might not be required, but it's good to know about. N64 game ROMs tend to be specific sizes, with any unused space filled with `0xFF` bytes.

Depending on what you change in your project, your built ROM could be smaller or larger than the original unhacked ROM. If it's smaller, pad the built ROM using `0xFF` bytes until it reaches the boundary. If it's larger, then you'll have to pad it to the next largest boundary. If you've somehow made a ROM over 64 megabytes, it probably won't work on the real N64 hardware.

Original ROM sizes for each game:

- WCW vs. nWo - World Tour – 12,582,912 bytes (12 megabytes; 96 megabits)
- Virtual Pro-Wrestling 64 – 16,777,216 bytes (16 megabytes; 128 megabits)
- WCW/nWo Revenge – 16,777,216 bytes (16 megabytes; 128 megabits)
- WWF WrestleMania 2000 – 33,554,432 bytes (32 megabytes; 256 megabits)
- Virtual Pro-Wrestling 2 – 33,554,432 bytes (32 megabytes; 256 megabits)
- WWF No Mercy – 33,554,432 bytes (32 megabytes; 256 megabits)

### Patch Creation

todo: certain versions of xdelta force a secondary compression type that won't work with Web Patcher JS; not sure how to handle this with xdelta UI

On Windows, "xdelta UI" is recommended. Open xdeltaUI, then switch to the "Create Patch" tab, and follow these steps:

1. Click "Open..." next to the "Original File" textbox, and select the unmodified original ROM (in Z64 format) for the game you're editing.
2. Click "Open..." next to the "Modified File" textbox, and select the built ROM from your project.
3. Click "..." next to the "Patch Destination" textbox, and enter a relevant name for your patch.
4. Finally, click the "Patch" button to create the patch.

For command line/terminal users: `xdelta3 -e -S none -s old_file new_file delta_file`

The `-S none` is included to disable any default secondary compressor. This is recommended for compatibility purposes, as Web Patcher JS does not support any secondary compression functionality.

### Checksums and Hashes

Multiple checksums and hashes are involved with the ROM, as well as some of the emulators and flash carts used to play the ROM. All hashes should be calculated on the built ROM (after adding padding, if necessary).

#### N64 Internal Checksums

Every N64 ROM has two internal checksums (4 bytes each, at offsets 0x10 and 0x14). If these are not correct with respect to the ROM's data, the game will not start. VPW Studio corrects/recalculates the internal checksums when building a project's ROM, so you shouldn't run into any problems. The only exception is if you try to edit the built ROM in a hex editor. If you do that, you will need to recalculate the internal checksums (preferably with an external tool).

#### CRC32

One of two hash types used by MAME's software lists. Not really recommended outside of this specific use case.

#### MD5

Used by Mupen64Plus to identify ROMs in its game database.

#### SHA-1

One of two hash types used by MAME's software lists.

#### Unmodified ROM Checksums and Hashes

For reference, here are the checksums and hashes for unmodified Z64 format ROMs that VPW Studio supports:

Game and Variant | Internal 1 | Internal 2 | CRC32 | MD5 | SHA-1
--- | --- | --- | --- | --- | ---
WCW vs. nWo - World Tour [NTSC-U v1.0] | `2C3E19BD` | `5113EE5E` | `DFBFC61F` | `203C3BBFDD10C5A0B7C5D0CDB085D853` | `5AD2D8359058C8BB71F08E3D3433B7A50D3BB645`
WCW vs. nWo - World Tour [PAL] | `8BDBAF68` | `345B4B36` | `37F358EB` | `553D8D5347969C66E5D91C3FE35208B9` | `840B8B6303ACACEB49619EB1533CB4221CDEC474`
WCW vs. nWo - World Tour [NTSC-U v1.1/Rev A] | `71BE60B9` | `1DDBFB3C` | `A74DA07A` | `B7A220B59303D47F3BEAE233CA868CFD` | `60814FB3AD2DD206BADBEEE47C07636357DD0D7E`
Virtual Pro-Wrestling 64 [NTSC-J] | `045C08C4` | `4AFD798B` | `E6651803` | `5E6202200AF40A8F026780EDFE1E15D0` | `F9E9FA2ED819C3A39DB5CB6AFECA186F021DB5ED`
WCW/nWo Revenge [NTSC-U] | `DEE596AB` | `AF3B7AE7` | `54CBAAA8` | `C1384F3637D7A381B29341FED3EF3CEB` | `E1711A2511394B9357B5F1AC8CA5CC17BD674836`
WCW/nWo Revenge [PAL] | `68E8A875` | `0CE7A486` | `8AF0F964` | `30C6676EC1D62122F4E7607EF3ABBD41` | `C59315A3E7A6E8124495477656A77E4619DAC104`
WWF WrestleMania 2000 [NTSC-U] | `90A59003` | `31089864` | `0B50B4C6` | `D9030CA30E4D1AF805ACCE1BFED988CC` | `442D417A52ED672CA1A47E7261A5414DEBB1E27A`
WWF WrestleMania 2000 [PAL] | `C71353BE` | `AA09A6EE` | `09D710C7` | `B75149F87CC5F3A508643AC377F2FCC9` | `D37C4100D967CB8B71852993B947619467FFCAF7`
WWF WrestleMania 2000 [NTSC-J] | `12737DA5` | `23969159` | `C2034D24` | `11EEE2F34BF8DA05A1B8F4FB9FE9F74C` | `E020C26DEDE0C349181CF08A3541816DC47F63A8`
Virtual Pro-Wrestling 2 [NTSC-J] | `CD094235` | `88074B62` | `F620835D` | `90002501777E3237739F5ED9B0E349E2` | `82DD25A044689EAB57AB362FE10C0DA6388C217A`
WWF No Mercy [NTSC-U v1.0] | `4E4B0640` | `1B49BCFB` | `B33F44F0` | `04C492BE7F89FC6F425238BD67629544` | `3566D9B5723291937582453AD0453CE517CFC358`
WWF No Mercy [PAL v1.0] | `6D8DF08E` | `D008C3CF` | `E88D7E16` | `D94A8F78178473D4BA4BED62FA8E2E66` | `15AD0A48DBB2DA32B39601E6BFB5D7B381853529`
WWF No Mercy [NTSC-U v1.1/Rev A] | `6C80F13B` | `427EDEAA` | `BACEEA13` | `66B8EC24557A50514A814F15429BD559` | `91CEE3D096F4A76644D8B35B9AEAD6448909ABD1`
WWF No Mercy [PAL v1.1/Rev A] | `8CDB94C2` | `CB46C6F0` | `43BA9E7E` | `400A14F132D993F5544F8B008EC136FA` | `CC8B9863C0E96D1B6A611D6AC2238E38B247EA5D`
WWF No Mercy [June 2000 E3 Prototype] | `7BFEE838` | `AAC6603C` | `E6DDCA14` | `44572B3AD9A45569331C3B29BA8433FC` | `665D1306C9C6F5F70D3DAF97E77EC5891956B7AD`
WWF No Mercy [July 19, 2000 Prototype] | `24784E97` | `E0D245DB` | `F73FCC5F` | `42C33D518A4E8266720F1269B46D0A29` | `80645E8769D414CC2CDBFFD415127DA0DFAF2BF6`
WWF No Mercy [August 2000 Prototype] | `24784E97` | `E0D245DB` | `275FD3E6` | `DE6304BA0A5B0FB0DF7A54640D3AA14E` | `914F9409B0EE5E3709F9CD82567352981B19E5F7`
WWF No Mercy [Sept. 11, 2000 Prototype] | `8A0AE9D6` | `CE038A9D` | `A526FF27` | `5CE490CF86CFEABF28C19B4C8AFC3F24` | `1C2C5969F176A3A781CFC4D8A8E44DAF3632AD64`

## (something that isn't possible with this program)

Many requested things are not possible with VPW Studio, even if more development time is dedicated to it. This is just a small list of things I've seen requested over the past few decades, as well as reasons why they can't be supported.

### Edit default wrestlers' movesets in-game

One of the most often asked questions involves editing the movesets of default wrestlers within the game itself. This is not possible because the default wrestler movesets are NOT stored in the save data, and are always read from ROM. Making this work requires a disassembly of the game, as well as finding or making space in the save data for the default wrestlers' movesets.

### Add items instead of replacing them

VPW Studio operates on replacing items, since there are multiple issues related to adding files to the File Table. Some of these issues are as follows:

- Hardcoded File IDs – Various places in the game code expect specific File IDs. Adding or removing files from the File Table would require these hardcoded IDs to be changed.
- File ID Assumptions – Following on the above, some parts of the game code assume that certain files start at a specific ID. This is different from the hardcoded IDs in that the game will treat the successive IDs as a sequence. Some examples are: move animations, wrestler faces, facial hair, etc.
- Internal Data Structures – Some data structures (e.g. wrestler movesets) rely on specific data widths. Adding more selectable moves to certain slots would require expanding the available list of moves, which is a non-trivial task.

There's also the matter of adding data that isn't editable in the File Table, such as arena and wrestler definitions. These require a disassembly to properly modify.

Chapter 4: Everything Else

## External Tools

Starting with Pre-Alpha Preview 24, VPW Studio includes some extra stand-alone programs that are useful for development purposes. These programs are located in the "Tools" directory.

### VPW Studio Palette Conversion Tools

Two stand-alone tools are provided for converting JASC Paint Shop Pro palette files to the VPW Studio palette format (`.vpwspal`). These tools are meant to be used from the Command Prompt, but file drag-and-drop works as well.

(For more information on these tools, see the original repository: https://github.com/AKI-Club/vpwspal)

#### `vpwspalconv`

`vpwspalconv` converts a single Paint Shop Pro palette to VPW Studio format. All palette values are given an alpha value of 255, so you'll have to edit the file if you need transparency for any color(s).

Usage: `vpwspalconv JASC_PAL_FILE`

You can also drag and drop a single JASC `.pal` file onto the `vpwspalconv` executable icon to convert a palette.

#### `vpwspalmerge`

`vpwspalmerge` merges multiple 16-color Paint Shop Pro palettes into a single VPW Studio palette file, taking advantage of sub-palettes.

Usage: `vpwspalmerge JASC_PAL_FILE1 JASC_PAL_FILE2 [...]`

There must be at least two palette files passed in. If you need to convert a single palette, use `vpwspalconv` instead.

The output `.vpwspal` file name depends on the first file passed into the program.

Drag and drop functionality is also available for `vpwspalmerge`, but you need to be careful when selecting multiple files to merge.

Sub-palette order is influenced by the order of the passed in filenames, so remember to put the filenames in the proper order for output.

## Credits

(todo: very incomplete)

- Main Programming – freem
- Assistance – Zoinkity, S.K. Stylez, Keson, jordyad, RetroRandy, Melonbread, WldFb
- Special Thanks – Baker64

VPW Studio uses OpenTK 3 and Be.HexBox, both of which are MIT licensed.

This tool is dedicated to the memory of Maximo.

## Appendix A: Glossary

Various communities create and use jargon to refer to ideas and concepts. The Virtual Pro-Wrestling series hacking communities are no exception. In addition, terms from other communities need to be borrowed or referenced from time to time, and they may not be familiar to everyone. This even extends to programs whose name and function are not immediately obvious.

Addy
  Short for "address", as in "memory address".
BPP
  Short for "bits per pixel", the number of bits required to represent a single pixel in an image.
Broad Action
  The general action the wrestler is performing. A Broad Action can have several "Sub-Actions" (or "action states", if you prefer).
BSS
  Short for "block starting symbol", the area dedicated to variables that are declared but undefined. These values are not in the ROM.
CI4
  16 color (4bpp) texture format used on Nintendo 64.
CI8
  256 color (8bpp) texture format used on Nintendo 64.
CLUT
  Color Look-Up Table; PlayStation palette format.
Doctor V64
  Unofficial Nintendo 64 development tool and backup device that connects under the N64. Also allows for loading games off of a CD-ROM. Origin of the V64 ROM format.
EUC-JP
  Extended Unix Code, a type of text encoding. The "JP" is specific for Japanese. Primarily appears in Virtual Pro-Wrestling 64.
I4
  16 value (4bpp) intensity texture format used on Nintendo 64.
ID2
  One of the two ways of identifying a wrestler. This value is one byte and controls indexing into various arrays and structures. ID2 values are always given in hex.
ID4
  One of the two ways of identifying a wrestler. This value is two bytes, being used as a unique identifier (not necessarily matching the ID2 order). ID4 values are always given in hex.
Midwaydec
  A "dead" tool by Zoinkity that handles various N64 archive formats.
Mr. Backup Z64
  Unofficial Nintendo 64 backup device that connects to the N64's cartridge slot. Originally shipped with a Zip drive, but can be modified to use other storage mediums. Origin of the Z64 ROM format.
Offsetter
  Another Zoinkity-created tool for inserting files into a VPW2 ROM and fixing the relevant offsets. VPW Studio largely owes its existence to this program, particularly the File Table portion.
Pointer
  A value that points to a specific location/address in memory.
Shift JIS
  One of the Japanese text encodings used by AKI's wrestling games. Primarily used in Virtual Pro-Wrestling 2.
TIM
  PlayStation texture format.
Toki
  "Toki" by itself is short for Tokidoim, the person who found the "Animation Stat Mods". This shortened nickname is used as a synonym for "Animation Stat Mods" by the majority of the AKI hacking community.
Toki 1
  Originally known as "Animation Stat Mods 1", the Toki 1 values control a large number of parameters for moves.
Toki 2
  Originally known as "Animation Stat Mods 2", the Toki 2 values control:
  - Player's "general" animation at the end of the previous animation.
  - Facing direction at the end of the animation.
  - Number of frames in the animation.
Toki 3
  Toki 3 values are related to items in the File Table. Depending on who you ask, they're either the file IDs themselves, or the location of the data in the ROM (relative to the start location of the first file in the archive).
V64
  One of the primary ROM formats used for Nintendo 64 games, typically dumped using a Doctor V64. Compared to Z64, it's byte swapped.
Z64
  One of the primary ROM formats used for Nintendo 64 games, typically dumped using a Mr. Backup Z64. This is the recommended format for ROM hacking.