Game Box Creation - GIMP PythonFu Scripts

From BOARD18 Project WIKI
Jump to navigation Jump to search
Game Box Creation edit

This Page is undergoing massive changes at this time.

There are a number of GIMP PythonFu scripts for creating and modifying tile and token graphics. They can be found in the gimpPythonScripts directory of the gamebox repository. They can be installed in the gimp image editor by performing the following steps:

  1. In the GIMP image editor, use Preferences, Folders->Plug-ins to find location of plug-ins on your system. You'll see two directories. Do not use the system directory. Instead use your personal plug-ins directory. It should look something like ~/.gimp-2.6/plug-ins/
  2. Copy the contents of the buildingBlocks/gimpPythonScripts directory into this directory.
  3. Make each of the copied files executable: chmod +x ~/.gimp-2.6/plug-ins/FILENAME.py
  4. Restart the GIMP image editor.
  5. The Python scripts will appear in the Filters->BD18 menu of the GIMP image editor.

The GIMP PythonFu scripts have been grouped into 3 sections. The first section contains scripts for type F tiles. The second section contains scripts for type P tiles. And the third section contains scripts for tokens. See this Design Document section for a description of the tile types mentioned here.

Scripts For Type F Tiles

The Tile F Adjust Script

This script will adjust the scale of a tile image.
It will scale the image to 116x100 pix. All extra white space will be clipped by the script and the background will be made transparent.

The tile to be adjusted should be the only graphic data on the image. Remove any surrounding text before adjusting tile.

The New Tile F Sheet Script

This script will prompt for the number of columns in the new type F tile sheet.

It will then create a new tile sheet with room for the desired number of columns.

The Add Tile F To Sheet Script

This script will prompt for three parameters:

  • "Tile to Add" The fully qualified name of the tile image file.
  • "Column" The tile sheet column to fill [numbered from one].
  • "Row Count" The number of rows to fill for that tile.

It will then create a column of tiles on the tile sheet.
Each tile in the column will be rotated 60 degrees clockwise compared to the tile above it.
The tile sheet produced by this script will conform to the following control parameters:

    "xStart":20, 
    "xSize":116, 
    "xStep":130, 
    "yStart":20, 
    "ySize":100, 
    "yStep":120,  

Scripts For Type P Tiles

The Tile P Adjust Script

This script will adjust the scale and orientation of a tile image.
First it will rotate image by 30 degrees then it will scale it to 100x116 pix. All extra white space will be clipped by the script.

The tile to be adjusted should be the only graphic data on the image. Remove any surrounding text before adjusting tile.

The New Tile P Sheet Script

This script will prompt for the number of columns in the new tile sheet.

It will then create a new tile sheet with room for the desired number of columns.

The Add Tile P To Sheet Script

This script will prompt for three parameters:

  • "Tile to Add" The fully qualified name of the tile image file.
  • "Column" The tile sheet column to fill [numbered from one].
  • "Row Count" The number of rows to fill for that tile.

It will then create a column of tiles on the tile sheet.
Each tile in the column will be rotated 60 degrees clockwise compared to the tile above it.

The tile sheet produced by this script will conform to the following control parameters:

    "xStart":20, 
    "xSize":100, 
    "xStep":120, 
    "yStart":20, 
    "ySize":116, 
    "yStep":130,  

Scripts For Tokens

The Token Adjust Script

This script will adjust the scale of a token image.
It will scale it to 30 pix. All extra white space will be clipped by the script.

The token to be adjusted should be the only graphic data on the image. Remove any surrounding text before adjusting token.

The New Token Sheet Script

This script will create a new token sheet for standard 30X30 Pix tokens.

It will prompt for the number of rows and columns in the new token sheet.

It will then create a new token sheet with room for the desired number of rows and columns.

The New Token Sheet X Script

This is an eXpanded version of the previous script which allows for non standard sized tokens.

It will prompt for the number of rows and columns in the new token sheet and also for the maximum hight and width of the largest tokens.

It will then create a new token sheet with room for the desired number of rows and columns.

The Add Token To Sheet Script

This script will add a token to a sheet of standard 30X30 Pix tokens.
This script should only be used to add tokens to a sheet created by the New Token Sheet script.

It will prompt for three parameters:

  • "Token to Add" The fully qualified name of the token image file.
  • "Column" The token sheet column to fill [numbered as one or two].
  • "Row" The token sheet row to fill [numbered from one].

It will then place a token on the token sheet.
The tokens will be spaced 10 pixels apart.

The Add Token X To Sheet Script

This is an eXpanded version of the previous script which allows for non standard sized tokens.
This script should only be used to add tokens to a sheet created by the New Token Sheet X script.

It will prompt for five parameters:

  • "Token to Add" The fully qualified name of the token image file.
  • "Column" The token sheet column to fill [numbered as one or two].
  • "Row" The token sheet row to fill [numbered from one].
  • "Width" The width in pix of the widest token that will be placed on the sheet.
  • "Height" The height in pix of the tallest token that will be placed on the sheet.

It will then place a token on the token sheet.
The token will be centered in the provided area.
The provided areas will be spaced 10 pixels apart.

Deprecated Scripts

These scripts should no longer be used. They will be deleted soon.

The Tile Adjust Script

This script will adjust the scale and orientation of a tile image.
First it will rotate image by 30 degrees then it will scale it to 100x116 pix. All extra white space will be clipped by the script.

The tile to be adjusted should be the only graphic data on the image. Remove any surrounding text before adjusting tile.
The background setting on the Toolbox should be set to white before you use this script.

The Batch Tile Adjust Script

This script will prompt for two parameters:

  • "Input directory" A directory containing one or more tile images.
  • "Output directory" An existing directory.

It will then call the tile adjust script for each .png file in the input directory.
It will put the resultant adjusted tile into the output directory as a .png file.

The New Tile Sheet Script

This script will prompt for the number of columns in the new tile sheet.

It will then create a new tile sheet with room for the desired number of columns.

The Add Tile To Sheet Script

This script will prompt for three parameters:

  • "Tile to Add" The fully qualified name of the tile image file.
  • "Column" The tile sheet column to fill [numbered from one].
  • "Row Count" The number of rows to fill for that tile.

It will then create a column of tiles on the tile sheet.
Each tile in the column will be rotated 60 degrees clockwise compared to the tile above it.
The tiles will be spaced 14 pixels apart.