VASSAL Automation

Yes, the class file is in the module, see my screenshots.

Ok. We need to see the module in order to troubleshoot further. Where can we get it?

Module:Case Blue / Guderian’s Blitzkrieg II - Vassal (vassalengine.org)

Is that the module you started from, or the module as modified? What we need to see is the module containing the changes you’ve made.

Sorry, that was the original.

Ok. I am going to ask another stupid question, how do I get that file uploaded into the forum?, since it seems I am limited to what types of files I can upload.

You need to upload it to a file-sharing service (Dropbox, Google Drive, etc.) and share the link–we don’t want to clutter the module server with non-functional modules!

3 Likes

Ok. Here is the Dropbox link to the CaseBlue/GBII module that I am trying to edit. Dropbox - CaseBlue_GBII_v6_13.vmod - Simplify your life

Have to agree with m3tan here.
I was able to define most game rules in vassal - not to the level he went to, but its very doable, and its not pretty/easy. Unfortunately Vassal (V3) isn’t really designed to do this and it will bog down dramatically, which in turn pisses the end user off.

Until V4 becomes a real thing I would steer clear of automating in hopes V4 will address V3’s flaws except for simple things

1 Like

Can you share which module you worked on with the automation? I am working on a similar thing for Commands and Colors series. Agreed it will be easier if the game state and the view were separated, but it is not bad to see what people are doing in V3 modules.

1 Like

I’ve also done some automation in C&C, specifically for C&C Napoleonics. Some of it is released (module v4.x), some of it I didn’t yet release, though it works.

The main bits not yet released are:

  1. “Combat Assist” - this provides click-by-click automation of the C&C Nap combat process. The only thing it does not automate is working out the number of dice to roll, but it does incorporate the conversation part where opponents propose and agree the number of dice to roll. From there, it does everything from working out hits to be applied through leader check applicable to tracking retreat hexes/losses.

  2. Full automation of card draws. (also available for C&C Nap Epic and C&C Ancients Epic, neither released yet).

I’d be happy to give you a walkthrough and I welcome any ideas or collaboration, if you’re up for that. Meanwhile, find the unreleased CCN “lockdown edition” here (note that the v4 release is a design re-iteration on LDE, so it differs quite a lot, as well as not implementing the less critical details).

1 Like

Hey marktb1961, thanks for jumping in. I will have a look at your module, although CCN is one of my least played of the C&C series. Your combat assist sounds like a great addition to the game.

2 Likes

updated my earlier post to include a link to the dev module with the combat assist function. Happy to jump on Vassal whenever we are both free and give you a demo, if that would help.

1 Like

There are no custom code classes in that module.

Are you sure you uploaded the modified module? The file you uploaded is identical to the origihnal.

Sorry about that. Try this link instead Dropbox - CaseBlue_GBII_v6_13.vmod - Simplify your life

I had no problems importing the terrain.TerrainDefinitions class in that version of the module.

Please, give me an email add and I will send you the CRT Prototype.

Be well.

Panther_2010 :grinning:

mnmanstein@gmail.com Thanks!

There are dozens if not hundreds of Java class Math operations that Vassal can call. This is the official documentation provided by Oracle:

https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html

Here is an example of a Java Integer class operation called Integer.toString that I used for a Calculated Property. It is a boolean test if “any areas adjacent to Russia are annexed”. I have a Global Property for every area in the game called LocationName_Units that tracks number of units for each of the 4 factions. This Integer.toString operation removes all zeroes from an integer, removes all 0s, converts it to a string, then counts its length in characters. If LocationName_Units>9 and the resulting string length is 1, then the area has been “annexed” and I assign a value 1, otherwise the value is 0. By summing all those 0’s and 1’s for all areas adjacent to Russia, I know “if any areas adjacent to Russia have been annexed” is true if that sum is greater than 0. If this Calculated Property is >0, I allow an event to be played, otherwise the event is restricted.

(Bessarabia_Units>9&&Integer.toString(Bessarabia_Units).replace(“0”,"").length()==1?1:0)+(Erzurum_Units>9&&Integer.toString(Erzurum_Units).replace(“0”,"").length()==1?1:0)+(Lwow_Units>9&&Integer.toString(Lwow_Units).replace(“0”,"").length()==1?1:0)+(Manchukuo_Units>9&&Integer.toString(Manchukuo_Units).replace(“0”,"").length()==1?1:0)+(Mongolia_Units>9&&Integer.toString(Mongolia_Units).replace(“0”,"").length()==1?1:0)+(Oulu_Units>9&&Integer.toString(Oulu_Units).replace(“0”,"").length()==1?1:0)+(Riga_Units>9&&Integer.toString(Riga_Units).replace(“0”,"").length()==1?1:0)+(Tabriz_Units>9&&Integer.toString(Tabriz_Units).replace(“0”,"").length()==1?1:0)+(Viipuri_Units>9&&Integer.toString(Viipuri_Units).replace(“0”,"").length()==1?1:0)+(Wilno_Units>9&&Integer.toString(Wilno_Units).replace(“0”,"").length()==1?1:0)