Axis and Allies.org Boards

Axis & Allies => Software => Topic started by: Stoney229 on June 16, 2010, 07:19:28 pm



Title: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:19:28 pm
Hey Stoney! Good job on the modules! I haven't looked but have you updated or added to the tutorial for making modules? Feel free to add the next chapter to the knowledge base for everyone to find and use etc. Thanks!
One far day I will have learned the secrets of ABattlemap ;-)

That day is here!  Over the past couple months I have been working on writing a tutorial for creating an ABattleMap module.
If you've got a slow connection and you'd like something a little faster, you can download a .pdf copy here: http://www.mediafire.com/file/jzj1fjddn5m/Tutorial 1_0.pdf (http://www.mediafire.com/file/jzj1fjddn5m/Tutorial 1_0.pdf)
or if you'd like to add to it yourself, you can download an editable .rtf here: http://www.mediafire.com/file/w0y43klizji/Tutorial 1_0 rtf.zip (http://www.mediafire.com/file/w0y43klizji/Tutorial 1_0 rtf.zip)

Enjoy!


Stoney229's tutorial for creating ABattleMap modules
Version 1.01 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632131#msg632131)


Information about this 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 (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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632102#msg632102), which can be downloaded here: http://www.getpaint.net/ (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 (http://www.axisandallies.org/forums/index.php?topic=11223.msg314096#msg314096), and HolKann (http://www.axisandallies.org/forums/index.php?topic=11223.msg373377#msg373377).  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 this thread.  Even pointing out typos or grammatical errors would be appreciated.  Thanks!


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:20:16 pm
Contents

Section A: The files that make up a module (http://www.axisandallies.org/forums/index.php?topic=18773.msg632099#msg632099)
Section B: Steps for creating a module (http://www.axisandallies.org/forums/index.php?topic=18773.msg632101#msg632101)
Section C: The image-editing program- Paint.NET (http://www.axisandallies.org/forums/index.php?topic=18773.msg632102#msg632102)
Section D: Map.bmp (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105)
Section E: SektorInfo.bmp (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106)
Section F: SektorInfo.map (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109)
Section G: ToolPieces.bmp (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110)
Section H: BigPieces.bmp (http://www.axisandallies.org/forums/index.php?topic=18773.msg632111#msg632111)
Section I: UnitStats.txt (http://www.axisandallies.org/forums/index.php?topic=18773.msg632113#msg632113)
Section J: ToolPieces.txt (http://www.axisandallies.org/forums/index.php?topic=18773.msg632114#msg632114)
Section K: MapInfo.txt (http://www.axisandallies.org/forums/index.php?topic=18773.msg632115#msg632115)
Section L: SektorInfo.sek (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117)
Section M: Using Sektor Editor (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118)
Section N: SektorInfo.txt (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)
Section O: Start.aam (http://www.axisandallies.org/forums/index.php?topic=18773.msg632120#msg632120)
Section P: Using ABattleMap's file conversion tools (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122)
Section Q: The hexadecimal number system (http://www.axisandallies.org/forums/index.php?topic=18773.msg632126#msg632126)
Section R: .zip files (http://www.axisandallies.org/forums/index.php?topic=18773.msg632127#msg632127)
Section S: Uploading for internet distribution (http://www.axisandallies.org/forums/index.php?topic=18773.msg632128#msg632128)
Section T: Glossary (http://www.axisandallies.org/forums/index.php?topic=18773.msg632129#msg632129)
Section U: The FAQ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632130#msg632130)
Section V: Change log (http://www.axisandallies.org/forums/index.php?topic=18773.msg632131#msg632131)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:21:30 pm
Section A: The files that make up a module

The ".gim" folder*
All 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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632111#msg632111)
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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105)
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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632115#msg632115)
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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106)
This image file is used to create SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109).

SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109)
This file contains the information of which sector (territory, sea zone, space, etc.) each pixel on the map belongs to.

SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117)
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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)
This text file is used to create SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117).

Start.aamO (http://www.axisandallies.org/forums/index.php?topic=18773.msg632120#msg632120)
This is the save file that contains the starting setup of pieces.

ToolPieces.bmp*G (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110)
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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632114#msg632114)
This text file is an older version of UnitStats.txtI (http://www.axisandallies.org/forums/index.php?topic=18773.msg632113#msg632113), and contains the IPC cost/value and type ("Land" or "Naval") of each column of units on the "ToolPieces" palette.

UnitStats.txtI (http://www.axisandallies.org/forums/index.php?topic=18773.msg632113#msg632113)
This text file is a newer version of ToolPieces.txtJ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632114#msg632114), 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.


*this file/folder is required.  Opening a module that is missing required files will crash ABattleMap.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:22:15 pm
Section B: Steps for creating a module

These are the steps I would recommend for creating an ABattleMap module (not all steps are essential):

-Step 1: Create the ".gim" folderA (http://www.axisandallies.org/forums/index.php?topic=18773.msg632099#msg632099), inside which you should conduct the rest of the steps
-Step 2: Use your preferred image editing programC (http://www.axisandallies.org/forums/index.php?topic=18773.msg632102#msg632102) 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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105)
-Step 4: Use the image created in Step 2 to create SektorInfo.bmpE (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106)
-Step 5: Use b242map.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109)
-Step 6: Create ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110)
-Step 7: Create BigPieces.bmpH (http://www.axisandallies.org/forums/index.php?topic=18773.msg632111#msg632111)
-Step 8: Create UnitStats.txtI (http://www.axisandallies.org/forums/index.php?topic=18773.msg632113#msg632113)
-Step 9: Create MapInfo.txtK (http://www.axisandallies.org/forums/index.php?topic=18773.msg632115#msg632115)
-Step 10: Create a blank SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) file
-Step 11: Use csek.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) from the blank SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)
-Step 12: Use Sektor EditorM (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118) to edit SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117)
-Step 13: Use rsek.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create a new SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) from your edited SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117)
-Step 14: Edit SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) as needed (to include what could not be included with Sektor EditorM (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118))
-Step 15: Use csek.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) from the new SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)
-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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632120#msg632120)
-Step 19: Place module in a .zip fileR (http://www.axisandallies.org/forums/index.php?topic=18773.msg632127#msg632127)
-Step 20: Upload your .zip file for internet distributionS (http://www.axisandallies.org/forums/index.php?topic=18773.msg632128#msg632128)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:22:38 pm
Section C: The image-editing program- Paint.NET

In order to create the image filesD (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105),E (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106),G (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110),H (http://www.axisandallies.org/forums/index.php?topic=18773.msg632111#msg632111) used 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/ (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 (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.bmpE (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106) file (required to create a SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109) file), 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 sizeCtrl + Shift + R
Scroll up / downMouse Wheel up / down
Scroll left / rightShift + Mouse Wheel up / down
Zoom in / outCtrl + 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, replacing any old selection if there was oneDraw with left mouse button
Subtract from the current selection (difference)Draw with Alt + left mouse button
Add to the current selection (union)Draw with Ctrl + left mouse button
Invert a given area of the selection (exclusive-or)Draw with Ctrl + right mouse button
Get the intersection of the current selection and a new oneDraw with Alt + right mouse button
Invert the selection on the entire canvasCtrl + I
Fill the selection with the primary colorBackspace

Magic Wand Tool
Create new selection from 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)Left mouse click
Subtract from the current selection (difference)Right mouse click
Add to the current selection (union)Ctrl + Left mouse click
Invert a portion of the selection (exclusive-or)Ctrl + Right mouse click
Do a global selection across the entire layer based on the color you click on and the Tolerance settingHold Shift with one of the four commands listed above


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:24:20 pm
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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106).  After saving SectorBorders.bmp, 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 (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.
(http://www2.mediafire.com/imgbnc.php/7473c0e7903048b857c324ef321d37336g.jpg)
If you do not want to include sector information in your module by creating SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109) and SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) files (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.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:25:07 pm
Section E: SektorInfo.bmp

SektorInfo.bmp is the editable image file used with b242map.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109).  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.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109) and SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) files (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 Map.bmpD (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105). 
(http://www2.mediafire.com/imgbnc.php/85128cb95b829ff147ad1d641b12fae56g.jpg)
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
(http://www2.mediafire.com/imgbnc.php/609439d9b3414f90575505bb6ce099df6g.jpg)
-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 256th sector, 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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)/SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117).  The definition of the sector colored with RGB value 000001 will be the first line SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)/SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117), and so on.  So, if you are adding sectors to an existing SektorInfo.bmp, please note that the RGB (“Hex”) hexadecimalQ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632126#msg632126) value (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.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)/SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) where the sector is defined.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:26:05 pm
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.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117).  Without these two files, a module will not contain 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.bmpE (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106) using b242map.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122).

Creating SektorInfo.map
Refer to Section P (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) for instructions on using b242map.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create SektorInfo.map.  The syntax is “b242map.exe SektorInfo.bmp SektorInfo.map”.
(http://www4.mediafire.com/imgbnc.php/d683478a8b4bfe009674a024141ec19e6g.jpg)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:26:45 pm
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.

(http://www2.mediafire.com/imgbnc.php/6245d5242e9aacb32155a7b27137cc996g.jpg)

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.txtJ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632114#msg632114) or UnitStats.txtI (http://www.axisandallies.org/forums/index.php?topic=18773.msg632113#msg632113) if 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 “Rectangle Select” tool to select the rows you do not need and delete them.
(http://www3.mediafire.com/imgbnc.php/b4cb520f91336c4abcbae4e055c3c5d56g.jpg)
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 probably want your anchor to be “Top Left”
(http://www3.mediafire.com/imgbnc.php/c83e12c96a95624360b6f11323f1cde76g.jpg)
-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.
(http://www3.mediafire.com/imgbnc.php/b75045b75483c29f652d08cb429eb3e76g.jpg)
-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.
(http://www3.mediafire.com/imgbnc.php/a0098a15ea70202c1feb6fd0a982dc076g.jpg)
-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.
(http://www4.mediafire.com/imgbnc.php/ea25852af365c89d96898f1635f455ae6g.jpg)
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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105).  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.
(http://www3.mediafire.com/imgbnc.php/a8bc1a79230df07d7f81c8285e0b91ed5g.jpg)
-Step 9:  With the “Recolor” tool selected, set the “Tolerance” setting to 0% and the brush width to at least 15.
(http://www1.mediafire.com/imgbnc.php/1ffe556962d76a2fe430a08d16d76b946g.jpg)
-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 (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105), you can select your primary color by opening Map.bmpD (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105), 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 key and right-clicking the main color in the toolpieces row you have selected.
(http://www2.mediafire.com/imgbnc.php/5b4ac34eb913ecf8a74414743012682b6g.jpg)
-Step 11:  Use the recolor tool to paint over your entire selected area.  All instances of your secondary color will be replaced by your primary color.
(http://www0.mediafire.com/imgbnc.php/07220c89155405aa6a3e1b4846d899c96g.jpg)
-Step 12:  Select your primary color in the “Colors” window and increase its value in the “HSV” section of the expanded “Colors” window.  Hold Ctrl and right-click the highlights in your selected toolpieces row to designate it as the color to be replaced.  Recolor your selected row of toolpieces as you did in step 11.
(http://www2.mediafire.com/imgbnc.php/68c3627d43b2406b218b302691ccfd6c6g.jpg)
-Step 13:  Repeat step 12, only this time decrease the value of your primary color and select the shadows as the color to be replaced.  This should complete the recoloring of your row.
-Step 14:  Select a new row to be recolored by using the “Rectangle Select” tool, or by using the “Move Selection” tool and pressing Ctrl + Down Arrow on your keyboard (this moves your selection down 10 pixels).  Repeat steps 9 through 14 until all rows have been recolored appropriately.
(http://www4.mediafire.com/imgbnc.php/d624ec3c29352f9467f3451f0bdee8ae6g.jpg)
-Step 15:  If there are any columns of toolpieces you do not wish to use in your module, you can select and delete them.
(http://www3.mediafire.com/imgbnc.php/c895c163551e1a423f57c4271b4a6f716g.jpg)
-Step 16:  Use the “Rectangle Select” and “Move Selected Pixels” tools to rearrange your toolpieces, so that you have 15-pixel-wide columns where you wish to add a new column of toolpieces, and all other rows and columns are aligned.
(http://www0.mediafire.com/imgbnc.php/0d0a0c69cc1d8744d3c301d1c0abd0b46g.jpg)
You will now create your new toolpieces.  If you do not wish to create new toolpieces, you may skip to step 23.
-Step 17:  Draw or copy a blank toolpiece into the space you wish to create a new toolpiece.
(http://www3.mediafire.com/imgbnc.php/acabda84e3bee122e37f8915ad5fc5c75g.jpg)
-Step 18:  Use the “Pencil” tool to draw the image of the new toolpiece you wish to create.
(http://www2.mediafire.com/imgbnc.php/7c0270bc236a34b979be10d2edb3c3f66g.jpg)
-Step 19:  Select the new toolpiece using “Rectangle Select”.
-Step 20:  Copy the new toolpiece into other rows by pressing Ctrl + C, Ctrl + V, and Ctrl + Down Arrow.  Repeat as necessary.
(http://www4.mediafire.com/imgbnc.php/e7a41265395c6ee7287d584d6b31d67b6g.jpg)
-Step 21:  Repeat steps 17 through 20 until your toolpieces palette contains all the pieces you wish to use in your module.
-Step 22:  Use the “Recolor” tool to recolor your new toolpieces to fit the color of their pertaining rows (refer to steps 8 through 14 for a general process of how to use the “Recolor” tool).
(http://www3.mediafire.com/imgbnc.php/9a27af101944ec17c3095420d9bc8c326g.jpg)
-Step 23:  Once all your toolpieces are colored and arranged the way you want them, ensure that each row is exactly 10 pixels in height, and each column is exactly 15 pixels in width.
-Step 24:  Finally, use “Rectangle Select” to select all and only your toolpieces palette.  Check the bottom-left corner of the Paint.NET window to ensure that the width of your selection is exactly 15 pixels times the number of columns of toolpieces, and the height of your selection is exactly 10 times the number of rows of toolpieces.
(http://www1.mediafire.com/imgbnc.php/4a4ae02cd10aef934e386421842039116g.jpg)
-Step 25:  Press Ctrl + Shift + X on your keyboard to crop your image to your selection.
-Step 26:  Use the “File” menu > “Save As…” or press Ctrl + Shift + S to open the “Save As” window.
-Step 27:  Navigate to your module’s .GIM folder to save your file in that location.  Type “ToolPieces” in the “File Name:” field, and select “BMP (*.bmp)” in the “Save as type:” field.
-Step 28:  Click the “Save” button, replacing any existing file if necessary (rename the existing file beforehand if you wish to keep it).  Use 24-bit depth.  I would not recommend playing with the dithering level, as it could crash the program.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:27:42 pm
Section H: BigPieces.bmp

BigPieces.bmp is the image file displayed in ABattleMap's "ToolBar" window when a user has the "Use BigPieces" option selected in ABattleMap's "View" menu.  It allows the user the option of a larger toolpieces palette.  This file is not required: when a module does not contain a BigPieces.bmp file, the "ToolBar" window will always display Toolpieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110).

(http://www1.mediafire.com/imgbnc.php/2f2678e46f3b7a22e3e41fb4e17698dd6g.jpg)

Creating BigPieces.bmp
Like ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110), BigPieces.bmp is created as a grid of pieces, but each piece must be 20x15 pixels in size without gaps between them.  Each piece corresponds to the piece in the exact same relative location in Toolpieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110).  In other words, the piece represented in column X and row Y of BigPieces.bmp must also be the piece represented in column X and row Y of ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110).  As with Toolpieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110), I think the easiest way to create BigPieces.bmp is to modify an existing BigPieces.bmp.  You may want to ask permission from the original creator of the file, but many good files seem to be a conglomeration of efforts.  Following the steps in Section G (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110) for creating ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110) should give you a good idea of how to create BigPieces.bmp, as long as you remember that each piece in BigPieces must be 20x15 pixels instead of 15x10 pixels.  If you are changing pieces or creating new ones, be sure to use your ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110) file as a reference, since corresponding pieces must be located in the same column and row locations in each image file.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:29:06 pm
Section I: UnitStats.txt

UnitStats.txt is a newer version of "ToolPieces.txtJ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632114#msg632114)" (new in version 0.80+), 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.  It is not required, and its function will replace that of "Toolpieces.txtJ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632114#msg632114)" if both files are present.

Creating UnitStats.txt
UnitStats.txt is constructed in the same way as ToolPieces.txtJ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632114#msg632114), except each line (piece) has three number values instead of 2.  Refer to an existing UnitStats.txt or Toolpieces.txtJ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632114#msg632114) file to see how it is constructed:
(http://www2.mediafire.com/imgbnc.php/5df6fefcb3479fab217ee7e12e5612816g.jpg)
-   Each line of the text file corresponds to each column, in sequential order, of toolpieces in ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110) and BigPieces.bmpH (http://www.axisandallies.org/forums/index.php?topic=18773.msg632111#msg632111).
-   Each line begins with the name (or an abbreviated name) of the toolpiece to which it corresponds.  This name is arbitrary.  It is not used by the program [as far as I can tell]; it only helps you identify which piece each line belongs to.
-   Each name is followed by three numbers, and each number is separated by a space:
    o   The first number is the piece's IPC cost/value.  This number is used to calculate a power's assets in the program's "InfoView" window.
    o   The second number identifies which type of unit is represented by the toolpiece.  This determines which line of assets in the "InfoView" window includes the piece's IPC value.  0 = "Land", 1 = "Naval", 2 = "Air", 3 = "Build" (short for "Buildings", or "Facilities").
(http://www3.mediafire.com/imgbnc.php/c5d482e5362071d29c4b4de0ace8631b6g.jpg)
    o   The third number is the piece's convoy disruption value.  For example, in the "Pacific 1940 v3.1" module, subs are given a convoy disruption value of 2.  Sectors can be designated as convoy zones in SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)/SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117), each with a list of sectors designated as susceptible to its convoy disruption (see "Section M: Using Sektor Editor" (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118)).  When a sub is placed in one of these convoy zones, its convoy disruption value is subtracted from the income value of the susceptible sectors in the owning powers' incomes.  This is reflected in the "Damage" and "Sum" rows of the income section of the "InfoView" window.  Note that this effect is contingent on "At War" status.
(http://www2.mediafire.com/imgbnc.php/8625a313ea53724edf9d6525a160b1d26g.jpg)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:29:35 pm
Section J: ToolPieces.txt

ToolPieces.txt is an older version of "UnitStats.txtI (http://www.axisandallies.org/forums/index.php?topic=18773.msg632113#msg632113)" and contains the IPC cost/value and type ("Land" or "Naval") of each column of units on the "ToolPieces" palette.  It is not required, and is not utilized if a UnitStats.txtI (http://www.axisandallies.org/forums/index.php?topic=18773.msg632113#msg632113) file exists in the module (unless the program is version 0.80 or earlier).  Including both ToolPieces.txt and UnitStats.txtI (http://www.axisandallies.org/forums/index.php?topic=18773.msg632113#msg632113) in your module will provide compatibility for older ABattleMap versions.

(http://www2.mediafire.com/imgbnc.php/7a1b1ce3b5ac4071cc0c5017aec981cc6g.jpg)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:31:46 pm
Section K: MapInfo.txt

MapInfo.txt is a text file that 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.  It is required.

Creating MapInfo.txt
Refer to an existing MapInfo.txt file to see how it is constructed:
(http://www3.mediafire.com/imgbnc.php/b49108f6f704cc57fd10bc7f4d5581356g.jpg)
-   The first line is the name of the module.  It displays in ABattleMap's "New" drop-down menu and is selected by the user to open the module.  Notice that the "&" (ampersand) character must be preceded by another "&" character in order to be displayed within the ABattleMap menu.
(http://www1.mediafire.com/imgbnc.php/2d946c6a21e305506d6ce36f68d465e56g.jpg)
-   Subsequent lines identify listed powers as allied together.  This information is used, for example, for convoy route or national objectives purposes, where a sector or group of sectors must be controlled by a power's side for that power to receive an amount of income.  These lines must begin with the word "allied", followed by a list of single-digit integers representing powers.  The line "allied 1 3 6" shows that powers 1, 3, and 6 are allied together.  Powers are numbered by their order in ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110) and BigPieces.bmpH (http://www.axisandallies.org/forums/index.php?topic=18773.msg632111#msg632111).  Note that powers numbered 10 or greater cannot be a part of these lists (as far as I can tell).


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:32:44 pm
Section L: SektorInfo.sek

SektorInfo.sek 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.  It is not required, but if used, it does require the accompaniment of SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109).  Without these two files, a module will not contain 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.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) using csek.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122), but can also be edited using ABattleMap's Sektor EditorM (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118).  An existing SektorInfo.sek can be used to create SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) with rsek.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122).

Creating SektorInfo.sek
Refer to section P (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) for instructions on using csek.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create SektorInfo.sek.  The syntax is "csek.exe SektorInfo.txt SektorInfo.sek".
(http://www2.mediafire.com/imgbnc.php/6dc6377114c7037e95ddc06e7c38efc66g.jpg)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:33:25 pm
Section M: Using Sektor Editor

Sektor Editor is a tool included in ABattleMap beginning with version 0.80 (this section discusses the use of Sektor Editor in ABattleMap version 0.80+).  It is accessed from ABattleMap's "File" menu.  

(http://www1.mediafire.com/imgbnc.php/4e518204831beea6f9b037e1c4f24f7e6g.jpg)

Sektor Editor provides a quick and easy way to edit many aspects of SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) without the need to edit and convert SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119).  It cannot edit sectors not represented by space on the map (with SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109)), it cannot create new sectors, and it cannot edit the position of a sector's "IPC Values" display.  It is not intended to edit pseudo-sectorsN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) (which should not be represented on the map).

While the "SektorEdit" window is open, sector names in the main window's title bar will be followed by the pertaining sector's ID number between asterisks.  This number corresponds to the sector's line in SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)/SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) and RGB value in SektorInfo.bmpE (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106)/SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109).  Begin editing any sector on the map by clicking on it - each field in the "SektorEdit" window will be updated to reflect the current values of the sector.
(http://www3.mediafire.com/imgbnc.php/aa184a9515a47cfa0893320c95f37b136g.jpg)

Features of Sektor Editor
Buttons
-   "Save":  This button does not permanently institute changes and does not permanently affect SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117), but applies all changes made to the current sector to memory and puts them into effect until you change modules (or reopen the same module) or close the program.
-   "Save SektorInfo.sek":  This button will update your module's SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) file to reflect all changes that have been applied to memory using the "Save" button.  Note that changes to made to any sector, including the current one, will not be reflected in SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) unless they were first applied to memory using "Save".
-   "Close":  This closes the "SektorEdit" window.  Any changes applied only to memory will remain until you change modules, reopen the module, or close the program.
Fields
-   "Name":  This text field is the name of the sector, displayed in ABattleMap's title bar when the user hovers the cursor over the sector.
-   "Owner":  This is the number of the power considered to be the original owner of the sector (powers' numbers correspond to the sequence of the rows in ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110)).  The sector's IPC value is included in the income of the original owner unless another power's flag is placed on the sector.
-   "Unit":  This field defines which unit the controlling power's side must have on the sector in order for the controlling power to receive the sector's IPC income.  A value of 0 means no unit is required.  A value of 1 means the unit in the second column of ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110) (since the first column is only for flags) is required.  2 is the third column, and so on.  Most modules do not use this feature.
-   Flags - "Land" or "Water":  Distinguishes the sector as a land sector or a water sector.  As far as I know, this distinction is obsolete in recent versions of ABattleMap.
-   Flags - "Oil":  If checked, IPCs received by a power for controlling this sector are listed in that power's "Oil" row of the "InfoView" window instead of the "IPC" row.
-   Flags - "Convoi":  If checked, and "Flags - Oil" is unchecked, IPCs received by the original owner of this sector are listed in that power's "Convoy" row of the "InfoView" window instead of the "IPC" row, and all other powers cannot receive income from this sector.  If checked, and "Flags - SCVR" is unchecked, the "Convoiroute - Special (1-8)" fields can define sectors affected by convoy disruption occurring in this sector* (such as in "Seazone 19 (z19)" in the "Pacific 1940 v3.x" modules).  Note that convoy disruption effects are subject to control of specific "at war" sectors (see "Pseudo-sectors" in section N (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)).
-   Flags - "SIPC":  Stands for "Special IPC".  If checked, values listed in the "IPCs - Special (1-8)" fields define the sector's IPC income value according to which power controls it.  For example, if "SIPC" is checked for sector 10, "IPCs - Special 1" is 5, and "IPCs - Special 2" is 3, then power 1 will receive 5 IPC for controlling sector 10, but power 2 will only receive 3 IPC for controlling the same sector.  Note that there appears to have been an error in programming this, and "IPCs - Special 6" actually defines the value for power 8, "Special 7" is for power 6, and "Special 8" is for power 7.  Most modules do not use this feature.
-   Flags - "SCVR":  Stands for "Special Convoy Route".  If checked, values listed in the "Convoiroute - Special (1-8)" fields define what other sector each specific power must control in order to receive the IPC income value of the current sector.  For example, if "SCVR" is checked for sector 20, "Convoiroute - Special 1" is 5, and "Convoiroute - Special 2" is 0, then power 1 must control both sectors 5 and 20 in order to receive the IPC income value of sector 20.  Power 2, however, only needs to control sector 20 to receive its IPC income value as usual.  Most modules do not use this feature.
(http://www3.mediafire.com/imgbnc.php/a9f2a526e816baf3eeb7aa08eb8ff4af6g.jpg)
-   Flags - "OCVR"*:  Stands for "Owner Convoy Route".  If checked, all convoy routes defined for the current sector must be controlled by the same power that controls the current sector in order for that power to receive the IPC income for the sector.  If unchecked, all convoy routes defined for the current sector can be controlled by any power allied with the current sector's controlling power in order for that controlling power to receive the IPC income for the sector.  Most modules do not use this feature.
-   IPCs - All:  This field defines the IPC income value of the sector if the IPC value is the same for all powers.
-   IPCs - Special (1-8):  If "Flags - SIPC" is checked, these fields define the IPC income value of the sector according to which power (1-8) controls it.  If "Flags - SIPC" is unchecked, these fields should all be 0.  Note that these fields cannot hold values larger than 15.  See the description of "Flags - SIPC" above for a more thorough explanation of special IPCs.
-   Convoiroute - All:  This field contains the ID number of another sector that must be controlled in order for a power to receive income from the current sector.  If more than one other sector is required, the "Convoiroute - Special (1-8)" fields may be used** (beginning with "Special 1") to define these additional sectors as long as "Flags - SCVR" is unchecked.
-   Convoiroute - Special (1-8):  If "Flags - SCVR" is checked, these fields define the sector (ID number) each individual controlling power (or controlling power's side) must also control in order for the current sector's IPC income to be received.  See the description of "Flags - SCVR" above for a more thorough explanation of special convoy routes.  Most modules do not use this feature.  If "Flags - SCVR" is unchecked, these fields may be used** to define more convoy sectors for all powers in addition to the "Convoiroute - All" field.  If "Flags - SCVR" is unchecked and "Flags - Convoi" is checked, these fields can define sectors affected by convoy disruption occurring in this sector* (such as in "Seazone 19 (z19)" in the "Pacific 1940 v3.x" modules).  Note that convoy disruption effects are subject to control of specific "at war" sectors (see "Pseudo-sectors" in section N (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)).

*This feature is new in ABattleMap version 0.80+
**This feature is new in ABattleMap version 0.80


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:34:09 pm
Section N: SektorInfo.txt

SektorInfo.txt is the editable text file used with csek.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117).  Since SektorInfo.txt 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.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) and SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109) files (by far the most technical part of creating a module).

Creating SektorInfo.txt
To create a blank SektorInfo.txt file, right-click any unused space in you .gim folder, select "New", and select "Text Document".
(http://www0.mediafire.com/imgbnc.php/06cfbe5fdbd8dc88371fb1d044b1ca7f6g.jpg)
Rename your new text document "SektorInfo.txt".  From here, I recommend creating SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) and using Sektor EditorM (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118)** to set all the available settings for each sector on the map.

Editing SektorInfo.txt
Some sector information cannot be added to SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) using Sektor EditorM (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118).  In these cases, the information must be included by editing a current copy of SektorInfo.txt and converting it back to SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117).  I will begin with what cannot be added using Sektor EditorM (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118), and continue with a map of the rest of the information in SektorInfo.txt.  Before editing SektorInfo.txt, you should always use rsek.exeP (http://www.axisandallies.org/forums/index.php?topic=18773.msg632122#msg632122) to create a current copy of SektorInfo.txt from SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) so that SektorInfo.txt will reflect all changes made to SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) using Sektor EditorM (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118).

The structure:
Each sector in your module is represented by one line in SektorInfo.txt.  Each line has different parts, used for different pieces of information.  The first part of each line is a character string which functions as the sector's name that appears in ABattleMap's title bar when a user hovers the cursor over the sector on the map.  Following the sector name is a colon, which is then followed by nine sets of eight digits each.  Each 8-digit set is called a long, and they are labeled "long1" through "long9" left to right.  Each long may contain separate numbers, labeled according to the number of digits used:  each set of two digits in a long is called a byte, labeled b1-b4 left to right, and each single digit I will call a nyble, labeled n1-n8 left to right.
(http://www1.mediafire.com/imgbnc.php/2fbc7a6cf48fc96867594663b7224b846g.jpg)
Note that all numbers in SektorInfo.txt must be written as hexadecimal valuesQ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632126#msg632126).  Refer to section Q (http://www.axisandallies.org/forums/index.php?topic=18773.msg632126#msg632126) for an explanation of hexadecimal values.

IPC Value display location:
Long2 and long3 in each line define the location of the sector's IPC value display when a user selects "IPC Values" in ABattleMap's "View" menu.
(http://www1.mediafire.com/imgbnc.php/3842d993ed8ebd2ce71d99b3941cc4f66g.jpg)
Long2 is the location's X-value, or horizontal distance in pixels from the left side of the image.  Long3 is the location's Y-value, or vertical distance in pixels from the top of the image.  To identify the X and Y values of a specific location on the map, open Map.bmpD (http://www.axisandallies.org/forums/index.php?topic=18773.msg632105#msg632105) in Paint.NET.  Hover your cursor over a location where you would like the IPC value of your sector to be.  The bottom-right corner of the Paint.NET window shows the X and Y values (respectively) of that location separated by a comma.
(http://www3.mediafire.com/imgbnc.php/9364693436b88e53e60bd510acad00556g.jpg)
Convert each value from decimal to hexadecimalQ (http://www.axisandallies.org/forums/index.php?topic=18773.msg632126#msg632126), and then type them into long2 and long3 of the pertaining sector.  For example, if your "X, Y" value for sector 1 is "1137, 879", then long2 of sector 1 should be "00000471", and long3 should be "0000036f".

Pseudo-sectors*:
SektorInfo.txt/SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) can include some information that does not pertain to a specific sector.  This information is not represented by space on the map, but does exist in a line of SektorInfo.txt as a pseudo-sector.  Pseudo-sector lines are structured in the same way as all sectors with a string (name), colon, and 9 longs, but each long in a pseudo-sector contains different information than the corresponding longs in normal sectors.

One type of pseudo-sector (the only one I know of) is used for defining at-war status criteria (used for convoy disruption).  In this pseudo-sector, long1 is "00000080".  Long2:b4 is the number of the aggressing power.  Long2:b3 is the number of the sector which must be controlled by any power for the aggressing power to be considered "at war" with (afflict convoy damage against) power 1.  Long2:b2 is the number of the sector which must be controlled by any power for the aggressing power to be considered "at war" with (afflict convoy damage against) power 2.  Long2:b1 is the same for power 3, long3:b4 is for power 4, long3:b3 for power 5, and so on.  For example, in the "Pacific 1940 v3.1" module, someone must control sector 192 (or C0 in hexadecimal) for Japan (power 1) to do convoy disruption damage to UK (power 4) or ANZAC (power 5), and someone must control sector 161 (or A1 in hexadecimal) for Japan to do convoy disruption damage to the US (power 2).  Japan cannot do convoy disruption damage to China (power 3).  In the module's SektorInfo.txt, this is shown with the following line:
Code:
atWarStatus Japan: 00000080 00a10001 0000c0c0 00000000 00000000 00000000 00000000 00000000 00000000

The Rest:
The following is a map of what each location (in order) of each line in SektorInfo.txt defines (for normal sectors).  Named features are references to fields in Sektor EditorM (http://www.axisandallies.org/forums/index.php?topic=18773.msg632118#msg632118):
-   String- This is the name of the sector.  Any white space between the last visible character of the string and the colon is ignored.
-   Colon- This separates the string from the numerical codes
-   Long1:b1- "01" is for land, "00" is for water
-   Long1:b2- IPC value of sector
-   Long1:b3- original owner of sector
-   Long1:b4- defines type of pseudo-sector*; always "00" for normal sectors
-   Long2- X-value of IPC value display location
-   Long3- Y-value of IPC value display location
-   Long4:b1- always "00" (as far as I can tell)
-   Long4:b2- corresponds to "Convoiroute - All"
-   Long4:n5- always "0" (as far as I can tell)
-   Long4:n6- corresponds to "Flags - Convoi" ("1" is checked, "0" is not)
-   Long4:n7- always "0" (as far as I can tell)
-   Long4:n8- corresponds to "Flags - Oil", "Flags - SIPC", "Flags - SCVR", and "Flags - OCVR"*.  Value for "Oil" is 1, "SIPC" is 2, "SCVR" is 4, and "OCVR" is 8.  If more than one of these are applicable, add their values together.
-   Long5:b1- corresponds to "Convoiroute - Special 4"
-   Long5:b2- corresponds to "Convoiroute - Special 3"
-   Long5:b3- corresponds to "Convoiroute - Special 2"
-   Long5:b4- corresponds to "Convoiroute - Special 1"
-   Long6:b1- corresponds to "Convoiroute - Special 8"
-   Long6:b2- corresponds to "Convoiroute - Special 7"
-   Long6:b3- corresponds to "Convoiroute - Special 6"
-   Long6:b4- corresponds to "Convoiroute - Special 5"
-   Long7:n1- corresponds to "IPCs - Special 6" (for power 8)
-   Long7:n2- corresponds to "IPCs - Special 8" (for power 7)
-   Long7:n3- corresponds to "IPCs - Special 7" (for power 6)
-   Long7:n4- corresponds to "IPCs - Special 5"
-   Long7:n5- corresponds to "IPCs - Special 4"
-   Long7:n6- corresponds to "IPCs - Special 3"
-   Long7:n7- corresponds to "IPCs - Special 2"
-   Long7:n8- corresponds to "IPCs - Special 1"
-   Long8:b1- always "00"
-   Long8:b2- always "00"
-   Long8:b3- always "00"
-   Long8:b4- correspond to "Unit"
-   Long9- always "00000000"

*This feature is new in ABattleMap version 0.80+
**This feature is new in ABattleMap version 0.80


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:34:49 pm
Section O: Start.aam

Start.aam is the save file that contains the starting setup of pieces.  This file is not necessary if there is no standard starting setup for your game.  Note that the file contains the name of the module directory (.gim folder) that was used to create it, so it cannot be used for a module with a differently-named directory.

Creating Start.aam
Once you have created all the other desired files for your module, open your module in ABattleMap.  Use your ToolBar to place pieces according to the way all games should begin in your module.  I recommend using BigPieces (if you have them) for this so that you can adequately space the pieces for users who prefer to use BigPieces.  Once you have finished, open the "File" menu, select "Save As...", navigate to your module"s .GIM folder, type "Start" in the "File name:" field, and select "AAA Map (*.AAM)" in the "Save as type:" field.  Press the "Save" button.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:35:21 pm
Section P: Using ABattleMap's file conversion tools

There are several application tools included in an installation of ABattleMap 0.79f which are helpful and/or required for creating certain files used in a module.  The tools are:

b242map.exe - this is used for creating SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109) from SektorInfo.bmpE (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106)
csek.exe - this is used for creating SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) from SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)
rsek.exe - this is used for creating SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) from SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117)

You may also notice a bmp2map.exe file in your ABattleMap folder, but I have no idea what this is for or how to use it.

Each of these files must exist in the same folder as the source file they use and the file they will create, so it is a good idea to make a copy of each of these files in your module's .GIM folder while you are working on it.  To do this, simply open your ABattleMap program directory in Windows Explorer (usually located at C:\Program Files\ABattleMap) and drag each one from your ABattleMap folder to your module's .GIM folder while holding the "Ctrl" key on your keyboard.

After you have the tool files in your module's directory, you need to access them from the command console in order to use them.  To open the command console, click "Start" and "Run...".  Type "cmd" in the "Run" window and press enter or click "OK".  You should see a black window with a file location followed by a blinking text insertion point, like this: "C:\Document and Settings\Stoney229>_".  This line is like viewing the "Stoney229" folder in Windows Explorer.  To open a file in the "Stoney229" folder, you would type the file name and press enter.  To open a subfolder in the "Stoney229" folder you would type "cd" (without quotes) followed by a space and the folder name and press enter.  File or folder names that have at least one space require quotation marks (e.g. cd "My Documents" (with quotes)).  To go up one folder you would type "cd.." (without quotes) and press enter.

You need to navigate from here to your module's directory, so typing "cd.." and pressing enter will get you to C:\Document and Settings.  "Cd.." and enter again will get you to C:\.  Once you are at C:\, type "cd "Program Files"" (quotes around "Program Files" only) and press enter.  Now type "cd ABattleMap" and press enter.  Finally, type "cd" followed by a space and the name of your module's directory (e.g. "P40.gim") and press enter.  Now you should be inside the folder containing all the files you need to access.
(http://www3.mediafire.com/imgbnc.php/ccc0426ed5e9af4c50e813f9cd5115586g.jpg)

(Tip: instead of typing out the full name of a file or folder, you can type the first letter of the file or folder and press Tab on your keyboard to cycle through all files or folders beginning with that letter.)

From here you can use any of the .exe tools you have placed in your directory.  To use b242map.exe to create a new SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109) file out of an existing SektorInfo.bmpE (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106) file, type "b242map.exe SektorInfo.bmp SektorInfo.map" (no quotes).  SektorInfo.bmpE (http://www.axisandallies.org/forums/index.php?topic=18773.msg632106#msg632106) will remain in your folder and a new SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109) will appear.
(http://www4.mediafire.com/imgbnc.php/d683478a8b4bfe009674a024141ec19e6g.jpg)

To use csek.exe to create a new SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) file out of an existing SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) file, type "csek.exe SektorInfo.txt SektorInfo.sek" (no quotes).  SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) will remain in your folder and a new SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) will appear.

To use rsek.exe to create a new SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) file out of an existing SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) file, type "rsek.exe SektorInfo.sek > SektorInfo.txt" (no quotes).  SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) will remain in your folder and a new SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) will appear.  Note that the required ">" between the source and destination files is unique to this tool.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:36:29 pm
Section Q: The hexadecimal number system

Using Windows Calculator to convert a number to hexadecimal
Open Windows Calculator by clicking Start>All Programs>Accessories>Calculator.  Click the "View" menu and select "Scientific".  Type in a number to be converted to hexadecimal.  Press F5 on your keyboard and the decimal number will be converted to hexadecimal.  Press F6 to convert it back to decimal.

Understanding the hexadecimal number system
Numbers are abstract entities which can be represented in a variety of different ways.  Most of us represent numbers using a decimal (base-10) number system - that is, one with 10 different symbols, or digits, to represent all numbers.  Our first 10 numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 only require one digit to be represented, but since there are only ten different digits, our eleventh number (10) requires a combination of digits, or symbols, to be represented.  The way we do this is by assigning place values - we have a "ones" (100) place, the right-most digit of any number, and "tens" (101) place to the left of that, a "hundreds" (102) place to the left of that, and so on.  When we're used to using the decimal number system, we don't have to think about the fact that the number 1265, for example, represents a number far larger then the measly number of 4 small digits it takes to represent the abstract 1265.  Instead, we intuitively know that the "1" is really 1 thousand (103), the "2" is 2 hundreds (102), the "6" is 6 tens (101), and the 5 is 5 ones (100).  In other words, as we count, when we run out of digits (7... 8... 9... ?), we add one into the next place and start over (10... 11... 12...).  Using this method, we could create a number system using any number of digits and still be able to represent any number imaginable.  Even if we only had 2 digits to work with, we could count: 0... 1... 10... 11... 100... 101... 110... 111... 1000... 1001... 1010... 1011... 1100... 1101... 1110... 1111... and so on.  Using a smaller number of different digits requires more of the same digits to be used to represent a single number.  The converse, however, is that if we used a number system based on something larger than ten, we would have more digits to work with and each number would be represented with a more efficient use of digits.

The hexadecimal number system has 16 different digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F, in that order.  What comes after F?  10 of course!  Although F (hexadecimal) is the same number as 15 (decimal), the hexadecimal system has place values in the same way as the decimal system.  There's the ones (160) place, the sixteens (161) place, the two hundred fifty-sixes (162) place, and so on.  So why does 10 (hexadecimal) represent the same number as 16 (decimal)?  Because you have 1 sixteen and 0 ones, just like having 1 ten and 6 ones.

What's 1265 (just a random number) in hexadecimal?  The first thing to think about is how many places will it take?  Does 1265 fit in the ones place of the hexadecimal number system?  Are there 16 or more ones in 1265?  Yes, so since we only have 16 different digits to put in each place, it must take more than one place.  So then let's look at the sixteens place: are there 16 or more sixteens in 1265?  What is 16 16s?  It is 256, so yes, there are more, and thus 1265 must take more than 2 places even in hexadecimal.  So let's look at the next place - are there 16 or more 256s in 1265?  16x256 is 4096, so no there are not 16 256s in 1265.  That means the number 1265 (decimal) in hexadecimal must only take the ones place, the 16s place, and the 256s place - three places/digits in total.  How many whole 256s are there in 1265?  1265/256=4.94140625, so there are 4 whole 256s in 1265.  But 4 256s only accounts for 1024, and our number is 1265, so the remaining 241 must be represented in smaller denominations than the 256s.  So the next place is the 16s place - how many whole 16s are there in 241?  241/16=15.0625.  But how do we represent 15 in a single digit?  In hexadecimal the 16th digit is F, so we have 4 256s, and we have "F" 16s.  Those 15 (or "F") 16s only account for 240 of our remaining 241, so we still have 1 left.  We must move on to the ones place - how many whole ones go into 1?  Exactly one!  So since 1 thousand, 2 hundreds, 6 tens, and 5 ones are the same as 4 256s, 15 16s, and 1 one, then 1265 (decimal) must be the same as 4F1 (hexadecimal)!

Another way to think about it is this:  Imagine going to a bank that only has dollar bills in denominations of 160 (1), 161 (16), 162 (256), 163 (4096) and so on.  They will always give you change in the highest denominations possible, so that they handle the fewest number of bills.  If you withdraw $1265, what bills will you get?  You will get 4 $256-bills, 15 $16-bills, and 1 $1-bill.

That's how it works!


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:37:17 pm
Section R: .zip files

.ZIP files are like windows folders in that they can contain any number of files, but they package all the information up into one tidy file.  Furthermore, they store redundant information in the files more efficiently so they take up less space on a computer or server and less bandwidth when being transferred over a network connection.  These features make .zip files very useful for distributing the multiple files of an ABattleMap module over the internetS (http://www.axisandallies.org/forums/index.php?topic=18773.msg632128#msg632128).  Once files have been packaged into a .zip file, they can be easily extracted again for regular use using the Windows Extraction Wizard.

Creating a .zip file
To copy your module into a single .zip file, first create an empty .zip file by right-clicking an empty space in your ABattleMap program folder, selecting "New", and selecting "Compressed (zipped) Folder".  Then drag your module's .GIM folder onto the icon of the new .zip folder.  If you have some extra files in your module's directory, you may want to drag the necessary files of your module into the .zip folder one at a time.  Now you have a .zip file containing your module, ready to upload to the internetS (http://www.axisandallies.org/forums/index.php?topic=18773.msg632128#msg632128)!

Extracting a .zip file
To restore the contents of a .zip file, right-click the file, select "Extract All...", and follow the instructions in the Extraction Wizard.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:39:42 pm
Section S: Uploading for internet distribution

An ABattleMap module is hardly any fun if you are the only one who has it.  Thankfully, there are online file hosting websites like Mediafire.com (http://www.mediafire.com/) that allow you to upload your files for free and provide you with a link that can be given to others who wish to download your files.

To upload your filesR (http://www.axisandallies.org/forums/index.php?topic=18773.msg632127#msg632127) to Mediafire (http://www.mediafire.com/), you should first follow the instructions to create a user account (free).  With a user account, uploading files is pretty easy and straight-forward.  Once you have uploaded a file, you should see it in your online folder.  If you click the "Share" button to the far right of your uploaded file, you will get a drop-down display that shows 2 different sharing URLs for that file.  Copy one of the URLs and post it in the AxisandAllies.org forums (http://www.axisandallies.org/forums) for everyone to download and enjoy!


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:40:48 pm
Section T: Glossary
This is a work in progress.  If you have any questions or suggestions for adding to this section, please post them on this thread.

convoy: can refer to "convoy disruption" or "convoy route"

current sector:  the sector currently being edited in the SektorEdit window.

at-war status: for the purposes of ABattleMap, the at-war status of a power determines whether or not that power can afflict convoy disruption damage.  SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119)/SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) must contain pseudo-sectors to define which sector must be controlled for each power to be considered at war with each other power.

convoy disruption: a set of rules included in some games that involves naval units reducing the income value of neighboring enemy territories.  Convoy disruption is subject to "at-war" status of the aggressing power.  Convoy disruption can not cause more income damage than the total income value of the territories it affects.

convoy routes: additional sectors that must be controlled in order for a power to receive the income of a specific sector.

power: a nation-player in a game.  Powers are designated and numbered by their corresponding rows in ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110).

sector: any designated space on the map in a module.  Sectors are territories, sea zones, and other spaces used for any of various purposes.  Modules must contain working SektorInfo.mapF (http://www.axisandallies.org/forums/index.php?topic=18773.msg632109#msg632109) and SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) files in order to have designated sectors.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:41:54 pm
Section U: The FAQ
This is a work in progress.  If you have any questions or suggestions for adding to this section, please post them on this thread.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:43:43 pm
Section V: Change log

v1.0  (June 16, 2010)
-(original document)

v1.01  (October 27, 2010)
-Section P, changed
type "rsek.exe SektorInfo.sek > SektorInfo.sek"
to
type "rsek.exe SektorInfo.sek > SektorInfo.txt"

-(updated on 10/20/2013 to corrected for UTF-8 characters gone missing, presumably due to forum software upgrade)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:46:20 pm
[reserved for future use]


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:48:19 pm
[reserved for future use]


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 16, 2010, 07:50:28 pm
[reserved for future use]


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 19, 2010, 07:24:48 pm
Does anyone know how I can adjust the column width of my tables in Section C?

Also, my browser does not load all the images, though it used to.  I am curious to hear if you are or aren't also having this problem.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: P@nther on June 20, 2010, 01:21:23 am
Also, my browser does not load all the images, though it used to.  I am curious to hear if you are or aren't also having this problem.

No problems with Firefox, Opera, IE (latest versions).

Great job, Stoney, thank you!!!
This thread should be stickied :-)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 20, 2010, 07:31:47 am
Also, my browser does not load all the images, though it used to.  I am curious to hear if you are or aren't also having this problem.

No problems with Firefox, Opera, IE (latest versions).

Great job, Stoney, thank you!!!
This thread should be stickied :-)
Good to hear, thank you.  Maybe it's my browser (chrome), or maybe it's my slow internet connection.

Glad you like it.  Thank you!


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: TMTM on June 21, 2010, 06:24:45 pm
This is Great! Excellent work!

I've been having trouble with my Toolbar in 0.80.. it disappears.. got any fix for that? I'm using Windows Vista... never had the trouble until now.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on June 21, 2010, 08:11:46 pm
This is Great! Excellent work!
Thanks very much!

I've been having trouble with my Toolbar in 0.80.. it disappears.. got any fix for that? I'm using Windows Vista... never had the trouble until now.
Is it not the same problem that is solved by the ABattlemap.ini trick?  That bug should be fixed if you care to upgrade to version 0.80+.  Also, Sektor Editor is a little buggy in version 0.80, but it works (with one exception noted in the tutorial) great in version 0.80+.  Dont worry, it won't break any compatibility or anything!


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: TMTM on June 22, 2010, 05:03:48 am
Do you have a link to downloand the 0.80+ version? I can only find 0.80

**I got it... just needed the P40 installed.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: smither07 on July 20, 2010, 11:58:38 am
Well explained!  :mrgreen: thanks!


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Funcioneta on October 26, 2010, 07:45:52 am
To use rsek.exe to create a new SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) file out of an existing SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) file, type rsek.exe SektorInfo.sek > SektorInfo.sek (no quotes).  SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) will remain in your folder and a new SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) will appear.  Note that the required > between the source and destination files is unique to this tool.

It should be rsek.exe SektorInfo.sek > SektorInfo.txt, or otherwise sektorinfo.sek will corrupt trying to convert to itself. Check this, Stoney (I found this while I was trying to update F40 module)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on October 26, 2010, 11:58:17 pm
To use rsek.exe to create a new SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) file out of an existing SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) file, type rsek.exe SektorInfo.sek > SektorInfo.sek (no quotes).  SektorInfo.sekL (http://www.axisandallies.org/forums/index.php?topic=18773.msg632117#msg632117) will remain in your folder and a new SektorInfo.txtN (http://www.axisandallies.org/forums/index.php?topic=18773.msg632119#msg632119) will appear.  Note that the required > between the source and destination files is unique to this tool.

It should be rsek.exe SektorInfo.sek > SektorInfo.txt, or otherwise sektorinfo.sek will corrupt trying to convert to itself. Check this, Stoney (I found this while I was trying to update F40 module)
By jove, you're right!  sorry about that!  Look forward to seeing your module.  I actually expect to have electricity installed to where I am living before the end of the year, and so I may continue (even if for my own personal fulfillment) to finish what I had started, but even if I do it will be many months before being completed.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Funcioneta on October 30, 2010, 09:19:24 am
A very important question: is there a limit for the number of powers that can do convoy damage? I can make all the other powers do damage, but the last 2 powers in the list (China and France) cannot do convoy damage, no wonder what I try. I don't care about China (at least in this module), but France is important because of the Madagascar dd. I cannot change the positions of India and France because it's needed that axis can raid India's Income


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: calvinhobbesliker on October 30, 2010, 09:22:33 am
A very important question: is there a limit for the number of powers that can do convoy damage? I can make all the other powers do damage, but the last 2 powers in the list (China and France) cannot do convoy damage, no wonder what I try. I don't care about China (at least in this module), but France is important because of the Madagascar dd. I cannot change the positions of India and France because it's needed that axis can raid India's Income

Well, if there's no solution, at least you can take comfort in the fact that French convoy raids will be few and far between.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Funcioneta on October 30, 2010, 03:50:31 pm
   Subsequent lines identify listed powers as allied together.  This information is used, for example, for convoy route or national objectives purposes, where a sector or group of sectors must be controlled by a powers side for that power to receive an amount of income.  These lines must begin with the word allied, followed by a list of single-digit integers representing powers.  The line allied 1 3 6 shows that powers 1, 3, and 6 are allied together.  Powers are numbered by their order in ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110) and BigPieces.bmpH (http://www.axisandallies.org/forums/index.php?topic=18773.msg632111#msg632111).  Note that powers numbered 10 or greater cannot be a part of these lists (as far as I can tell).


Not totally true: since it's a hexadecimal system, the max number is f (15). In my G40 module, France uses 'a' and still sums the income right. However, I'm not sure if powers with a number greater to 8 can do convoy damage (based on my experience)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on October 31, 2010, 03:58:44 am
A very important question: is there a limit for the number of powers that can do convoy damage? I can make all the other powers do damage, but the last 2 powers in the list (China and France) cannot do convoy damage, no wonder what I try. I don't care about China (at least in this module), but France is important because of the Madagascar dd. I cannot change the positions of India and France because it's needed that axis can raid India's Income

I cannot specifically remember what my discovery was on this matter, but you are quite likely right that it can only support up to 8 (idk why Attila didn't think of the Globabl game when he instituted the system for P40).  If this is the case, I guess you will have to find some way to work around it until a someone with C/C++ programming know-how to remedy the deficiency.
   Subsequent lines identify listed powers as allied together.  This information is used, for example, for convoy route or national objectives purposes, where a sector or group of sectors must be controlled by a powers side for that power to receive an amount of income.  These lines must begin with the word allied, followed by a list of single-digit integers representing powers.  The line allied 1 3 6 shows that powers 1, 3, and 6 are allied together.  Powers are numbered by their order in ToolPieces.bmpG (http://www.axisandallies.org/forums/index.php?topic=18773.msg632110#msg632110) and BigPieces.bmpH (http://www.axisandallies.org/forums/index.php?topic=18773.msg632111#msg632111).  Note that powers numbered 10 or greater cannot be a part of these lists (as far as I can tell).


Not totally true: since it's a hexadecimal system, the max number is f (15). In my G40 module, France uses 'a' and still sums the income right. However, I'm not sure if powers with a number greater to 8 can do convoy damage (based on my experience)
that's what I would have assumed, but I tried "a" and it didn't work for me.  Either my trial had some other error, or you are misunderstanding (slash-I have miscommunicated) the function of these ally groupings.  Where I have written "convoy route" here in this post, I am speaking of the "convoy routes" of games released before AAP40 (as opposed to the "convoy disruption" system of the AA1940 series), which functionally work in the modules basically the same way as the National Objectives (since the old system of convoy routes was that you had to control a specific sea zone in order to get the income of a certain territory or something like that).  So in the 1940 modules, the only function of the ally grouping in the MapInfo text file, which is only a function IF you implement automatic NO-calculation in your module, is that (in accordance with the rules) any one of a power's listed allies can control the sectors required for NO fulfillment in order for that power's NO to be automatically calculated.  This is why, in my P40 module, the USA (Oki + Iwo) NO requires the special "OCVR" designation (which was specifically created by Atti for that NO), since the rules state that the USA only receives income for that particular NO if the USA (specifically) controls both territories (e.g. UK or ANZ owning either one or both means USA does not get the NO).  Does that make sense?  This is why I had said before that I could not include France in the auto-NO calculations.

Now that I have tediously explained all this to you, you will tell me that you already understood all this and that France being listed as "a" actually works (and my own trials were somehow erroneous) so my explanation was pointless.  I'll be happy anyway, because that only makes it easier for you if you are wanting to implement Auto-NOs.  If you are not implementing Auto-NOs, then the ally groupings have no function (that I can think or am aware of)


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Funcioneta on October 31, 2010, 04:53:54 pm
Thanks for the input, Stoney. I guess that I'll cheat, using 'Indian' ships painted with blue to simulate French ships. That's the better system that I can find by now

As for the groupings, thanks again, and good to know. Now I understand what you mean, and you're right. And like I use manual NOs, it's not going to be a trouble


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: TMTM on March 16, 2011, 05:29:14 pm
Section Q: The hexadecimal number system

I was just browsing through to see whats new.. reading up on the how Hexadecimal works.. too much for my brain hehe So I went looking for a converter:
http://www.ascii.cl/conversion.htm


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: TMTM on March 16, 2011, 05:47:53 pm
Is there already a post/forum for discussing future idea's for abattlemap development? Any I always think of idea's while laying in bed at night hehe.

How about being able to make different sized units on the same toolbar.. of course they'd all be the same height, 9 pixels... but be able to adjust the length for ships would be cool.. make it all adjustable from the UnitStats.txt by adding another set of digits for abattlemap to read when it loads the module.. each unit would have a size setting.

How about having Zoom in/ Zoom out.. being able to adjust the view of the map.. not sure if it can be done but sounds cool.

How about adding tabs to the map file.. so you can save a whole game into one file and be able to click thru the turns.

How about able to add an info sting to the InfoView, I would add Cash.. and on my cash/sektors on the map I would program it to show the cash on the InfoView as well so you don't have to scroll back to go see.. just look at the Infoview.

How about a text tool to add text or text boxes to the module or notes to the map file

We have Toolpeices and BigPeices, how about adding a 3rd CustomPeices: Have a CustomPeices.txt which is where the module maker edits its specs.. so we can make larger and longer toolpeices of multiple size on one toolbar

How about a dice roller inside the program and saves the uneditable results to the AAM file.. it could work.. as long as no one gets pretty and edits the source code to give themselves favorable results hehe

Able to move a whole stack of units with one click etc or partial stack.

We now have the Sektor Editor.. how about a tool to edit the area of the sektor and saves it to the SektorInfo.map file for quit fixes etc... like a paint brush.. just paint where you want the sektor to be.

A hilighter tool.. kinda like paint brush.. maybe it would work like a layer that can be delete once the other user/s review what the other player hilighted.

emailer, be able to add players emails to the abattlemap and from the top.. like next to View.. would be Email.. it would auto attach the map file and have a message box and send button.. and the option to add multiple receivers (emails)

How about a Fleet peice.. that you can stack units on.. and all you have to do is move the Fleet peice to move all the navy units in one seazone... maybe also for land units?

I'll add more later



Title: Tutorial for Creating ABattleMap Modules v1 0
Post by: asseldidsnino on July 18, 2011, 12:31:50 am
If I remember correctly, I think its kind of picky about the order in which things are installed, whether you let it reboot between main installation and application of the patch.  Blah, I use Nero.


Title:
Post by: Invetteplaile on August 21, 2011, 04:16:02 pm
?   
?


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Imperious Leader on September 21, 2011, 07:31:20 pm
post to kill spammer


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: ksmckay on March 27, 2013, 10:14:01 pm
So I am trying to create a 1914 module and have gotten far enough that I want to actually open it up and see what it looks like and look at sektors.  However, whenever I open the module it doesnt show anything, map tool pieces, - completely blank. 

I even tried just completely copying another folders contents into mine (with nothing else in it) and just changing the name of the map in MapInfo.txt and it opened up the same way.

Any thoughts?

For starters all I need are three files right? Map.bmp, MapInfo.txt, and ToolPieces.bmp?


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on March 29, 2013, 05:57:23 pm
Ok the previous problem was that the name of the folder wasnt 1-3 characters.

Now it opens and loads the toolpieces and map file but crashes after you try to do anything.  I tried to simplify things by trying to get it to work with only the three necessary files MapInfo.txt, Map.bmp, ToolPieces.bmp but that didnt help either.

MapInfo.txt contains 1 line to be simple - just the name
Map.bmp is a flattened bmp file created from paint.net.  Tried 8 bit and 24 bit and neither options helped.
ToolPieces.bmp is 150x90 pixels - 10x9 markers

Is there something that has to be reset?  Kind of like a new install or something?  Does it matter what size the map is?  Currently its smaller than some other maps.
Map size isn't supposed to matter, but it has mattered for me in the past (we never figured out why - other maps have been same size as what didn't work for me).  In my case, my map was too big.  Idk if you can solve your problem by changing the map size.

In this case, I don't think "resetting" or reinstalling anything will be of any help, so long as you already have all the files you are supposed to have in your abattlemap directory.

have you tried opening another module with only the 3 essential files?

You said your mapinfo.txt file is only one line.  I do not know if that is allowable or not.  do other working modules have only one in that file?  Also am I correct in assuming you have not created your start.aam file yet?

Can you send me a screenshot of your file explorer window with your module directory (.gim folder) open?  Also, can you send your mapinfo.txt and toolpieces.bmp files?


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: ksmckay on April 01, 2013, 05:51:55 pm
If you try to create your own module using existing files it wont work until you include the SektorInfo files.  If you dont have SektorInfo.sek and SektorInfo.map the program instantly crashes (unless you have a working start.aam file but in order to make that you need a working module first). 

I will try to create a very simple map with a few sektors and see if I can get that to work before I keep messing with the real map file.  But I would be very surprised if someone can open up a module with just the three essential files - maybe that was a previous version and a bug with the new version? 


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: ksmckay on April 01, 2013, 06:17:15 pm
Ok so yeah I created a very simple map and used tool piece and such files from another module and it didnt work.

Then I made the necessary SektorInfo files and added them and the program worked fine. 

So it seems pretty clear that the SektorInfo files are mandatory and not optional.  Perhaps in a different version they were optional but not in the 0.8 alpha 1 version. 

I guess the best way to make my own Sektor files is to make the map, color it up and save it as SektorInfo.bmp and take note of how many Sektors there are.  Then create the sektorInfo.txt file, leave it blank, then use csek.exe to create the SektorInfo.sek file.

Then the program works fine and you can edit the Sektor files either using the txt file or the Sektor Editor and be on your way.

But I think you should update the tutorial to reflect this as the Sektor Files are not optional as stated.

Let me know if you see differently but it seems conclusive to me that this is the case.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on April 01, 2013, 08:19:37 pm
Ok so yeah I created a very simple map and used tool piece and such files from another module and it didnt work.

Then I made the necessary SektorInfo files and added them and the program worked fine. 

So it seems pretty clear that the SektorInfo files are mandatory and not optional.  Perhaps in a different version they were optional but not in the 0.8 alpha 1 version. 

I guess the best way to make my own Sektor files is to make the map, color it up and save it as SektorInfo.bmp and take note of how many Sektors there are.  Then create the sektorInfo.txt file, leave it blank, then use csek.exe to create the SektorInfo.sek file.

Then the program works fine and you can edit the Sektor files either using the txt file or the Sektor Editor and be on your way.

But I think you should update the tutorial to reflect this as the Sektor Files are not optional as stated.

Let me know if you see differently but it seems conclusive to me that this is the case.
Without going into unnecessary detail here as to why, what you suggest is very possibly the case.

Have you tried creating just a blank all-black sektorinfo.map and blank sektorinfo.txt?


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: ksmckay on April 02, 2013, 06:17:22 am
Yep, with blank files - meaning
SektorInfo.bmp is the same size map and all black
made SektorInfo.map from that file
Blank SektorInfo.txt file
Made SektorInfo.sek from the txt file

It works.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: ksmckay on April 02, 2013, 06:54:34 am
Ok question about Sektors -

So I have my file that contains all of the borders and/or bounding boxes and I need to go in and add the different Sektor colors (1-whatever). 

1.  If I have territories with mutliple areas can I just pain them all the same Sektor color?  When I go to edit that Sektor will I need to edit both (or more) or just one of the areas?

2.  Does every space on the map need to be either black border or a Sektor Color?  Can there be any blank space?  When I draw the borders sometimes there are some shades of black with different transparency levels - Do I need to go and make sure every such box is completely black/transparency = 255?  If there are some random pixels left over that dont have a color do I have to fill them in?

Just want to confirm before I do more than necessary for the first round.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on April 02, 2013, 07:28:07 pm
Yep, with blank files - meaning
SektorInfo.bmp is the same size map and all black
made SektorInfo.map from that file
Blank SektorInfo.txt file
Made SektorInfo.sek from the txt file

It works.
good to know


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on April 02, 2013, 07:39:02 pm
Ok question about Sektors -

So I have my file that contains all of the borders and/or bounding boxes and I need to go in and add the different Sektor colors (1-whatever). 

1.  If I have territories with mutliple areas can I just pain them all the same Sektor color?  When I go to edit that Sektor will I need to edit both (or more) or just one of the areas?

2.  Does every space on the map need to be either black border or a Sektor Color?  Can there be any blank space?  When I draw the borders sometimes there are some shades of black with different transparency levels - Do I need to go and make sure every such box is completely black/transparency = 255?  If there are some random pixels left over that dont have a color do I have to fill them in?

Just want to confirm before I do more than necessary for the first round.
1) yes, any area that has the exact same color will be considered the same sektor.  It does not have to be contiguous.  on the map it will work just like the two non-contiguous areas are a normal, contiguous, sector/territory.  If you click on one of the areas, edit it in sektor editor and save, then click on the other area, you will see the same info that you saved.

2) yes, every single pixel needs to be either black or corresponding to an entry in sektorinfo.sek.  I don't know how you're getting colors that you don't intend, unless you're using some kind of effects or you have anti-aliasing on.  best to stick with just the pencil and fill tools for adding color to your sektorinfo.bmp, and make sure antialiasing is off.

If you have a color that does not correspond to any sector (other than black), your module should open, but if somebody hovers the cursor over that pixel I think it would crash the program.


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: ksmckay on April 09, 2013, 05:35:55 pm
Ok, running out of ideas again.

Using blank Sektor files the module works fine. 

Using Sektor files with something in them it crashes.

Test 1
Made a 4 quadrant SektorInfo.bmp file with black borders and then paint in each of the 4 quadrants with color 1, 2, 3, 4.

converted the map file with b242map.exe  the text and Sek files are still empty.

When I open the map and try to look at Sektor stuff the sektors are randomly distributed and have nothing to do with the SektorInfo.bmp or SektorInfo.map file.  And then it crashes eventually.  Can edit stuff using SektorEditor and it seems to save it but like I said the Sektors are random. 

Can you copy some files into a new folder and try to make a Simple sektor file and see if it works for you?

Same as with the previous problem, maybe something in the software isnt working right and there is some missing step that isnt included anywhere.  Without going into the program I dont know how to solve this. 


Title: Re: Tutorial for Creating ABattleMap Modules v1.0
Post by: Stoney229 on April 09, 2013, 09:13:20 pm
Ok, running out of ideas again.

Using blank Sektor files the module works fine. 

Using Sektor files with something in them it crashes.

Test 1
Made a 4 quadrant SektorInfo.bmp file with black borders and then paint in each of the 4 quadrants with color 1, 2, 3, 4.

converted the map file with b242map.exe  the text and Sek files are still empty.

When I open the map and try to look at Sektor stuff the sektors are randomly distributed and have nothing to do with the SektorInfo.bmp or SektorInfo.map file.  And then it crashes eventually.  Can edit stuff using SektorEditor and it seems to save it but like I said the Sektors are random. 

Can you copy some files into a new folder and try to make a Simple sektor file and see if it works for you?

Same as with the previous problem, maybe something in the software isnt working right and there is some missing step that isnt included anywhere.  Without going into the program I dont know how to solve this. 
send me a screenshot of the windows explorer window with all the relavent files in it, as well as the actual files and I'll see if I notice anything, but I can't spend too much time on it.