Saturday, April 25, 2015

WFMC - 2 More Weeks Have Come and Gone … Ability to Load Previous Data & Reconfig Costs/Restrictions [Part 5/11]

Time is just flying by, it seems. Two more weeks have come and gone ... I've made some interesting changes over those last two weeks - hopefully everyone else will agree.

WHERE WE LEFT OFF WITH PART 4/10

Here is what the application looked like on the 8th April 2015. Where we left off with it from the Part 4/10 post is shown below:



I like how the formations are rendering correctly in the OpenGL view - with proper sizes and layouts. Also, the cleanup of the combo boxes with the "Select …" text really helps with knowing what to populate next for the application. Furthermore, the fact that I got the Baseline button working was a pretty big accomplishment, too.

Furthermore, I had hoped to make progress in the following areas over these last two weeks:
  • Resetting move values (expended and remaining) based upon baselining, reseting, and ending rounds
  • Applying the reconfiguration costs from the database table to the actual expended move value

Let's go through some of the changes that HAVE been made, and see what you think ... I think you will be pleasantly surprised!

MORE PROGRESS THAT HAS BEEN MADE


First off, the thing you will probably notice first is the new layout that has been implemented. I tried to get rid of the cramped feeling that it had before, by spreading it out more and re-organizing it a little with a more logical placement of checkboxes and labels. Notice that there are labels now for the sliders, as well - to indicate which slider handles what type of movement. Another thing that should be exciting to notice is that when the application is launched fresh, the "Load Last Saved Round …" button is enabled and ready for use! This allows you to come in and make multiple round changes and then leave the application - and then come back, load the last saved round from the database, and then pick up right where you left off! During the last run of the application, I was working with an Angmar Orc Warband formation. Clicking the "Load Last Saved Round …" button restored the round number, formation and number of companies within it, its baseline and current configuration, rotation, location and all other settings that were established during the previous run of the application. Here's how it looks after the load:


The next thing that you will probably notice is the color change of the units within the formation. They are no longer the awesome blue color that they were 2 weeks ago, but have been updated to look more like the actual trays from the game. Again, this really makes it feel like a WotR formation - and not just a "cartoony" representation. OK, enough with the loading capability … let's get back to other added functionality!

The first goal that I had set for myself 2 weeks ago was to reset the movement values once the baseline button was set… Here I've gone through the steps to select an Elven Mirkwood Ranger Warband formation (which is part of the extended ruleset from WotR version 1) comprised of 5 companies in 3x2 Configuration - and they are ready to be baselined. Notice that the Expended and Remaining Move Values have been fully consumed in the positioning of the formation for the baseline.


Clicking on the "Set Baseline … " button confirms the desire to set the formation into baseline, and clicking OK overwrites the previous last saved round. So if the Load is used again, it would display the Elven formation - and no longer show the Angmar one.


Here, the baseline has been set. Notice that it has set the baseline configuration, incremented the round counter (as advertised in the warning); but the big thing to notice is that the expended and remaining values have been updated to allow use of the Move Value again during Round 2.


Rotating and Translating still costs … but if by playing around you get into a state that you did not intend:



Here I've moved the formation all over the place and also reduced the number of companies down to 4. Using the "Reset Round" button, it will pop-up to ask if the reset was intentional, and then it will revert back to the state before any changes were made.


Notice that the Expended Move value was also returned to 0.00" and the Remaining Move Value was also returned to 8.00". This was the main intent of the first bullet that I wanted to accomplish. Likewise, clicking "End Round" will do the same - reset the move values and increment the round counter and create a new point to which to load or reset.


Here, I have a formation of 6 Palace Guard Elves. They are currently in 4x2 Configuration and Baselined. If I attempt to change from the 4x2 Configuration to the 5x2 Configuration:


Since the cost to perform the reconfiguration to 5x2 Configuration is 8.98", and the Remaining Move Value is only 8.00", this is not allowed. I have a pop-up that will show indicating such. When OK is clicked the Formation Configuration is returned back to the Baseline Config - since the reconfiguration could not take place. Now, if the Palace Guard Regiment had executed an "At the Double!" (increasing the Move Value to 16"); or a "Heroic Move" (increasing the Move Value to 24") then the reconfiguration cost would be met - and the reconfiguration would have taken effect.

Here is a reconfiguration that would work with the current 8.00" Move Value: 4x2 Configuration to 2x3 Configuration:


Notice that in this case, the reconfiguration took place, and the cost to reconfigure 4.93" was applied to the Expended Move Value to perform the reconfiguration (and likewise, the Remaining Move Value was also updated).

WHERE TO GO FROM HERE

Success with the goals from the last 2 weeks - maybe I should set more goals for the upcoming weeks. I'm going to be traveling for work, so during layovers in airports I'm sure I can squeeze in a few extra hours of writing code and updating. Here's the goals for the next 2 week gap:
  • Color Formation Configuration selections within the combo box based upon feasibility of performing the reconfiguration (this will make it easier to determine which move value augmentation option is "best" to use):
    • Black means current Remaining Move Value is sufficient
    • Blue means current Remaining Move Value is not sufficient, but performing an "On the Double!" would make it ok.
    • Orange means that the current Remaining Move Value is not sufficient, but performing a "Heroic Move" would make it ok.
    • Red means that the current Remaining Move Value is not sufficient and the labeled configuration is not one that could be made.
Stay tuned! I'm sure there will be plenty more upcoming very soon!







    LINKS TO OTHER PARTS OF THE WFMC PROGRESS SERIES


      LINKS TO OTHER PARTS OF MOVEMENT TYPES AND LIMITS SERIES




      • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 2-3 Companies [Part 11/23]
      • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised for 4 Companies [Part 12/23]
      • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 5 Companies [Part 13/23]
      • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 6 Companies [Part 14/23]
      • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 7 Companies [Part 15/23]
      • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 8 Companies [Part 16/23]
      • Movement Types and Limits Series - Reconfiguration Movement of Infantry Formations Comprised of 9 Companies [Part 17/23]
      • Movement Types and Limits Series - Cavalry Movement Example 1 from Page 33 of WotR Rulebook Analysis [Part 18/23]
      • Movement Types and Limits Series - Cavalry Movement Example 2 from Page 33 of WotR Rulebook Analysis [Part 19/23]
      • Movement Types and Limits Series - Cavalry Movement Example 3 from Page 33 of WotR Rulebook Analysis [Part 20/23]
      • Movement Types and Limits Series - Reconfiguration Summary of Cavalry Formations by Company Size [Part 21/23]
      • Movement Types and Limits Series - Cavalry Restrictions of Reconfiguration by Formation Name Summary [Part 22/23]
      • Using WFMC to Verify Movement Examples [Part 23/23]


    • Tuesday, April 14, 2015

      The Dwarf Holds Epic Heroes' Special Rules [Part 4/10]

      Next in the queue is The Dwarf Holds' Epic Hero List. It appears that within the list for the Dwarves there is a plethora of Bestow rules - it looks like their primary focus is to augment the companies and formation in which they are included:





      There we have it ... If we look at the applicability column, it is interesting to see that the following spread exists:
      • Only the Hero - 1/22
      • Hero's Company - 7/22
      • Hero's Formation - 9/22
      • Target Enemy - 3/22
      • All Friendly Formations within Range - 1/22
      • Target Friendly Hero - 2/22
      This would appear that The Dwarf Hold's Epic Hero Special Rules are targeted to augmenting the hero's company and formation. So, long story short - even if you are not playing with the Dwarves directly, it would seem to be worth the investment to bring a few Dwarf Heroes along as allies just to get the company and formation bonuses.




      LINKS TO OTHER SPECIAL RULE EVALUATION POSTS
      1. Gondor & Arnor Epic Heroes' Special Rules [Part 1/10]
      2. The Kingdom of Rohan Epic Heroes' Special Rules [Part 2/10]
      3. The Elven Kingdoms Epic Heroes' Special Rules [Part 3/10]
      4. The Dwarf Holds Epic Heroes' Special Rules [Part 4/10]
      5. The Forgotten Kingdoms Epic Heroes' Special Rules [Part 5/10]
      6. Mordor Epic Heroes' Special Rules [Part 6/10]
      7. The Fortress of Isengard Epic Heroes' Special Rules [Part 7/10]
      8. The Misty Mountains (Moria) Epic Heroes' Special Rules [Part 8/10]
      9. The Fallen Realms Epic Heroes' Special Rules [Part 9/10]
      10. Angmar Epic Heroes' Special Rules [Part 10/10]

      LINKS TO OTHER UNIT COST ANALYSIS POSTS

      Wednesday, April 8, 2015

      WFMC - Formations Look Like REAL WotR Formations and Groundwork for Reconfiguration Costs Put in Place [Part 4/11]


      Time is just flying by, it seems. Two more weeks have come and gone ... I've made some interesting changes over those last two weeks - hopefully everyone else will agree.

      WHERE WE LEFT OFF WITH PART 3/10

      Here is what the application looked like on the 23rd of March 2015. Where we left off with it from the Part 3/10 post is shown below:


      It was looking really good (granted still being a little cramped) - and I had gotten in the formation reconfiguration combo box - and had it drawing to the OpenGL View.

      Furthermore, I had hoped to make progress in the following areas over these last two weeks:
      • Hornblower/Drummer applicability to units based upon upgrade capabilities.
      • Add the math to do the reconfigurations
      • Add the math for rotation based upon configuration dimensions
      Let's go through some of the changes that HAVE been made, and see what you think ... I think you will be pleasantly surprised!

      MORE PROGRESS THAT HAS BEEN MADE

      First off, having disabled fields to "force the workflow" through the application, it was a little difficult to see "what to do next" within the application. To help facilitate this, instead of simply having blank combo boxes that would enable - I've added the text "Select ..." to the next combo box that is intended to be used in the workflow. So, when the application is first launched, the Desired Faction combo box has the text to indicate that that is the first selection that should be made.

       

      Once a Desired Faction is selected, the Desired Unit combo box enables (as it did before) and is now populated with the "Select ..." contents to indicate that that is the next selection to be made.



      Similarly, once the Desired Unit is selected, then the Unit Type, Move Value and Number of Companies are populated (as before). Likewise, the Formation Configuration combo box is enabled and labeled to indicate that it is the next selection point.


      Something else to mention at this point. As I had set for a goal from the list above, I wanted to enable and disable the "Simulate Hornblower" checkbox based upon the profile for the selected Desired Unit. I went through and for each unit determined if there was a "hornblower/drummer" option for the unit - and if there is (within the WotR core rules) I enabled the use of the field. If the unit had no command upgrade option for a hornblower, it was unchecked and disabled - and finally if the unit was a Legendary Formation that had a hornblower in the base cost for the command company, it is disabled and checked. 


      All that is working properly, now ... and I consider that a pretty big accomplishment in-and-of itself. In the case of the Oathsworn Militia that were selected above, they have the option for a hornblower to be included in the command company, so that option is enabled and unchecked to allow the selection to be made (as desired)
      Selecting one of the valid configurations from the Formation Configuration combo box really starts to "bring on the sexy" from the last two weeks' worth of work...

      The View no longer simply draws blue "empty" boxes, but actually draws the companies as if they are the literal bases in play. Here is the formation of Oathsworn Militia (an Infantry Formation) comprised of the 9 companies that make it up.
      Similarly, here is a formation of Cloud of Bats (a Cavalry Formation) comprised of the 9 companies that make it up.
      Both are drawn to scale and formations are comprised within the selected configuration. I personally think this gives the view a lot more of a "realistic WotR feel" and makes it seems more "tangible" (as if it were actual units being simulated).
      Notice in both of the cases above, the "Baseline Config" line (just under the Formation Configuration combo box) has been updated (since it is effectively the next piece in the workflow). It is implying that the sliders should be adjusted to put the formation in the initial desired position, rotation and configuration and then baseline (using the "Set Baseline ..." button) to establish where the formation is going to be located for the first round.
       Clicking on the "Set Baseline ..." button brings up a pop-up that indicates that baselining will set the current location of the formation and set the Round Number to be 1 (meaning that the formation is in its first round's position). Here the formation of 9 companies of Oathsworn Militia have been rotated and moved - and the Baseline has been set. Notice that the baseline configuration for the formation is populated and the round number (just above the move distances under the OpenGL View) has also been set to 1 (as indicated in the pop-up). I still need to reset the expended move value to be 0 and reset the Remaining move value back to the stat for the unit (plus/minus any movement modifiers that are checked) after the baseline has been set.

      The point of baselining is so that when the formation configuration is changed after the baseline is established, the difference between the baseline configuration and the reconfiguration can be determined and the movement cost associated with the change can be calculated. For example, here is the same formation - and it has been changed within the Formation Configuration combo box to now be in 2x5 Configuration.

      Making this change from 4x3 Configuration to 2x5 Configuration requires a move value of 6.41".


      I've updated the database to have the full set of reconfiguration costs for any configuration to another. This ended up with over 450 rows for all the different permutations for Infantry and Cavalry. This was the "guts" of this entire application - since the intent is to provide a quick means to determine feasibility and cost for movement … Now that that's done, I still need to do something with pushing the value to the expended move cost … or checking to ensure that there is sufficient remaining move value available to accommodate the reconfiguration request. I have a feeling that doing such will be little harder than it simply sounds.

      Another thing is - setting the Baseline now is the trigger for enabling the Reset Round button and the End Round button. Since the baseline has been saved, the Reset Round button now has something that it can "look up" and return the formation back to a given state. It will always look for the highest Round Number record to reset back to, as well.

      The End Round button now also launches a pop-up. Clicking on OK will add to the Round Number by 1 (incrementing it to the next round) and save the location and configuration of the formation at its new updated location and configuration.


      So, here the End Round button has been pressed after reconfiguring the formation to be in 2x5 Configuration. Notice that the Round Number under the View has been updated to 2 and the Baseline Configuration for round 2 is now the updated Formation Configuration that was selected - so now if another configuration is selected it will be compared against the 2x5 Configuration for determining move value expended cost.


      One more note … Notice the button down at the bottom-right. When the application is closed it is not persisted - in other words, every time that you re-launch the application it basically makes you "start over"; however, since the Baseline button, Reset and End Round buttons are saving the state, I can get back to the last saved state by loading the highest round number for the formation. It works effectively like the Reset Round Button - but allows the user to pick back up where they left off, if they so desire. One thing to keep in mind, though - if a different faction/unit is selected and that is baselined - all other historical records are "blasted away" for the new baseline.

      WHERE TO GO FROM HERE

      So there is still a lot to do! I got 2 of my 3 goals done, plus I got the "bonus sexy" look and feel implemented as well (so that's a plus). I think the thing I'll shoot for next is resetting move values based upon baselining, reseting, and ending rounds - and then apply the reconfiguration costs from the table to actual expended move value … that sounds reasonable.

      Stay tuned! I'll continue to provide updates as it goes on!







        LINKS TO OTHER PARTS OF THE WFMC PROGRESS SERIES


          LINKS TO OTHER PARTS OF MOVEMENT TYPES AND LIMITS SERIES




          • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 2-3 Companies [Part 11/23]
          • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised for 4 Companies [Part 12/23]
          • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 5 Companies [Part 13/23]
          • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 6 Companies [Part 14/23]
          • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 7 Companies [Part 15/23]
          • Movement Types and Limits Series - Reconfiguration Movement of Cavalry Formations Comprised of 8 Companies [Part 16/23]
          • Movement Types and Limits Series - Reconfiguration Movement of Infantry Formations Comprised of 9 Companies [Part 17/23]
          • Movement Types and Limits Series - Cavalry Movement Example 1 from Page 33 of WotR Rulebook Analysis [Part 18/23]
          • Movement Types and Limits Series - Cavalry Movement Example 2 from Page 33 of WotR Rulebook Analysis [Part 19/23]
          • Movement Types and Limits Series - Cavalry Movement Example 3 from Page 33 of WotR Rulebook Analysis [Part 20/23]
          • Movement Types and Limits Series - Reconfiguration Summary of Cavalry Formations by Company Size [Part 21/23]
          • Movement Types and Limits Series - Cavalry Restrictions of Reconfiguration by Formation Name Summary [Part 22/23]
          • Using WFMC to Verify Movement Examples [Part 23/23]