• I wrote some code for a calculator to keep track of IPC during a board game of Axis and Allies 1942, Second Edition. As an amateur coder and new to this board game I need feedback, please. (Got a lot of help from my friend Rainer. Thanks ‘Reg’)

    see it on YouTube: https://youtu.be/d1heYfO4ME4

    There is a link to download the code below. It is not a PC game. The idea is it will run on your PC, (laptop, desktop or PC tablet), with a mouse. Boot it up when you start a board game and keep track of each nation’s IPC totals by clicking a radio button in a territory on the map to change ownership. Watch the IPC totals update as territories change ownership.

    2020-04-12 09_08_25-Window.png

    2020-04-12 16_05_18-Window.png

    [BITBUCKET]https://bitbucket.org/kflanagan/calculatorforaanda/downloads/AnA_IPC_Calulator.7z

    Download the file. (It comes from bitbucket, a password protected code repository but have your security software scan it in any event for security.) Use 7-zip to unpack it in a new folder on your hard disk. Click on the AsixAndAlliesCalculator.exe file to run the code. Let me know what I did wrong. Thanks.

    5/2/2020 — I have updated the code to deal with the capture and liberation of a nation’s capital. It will zero out the income and then return it on liberation.

    2020-05-02 10_23_07-.png


  • I just updated the download link above. My database had New Guinea twice and this could have given incorrect totals. This issue is fixed. Please delete and redownload the calculator if your download file was named other than “AnA_IPC_Calulator.7z”.

    I have also added the capture and liberation of the capital to zero out or return income.


  • Good idea. Thanks.


  • Great work! Is there also an IPC calculator for Global ;-)
    One think: If a capital is captured the allied forces can’t gain IPCs for liberating territories which belong to that capital’s force. E.g. UK or US liberates Karelia after Germany/Japan occupied Russia


  • Thanks fasthard. That is just the kind of help I needed. The code to correct that will be coming in an update to the download.

    As for making a version for Global, yes that is possible. I would need some help though.

    Images: I used my cell phone to take two pictures of each half of the 1942 map and photoshopped ( or gimp, a free photo editor) the two images into one map image. This is the background map you see in the PC program. Can you do that or do you know someone that can? The final image is a massive 4741 by 2800 pixels but could be smaller. ( you just lose some of the zoom depth) I would also need 300 by 300-pixel images of the insignias of the additional nations in the game.
    German.png

    Support Files:
    There would also need to be an updated version of this text file to reflect the territories on the map.
    BasicCountryList.txt

    The file starts out like this:

    Germany;10;Germany;Germany;
    France;6;Germany;Germany;
    NorthWesternEurope;2;Germany;Germany;
    Norway;2;Germany;Germany; …

    Each new line is a territory in the game. The information in each line is in the order of name, IPC, current owner, original owner. Someone would need to provide a list like that for the global game. Do you have, or do you know, someone with Excel spreadsheet skills?

    Editing:
    After creating these supporting files there will be a process of creating and editing the location of all the radio buttons on the map. I will be glad to show you how that is done.

    Thanks again.


  • Hi kennethofborg,
    you’re welcome.

    I’ve done a global IPC tracker with MS Excel (https://www.dropbox.com/scl/fi/qj1ukd81mhwvhwu9ajbo3/AxisAndAllies_GLOBAL_1940_2nd_Initial_20200312.xlsm?dl=0&rlkey=ndesbxts7ih1pcqknz2vriu6l), therefore I’ve got some preparation lists I can easily adjust:
    BasicCountryListGlobal.txt
    There’re all IPCs relevant territories included (also the NO ones without IPC value).

    Here are some maps files:
    https://www.dropbox.com/s/ona2aexfo66pxhw/Map.bmp?dl=0
    https://www.dropbox.com/s/yi80qacpzzmcfj9/MapnoTerrain.bmp?dl=0

    Loooking forward testing the calculator ;-)

    Best regards


  • Very good!

    I was able to cut out the map image and covert it. It is fewer pixels than for 1942 but this will likely not be important.

    Do you have images for the nation insignias other than the German, Japanese, USA, UK and USSR images I already have?

    The .txt file looks good too.

    I just need to ask three stupid questions.

    First, because the current code is a calculation of total IPC it does not include territories with zero value. There is no reason to put the radio buttons for a zero IPC territory on the map. The button function is to exchange ownership of IPC values. Is there some other feature to Global that is different than for 1942? If not I can just remove those zero IPC lines.

    Second, what is the “n” owner in Global? Is that no owner but there could be?

    Third, what is “nAllies” and “nAxis” owner in Global? Is this some alliance of neutrals? (Sounds like there may be a need for new code logic to deal with a complicated set of rules.) This will take more work.

    Also, regarding your original observation about the capture of capital: There currently is no accounting for the loss of a nation’s capital in this code.

    The question:
    Would I correctly follow the board game rules if I have the nation’s IPC income turn to zero when the capital territory falls to an opposing nation? If the capital territory was liberated by the original owner nation or a friendly nation, it would again show the total IPC income of that nation. (program already keep track of liberated territory returning IPC to the original owner)

    To be clear, this program just adds up a nation’s IPC total income from territories to determine income for that turn. It does not keep track of cash held by any nation, player.


  • HI kennethofborg,

    1. The zero value territories are necessary if you want to calculate some of the additional National Objectives.
      e.g. the Soviet Union gains 3 extra IPCs if they occupy an original axis/pro axis territory even if it’s worth zero IPC: Sardinia, Sicily, Italien Somaliland;
      or the United Kingdom Europe gains 5 IPCs if it controls all of they original territories: Alexandria is worth nothing but UKE won’t get the NO’s 5IPCs if they don’t control it.
      But if you only want to calculate the territories IPCs you can delete (or comment for futher versions ;-)) these rows.

    2./3. “n” means “neutral”: There are neutral, neutral pro axis and neutral pro allies territories in Global40.

    For the insignias: Mr @Tjoek has created some roundels:
    https://www.axisandallies.org/forums/topic/31982/tjoek-s-custom-roundels-and-tokens?lang=de&page=1

    Best regards


  • The extra IPD conditions will require more code logic to build into a global calculator. I could give it a go but would ask for a commitment on your part. To complete the project I would like to teach you how to position the buttons correctly on the map. alt text

    I will take on getting the code working to create the buttons and calculate while you place the buttons. Would you be willing to spend some time on Skype with me, install an editor and let me show you how xaml code (the top of the image above) works to place the buttons on the map ( the bottom part of the image)?


  • @fasthard hello, the excel looks great!

    can the map be somehow used with the excel? how is this?

    also, can the numbers be reset to just use with Pacific 1940 2nd edition?

    thankS!


  • @kennethofborg hello, how do i install this map tool after downloading? it asks me what i want to open the application in, after downloading.

  • PantherP Panther moved this topic from Axis & Allies 1942 2nd Edition on

  • @allister The download should be a file called “AnA_IPC_Calculator.7z”. That means it is a compact zip file so it needs to be unzipped to use. I suggest the free program 7-Zip file manager. https://www.7-zip.org/download.html Once you install this program and open it put this path: C:\Users(Your User Name Here)\Downloads in the 7_Zip path. Now select the "AnA_IPC_Calculator.7z file in your Downloads folder and click Extract in the 7_Zip menu bar. In the new window that opens, click the box with the three dots that is to the right of the Extract to: field. Here you can make a new folder in our Documents folder and call it something like “AnA_Calculator” and click OK and again OK. This will extract the zip file into your new folder. Now use File Explorer to navigate to your new folder and one of the new files will be called “AxisAndAlliesCalculator.exe”. Double clicking that file will start the program running with the map window open. Hope this helps. This does not work for Pacific 1940, sorry.
    ken


  • Hi @kennethofborg

    Nice work :)
    Idk if you would have any interest in working on the triplea engine, but if you do, it is here https://github.com/triplea-game/triplea?tab=readme-ov-file

    There site is here https://forums.triplea-game.org/


  • @kennethofborg thanks heaps, that works. wish there was one for the 1940 2nd edition!


  • @allister thx for your feedback and sorry for the late answer. I adapted my recent BM4 Excel table to Pacific 1940 2nd. The NOs are not updated (checkboxes are unchecked so the NOs are not fullfilled exceppt Japan’s for not being at war) but I think you can use the IPCs tracking for the territories and add the NOs Money manual?

    I uploaded the Excel file here:
    https://www.dropbox.com/scl/fi/0qquacjmmo6s252pnp7d7/Pac_XvsL_JAP1_20240721.xlsm?rlkey=t4uonqxmffoi2c66rskhuiynv&st=lbb6u8jd&dl=0

    If you have any questions, don’t hesitate to contact me. I’ll answer more quick than 23 days ;-).

    Kind regards Rene


  • @fasthard Thank you.

Suggested Topics

  • 10
  • 4
  • 3
  • 7
  • 4
  • 4
  • 2
  • 5
Axis & Allies Boardgaming Custom Painted Miniatures

188

Online

17.3k

Users

39.7k

Topics

1.7m

Posts