December 15, 2017, 02:20:42 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Help support TripleA software development. Search me
  Articles  
   Home   Help Login Register AACalc  
Loading
Pages: « 1 2 3 4 »
  Print  
Author Topic: Tutorial for Creating ABattleMap Modules v1.0  (Read 24264 times)
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #15 on: June 16, 2010, 07:34:09 pm »
0

Section N: SektorInfo.txt

SektorInfo.txt is the editable text file used with csek.exeP to create SektorInfo.sekL.  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 and SektorInfo.mapF 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".

Rename your new text document "SektorInfo.txt".  From here, I recommend creating SektorInfo.sekL and using Sektor EditorM** to set all the available settings for each sector on the map.

Editing SektorInfo.txt
Some sector information cannot be added to SektorInfo.sekL using Sektor EditorM.  In these cases, the information must be included by editing a current copy of SektorInfo.txt and converting it back to SektorInfo.sekL.  I will begin with what cannot be added using Sektor EditorM, and continue with a map of the rest of the information in SektorInfo.txt.  Before editing SektorInfo.txt, you should always use rsek.exeP to create a current copy of SektorInfo.txt from SektorInfo.sekL so that SektorInfo.txt will reflect all changes made to SektorInfo.sekL using Sektor EditorM.

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.

Note that all numbers in SektorInfo.txt must be written as hexadecimal valuesQ.  Refer to section Q 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.

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 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.

Convert each value from decimal to hexadecimalQ, 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 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:
-   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
« Last Edit: October 20, 2013, 10:36:26 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #16 on: June 16, 2010, 07:34:49 pm »
0

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.
« Last Edit: October 20, 2013, 10:39:41 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #17 on: June 16, 2010, 07:35:21 pm »
0

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 from SektorInfo.bmpE
csek.exe - this is used for creating SektorInfo.sekL from SektorInfo.txtN
rsek.exe - this is used for creating SektorInfo.txtN from SektorInfo.sekL

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.


(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 file out of an existing SektorInfo.bmpE file, type "b242map.exe SektorInfo.bmp SektorInfo.map" (no quotes).  SektorInfo.bmpE will remain in your folder and a new SektorInfo.mapF will appear.


To use csek.exe to create a new SektorInfo.sekL file out of an existing SektorInfo.txtN file, type "csek.exe SektorInfo.txt SektorInfo.sek" (no quotes).  SektorInfo.txtN will remain in your folder and a new SektorInfo.sekL will appear.

To use rsek.exe to create a new SektorInfo.txtN file out of an existing SektorInfo.sekL file, type "rsek.exe SektorInfo.sek > SektorInfo.txt" (no quotes).  SektorInfo.sekL will remain in your folder and a new SektorInfo.txtN will appear.  Note that the required ">" between the source and destination files is unique to this tool.
« Last Edit: October 20, 2013, 11:02:49 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #18 on: June 16, 2010, 07:36:29 pm »
0

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!
« Last Edit: October 20, 2013, 10:50:32 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #19 on: June 16, 2010, 07:37:17 pm »
0

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.  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!

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.
« Last Edit: October 20, 2013, 10:51:28 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #20 on: June 16, 2010, 07:39:42 pm »
0

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 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 to Mediafire, 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 for everyone to download and enjoy!
« Last Edit: October 20, 2013, 10:51:41 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #21 on: June 16, 2010, 07:40:48 pm »
0

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/SektorInfo.sekL 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.

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 and SektorInfo.sekL files in order to have designated sectors.
« Last Edit: October 20, 2013, 10:52:13 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #22 on: June 16, 2010, 07:41:54 pm »
0

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.
« Last Edit: June 16, 2010, 09:48:53 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #23 on: June 16, 2010, 07:43:43 pm »
0

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)
« Last Edit: October 20, 2013, 10:53:10 pm by Stoney229 » Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #24 on: June 16, 2010, 07:46:20 pm »
0

[reserved for future use]
Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #25 on: June 16, 2010, 07:48:19 pm »
0

[reserved for future use]
Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #26 on: June 16, 2010, 07:50:28 pm »
0

[reserved for future use]
Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #27 on: June 19, 2010, 07:24:48 pm »
0

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.
Logged
P@nther
Site Moderator
A&A.org Heavy Bomber
*
*
*
*
*
*
*
*
*
*******
Posts: 5300


Rules Deputy and Moderator


View Profile
« Reply #28 on: June 20, 2010, 01:21:23 am »
0

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 smiley
Logged
Stoney229
A&A.org Submarine
****
Posts: 798



View Profile
« Reply #29 on: June 20, 2010, 07:31:47 am »
0

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 smiley
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!
Logged
Pages: « 1 2 3 4 »
  Print  
 
Jump to:  

2017 Support Drive

Read about this support drive.
Support Level
Forum Username
Note: payee will appear as Livid Labs, LLC.
Buy Axis & Allies
  • Axis & Allies 1942 [Amazon]
  • A&A Pacific 1940 [Amazon]
  • A&A Europe 1940 [FMG]
  • [eBay]
  • [eBay]
  • A&A D-Day [Amazon]
  • A&A Battle of the Bulge [Amazon]
  • [eBay]
  • [eBay]
  • WWII Themed Combat Dice [FMG]



Axis and Allies.org Official Gold Sponsor: Historical Board Gaming

Axis & Allies.org Official Silver Sponsor: Field Marchal Games
Powered by MySQL Powered by PHP © 2015 Livid Labs, LLC. All rights reserved.
Axis & Allies is registered trademark of Wizards of the Coast, a division of Hasbro, Inc.
Note: the copyright below is for the forum software only.
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Valid XHTML 1.0! Valid CSS!