Utilities, Controllers & Bots, Oh My!
Moderator: Shannon V. OKeets
Re: Utilities, Controllers & Bots, Oh My!
I suspect that all those "255"s in the hex control report are water. I think visibility would be improved if you used something like "." to represent sea dots. Then one would have the oceans show up as a bunch of dots, which would help the eye orient on the map.
I thought I knew how to play this game....
- paulderynck
- Posts: 8470
- Joined: Sat Mar 24, 2007 5:27 pm
- Location: Canada
Re: Utilities, Controllers & Bots, Oh My!
then after they are all dots you could use this VBA macro:
Sub ApplyTestToAllCells()
Dim ws As Worksheet
Dim cell As Range
Dim targetCharacter As String
Dim asciiPeriod As Integer
' Set the worksheet variable
Set ws = ThisWorkbook.Sheets("Sheet1") ' Change "Sheet1" to your actual sheet name
' Set the target character and obtain its ASCII code
targetCharacter = "."
asciiPeriod = Asc(targetCharacter)
' Loop through each row
For Each row In ws.UsedRange.Rows
' Loop through each cell in the row
For Each cell In row.Cells
' Check if the cell contains the target character (ASCII period)
If InStr(1, cell.Value, targetCharacter) > 0 Then
' If the target character is found, change the cell's background color to blue
cell.Interior.Color = RGB(0, 0, 255) ' RGB values for blue
Else
' If the target character is not found, reset the cell's background color
cell.Interior.ColorIndex = xlNone
End If
Next cell
Next row
End Sub
Sub ApplyTestToAllCells()
Dim ws As Worksheet
Dim cell As Range
Dim targetCharacter As String
Dim asciiPeriod As Integer
' Set the worksheet variable
Set ws = ThisWorkbook.Sheets("Sheet1") ' Change "Sheet1" to your actual sheet name
' Set the target character and obtain its ASCII code
targetCharacter = "."
asciiPeriod = Asc(targetCharacter)
' Loop through each row
For Each row In ws.UsedRange.Rows
' Loop through each cell in the row
For Each cell In row.Cells
' Check if the cell contains the target character (ASCII period)
If InStr(1, cell.Value, targetCharacter) > 0 Then
' If the target character is found, change the cell's background color to blue
cell.Interior.Color = RGB(0, 0, 255) ' RGB values for blue
Else
' If the target character is not found, reset the cell's background color
cell.Interior.ColorIndex = xlNone
End If
Next cell
Next row
End Sub
Paul
Re: Utilities, Controllers & Bots, Oh My!
Looking at the 255s some more, they are either water or neutral minor countries. It would be nice if a distinction could be made.
I thought I knew how to play this game....
Re: Utilities, Controllers & Bots, Oh My!
This field is about individual hex control. So 255 equals not controlled and a national flag symbol is not displayed on it (if chosen to display) thus water or neutral contriesCourtenay wrote: Wed Jan 17, 2024 9:14 am Looking at the 255s some more, they are either water or neutral minor countries. It would be nice if a distinction could be made.
Terrain is described in a different field
Re: Utilities, Controllers & Bots, Oh My!
some psuedocode:
if (country_field == 255) { output_string = (terrain_field == water ? "." : "--") };
if (country_field == 255) { output_string = (terrain_field == water ? "." : "--") };
I thought I knew how to play this game....
Re: Utilities, Controllers & Bots, Oh My!
Daily Status Report. (Wednesday) January 17, 2024.
(1) Roads outside are still like a ice rink so no run (again) today (3 days in row!).
(2) I'm very close to an initial release. May happen later today, but need to get through five unit tests before I do.
(3) I want to verify the release by running it command line. By the way, anyone want to come up with a nifty icon for MAGIC? I just pulled one from windows. (4) And running and comparing a number of five unit tests (ut=1,2,3,4 & 6) that I ran back in 2020. I'm copying and pasting from the old UT script into the appropriate MAGIC forms. I will diff the file produced by MAGIC against those produced ran back in 2020. I plan to include screen caps of these units test as examples of how I entered the needed data. If (when) they compare exactly (i.e., no differences), I will release (i.e., email) MAGIC v0.01 to those of you that have PM me your email.
(1) Roads outside are still like a ice rink so no run (again) today (3 days in row!).
(2) I'm very close to an initial release. May happen later today, but need to get through five unit tests before I do.
(3) I want to verify the release by running it command line. By the way, anyone want to come up with a nifty icon for MAGIC? I just pulled one from windows. (4) And running and comparing a number of five unit tests (ut=1,2,3,4 & 6) that I ran back in 2020. I'm copying and pasting from the old UT script into the appropriate MAGIC forms. I will diff the file produced by MAGIC against those produced ran back in 2020. I plan to include screen caps of these units test as examples of how I entered the needed data. If (when) they compare exactly (i.e., no differences), I will release (i.e., email) MAGIC v0.01 to those of you that have PM me your email.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
MWIF MAGIC v0.01
I decided to make this initial release available to the community in general. Below are the instructions that I included in 2 emails and the attachment that I was finally able to get through by changing the extension of the MAGIC.bat command file to MAGIC.batter. I definitely could use help with (5) & (11) below, which are necessary to getting MAGIC for your specific PC configuration.
I decided to make this initial release available to the community in general. Below are the instructions that I included in 2 emails and the attachment that I was finally able to get through by changing the extension of the MAGIC.bat command file to MAGIC.batter. I definitely could use help with (5) & (11) below, which are necessary to getting MAGIC for your specific PC configuration.
FIRST EMAIL
(1) MWIF MAGIC v0.01 Attached.
(2) Unzip and place anywhere you wish.
(3) Edit paths ../data/MWIF_MAGIC.cfg to your specific paths. Specifically,
src_dir,C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\src
data_dir,C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\data
gf_save_dir,C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\game_files
lib_dir,C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\lib
exe_dir,C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\exe
report_dir,C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\reports
log_dir,C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\logs
gf_input_dir,C:\Program Files (x86)\Matrix Games\World in Flames\Scenarios\Global War\Saved Games
image_dir,C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\images
(4) Assuming correct configuration of these paths, folders data_dir, report_dir, log_dir and gf_save_dir will (should) be created on first run. If not, then please report, manually make the folder and retry.
(5) MAGIC is currently run by double clicking on the ../exe/MWIF_MAGIC.bat or desktop icon (which you create). BUT FIRST, edit the paths, python install and executables to run the MAGIC script. Looking at this bat file we may have some trial and error to get it configured for a python installation different from Anaconda3, Python3. Really could use help here.
set root=C:\ProgramData\Anaconda3
call %root%\Scripts\activate.bat %root%
call %root%\Scripts\ipython3.exe C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\src\MWIF_MAGIC.py C:\Users\rkrun\Documents\WW2\MWiF\MAGIC\data\MWIF_MAGIC.cfg
pause
(6) Also, might be best once the bat file is properly configure to run by right click, select run as Administrator.
(7) Even if we get things running, this first release if very crude.
(8) Good luck.
(9) Apparently, Gmail won't let me send an attachment that includes a *.bat file. Will send it via another email (I hope).
SECOND EMAIL
(10) Ok, let's try this again. I changed the extension of the MAGIC.bat file in the exe folder to MAGIC.batter to get the attachment through. I couldn't get it through either in my other email.
(11) You'll both need to change the extension back to .bat & properly configure it to run based on your python installation & directory paths.
- Attachments
-
- 2024JAN18-MAGICv0-01.zip
- (380.34 KiB) Downloaded 22 times
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
MWIF MAGIC v0.01 Pre Release Unit Tests and Informal User's Guide.
(1) I'm going to post details of my pre release unit tests to serve as an informal user's guide and to point out some of the rough edges that I'll (we'll) correct moving forwarded. Assuming that we do move forward.
(2) I ran 5 unit tests (UTs) and compared diffed (using WINMERGE) the resultant saved game files against those saved from the same UTs ran in August of 2020, which were posted in the earlier part of this thread.
(3) The 2020 UTs were ran via python script and through an earlier version of Anaconda IDE and Spyder python.
(4) The current UTs were ran via the MWIF MAGIC v0.01 GUI.
UT001. Generate Reports, Save (no edits) Game File & Compare Back to Original.
Script Description. MWIF MAGIC UT.
(1) Loaded game file UT.GAM
(2) Generated Hex Control, Production & Counters reports.
(3) Saved game file UT001.GAM
(4) Diff UT001.GAM against both UT.GAM and the 2020 UT001.GAM. No differences found.
(5) UT001 PASSED.
(6) Rough Edge(s). Need to refresh the main screen after making edits or saving file to another name. Indicate when edits have been made but not saved. Also, indicate which game file or game file state (edited but not yet saved) that the Hex, Control, Production and all future reports apply.
(1) I'm going to post details of my pre release unit tests to serve as an informal user's guide and to point out some of the rough edges that I'll (we'll) correct moving forwarded. Assuming that we do move forward.
(2) I ran 5 unit tests (UTs) and compared diffed (using WINMERGE) the resultant saved game files against those saved from the same UTs ran in August of 2020, which were posted in the earlier part of this thread.
(3) The 2020 UTs were ran via python script and through an earlier version of Anaconda IDE and Spyder python.
(4) The current UTs were ran via the MWIF MAGIC v0.01 GUI.
UT001. Generate Reports, Save (no edits) Game File & Compare Back to Original.
Script Description. MWIF MAGIC UT.
(1) Loaded game file UT.GAM
(2) Generated Hex Control, Production & Counters reports.
(3) Saved game file UT001.GAM
(4) Diff UT001.GAM against both UT.GAM and the 2020 UT001.GAM. No differences found.
(5) UT001 PASSED.
(6) Rough Edge(s). Need to refresh the main screen after making edits or saving file to another name. Indicate when edits have been made but not saved. Also, indicate which game file or game file state (edited but not yet saved) that the Hex, Control, Production and all future reports apply.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
UT002. Change Version, Verify Change & Diff with UT002 (Aug 2020).
Script Description. MWIF MAGIC UT002.
(1) Loaded UT.GAM
(2) Changed version to 3.1.0.5 and saved to UT002.GAM.
(3) Version changed verified and diff with Aug 2020 UT002 matched*.
(4) UT002 PASSED.
(5) Rough Edge(s). * WINMERGE produced a difference on the version line though both lines matched exactly. Well, exactly until I enable "view EOL (end of line)" option. It turns out that MWIF at the end of each line is using a carriage return (CR) & line feed (LF) (or in Windows OS terms \r\n) and I was using only a (LF or \n) for a new line. The "difference" does NOT impact MWIF from correctly loading the edited game file and saving it as it saves it. This is definitely an easy fix and one I have already made in my working version. By the way, if you open a game file in Notepad ++ and click on the "paragraph" button you'll see what I'm talking about as show below.
Script Description. MWIF MAGIC UT002.
(1) Loaded UT.GAM
(2) Changed version to 3.1.0.5 and saved to UT002.GAM.
(3) Version changed verified and diff with Aug 2020 UT002 matched*.
(4) UT002 PASSED.
(5) Rough Edge(s). * WINMERGE produced a difference on the version line though both lines matched exactly. Well, exactly until I enable "view EOL (end of line)" option. It turns out that MWIF at the end of each line is using a carriage return (CR) & line feed (LF) (or in Windows OS terms \r\n) and I was using only a (LF or \n) for a new line. The "difference" does NOT impact MWIF from correctly loading the edited game file and saving it as it saves it. This is definitely an easy fix and one I have already made in my working version. By the way, if you open a game file in Notepad ++ and click on the "paragraph" button you'll see what I'm talking about as show below.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
UT003. Edit Counters, Save, Verify & DIFF with 2020 UT003 (1/2).
Script Description.
(1) Script Matrix included 9 counters to edit, 2 of which were invalid to test back in 2020 error handling. Given the way counters are identified and then edited in MAGIC, erroneous counter inputs are not possible.
(2) 7 "real" counters were edited. MWIF MAGIC UT003 (1/2).
Hex Location 1/6.
(3) Open Edit Unit(s) form, enter the row and column of the counter(s) you wish to edit.
(4) GET UNIT(s) -> which finds all counters in that hex.
(5) For each counter you may edit organization status (ORG or DOG)*,row, column and return to base (RTB) if applicable (i.e., only applicable to units at sea).
(6) In my initial edit, I moved all 3 counters instead of the 2 that I should have. During initial verification I discovered this mistake and re-edited the counter to move it back to its original hex. Hex Location 2/6.
(7) Forgot to "move" this counter in my initial pass. Corrected oversight after initial verification. Hex Location 3/6.
Script Description.
(1) Script Matrix included 9 counters to edit, 2 of which were invalid to test back in 2020 error handling. Given the way counters are identified and then edited in MAGIC, erroneous counter inputs are not possible.
(2) 7 "real" counters were edited. MWIF MAGIC UT003 (1/2).
Hex Location 1/6.
(3) Open Edit Unit(s) form, enter the row and column of the counter(s) you wish to edit.
(4) GET UNIT(s) -> which finds all counters in that hex.
(5) For each counter you may edit organization status (ORG or DOG)*,row, column and return to base (RTB) if applicable (i.e., only applicable to units at sea).
(6) In my initial edit, I moved all 3 counters instead of the 2 that I should have. During initial verification I discovered this mistake and re-edited the counter to move it back to its original hex. Hex Location 2/6.
(7) Forgot to "move" this counter in my initial pass. Corrected oversight after initial verification. Hex Location 3/6.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
UT003. Edit Counters, Save, Verify & DIFF with 2020 UT003 (1/2).
MWIF MAGIC UT003 (2/2).
Hex Location 4/6.
(9) # of Convoy pts are appended at the end of name which for CPs is set to Convoy_<# pts> Hex Location 5/6.
(8) # of Oil is append to name, which for Oil Pts is set to Oil Resource_<# pts>. Corrected before release that # pts displayed as integer vs real. Hex Location 6/6.
(9) Forgot to move German sub (U-boat), which was corrected after initial verification. (10) Final verification PASSED UT003. Compared, with the exception to the CR, LF exactly to the 2020 UT003. Also, loaded and visually verified all the counter edits.
Main Screen (After Save).
(11) Rough Edge(s). As mention earlier refreshing and clearing main screen after save. EDIT UNIT(S) form, make it more obvious that the user must GET UNIT(S) before they can EDIT UNIT(S). This is only an issue if the user moves from editing units in one hex to another. The EDIT UNIT(S) button won't work unless the user GET UNIT(S). After, even if the hex doesn't change, won't work AFTER the user makes any edit(s) (i.e., EDIT UNIT(S) pressed). The user will have to GET UNIT(S) again. IMPORTANT, edits aren't permanent unit a game file saved is made.
MWIF MAGIC UT003 (2/2).
Hex Location 4/6.
(9) # of Convoy pts are appended at the end of name which for CPs is set to Convoy_<# pts> Hex Location 5/6.
(8) # of Oil is append to name, which for Oil Pts is set to Oil Resource_<# pts>. Corrected before release that # pts displayed as integer vs real. Hex Location 6/6.
(9) Forgot to move German sub (U-boat), which was corrected after initial verification. (10) Final verification PASSED UT003. Compared, with the exception to the CR, LF exactly to the 2020 UT003. Also, loaded and visually verified all the counter edits.
Main Screen (After Save).
(11) Rough Edge(s). As mention earlier refreshing and clearing main screen after save. EDIT UNIT(S) form, make it more obvious that the user must GET UNIT(S) before they can EDIT UNIT(S). This is only an issue if the user moves from editing units in one hex to another. The EDIT UNIT(S) button won't work unless the user GET UNIT(S). After, even if the hex doesn't change, won't work AFTER the user makes any edit(s) (i.e., EDIT UNIT(S) pressed). The user will have to GET UNIT(S) again. IMPORTANT, edits aren't permanent unit a game file saved is made.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
Wonderful work. I will be looking at this later.
One suggestion: for units at sea, it would be nice to have Sea Areas and sea boxes displayed, somehow.
This is by no means urgent, and might never happen.
I wish the code were c++, or even c; this python looks close enough that I am sure I would get into terrible trouble if I try writing code.
One suggestion: for units at sea, it would be nice to have Sea Areas and sea boxes displayed, somehow.
This is by no means urgent, and might never happen.
I wish the code were c++, or even c; this python looks close enough that I am sure I would get into terrible trouble if I try writing code.
I thought I knew how to play this game....
Re: Utilities, Controllers & Bots, Oh My!
UT004. Edit Hex Control, Save Verify & DIFF with 2020 UT004.
Script Description.
(1) 7 valid & 2 invalid [row,col] hexes to flip from Italian to German control.
(2) 3 valid Chinese controlled hexes to flip to Japanese control.
(3) Bad country input to test error handling. MWIF MAGIC UT004.
(4) Opened the CHANGE HEX CONTROL form from the main screen, copied and pasted the hex (rol,col) pairs in the appropriate Country slot.
(5) Similar to EDIT COUNTER(S), the user must first hit LOAD after entering data in the form before they can hit EXECUTE, which is disable after you hit it.
(6) To get it to work you must hit LOAD again.
LOAD (Post).
(7) After you hit LOAD, the right side of form shows you the number of good & bad hex pairs that you've entered. EXECUTE (Post).
(8) You the hit EXECUTE and the right side of the form now shows you the number of hex(es) changed (i.e., control changed to the country on the left). As stated previously, one you hit EXECUTE it won't work again until you hit LOAD. Error Handling.
(9) Not sure why I highlighted the EXECUTE button in green. Please ignore.
(10) So this screen is post entering additional data and hitting the load button. When I did this I discovered that the top right label wasn't being refreshed correctly. That was fixed pre release.
(11) I produced the form to highlight two things: (a) row, col entries are comma or whitespace delimited (i.e., separated). You can use as much whitespace as you want between entries but only 0 or 1 comma. (b) Being row,col pairs the total number of entries SHOULD be even. If not, MAGIC (or I did initial) makes the assumption that you mis entered the pairs leaving a row or col out by accident. So, if the number of entries for a given country is odd, that country will NOT be processed if you hit EXECUTE and you get the error message on the far right of "UNPAIRED Entry!".
(12) Unlike the EXECUTE button, the LOAD button me be hit as many times in a row as you wish before you execute.
(13) I also need to point out that on the left there are 6 SPARE country slots in which you may enter a country ID to get access to a country not hardwired on the form. Or even enter one that is to included additional entries if you happen to fill the line of that one.
(14) Rough Edge(s). No checking to see if a hex is entered multiple times. If that's the case then it's the country lower down on the form that has that entry to which hex control is flipped. Also, when you enter a CID in one of the SPARE slots, unless you hit return, the Country name isn't updated until you hit LOAD. When there's a mismatch between CID and Country Name, CID takes precedent when you hit LOAD.
(15) File saved to UT004.GAM, valid hex changes visually confirmed and successful diff (no differences) with 2020 UT004.
(16) UT004 PASSED.
Script Description.
(1) 7 valid & 2 invalid [row,col] hexes to flip from Italian to German control.
(2) 3 valid Chinese controlled hexes to flip to Japanese control.
(3) Bad country input to test error handling. MWIF MAGIC UT004.
(4) Opened the CHANGE HEX CONTROL form from the main screen, copied and pasted the hex (rol,col) pairs in the appropriate Country slot.
(5) Similar to EDIT COUNTER(S), the user must first hit LOAD after entering data in the form before they can hit EXECUTE, which is disable after you hit it.
(6) To get it to work you must hit LOAD again.
LOAD (Post).
(7) After you hit LOAD, the right side of form shows you the number of good & bad hex pairs that you've entered. EXECUTE (Post).
(8) You the hit EXECUTE and the right side of the form now shows you the number of hex(es) changed (i.e., control changed to the country on the left). As stated previously, one you hit EXECUTE it won't work again until you hit LOAD. Error Handling.
(9) Not sure why I highlighted the EXECUTE button in green. Please ignore.
(10) So this screen is post entering additional data and hitting the load button. When I did this I discovered that the top right label wasn't being refreshed correctly. That was fixed pre release.
(11) I produced the form to highlight two things: (a) row, col entries are comma or whitespace delimited (i.e., separated). You can use as much whitespace as you want between entries but only 0 or 1 comma. (b) Being row,col pairs the total number of entries SHOULD be even. If not, MAGIC (or I did initial) makes the assumption that you mis entered the pairs leaving a row or col out by accident. So, if the number of entries for a given country is odd, that country will NOT be processed if you hit EXECUTE and you get the error message on the far right of "UNPAIRED Entry!".
(12) Unlike the EXECUTE button, the LOAD button me be hit as many times in a row as you wish before you execute.
(13) I also need to point out that on the left there are 6 SPARE country slots in which you may enter a country ID to get access to a country not hardwired on the form. Or even enter one that is to included additional entries if you happen to fill the line of that one.
(14) Rough Edge(s). No checking to see if a hex is entered multiple times. If that's the case then it's the country lower down on the form that has that entry to which hex control is flipped. Also, when you enter a CID in one of the SPARE slots, unless you hit return, the Country name isn't updated until you hit LOAD. When there's a mismatch between CID and Country Name, CID takes precedent when you hit LOAD.
(15) File saved to UT004.GAM, valid hex changes visually confirmed and successful diff (no differences) with 2020 UT004.
(16) UT004 PASSED.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
(1) Thanks!Courtenay wrote: Thu Jan 18, 2024 8:20 pm Wonderful work. I will be looking at this later.
One suggestion: for units at sea, it would be nice to have Sea Areas and sea boxes displayed, somehow.
This is by no means urgent, and might never happen.
I wish the code were c++, or even c; this python looks close enough that I am sure I would get into terrible trouble if I try writing code.
(2) Another good rough edge.
(3) The info is in the Counters.csv, which can easily be filter on as you like if you load it into EXCEL or some other spreadsheet program. Also, significant in this file is counter UID matched to a specific counter (which I'm covering in my next and final unit text).
(4) Also, this just gave me an idea for a method that produces a report of units that move (from-to) by (internally) generating this counters report pre, post move and then reporting on the units with difference. This could be used for AARs or for multiple player where one is responsible for a MP or theater, makes moves in a "working copy" of the game file and passes that report on to his gaming partner.
(5) Or, MAGIC could produce an instruction file for such moves that his partner could load into MAGIC which would then make the edits to the game file directly.
(6) We're talking about true PBEM multiple player functionality either at the MP or Theater level.
(7) For this you'd also have to factor hex control difference too. But that would be straight forward to add.
(8) By the way, I came to python from MATLAB and some Java. So, I think that is a much bigger difference than coming from C/C++ to python. I do a LOT of googling for commands. One thing that still gets me often is when I want to print something to the screen (or console) I'll still occasionally write disp(var) which is MATLAB versus print(var). Also, referencing arrays, which python calls lists except in numpy, I'll occasionally still incorrectly reference a list as A(i)or A(i,j) versus A[ i] or A[ i][j]. Now using numpy you can generate an array that's referenced as A[ i,j]
(9) P.S. had to put a space in between [ i because if I didn't this forum took it as the beginning of italicize tag. FUNNY.

Counters.csv loaded into EXCEL. Counters filtered by "at-sea" and "sea-area" fields.
Last edited by rkr1958 on Thu Jan 18, 2024 10:00 pm, edited 1 time in total.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
UT006. Edit Counters (2), Save, Verify & DIFF with 2020 UT006.
Script Description.
(1) Edit 5 counters identified by unit id (UID). MWIF MATIC UT006.
(2) Currently in MAGIC counters to be edited are identified by hex row, col. Meaning that only counters on the map can be edited. However; future release (if this continues) will include the ability to edit counters not of the map (e.g., GBA removed, repair, construction, production).
(3) Note that uid for each unit is displayed on the left. So one could use the counters.csv report file to help then identify counters to be edited. Especially when the functionality to load based on UID is also included (again, if future versions are to be based on community interest and help).
EDIT UNIT(S) FORM. 1/3. EDIT UNIT(S) FORM. 2/3. EDIT UNIT(S) FORM. 3/3. (4) Edits made, file saved (UT006), edited verified via inspection of MWIF after loading UT006 and UT006 successfully diffed vs 2020 UT006.
(5) UT006 PASSED.
(6) Rough Edges. Add functionality to identify counters to be edited by UID and pool form entries in addition to row and column. Add the functionality to move units from one pool to another.
Script Description.
(1) Edit 5 counters identified by unit id (UID). MWIF MATIC UT006.
(2) Currently in MAGIC counters to be edited are identified by hex row, col. Meaning that only counters on the map can be edited. However; future release (if this continues) will include the ability to edit counters not of the map (e.g., GBA removed, repair, construction, production).
(3) Note that uid for each unit is displayed on the left. So one could use the counters.csv report file to help then identify counters to be edited. Especially when the functionality to load based on UID is also included (again, if future versions are to be based on community interest and help).
EDIT UNIT(S) FORM. 1/3. EDIT UNIT(S) FORM. 2/3. EDIT UNIT(S) FORM. 3/3. (4) Edits made, file saved (UT006), edited verified via inspection of MWIF after loading UT006 and UT006 successfully diffed vs 2020 UT006.
(5) UT006 PASSED.
(6) Rough Edges. Add functionality to identify counters to be edited by UID and pool form entries in addition to row and column. Add the functionality to move units from one pool to another.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
(1) This completes my initial effort with MWIF MAGIC.
(2) Now it's up to us as the community if we want to take MAGIC further including future releases.
(3) I've made MWIF MAGIC ver 0.01 in previous post available to all.
(4) I've spent probably 8 to 10 hours a day over the past 4-days in building, testing and documenting this initial version. That's a 40-hr workweek!
(5) I treated it as a job (I'm retired) but a job without pay.
(6) I have no interest in monetary pay, just expansion of the MWIF playing base and players enjoyment of this great game!
(7) It's time for me to get back to my counter factual game and AAR. Haven't touched either in over a week. I am excited however at the thought of developing AAR report methods, as I discussed previously, to make doing my current AAR easier.
(2) Now it's up to us as the community if we want to take MAGIC further including future releases.
(3) I've made MWIF MAGIC ver 0.01 in previous post available to all.
(4) I've spent probably 8 to 10 hours a day over the past 4-days in building, testing and documenting this initial version. That's a 40-hr workweek!

(5) I treated it as a job (I'm retired) but a job without pay.

(6) I have no interest in monetary pay, just expansion of the MWIF playing base and players enjoyment of this great game!
(7) It's time for me to get back to my counter factual game and AAR. Haven't touched either in over a week. I am excited however at the thought of developing AAR report methods, as I discussed previously, to make doing my current AAR easier.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
If we do want to code, what compiler do you recommend? I don't have anything that does python at the moment.
Thanks.
Thanks.
I thought I knew how to play this game....
Re: Utilities, Controllers & Bots, Oh My!
Neither do I. Are there python compilers?Courtenay wrote: Fri Jan 19, 2024 12:17 pm If we do want to code, what compiler do you recommend? I don't have anything that does python at the moment.
Thanks.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
(1) I'm an idiot! What I've been dreading and thought would be a major undertaking wasn't that big of a deal. I've successfully created a window executable MWIF_MAGIC.exe using pyinstaller version 5.1
(2) The executable at 244 MB is too large to upload to this forum, I'm going to try drop box.
(3) Thanks to Don's previous link in this thread on creating a python executable. It led me to pyinstaller which I was able to install through an Anaconda cmd prompt which I had to run as administrator.
(4) The latest version of pyinstaller produced the following error message,
(5) I really didn't want to go around uninstalling Sypder packages so I search and found a recommendation to uninstall the latest version and install pyinstaller 5.1.The 'pathlib' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package ...
(6) I installed this version running as Administrator an Anaconda Powershell Prompt. pip install pyinstaller==5.1
cd <path>\MAGIC\src
pyinstaller --onefile MWIF_MAGIC.py
(7) Assuming the build goes correctly, which it did on my machine once I was running pyinstaller 5.1, a MWIF_MAGIC.exe file is created in the <path>\MAGIC\src\dist
(8) You then need to place a copy of that executable in the <path>\MAGIC\exe folder and run it from there. And it did run.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
(9) Uploaded MWIF_MAGIC.exe (zipped) to dropbox.
(10) Those that have PM me with the email address (4 so far) should have accesses.
(11) If you'd like access PM me. I'm going to build a full initial install folder too. But before then if you have downloaded from earlier in this thread:
(12) Unzip MWIF_MAGIC.zip and place the MWIF_MAGIC.exe in <path>\MAGIC\exe folder (13) I suggest you run as administrator (but that's up to you).
(14) You run by double clicking on the exe file or like I did I built a shortcut which I placed on my desktop to run (as administrator).
(15) It took about 30-seconds (or so) on my machine (i.e., PC configuration) for MAGIC to startup. After that the time taken to run was the same as running script mode.
(10) Those that have PM me with the email address (4 so far) should have accesses.
(11) If you'd like access PM me. I'm going to build a full initial install folder too. But before then if you have downloaded from earlier in this thread:
(12) Unzip MWIF_MAGIC.zip and place the MWIF_MAGIC.exe in <path>\MAGIC\exe folder (13) I suggest you run as administrator (but that's up to you).
(14) You run by double clicking on the exe file or like I did I built a shortcut which I placed on my desktop to run (as administrator).
(15) It took about 30-seconds (or so) on my machine (i.e., PC configuration) for MAGIC to startup. After that the time taken to run was the same as running script mode.
Ronnie