Difference between revisions of "PlasmaShop"

(Setting Up PlasmaShop)
(Added some tutorials and stuff)
Line 1: Line 1:
PlasmaShop is a useful general tool for many age-related tasks that lie outside of what the PRP Blender Plugin can do: create PAK files, decompyle/compile Python scripts, sum age files, etc.  It is maintained by Zrax.
+
PlasmaShop is a useful general tool for many age-related tasks that lie outside of what the PRP Blender Plugin can do: create PAK files, decompyle/compile Python scripts, generate and update checksum (SUM) files, etc.  It is written and maintained by Zrax.
  
==Setting Up PlasmaShop==
 
  
 +
==Setting Up PlasmaShop for Uru Installations==
 
# In the Python folder of your standalone URU installation, create a new folder named "src"
 
# In the Python folder of your standalone URU installation, create a new folder named "src"
 
# Download Python 2.2.3:  http://www.python.org/ftp/python/2.2.3/Python-2.2.3.exe
 
# Download Python 2.2.3:  http://www.python.org/ftp/python/2.2.3/Python-2.2.3.exe
Line 13: Line 13:
 
# In the Edit Games dialog, click on "Add Game..."
 
# In the Edit Games dialog, click on "Add Game..."
 
## Set "Game Name:" to "Standalone URU"
 
## Set "Game Name:" to "Standalone URU"
## Set "Game Type" to "URU" (for an URU:Ages Beyond Myst install) or "TPOTS" (for an UrU:The Path Of The Shell or URU:Complete Chronicles install:
+
## Set "Game Type" to "Uru: Prime" (for an URU: Ages Beyond Myst install), "Uru: PotS/CC" (for an UrU: The Path Of The Shell or URU: Complete Chronicles install) or "Uru Live" (for a Myst Online: Uru Live install).
 
## Set "Location" to your standalone URU Installation (e.g. C:\Program Files\Ubi Soft\Cyan Worlds\Myst Uru Complete Chronicles)
 
## Set "Location" to your standalone URU Installation (e.g. C:\Program Files\Ubi Soft\Cyan Worlds\Myst Uru Complete Chronicles)
 
## Click Save
 
## Click Save
 +
## Repeat these steps for each game you have installed that you want to edit with PlasmaShop.  PlasmaShop also supports Myst 5, Hex Isle, and CrowThistle games.
 
# Close the Edit Games dialog.  The left column of the PlasmaShop window should now list several folders.
 
# Close the Edit Games dialog.  The left column of the PlasmaShop window should now list several folders.
 
# Choose "Options..." from the File menu.
 
# Choose "Options..." from the File menu.
 
# On the Options dialog, go to the Python tab.
 
# On the Options dialog, go to the Python tab.
 
## Set "Python 2.2 Interpreter" to the Python.exe located in your Python-2.2.3 installation
 
## Set "Python 2.2 Interpreter" to the Python.exe located in your Python-2.2.3 installation
 +
## For Myst 5, Hex Isle and Myst Online: Uru Live games, you will also need [http://www.python.org/ftp/python/2.3.5/Python-2.3.5.exe Python 2.3], which can be installed the same was as Python 2.2
 
## Click the Save button
 
## Click the Save button
 +
 +
 +
==Extracting your python.pak==
 
# In the left column of the PlasmaShop window, expand the Python folder and double-click on python.pak.
 
# In the left column of the PlasmaShop window, expand the Python folder and double-click on python.pak.
 
# After a few seconds, a dialog will appear with a list of the compiled Python files contained by python.pak.   
 
# After a few seconds, a dialog will appear with a list of the compiled Python files contained by python.pak.   
 
# Click "Extract All...". Then browse to the "src" folder in the Python folder of your standalone URU installation.
 
# Click "Extract All...". Then browse to the "src" folder in the Python folder of your standalone URU installation.
# Exit PlasmaShop.
+
# Click "Yes" to automatically decompyle the source as it's being extracted.  (This will take a while)
 +
# The tree on the left will refresh once it's finished extracting and decompyling.  Expand the "Python" folder again, and then the "src" folder, and you should see all of your python source files.
 +
 
 +
 
 +
==Adding files to a new .pak file==
 +
# Select File -> New -> Python PAK.
 +
# A "Save As" dialog will pop up.  This will create a *new* .pak file, so be sure not to overwrite an existing .pak file.
 +
# An empty PAK editor will appear.  Click on "Add Files..."
 +
# Select all of the files you want to add to this PAK.  They will be compiled automaticaly when you click "open".  You can either select them all at once or add them one at a time
 +
# Make sure to read the output window to see if there are any errors in compyling your source.  If there are any, the file won't get added to the PAK!
 +
# To update the files in an existing PAK file, just select "Add Files..." and re-add the same files.  They will automatically be replaced with the new versions, so you don't have to delete your PAK and start all over again.
 +
# Close the PAK dialog
 +
 
 +
 
 +
==Updating a .sum file==
 +
# Expand the "Ages" folder in the file view on the left.
 +
# Select the age whose .sum file you wish to update and expand it.
 +
# Double-click on the "Sum File" entry.
 +
# If none of the file names have changed, you can just press "Re-sum" to check and update all of the checksums for an age.
 +
# If new files have been added, or filenames have changed, you can either automatically detect the age's files (excluding sounds) by pressing the "Auto-build Sumfile" button.
 +
# To manually edit entries in the sum file (for example, to add sounds to the checksum), use the "Add File" and "Remove File" buttons.  These are not usually necessary for most people.
 +
# Close the Sum file dialog
 +
 
 +
 
 +
==Creating a Font for your age==
 +
Uru supports bitmapped (raster) fonts, which can be used in numerous places in the game, including Journals, GUI elements and DynamicTextMaps.  PlasmaShop provides some functionality for creating and editing these fonts.
 +
 
 +
# The very first step is to create the font itself.  You can do this either from an actual Font (TrueType/OpenType/raster font), or by hand with a graphics editor.
 +
## Once you have your font, use a graphics editor (like Paint or The Gimp) to lay out all of your characters in a vertical line, one character per row.  The source image should have the width of the widest character in the font, however the actual width of each character will be specified later.
 +
## It's easier if you also make each character have the same height, and include space for exactly 256 characters...  This isn't really necessary, but it makes things a lot easier later on.
 +
## Once you have the whole font in your editor, save it as a greyscale (256 shades of gray) BMP file.  It is very important that it stays in this format, so it can be rendered properly by the game.
 +
# From PlasmaShop, select File -> New -> Font.
 +
# You can specify the name, size, and properties of the font.  This does not affect the rendering of the font at all, but it allows the game to find the font it's looking for (so when you use it in your PRP or Journals, be sure to specify it the same way as you set it up here in PlasmaShop)
 +
# From the Font menu, select "Load Font Bitmap".
 +
# Select the bitmap you created above.  PlasmaShop will attempt to split the bitmap into 256 characters.  If you don't have exactly 256 characters all with the same height, your font will probably look very messed up -- but that's ok, because you can fix it :)
 +
# Whether or not the characters were selected correctly, you will need to edit each character (double click on it to open it in the character edtior)
 +
## To align a character to the correct location in the bitmap, drag it up and down in the preview pane.  You may have to resize the Character Editor window to see the whole character.
 +
## Once the top cuts off where it should, change the "Letter Height" field to ensure the whole character is in view
 +
## Use "Start Height" to move the character up or down as necessary, so that the red line in the preview window denotes the "bottom" of the character.  for letters like g and p, you will likely have a tail that goes below the red line (a negative height).
 +
## "Move Before" and "Move After" show where the character begins and ends.  Move these around to position the green lines as necessary to denote the beginning and end of the character.
 +
### Specifically, when drawing a character, Uru will align the second green line of the previous character with the first green line of the current character to position the two characters correctly with each other.  Hence the names "Move Before" and "Move After".
 +
## While editing characters, make sure you pay attention to the character in the title of the Edit Letter window, as that is the ANSII character that Uru expects to find at that location.  I have not experimented with Unicode fonts in Uru, so I don't know if they work as expected or not.
 +
## Once you're finished editing all of the characters, be sure to Save the font file in your dat folder.

Revision as of 16:40, 2 August 2008

PlasmaShop is a useful general tool for many age-related tasks that lie outside of what the PRP Blender Plugin can do: create PAK files, decompyle/compile Python scripts, generate and update checksum (SUM) files, etc. It is written and maintained by Zrax.


Setting Up PlasmaShop for Uru Installations

  1. In the Python folder of your standalone URU installation, create a new folder named "src"
  2. Download Python 2.2.3: http://www.python.org/ftp/python/2.2.3/Python-2.2.3.exe
  3. Run Python-2.2.3.exe to install it. Leave all the options selected.
  4. Download PlasmaShop: PlasmaShop-2.2.zip
  5. Unzip its contents to your desired target folder - there is no installer.
  6. Download PRPTool: PRPTool-0.2.zip
  7. Unzip its contents into the PlasmaShop folder - PlasmaShop uses this to explore PRP files.
  8. Run PlasmaShop.exe. Choose Edit Games... from the Games menu.
  9. In the Edit Games dialog, click on "Add Game..."
    1. Set "Game Name:" to "Standalone URU"
    2. Set "Game Type" to "Uru: Prime" (for an URU: Ages Beyond Myst install), "Uru: PotS/CC" (for an UrU: The Path Of The Shell or URU: Complete Chronicles install) or "Uru Live" (for a Myst Online: Uru Live install).
    3. Set "Location" to your standalone URU Installation (e.g. C:\Program Files\Ubi Soft\Cyan Worlds\Myst Uru Complete Chronicles)
    4. Click Save
    5. Repeat these steps for each game you have installed that you want to edit with PlasmaShop. PlasmaShop also supports Myst 5, Hex Isle, and CrowThistle games.
  10. Close the Edit Games dialog. The left column of the PlasmaShop window should now list several folders.
  11. Choose "Options..." from the File menu.
  12. On the Options dialog, go to the Python tab.
    1. Set "Python 2.2 Interpreter" to the Python.exe located in your Python-2.2.3 installation
    2. For Myst 5, Hex Isle and Myst Online: Uru Live games, you will also need Python 2.3, which can be installed the same was as Python 2.2
    3. Click the Save button


Extracting your python.pak

  1. In the left column of the PlasmaShop window, expand the Python folder and double-click on python.pak.
  2. After a few seconds, a dialog will appear with a list of the compiled Python files contained by python.pak.
  3. Click "Extract All...". Then browse to the "src" folder in the Python folder of your standalone URU installation.
  4. Click "Yes" to automatically decompyle the source as it's being extracted. (This will take a while)
  5. The tree on the left will refresh once it's finished extracting and decompyling. Expand the "Python" folder again, and then the "src" folder, and you should see all of your python source files.


Adding files to a new .pak file

  1. Select File -> New -> Python PAK.
  2. A "Save As" dialog will pop up. This will create a *new* .pak file, so be sure not to overwrite an existing .pak file.
  3. An empty PAK editor will appear. Click on "Add Files..."
  4. Select all of the files you want to add to this PAK. They will be compiled automaticaly when you click "open". You can either select them all at once or add them one at a time
  5. Make sure to read the output window to see if there are any errors in compyling your source. If there are any, the file won't get added to the PAK!
  6. To update the files in an existing PAK file, just select "Add Files..." and re-add the same files. They will automatically be replaced with the new versions, so you don't have to delete your PAK and start all over again.
  7. Close the PAK dialog


Updating a .sum file

  1. Expand the "Ages" folder in the file view on the left.
  2. Select the age whose .sum file you wish to update and expand it.
  3. Double-click on the "Sum File" entry.
  4. If none of the file names have changed, you can just press "Re-sum" to check and update all of the checksums for an age.
  5. If new files have been added, or filenames have changed, you can either automatically detect the age's files (excluding sounds) by pressing the "Auto-build Sumfile" button.
  6. To manually edit entries in the sum file (for example, to add sounds to the checksum), use the "Add File" and "Remove File" buttons. These are not usually necessary for most people.
  7. Close the Sum file dialog


Creating a Font for your age

Uru supports bitmapped (raster) fonts, which can be used in numerous places in the game, including Journals, GUI elements and DynamicTextMaps. PlasmaShop provides some functionality for creating and editing these fonts.

  1. The very first step is to create the font itself. You can do this either from an actual Font (TrueType/OpenType/raster font), or by hand with a graphics editor.
    1. Once you have your font, use a graphics editor (like Paint or The Gimp) to lay out all of your characters in a vertical line, one character per row. The source image should have the width of the widest character in the font, however the actual width of each character will be specified later.
    2. It's easier if you also make each character have the same height, and include space for exactly 256 characters... This isn't really necessary, but it makes things a lot easier later on.
    3. Once you have the whole font in your editor, save it as a greyscale (256 shades of gray) BMP file. It is very important that it stays in this format, so it can be rendered properly by the game.
  2. From PlasmaShop, select File -> New -> Font.
  3. You can specify the name, size, and properties of the font. This does not affect the rendering of the font at all, but it allows the game to find the font it's looking for (so when you use it in your PRP or Journals, be sure to specify it the same way as you set it up here in PlasmaShop)
  4. From the Font menu, select "Load Font Bitmap".
  5. Select the bitmap you created above. PlasmaShop will attempt to split the bitmap into 256 characters. If you don't have exactly 256 characters all with the same height, your font will probably look very messed up -- but that's ok, because you can fix it :)
  6. Whether or not the characters were selected correctly, you will need to edit each character (double click on it to open it in the character edtior)
    1. To align a character to the correct location in the bitmap, drag it up and down in the preview pane. You may have to resize the Character Editor window to see the whole character.
    2. Once the top cuts off where it should, change the "Letter Height" field to ensure the whole character is in view
    3. Use "Start Height" to move the character up or down as necessary, so that the red line in the preview window denotes the "bottom" of the character. for letters like g and p, you will likely have a tail that goes below the red line (a negative height).
    4. "Move Before" and "Move After" show where the character begins and ends. Move these around to position the green lines as necessary to denote the beginning and end of the character.
      1. Specifically, when drawing a character, Uru will align the second green line of the previous character with the first green line of the current character to position the two characters correctly with each other. Hence the names "Move Before" and "Move After".
    5. While editing characters, make sure you pay attention to the character in the title of the Edit Letter window, as that is the ANSII character that Uru expects to find at that location. I have not experimented with Unicode fonts in Uru, so I don't know if they work as expected or not.
    6. Once you're finished editing all of the characters, be sure to Save the font file in your dat folder.