Utilities, Controllers & Bots, Oh My!
Moderator: Shannon V. OKeets
Re: Utilities, Controllers & Bots, Oh My!
It will be great to have an editor to fix the convey/product bugs.
Good job!
Good job!
- paulderynck
- Posts: 8465
- Joined: Sat Mar 24, 2007 5:27 pm
- Location: Canada
Re: Utilities, Controllers & Bots, Oh My!
You loaded the new route and it worked, which is very encouraging, but which phase of the game was that in and did it hold up through to production?rkr1958 wrote: ↑Mon Jan 08, 2024 10:02 pm
It's a start but I've got some more lessons to go through. By the way, the code for moving units, changing hex control, changing version already exists and has been extensively tested. The challenge is getting working inside a working gui and then exporting that to a windows application.
At any rate, I have considerable experience with using Visual Basic to create Windows apps. I use Microsoft Visual Studio which is a free download. Visual Studio does offer the use of python but I don't know if you can create the same kind of Windows Apps that way. It may be worth checking out.
Perhaps given suitable passing of parameters, Visual Basic could be used to make the GUI that the user would manipulate and in the background it would call the python code.
Paul
Re: Utilities, Controllers & Bots, Oh My!
It was during naval movement and the route changes have stuck through the end of impulse and into the next (axis) impulse.paulderynck wrote: ↑Tue Jan 09, 2024 9:55 pm You loaded the new route and it worked, which is very encouraging, but which phase of the game was that in and did it hold up through to production?
I definitely can use all the help and expertise that folks are willing to give! I have made an initial start on a MWIF MAGIC GUI. Took me a couple of days to figure out how to manipulate button and label widgets in python (tkinter).paulderynck wrote: ↑Tue Jan 09, 2024 9:55 pmAt any rate, I have considerable experience with using Visual Basic to create Windows apps. I use Microsoft Visual Studio which is a free download. Visual Studio does offer the use of python but I don't know if you can create the same kind of Windows Apps that way. It may be worth checking out.rkr1958 wrote: ↑Mon Jan 08, 2024 10:02 pm
It's a start but I've got some more lessons to go through. By the way, the code for moving units, changing hex control, changing version already exists and has been extensively tested. The challenge is getting working inside a working gui and then exporting that to a windows application.
Perhaps given suitable passing of parameters, Visual Basic could be used to make the GUI that the user would manipulate and in the background it would call the python code.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
To purposely misquote Winston Churchill, "This is not the end or even the beginning of the end but perhaps the [beginning] of the beginning."
Anaconda, Spyder Python IDE. MWIF MAGIC v0.01 (initial stage, hence the beginning of the beginning) Enable & Specific a "Session Logging File" or NOT (i.e., do not log session).
Magic suggests a log file name and save location, one which the user may accept and choose differently. Also, the user may choose NOT to log anything.
Anaconda, Spyder Python IDE. MWIF MAGIC v0.01 (initial stage, hence the beginning of the beginning) Enable & Specific a "Session Logging File" or NOT (i.e., do not log session).
Magic suggests a log file name and save location, one which the user may accept and choose differently. Also, the user may choose NOT to log anything.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
Load MWIF game file.
(1) Default MWIF game directory specified in MAGIC.cfg file.
(2) User may load from this default or override to another directory.
Save (Edited) Game File.
(3) Edited saved game directory also specified in MAGIC.cfg file.
(4) Again, user may save to the directory or override to another directory. First UNIT TEST, open & save (to another name) game file.
(5) Winmerge DIFF shows both files (as expected) are identical!
(6) First unit test passed with flying colors.
(1) Default MWIF game directory specified in MAGIC.cfg file.
(2) User may load from this default or override to another directory.
Save (Edited) Game File.
(3) Edited saved game directory also specified in MAGIC.cfg file.
(4) Again, user may save to the directory or override to another directory. First UNIT TEST, open & save (to another name) game file.
(5) Winmerge DIFF shows both files (as expected) are identical!
(6) First unit test passed with flying colors.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
Session Log File.
MWIF MAGIC Input Directory.
Specific relative path to MWIF MAGIC (executable) scripts. Near-Term Plans.
(1) Implement editing methods developed over the past 3 to 4 years (i.e., various reports, move counters, flip/unflip counters, change game file version, change hex control).
(2) Figure out how to export python/tinker scripts to an executable version for other folks to try out & test.
(3) Add more names to the developer & tester (CFG) lines.
Specific relative path to MWIF MAGIC (executable) scripts. Near-Term Plans.
(1) Implement editing methods developed over the past 3 to 4 years (i.e., various reports, move counters, flip/unflip counters, change game file version, change hex control).
(2) Figure out how to export python/tinker scripts to an executable version for other folks to try out & test.
(3) Add more names to the developer & tester (CFG) lines.
Ronnie
- paulderynck
- Posts: 8465
- Joined: Sat Mar 24, 2007 5:27 pm
- Location: Canada
Re: Utilities, Controllers & Bots, Oh My!
Here is an example of what I was picturing when the idea of an editing GUI first came up. This is not an application that I wrote, I just downloaded it. It is a program that can edit game files from the game Master of Orion 2 (one of my long time favorites).
It allowed you to edit just about anything in the game - races, weapons, ships, tech achievements and planetary systems and other stuff.
It allowed you to edit just about anything in the game - races, weapons, ships, tech achievements and planetary systems and other stuff.
Paul
Re: Utilities, Controllers & Bots, Oh My!
Nice.paulderynck wrote: ↑Wed Jan 10, 2024 9:38 pm Here is an example of what I was picturing when the idea of an editing GUI first came up. This is not an application that I wrote, I just downloaded it. It is a program that can edit game files from the game Master of Orion 2 (one of my long time favorites).
It allowed you to edit just about anything in the game - races, weapons, ships, tech achievements and planetary systems and other stuff.
GUI sample.jpg
Ronnie
- paulderynck
- Posts: 8465
- Joined: Sat Mar 24, 2007 5:27 pm
- Location: Canada
Re: Utilities, Controllers & Bots, Oh My!
The components shown such as: buttons, radiobuttons, dropdown pick lists, text boxes, etc. are really very easy to make in Visual Studio.
Writing all the code to support them is the time consuming part.
Writing all the code to support them is the time consuming part.
Paul
Re: Utilities, Controllers & Bots, Oh My!
I imagine they're just as easy in Python using tkinter. It took me a day or so to generate the code to do this. Crude I know, though I'm an experienced coder, I'm inexperience gui person. It's just learning the best widget to use for the job and using it correctly. My game file editing code, MWIF_Utilities_01.py currently stands at 1126 line and will definitely grow if all this takes root. Most of the code was written back in 2020 (3 to 4 years ago).paulderynck wrote: ↑Wed Jan 10, 2024 9:43 pm The components shown such as: buttons, radiobuttons, dropdown pick lists, text boxes, etc. are really very easy to make in Visual Studio.
Writing all the code to support them is the time consuming part.
Ronnie
- paulderynck
- Posts: 8465
- Joined: Sat Mar 24, 2007 5:27 pm
- Location: Canada
Re: Utilities, Controllers & Bots, Oh My!
I found some info on the net about the possibility of Visual Basic code calling python scripts and it does appear to be possible. Cooperators would need to know which parameters are to be passed between them and agree on whether they should be passed as command line arguments or stored in data files that both VB and python could access.
Paul
Re: Utilities, Controllers & Bots, Oh My!
Initial Release (MWIF MAGIC v0.01).
(1) If folks are willing to install & test and initial version, I think I can have one ready next week which includes a dozen or so game file editing and report options.
(2) This initial version will include a rudimentary gui and install configuration that hopefully will be improved upon as we move forward, including editing functionality.
(3) Also, this initial version will run python scripts via a windows bat (command) file that will have to be edited by the user to your machine (PC) specifics.
(4) For the initial versions you'll need python installed, including certain packages.
(5) If any folks willing to try out this and I'll proceed with getting this initial version ready.
(6) NOTE. Hopefully if we proceed in this development later versions will include an install that doesn't require python.
(7) Any takers?
(1) If folks are willing to install & test and initial version, I think I can have one ready next week which includes a dozen or so game file editing and report options.
(2) This initial version will include a rudimentary gui and install configuration that hopefully will be improved upon as we move forward, including editing functionality.
(3) Also, this initial version will run python scripts via a windows bat (command) file that will have to be edited by the user to your machine (PC) specifics.
(4) For the initial versions you'll need python installed, including certain packages.
(5) If any folks willing to try out this and I'll proceed with getting this initial version ready.
(6) NOTE. Hopefully if we proceed in this development later versions will include an install that doesn't require python.
(7) Any takers?
Ronnie
- paulderynck
- Posts: 8465
- Joined: Sat Mar 24, 2007 5:27 pm
- Location: Canada
Re: Utilities, Controllers & Bots, Oh My!
I'll give it a try. I installed the python module into Visual Studio last night.
Paul
-
- Posts: 416
- Joined: Tue Apr 28, 2020 4:24 am
Re: Utilities, Controllers & Bots, Oh My!
I will give it happily a try, if you guide me through the installation process.
Re: Utilities, Controllers & Bots, Oh My!
paulderynck wrote: ↑Thu Jan 11, 2024 7:58 pm I'll give it a try. I installed the python module into Visual Studio last night.
Will do.Angeldust2 wrote: ↑Thu Jan 11, 2024 8:11 pm I will give it happily a try, if you guide me through the installation process.
Look for an initial release this time next week ... Crude, Ugly & Unashamed, MWIF MAGIC version 0.01!
I'm going to add some more basic editing function and include some reports.
Ronnie
- Joseignacio
- Posts: 2970
- Joined: Fri May 08, 2009 11:25 am
- Location: Madrid, Spain
Re: Utilities, Controllers & Bots, Oh My!
rkr1958 wrote: ↑Thu Jan 11, 2024 10:11 pmpaulderynck wrote: ↑Thu Jan 11, 2024 7:58 pm I'll give it a try. I installed the python module into Visual Studio last night.Will do.Angeldust2 wrote: ↑Thu Jan 11, 2024 8:11 pm I will give it happily a try, if you guide me through the installation process.
Look for an initial release this time next week ... Crude, Ugly & Unashamed, MWIF MAGIC version 0.01!
I'm going to add some more basic editing function and include some reports.




Re: Utilities, Controllers & Bots, Oh My!
Quick update:
(1) Still on track for a crude release by end of the week (and I do mean crude).
(2) Definitely trying to climb up the python tkinter (GUI development) learning curve.
(3) Do think I'm slowly climbing the curve and expect to get in the initial release of a gui that looks like it was created by a beginner (which it will be!).
(4) It's taken me 2 or 3 days to figure out how to get inputs from the user, filter the game file on those inputs & display the results back in the gui.
(5) Specifically on the "Move Unit(s)" form. I still have some work to go but have made progress. For this initial release the user enters row, col -> hits enter for the gui to get those values, then hits -> Show Unit(s) for the GUI to list all counters in that hex. I will then add to the right of each unit: (a) Move Row, (b) Move Col, (c) ORG/DOG, (d) RTB/SAS (applicable for naval units only). In fact (d) may be a separate form that filters on naval units at sea (haven't decide yet).
(6) I do want to add change hex control and some report functionality too in this initial (crude) release.
(7) My initial release(s) will include my source code so folks that wish to improve on things or just play around will be welcomed to it! (8) Anyway, this is where things stand at the moment.
(9) Now I do have experience with software development and deployment projects.
(10) MWIF->MAGIC is following a typical file structure that we followed in those projects. The path to the lib and exe folders are added during execution so folks may tie in the own executables (exe folder) and included their own libraries (lib folder).
(1) Still on track for a crude release by end of the week (and I do mean crude).
(2) Definitely trying to climb up the python tkinter (GUI development) learning curve.
(3) Do think I'm slowly climbing the curve and expect to get in the initial release of a gui that looks like it was created by a beginner (which it will be!).
(4) It's taken me 2 or 3 days to figure out how to get inputs from the user, filter the game file on those inputs & display the results back in the gui.
(5) Specifically on the "Move Unit(s)" form. I still have some work to go but have made progress. For this initial release the user enters row, col -> hits enter for the gui to get those values, then hits -> Show Unit(s) for the GUI to list all counters in that hex. I will then add to the right of each unit: (a) Move Row, (b) Move Col, (c) ORG/DOG, (d) RTB/SAS (applicable for naval units only). In fact (d) may be a separate form that filters on naval units at sea (haven't decide yet).
(6) I do want to add change hex control and some report functionality too in this initial (crude) release.
(7) My initial release(s) will include my source code so folks that wish to improve on things or just play around will be welcomed to it! (8) Anyway, this is where things stand at the moment.
(9) Now I do have experience with software development and deployment projects.
(10) MWIF->MAGIC is following a typical file structure that we followed in those projects. The path to the lib and exe folders are added during execution so folks may tie in the own executables (exe folder) and included their own libraries (lib folder).
Last edited by rkr1958 on Mon Jan 15, 2024 3:48 am, edited 1 time in total.
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
Still climbing that curve, wanted and did make this refinement to the Move Unit(s) form before stopping for the evening.
Time for a whiskey! Dalmore 12-year scotch. I also have Knob Creek 120 single barrel reserve bourbon. Think I'm going with the scotch tonight.
Time for a whiskey! Dalmore 12-year scotch. I also have Knob Creek 120 single barrel reserve bourbon. Think I'm going with the scotch tonight.

Ronnie
Re: Utilities, Controllers & Bots, Oh My!
Just had do some more fiddling with the Move Unit(s) form. At least I've been sipping my whiskey as I'm fiddling.
Added entry boxes, which are automatically filled with initial values, for ORG/DOG, row, column.
Also, added the command button MOVE. Need to add the logic for that button which will move the units if the user changes ORG/DOG, row or column for the unit(s). Barring anything unexpected will have done by tomorrow.
P.S. Just noticed that I got the year & type column labels (row 0) reversed.
Now it's off to sip my whiskey while I watch an episode or two of "Murder She Wrote" (with Angela Lansbury) or "Magnum P.I." (original with Tom Selleck). I bought the complete series of both on DVD and have been thoroughly enjoying both!
Added entry boxes, which are automatically filled with initial values, for ORG/DOG, row, column.
Also, added the command button MOVE. Need to add the logic for that button which will move the units if the user changes ORG/DOG, row or column for the unit(s). Barring anything unexpected will have done by tomorrow.
P.S. Just noticed that I got the year & type column labels (row 0) reversed.
Now it's off to sip my whiskey while I watch an episode or two of "Murder She Wrote" (with Angela Lansbury) or "Magnum P.I." (original with Tom Selleck). I bought the complete series of both on DVD and have been thoroughly enjoying both!
Ronnie
Re: Utilities, Controllers & Bots, Oh My!
I once saw a theory that Angela Lansbury's character was a very successful serial killer, who not only went around the country killing people, but, to prevent suspicion falling on her, would frame some innocent bystander of the killing. This always made sense to me, because what are the odds that a person wandering around the country would always find someone who has just been murdered? Clearly she is the cause. 

I thought I knew how to play this game....