Create account / Log in

Independent, Non-linear UNDOs

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » April 28th, 2014, 9:23 pm

Yes, your are correct in that I was looking for an exact duplication. I will try what you are suggesting.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » April 29th, 2014, 7:09 pm

I think that I got the duplication done correctly. There were a few errors in my initial attempts, but now all the script seems to duplicate Tim's.

Still, I have run into a problem. When I clicked a unit to return to start, it disappears.

Here is a sequence of screen shots showing what happens. I am not sure, but I think that the first entries in the Logfile were from a Save earlier in the process when I was tracking down errors in the copying. This test begins with <Charles McLellan> test. Only two pieces are set to return to start at this time -- the German 1st and 2nd Infantry Divisions at 0924.

In image 1, shows the initial positions of the divisions. In image 2, I move the 1st Division (remove due to attachment limit). Image 3 shows the right click of the 1st division. Image 4 shows the location after the "Return to start" is left clicked.

The unit still shows in the Search window and when that line in clicked, map shifts with the upper left corner of the map at the upper right of the monitor. Perhaps the unit is at 0,0 coordinate and unseen under that white portion of the screen where the Logfile scrolls.

The only difference I see in what I have and Tim's demo is the grid labels. The demo module's hexes are all numeric while the TRC's modules all begin with "TRC4" followed by the numeric hex number.

What do you guys think? Should I redo the board so that all hexes are numeric?

By the way, I asked Tom Gregorio to look at Tim's Demo. Tom said that on his system, Tim's demo was exhibiting the same results as my changes to the TRC module. I do not know what computer or operating system Tom uses. Tim's Demo works just fine on my system -- Dell Inspiration computer using Windows 7 pro 32 bit with Java 7 Update 51 (build 1.7.0_51-b13).
Image4.png
Image4.png (58.59 KiB) Viewed 4944 times
Attachments
Image1.png
Image1.png (50.83 KiB) Viewed 4944 times
Image3.png
Image3.png (65.93 KiB) Viewed 4944 times
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Independent, Non-linear UNDOs

Postby Tim M » April 29th, 2014, 7:21 pm

The grid labeling doesn't matter. The script does not depend on that - it works on internal absolute x,y positions.

What is happening is it is indeed returning the piece to the 0,0 position because these are the initial values you entered into the dynamic properties. What this means is you missed adding the autoexec gkc. Look at the bottom of my module tree. You need to add this feature too. Also this is not going to work on a previously saved game logfile. It must be a new game. the autoexec only runs on initial startup of a game/ created save file

sorry its called in the tree "Initialize pieces[Startup Global Key Command]

btw I will make an alternate version for you here shortly with a Global key to reset start positions so you dont have to do it individually on each piece
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Independent, Non-linear UNDOs

Postby Tim M » April 29th, 2014, 7:39 pm

Ok,

Here's the modified demo which instead of having to reset the new start position on each piece individually it is done from the toolbar instead. This is in line with your earlier wish. Keep in mind you only want to push the end movement button when you are absolutely sure you dont want to do anymore "move back to start" moves and are completely finished moving pieces until next turn

Tim
Attachments
Return To Start Demo2.zip
(23.84 KiB) Downloaded 77 times
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » April 29th, 2014, 8:34 pm

Actually, I did add that thing at the bottom of the tree. I'll go back and check. I probably made a copying error.

There may be a bit of a delay. My computer is beset with problems just now -- not of VASSAL's origin. May take some time to straighten out. I am NOT leaving until this whole module is fixed.

I will have to import a new module. Not a major problem, but coping the Demo data again might take a little time.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » May 3rd, 2014, 7:04 pm

Hi, Still have some printer problems, but I want to go on here.

I downloaded Demo2 and implemented the changes. A "End Movement" button shows on the top icon menu row. However, the units no longer carry the Return to Start with the right click. Something is wrong. I have checked and rechecked the settings. I believe everything is in order except it doesn't work. I did notice that the " Change Value Control V" went from the top to the bottom.

Is there a limit to the number of traits that a piece can have? Maybe the trait list is too long.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » May 3rd, 2014, 7:19 pm

Can't remember how to load an image. download/file.php?mode=view&id=2341&sid=5b3eb89fb8ad34ec2b7
Image1.png
Image1.png (181.84 KiB) Viewed 4922 times
72256899dde2c
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Independent, Non-linear UNDOs

Postby uckelman » May 3rd, 2014, 9:11 pm

Thus spake Charles McLellan:
>
> Is there a limit to the number of traits that a piece can have? Maybe
> the trait list is too long.
>

The GUI element which displays traits uses an array interally. Java
arrays are indexed using signed 4-byte integers, which means that you
cannot have an array in Java with more than 2^31 elements.

So, yes, there is a limit, but it's almost certain that you are not
hitting it.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8137
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » May 3rd, 2014, 9:41 pm

OK, so I am no where near reaching the limit. I'll do some more guessing.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Independent, Non-linear UNDOs

Postby Tim M » May 5th, 2014, 1:25 pm

Charles McLellan wrote:OK, so I am no where near reaching the limit. I'll do some more guessing.


If you still can't find the problem, send me your mod as is and I'll fix it up for you
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » May 5th, 2014, 3:28 pm

In the process of writing all. Started well before this post. Will be done shortly. Missed some of the Java error information.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » May 5th, 2014, 4:40 pm

Problem: I have tried a number of times to reproduce the results achieved by Tim McCarron but have not been successful. I am attaching the module with which I have been working. I only set the Return to Start trait on two units, the 1st and 2nd German Infantry in hex TRC 0924.

The Return to Start option was not included on the list of traits displayed on the right click menu. Moving the units also did not bring the Return to Start option into the trait list.

Current Differences Between Models: The only intentional difference that I made in coping Tim's work was substituting "TRC4a" for Tim's "Map" in Game Piece Photo Definitions \ Return to Start \ Send to Location \ Return me back to where I came from \ Board.

Problems Encountered During Copying: On the first attempt to duplicate Tim's work, I mistyped A "#" in the first position of "$CurrentlyY$" in the Game Piece Photo Definitions \ Return to Start \ Dynamic Property \ StartYLocation \ SetupInitialLocation \ New Value. A note identifying the error was displayed upon opening the module. I corrected the character in an edit of the module.

When first coping the "Reset the location [Global Key Command], the "Button Icon:" was "white" where Tim's was "gray." Selecting the default brought what appeared to be a small unit icon not from this module. Going then to "Select" brought an icon page off of my computer. I selected an icon, but nothing appeared. When I open the module, a report that the icon I had selected was not recognized by the module. I subsequently changed the image from ".ico" to ".png," substituted the new image in the module image file and changed the ".ico" to ".png" in the module build file. That seemed to satisfy the module. On subsequent edits, the "white" reset button had changed to "gray" without any action on my part.

When saving the edit, the Save would not process. A "Java" window opened in the upper left of the monitor. I did not capture the information as to why. On a retry, a Save As… was forbidden in the location where the module was located (C:\ Program Files \ VASSAL \ mods) but allowed in a location under "C: \ Users \ Charles." I saved there with a "TRC5" title. A VASSAL module with the edit changes was located at and subsequently loaded from that location.

After re-edits, I had problems saving and had to again Save As… This time as TRC6.vmod. This will be the attached module.

Attempts to Correct Results: I tried a couple of things in an attempt to duplicate Tim's results:

I moved the "Initialize pieces" group up the tree to duplicate the position in Tim's Demo2 module. Still didn't bring "Return to Start" trait into menu. Returned the group back to the end position on the tree.

I changed the "TRC4a" "Board" to just "TRC" because the grid identification of a hex is for example "TRC4 0924". It didn’t alter anything. I changed back.

Differences Between Modules: Differences that I note between the Deme2 and TRC4 modules that I didn't change:

1. Of course, the map is different and there are many more units with different images and more traits.
2. Tim's module does not produce a log file. Moving units in the TRC4v2 module does.
3. Tim's units do not show a movement path. Moving units in the TRC4v2 module do.
4. Tim's works; mine doesn't.

Possible Problems Between Models: In the TRC6 module there is a extra line preceding Game Piece Photo Definitions \ Return to Start \ Dynamic Property in both the StartXLocation and StartYLocation properties. This line is "CTRL V" trait and it does appear on the trait list. I have not tired to remove or shift the trait yet.

Data: My computer is a Dell Inspiron with a Windows 7, SP1 32 bit operating system with an AMD Semprus Processor LE-1300 2.30 GHz and 3.0GB RAM, C: of 596 GB with 262 GB free. Java is 7 Up-date 55 (build 1.7.0_55-b14). VASSAL is 3.2.8. Internet is Internet Explorer 11.0.9600.17105, Update Version 11.0.7 (KB2964358).

Other Concerns: When I went to attach the TRC6.vmod from C: \ Users \ Charles it was not there. There was a TRC5.vmod which was an earlier module that required the use of TRC6.vmod as a Save As… as the TRC5.vmod caused some Java conflict when Save was attempted. I also notice that there are three "temxxx.zip" files two of which seem to be VASSAL modules in disguise and one a VASSAL build file. So, I am going to attach just the TRC4v2 module from C: \ Program Files \ VASSAL \ Modules here, then the other four files from C: \ Users \ Charles in subsequent attachments.

Let me know if you need any more information.

The file is too big, maximum allowed size is 256 KiB.

Guess I try some other ways to add the attachments.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Independent, Non-linear UNDOs

Postby Tim M » May 5th, 2014, 4:56 pm

Email the files to me direct to get around the file size. We'll get this taken care of for you. You've got my email from before :)
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Independent, Non-linear UNDOs

Postby JoelCFC25 » May 5th, 2014, 5:04 pm

Charles McLellan wrote:On a retry, a Save As… was forbidden in the location where the module was located (C:\ Program Files \ VASSAL \ mods) but allowed in a location under "C: \ Users \ Charles."


As a general point, I would really discourage keeping your collection of VASSAL modules anywhere in the C:\Program Files hierarchy. C:\Program Files is a location intended for programs, but not data files associated with those programs. The VASSAL program itself is fine there, but individual modules are data, and should be kept elsewhere. A folder in your home directory (C:\Users\Charles) is ideal.
JoelCFC25
 
Posts: 591
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Independent, Non-linear UNDOs

Postby Charles McLellan » May 5th, 2014, 5:13 pm

http://www.vassalengine.org/wiki/File:TRC4v2.vmod TRC4v2.vmod from C: \ Program Files \ VASSAL \ Modules.

http://www.vassalengine.org/wiki/File:TRC5.vmod TRC5 file from C: \ Users \ Charles

http://www.vassalengine.org/wiki/File:Tmp2979249757449415253.zip suspected VASSAL file from C: \ Users \ Charles

http://www.vassalengine.org/wiki/File:Tmp4485721568328777342.zip suspected build file from C: \ Users \ Charles

http://www.vassalengine.org/wiki/File:Tmp8843374889608235583.zip suspected VASSAL file from C: \ Users \ Charles

Whoops! Forgot to Save the open file with TRC4 substituted for TRC4a before attaching the TRC4v2.vmod.

PS: Is there anyway to dispose of VASSAL module files no longer needed? They might be taking up some space somewhere.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

PreviousNext

Return to Module Design

Who is online

Users browsing this forum: No registered users and 0 guests