Stoney229

Stoney229's tutorial for creating ABattleMap modules

English
31 Pages
Read
Download
Downloading requires you to have access to the YouScribe library
Learn all about the services we offer

Description

Stoney229’s tutorial for creating ABattleMap modules
Information about this tutorial
You are reading tutorial version 1.0. Visit
http://www.axisandallies.org/forums/index.php?topic=18773.0 to read or download the
Vlatest version of the tutorial.
This tutorial is based on the latest version of ABattleMap as of June 16, 2010, which is
only found packaged with Attila’s Pacific 1940 module, here: http://www.flames-of-
europe.de/modules.php?name=Downloads&d_op=getit&lid=107 , and is referred to as
“0.80+” in this tutorial. Information and instructions related to image-editing are based
Con the latest version (v3.5.5) of the image-editing program Paint.NET , which can be
downloaded here: http://www.getpaint.net/ . Operating System related instructions are
based on recent Windows desktop operating systems.
The content of this tutorial is based in part on tutorials by Attila, TMTM, and HolKann.
Credit goes to them for beginning the work and making this easier for me. It has been
designed more as a sort of manual, rather than a step-by-step tutorial, with the intent of
offering a better understanding of how things work. Do not be intimidated by its length:
any software that takes 2 minutes to figure out still comes with a 30-page help file!
While it can be used as a step-by-step guide, you may find it more enjoyable to explore
things on your own before reading the tutorial in detail; consulting this tutorial only when
you would like some guidance. Feel free ...

Subjects

Informations

Published by
Reads 143
Language English
Report a problem
Stoney229’s tutorial for creating ABattleMap modules
Information about this tutorial
You are reading tutorial version 1.0. Visit http://www.axisandallies.org/forums/index.php?topic=18773.0to read or download the latestVversion of the tutorial. This tutorial is based on the latest version of ABattleMap as of June 16, 2010, which is only found packaged with Attila’s Pacific 1940 module, here:http://www.flames-of-europe.de/modules.php?name=Downloads&d_op=getit&lid=107, and is referred to as “0.80+” in this tutorial. Information and instructions related to image-editing are based on the latest version (v3.5.5) of the image-editing program Paint.NETC, which can be downloaded here:ni.ten/tpaet.gww/w:/tpht. Operating System related instructions are based on recent Windows desktop operating systems. The content of this tutorial is based in part on tutorials by Attila, TMTM, and HolKann. Credit goes to them for beginning the work and making this easier for me. It has been designed more as a sort of manual, rather than a step-by-step tutorial, with the intent of offering a better understanding of how things work. Do not be intimidated by its length: any software that takes 2 minutes to figure out still comes with a 30-page help file! While it can be used as a step-by-step guide, you may find it more enjoyable to explore things on your own before reading the tutorial in detail; consulting this tutorial only when you would like some guidance. Feel free to reproduce and/or modify this tutorial (with or without citation or credit to me) as you see fit. Superscripts refer to dedicated sections which offer more comprehensive and detailed explanations. Use Ctrl+F to search for a specific topic. If you have any questions, suggestions, corrections, etc., please post them on the tutorial’s forum thread here:http://www.axisandallies.org/forums/index.php? topic=18773.0
Contents
Section A: The files that make up a module Section B: Steps for creating a module Section C: The image-editing program- Paint.NET
Section D: Map.bmp Section E: SektorInfo.bmp Section F: SektorInfo.map Section G: ToolPieces.bmp Section H: BigPieces.bmp Section I: UnitStats.txt Section J: ToolPieces.txt Section K: MapInfo.txt Section L: SektorInfo.sek Section M: Using Sektor Editor Section N: SektorInfo.txt Section O: Start.aam Section P: Using ABattleMap’s file conversion tools Section Q: The hexadecimal number system Section R: .zip files Section S: Uploading for internet distribution Section T: Glossary Section U: The FAQ Section V: Change log
Section A: The files that make up a module
The “*.gim” folderAll of the files which make up a module are contained in a single folder. This folder can have any name of 1-3 characters in length, ending in the suffix “.gim”. No two .GIM folders can have the same name. All .GIM folders must be placed directly in the ABattleMap program folder, which is usually located at C:\Program Files\ABattleMap. .GIM folders may contain any files or folders, even if they are not used by the module. However, files must be directly in the .GIM folder (not in a subfolder) in order to be used by the module. The following is an alphabetical list of files used to create a module. Not all of these files are required for a module to function: BigPieces.bmpH This is the image file displayed in ABattleMap’s “ToolBar” window when a user has the “Use BigPieces” option selected in ABattleMap’s “View” menu. Map.bmp†D This is the image file displayed in ABattleMap’s main window when a user selects the module in ABattleMap’s “New” menu. It normally represents the “game board,” but sometimes includes other areas as well (e.g. reference panels or charts, toolbars for
keeping track of cash and technology, etc.). MapInfo.txt†K This text file contains the name of the module as it appears in ABattleMap’s “View” menu. It also includes the information of which powers are aligned together on a team. SektorInfo.bmpE This image file is used to create SektorInfo.mapF. SektorInfo.mapF This file contains the information of which sector (territory, sea zone, space, etc.) each pixel on the map belongs to. SektorInfo.sekL This file contains all the information (except map/board location) about specific sectors, including name (as displayed in ABattleMap’s title bar), type (land or water), IPC value, original owner, and much more. It also includes other special sector-related information, such as damage/“convoy disruption” criteria. SektorInfo.txtN . This text file is used to create SektorInfo.sekL Start.aamO This is the save file that contains the starting setup of pieces. ToolPieces.bmp†G This is the default image file displayed in ABattleMap’s “ToolBar” window, when a user does not have the “Use BigPieces” option selected in ABattleMap’s “View” menu. ToolPieces.txtJ This text file is an older version of UnitStats.txtI, and contains the IPC cost/value and type (“Land” or “Naval”) of each column of units on the “ToolPieces” palette. UnitStats.txtI This text file is a newer version of ToolPieces.txtJ, and contains the IPC cost/value, type (“Land”, “Naval”, “Air”, or “Build”), and convoy disruption (“Damage”) value of each column of units on the “ToolPieces” palette.
 a module that is missing required files will crashthis file/folder is required. Opening ABattleMap.
Section B: Steps for creating a module
These are the steps I would recommend for creating an ABattleMap module: -Step 1: Create the “.gim” folderA, inside which you should conduct the rest of the steps -Step 2: Use your preferred image editing programC to draw the borders of your map or gameboard. Save the image for use in Steps 3 and 4. -Step 3: Use the image created in Step 2 to create Map.bmpD -Step 4: Use the image created in Step 2 to create SektorInfo.bmpE -Step 5: Use b242map.exePto create SektorInfo.mapF -Step 6: Create ToolPieces.bmpG -Step 7: Create BigPieces.bmpH -Step 8: Create UnitStats.txtI -Step 9: Create MapInfo.txtK -Step 10: Create a blank SektorInfo.txtNfile -Step 11: Use csek.exePto create SektorInfo.sekLfrom the blank SektorInfo.txtN -Step 12: Use Sektor EditorMto edit SektorInfo.sekL -Step 13: Use rsek.exePto create a new SektorInfo.txtNfrom your edited SektorInfo.sekL -Step 14: Edit SektorInfo.txtNas needed (to include what could not be included with Sektor Editor) -Step 15: Use csek.exePto create SektorInfo.sekLfrom the new SektorInfo.txtN -Step 16: Open the module in ABattleMap to check for errors -Step 17: Troubleshoot and fix errors (will likely involve repeating steps 14 and 15) -Step 18: Create Start.aamO  -Step 19: Place module in a .zip fileR -Step 20: Upload your .zip file for internet distributionS
Section C: The image-editing program- Paint.NET
In order to create the image filesD,E,G,Hused by your module, you will need a good image-editing program. I highly recommend using the free program Paint.NET, which you can download here:http://www.getpaint.net/. The features of Paint.NET which I find most useful in creating image files for ABattleMap modules include layers, history, and a sophisticated colors window. Find more information about the features of Paint.NET here: http://www.getpaint.net/features.html. If you are unfamiliar with layers, think of them as a stack of transparent canvases stacked on top of each other. Only the original “Background” layer when creating a new image file will be white instead of transparent. The background that is displayed when all layers are transparent is a gray and white checkered pattern that is not actually part of the image. Layers have many extremely useful applications, including, for example, the ability to
add territory names or “victory city” markers on top of your map that can be moved or removed without having to repaint the background underneath them.
If you will be creating a SektorInfo.bmpEfile (required to create a SektorInfo.mapFfile), your image-editing program must have the ability to choose colors by RGB value.
The following are the keyboard/mouse commands I have found most useful in creating module image files with Paint.NET (taken in part from Paint.NET help file):
General Canvas Controls Change canvas size Ctrl + Shift R + Scroll up / down Mouse Wheel up / down Scroll left / right Shift + Mouse Wheel up / down Zoom in / out Ctrl + Mouse Wheel Deselect (remove selection) Esc or Enter
Selection Tools (except Magic Wand) Note: While a selection is active, all drawing, and many other commands, will only draw or have effect inside the selection. Create new selection, Draw with left mouse button replacing any old selection if there was one Subtract from the current Draw with Alt + left mouse button selection (difference) Add to the current selection Draw with Ctrl + left mouse button (union) Invert a given area of the Draw with Ctrl + right mouse button selection (exclusive-or) Get the intersection of the Draw with Alt + right mouse button current selection and a new one Invert the selection on the Ctrl + I entire canvas Fill the selection with the Backspace primary color
Magic Wand Tool Create new selection from Left mouse click pixels in the surrounding area that resemble the pixel you clicked on, replacing any old selection if there was one (resemblance is determined by the Tolerance setting) Subtract from the current Right mouse click
selection (difference) Add to the current selection Ctrl + Left mouse click (union) Invert a portion of the Ctrl + Right mouse click selection (exclusive-or) Do a global selection across Hold Shift with one of the four commands listed above the entire layer based on the color you click on and the Tolerance setting
Section D: Map.bmp
Map.bmp is the image file displayed in ABattleMap’s main window when a user selects the module in ABattleMap’s “New” menu. It normally represents the “game board,” but sometimes includes other areas as well (e.g. reference panels or charts, toolbars for keeping track of cash and technology, etc.). It is required for a working module. As far as I know, there are not supposed to be any size restrictions. I have run into some problems with enlarging certain maps, but other larger maps seem to work fine. Creating Map.bmp Open Paint.NET and draw out the borders of your territories in black. You may want to draw circles around small islands to enlarge the space on which a user can place units. Once you have drawn the borders, I would recommend saving the file as SectorBorders.bmp, to use in creating SektorInfo.bmpE saving SectorBorders.bmp,. After I would recommend saving the file as a .PDN (i.e. “Map.pdn”) so that you can quickly save the file periodically throughout your work. Next, fill in your sectors with the desired color. Once you have done this, I recommend duplicating your layer (Ctrl + Shift + D) to preserve a basic undoctored copy of your background that can be used for editing parts of a later version to which you have applied effects. If you choose to add anything to your map beyond this point, I would recommend adding them in additional layers (Ctrl + Shift + N). For an example of how I used layers in the P40 module, you can download a .PDN of the map here:http://www.mediafire.com/file/by2hwxkmxa5/P40 Map.pdn. Having a location for keeping track of players’ cash on hand, researchers, weapons developments, and any other statuses can be very useful.
If you do not want to include sector information in your module by creating SektorInfo.mapFand SektorInfo.sekLfiles (by far the most technical part of creating a module), you should also probably include territory names and IPC values on the map image itself, as well as a location for keeping track of a player’s IPC income. When the map looks the way you want it, save the file as a .PDN for future editing (Tip:
never try to conduct any action while an image is saving, or the program may crash and your file will become corrupt and unrecoverable). Then save the file as Map.bmp in your module’s .GIM folder. Use 24-bit depth, and flatten the image when prompted. I would not recommend playing with the dithering level, as it could crash the program.
Section E: SektorInfo.bmp
SektorInfo.bmp is the editable image file used with b242map.exePto create SektorInfo.mapF. Since SektorInfo.bmp is not used by the program or module directly, an absence of it has no affect on the function of the module. Creating it is necessary only if you want to include sector information in your module with SektorInfo.mapFand SektorInfo.sekLfiles (by far the most technical part of creating a module). Creating SektorInfo.bmp Create or open a file containing the sector borders of your map (SectorBorders.bmp) represented by black (RGB= 000000) lines. The size (pixel by pixel, displayed near the bottom right corner of the Paint.NET window) of SektorInfo.bmp should be exactly the same size as Ma .bmD.
Next, use the “Paint Bucket” tool (Shortcut: F) to fill each sector with a different color, starting with RGB= 000001, and continuing with 000002, 000003, etc. in consecutive order, by following these steps: -Step 1: Click on the “Paint Bucket” tool in the “Tools” window -Step 2: Click on the “More >>” button in the “Colors” window  
-Step 3: In the “RGB” section, set the R (Red) and G (Green) values to 0, and the B (Blue) value to 1. -Step 4: Click on a sector with the fill tool to fill the sector with your selected color. All areas that contain the exact same RGB color value will be considered one sector, even if they are discontinuous. -Step 5: Increase the B (Blue) value by 1 in the colors window and repeat steps 4 and 5 until all sectors have been filled. Filling sectors in some kind of patterned order (e.g. starting in the left hand corner and filling each sector in a row across the top, or filling all sectors belonging to one power before moving to another power) may make things easier later. -Step 6: When you have finished, save your file as “SektorInfo.bmp” in your module’s .gim folder. Use 24-bit depth. I would not recommend playing with the dithering level, as it could crash the program.
I have not tried it, but theoretically if you have more than 255 sectors, you would add 1 to the G (Green) value and reset the B (Blue) value to 0 for your 256thsector, and continue to add 1 to the B value for each subsequent sector. The program uses these RGB values to identify an area of the map with a line in SektorInfo.txtN/SektornIofs.keL. The definition of the sector colored with RGB value 000001 will be the first line SektorInfo.txtNkes.eoSf/nIrotkL So,, and so on. if you are adding sectors to an existing SektorInfo.bmp, please note that the RGB (“Hex”) hexadecimalQvalue (which is equal to the B (Blue) value if you have fewer than 256 sectors and pseudo-sectors) must correspond to the line in SektorInfo.txtNkes.oforInSekt/Lwhere the sector is defined.
Section F: SektorInfo.map
SektorInfo.map contains the information of which sector (territory, sea zone, space, etc.)
each pixel on the map belongs to. It is not required, but if used, it does require the accompaniment of SektorInfo.sekLtwo files, a module will not contain. Without these any distinction of territories or sea zones, so IPC income calculations in the program’s “InfoView” window are not possible. It is created from SektorInfo.bmpEusing b242map.exeP. Creating SektorInfo.map Refer toSection Pfor instructions on using b242map.exeP Theto create SektorInfo.map. s ntax is “b242ma .exe SektorInfo.bm SektorInfo.ma ”.
Section G: ToolPieces.bmp ToolPieces.bmp is the default image file displayed in ABattleMap’s “ToolBar” window when a user does not have the “Use BigPieces” option selected in ABattleMap’s “View” menu. This file is required.
Creating ToolPieces.bmp ToolPieces.bmp is created as a grid of pieces, and each piece must be exactly 15x10 pixels in size without gaps between them. Each row represents the pieces belonging to a specific power. Rows should be (but do not have to be) in the same order as game’s turn order. Each column represents pieces of a specific type. The first column is always considered the power’s flag or control marker. Subsequent columns can be in any order, as long as they are consistent with the order defined in ToolPieces.txtJor UnitStats.txtIif one of those files exist. If your module requires miscellaneous pieces that do not belong to a specific power, you should include them in an additional row placed last, since including them in a row belonging to a specific power may affect that power’s “InfoView” statistics. In my opinion, the easiest way to create ToolPieces.bmp is to modify an existing ToolPieces.bmp from a different module (the alternative is to draw it from scratch). You may want to ask permission from the original creator of the file, but many good files seem to be a conglomeration of efforts. -Step 1: Copy an existing ToolPieces.bmp file from another .gim folder into your own. -Step 2: Open the file in Paint.NET
-Step 3: If the file you are modifying has more rows of toolpieces than you need, use the “Rectan le Select” tool to select the rows ou do not need and delete them.
If you do not need to create new rows of toolpieces, you may skip to step 7. -Step 4: If needed, expand your canvas by clicking the “Image” menu > “Canvas Size…”, or by pressing Ctrl+Shift+R and increasing the height or width as necessary. You robabl want our anchor to be “To Left”
-Step 5: If the file you are copying from has a bottom row of miscellaneous pieces that you would like to keep, select it using the “Rectangle Select” tool and move it to the bottom of the canvas using the “Move Selected Pixels” tool.
-Step 6: Add the appropriate number of rows of pieces by copying one of the existing rows (“Rectangle Select”, Ctrl + C), and adding it beneath the existing bottom row (Ctrl + V, Ctrl + Arrow Keys) until you have the desired number of rows.
-Step 7: Replace the images in the first piece of each row to correspond with the powers involved in your module’s game. The power represented in the first row of pieces will be “Power 1”, and should (recommended) be the first power in your game’s turn order. Power 2 will be in the second row, and so on.
You will now use the “Recolor” tool to recolor the toolpieces. Usually, rows of toolpieces have three colors that distinguish them from other rows: a main color, a highlight, and a shade. The main color usually corresponds with the color used to fill that power’s originally-owning territories in Map.bmpD. The highlight is a lighter value of the main color, and the shade is a darker value. If you do not need to recolor your toolpieces, you may skip to step 15. -Step 8: Use the “Rectangle Select” tool to select only the row of toolpieces that you wish to recolor.
-Step 9: With the “Recolor” tool selected, set the “Tolerance” setting to 0% and the brush width to at least 15.
-Step 10: Set your primary color in the “colors” window to the main color you wish to use for the toolpieces row you have selected. If you have already created Map.bmpD, you can select your primary color by opening Map.bmpD, holding the Ctrl key (on your keyboard), and clicking on the color used to identify the power whose toolpieces you are recoloring. Set your secondary color to the color you wish to replace, by holding the Ctrl ke and ri ht-clickin the main color in the toolpieces row you have selected.
-Step 11: Use the recolor tool to paint over your entire selected area. All instances of