Busting Block

Busting Block

Creative blocks are something all creatives face at least once. I’ve suffered from it in the past with many pursuits and spent significant time exploring it with reflection and tons of reading. Here are some thoughts and suggestions that have helped me and I hope they will help you.

Your creative energy is a limited resource which must be grown, managed and guarded.  You grow energy by being receptive to your ideas and faithful in executing them. Similar to a physical exercise program doing a fun thing consistently builds strength, stamina, and confidence to do more and grow. You manage your energy by knowing it is a limited resource, everything you do has a cost and considering risk versus return. There are literally thousands of ways you could choose to spend your time so you need to focus like a laser on the things that give you something back. Good things cost too. Try cutting back on reading or TV and see what happens. Finally, you need to guard your energy as there are tons of negative things out there that do siphon it away. The biggest offender is our constant connection to social and news media which by design is meant to keep you constantly looking at and processing mostly negative stuff.  You likely only really need a few minutes a day to focus on the good aspects (information and friends) so limit your exposure and save all that processing for the good stuff.   The other big offender is not maintaining your health. Your body is the engine that drives everything so do your best to take care of it and get a good night’s rest. It absolutely matters.

Your ideas are absolutely nerdy and stupid. So were the ideas of Tolkien, Spielberg, Roddenberry, and Lucas. Really think visions of magic-fingered aliens, glass-jawed weapons of planetary destruction, fuzzy-footed munchkins and pointy-eared bastards made sense or scored dates when first brought up?  Of course not!  What mattered was they were authentic to themselves and creative visions and that resonated with audiences.  They didn’t even try to live up to anybody else’s idea of what is cool and creative to be successful and neither, should you.  Their reward was being happy, cool, rich, loved dorks who got to do it again and again. Think about that, Poindexter.

There are literally thousands of recipes for borsch but the best I ever had was my grandmother’s. She knew how she liked it and through experience and feel knew how to get it there. We all loved it and a dank bowl was never served.  Your work should be the same. Don’t get too hung up on exact formulas and historical or data accuracies.  Go with what you like, test it and get it to meet your goal. History wasn’t certain and nobody cares how many cooks are in the mess tent as long as the 101st Airborne is there. Consider that and others will be ok with the result.

Finally, your environment matters so mind it. Build yourself a space filled with things that make you happy and nostalgic. My bunker has a shelf full of games and books, and a computer desk covered with pictures, open books, some dice, a drawing pad and lots of little-scribbled notes. I always have music playing and sometimes even an old movie on TV. This chaos keeps me focused and if I drift it’s to something great. Likewise, I only invite fun like-minded people who want to have a good time in. The good ones want to be part of a tribe that is building something worthwhile. Value and support them and they’ll return the favor.

Nuff Said. Go do.

Mike

Providing Value in Game Encounters

Providing Value in Game Encounters

Every encounter in your game should be meaningful to your players. Meaning is gained by rewarding or penalizing players psychologically or their side or characters mechanically. This doesn’t mean the impact has to be earth-shattering “I have the power” or ” lost my mojo” kind of thing but it should give something back for their efforts.

Mechanical awards and penalties are easy to come up with as most game systems offer them as part of the game design. These include points toward or against level advancement, addition or attrition of the enemy or gain or loss off loot. It is critical to scale these appropriately to the situation and overall tale. Its okay to give them a Star Destroyer early on if the story is short and sweet or it will have some critical immediate use. It’s not so fun if it’s the start of a long campaign and they’re cruising around using it to pockmark every low-level planet in the Universe.

Psychological awards are a deep subject that many people have dedicated careers, books and millions of dollars exploring. I don’t think you need to be Frasier Crain to succeed in game design though. People like to be in charge of their lives and exciting stories. Nobody likes to be bored even if they are rich, famous or powerful. These two statements should guide you in developing your own awards and the focus should always be on what you are providing not expecting. I used the word, their, in this article for good reason!

Your job as a game designer, scenario editor, writer or game master is to give players the pieces to form group narratives. Game and role-playing enjoyment are directly linked to the draw of collaborative storytelling in that players find it much more enjoyable if feel they are a critical team member crafting an authentic story or plot. This mirrors the same intrinsic values (authenticity, competency in work, connectivity to others) we as humans hold dear and it is carried over into our fantasy lives as Conan, Dead Pool, Patton, H.R. McMaster or Master Chief. Likewise, when we value extrinsic values such as meaningless wealth, fame and power we become bored and unfulfilled.  The Picture of Conan on his throne looking bored to tears tells a tale!

Providing and encouraging unique action in an encounter is critically important. I figured this out quickly in the 90’s when I figured out the back and forth control rhythm needed in Sega NHL hockey to score on my roommates at will. The first couple times it felt great and I tortured a Peachbelt star pitcher with it but the resulting rage quits and dorm room battle royal wrestling matches quickly filled the action void the challenge less routine left. It is utterly worthless (sometimes painful!) to give players a repetitive combat or challenge less role play that yields exactly the same as the combat before it. You must come up with unique experiences that allow players to be creative and yield interesting results.  You must also encourage it from them by adding unique challenges or twists to each so they don’t hang their hats on routine.  They will actually thank you for it!

These are my current conclusions on this but definitely open to a dialog on it. I like people and learning from them.

Scaling Forces To A Threat In CMANO Using Lua

Scaling Forces To A Threat In CMANO Using Lua

First a warning. This is using Lua code available with CMANO version 1.13 or greater. If you’re using something older all it does it make you wish you updated.

One of the bigger things I wanted to accomplish with CMANO and Lua was to devise a way to scale missions and/or mission assignments to the threat. The basic problem was that players could choose to overwhelm a patrol with greater numbers so needed a way for the static AI to evaluate a threat within an area and pick a better response to it based on some conditional logic. The responses could be adding units to the mission, adding new missions or deleting them all together. Thankfully the Lua team at CMANO came through and I’ve now got a way to do this.

My method is a two-event process. The first event which I call Air Defense Counter consists of an In Area Trigger and a Lua action with some code that runs a counter and runs some conditional logic that modifies missions based on the value of the counter. This is great but the detect trigger evaluates for everything regardless of where it is so we need to dictate an area which I do by creating a second event called Activate Air Defense Area which lets me modify an existing detect area trigger using a setter (Scenedit_SetTrigger) and some reference points as parameters. I then add some conditional logic statements to the counter code based on the current value.

Air Defense Counter Event:

Trigger: Type: Unit is detected Name: Red Unit Detected, Parameters: Aircraft, Detected By Myside, Minimum Classification Level: Unknown

Lua Action: Counter code and some conditional logic. Note the numeric value for b is a string (thus the ‘and’ around the numbers) because the CMANO Key Value Function only takes strings not numbers.

lastCount = ScenEdit_GetKeyValue(“AirdefCounter”);
lastCountN = tonumber(lastCount);
if lastCountN == nil then
lastCountN = 0;
end
lastCountN = lastCountN +1;
ScenEdit_SetKeyValue(“AirdefCounter”, tostring(lastCountN));
b=ScenEdit_GetKeyValue(“AirdefCounter”);
if b==’5′ then
ScenEdit_SetMission(‘Denmark’,’CAP 1′,{OnStation=8})
elseif b==’9′ then
ScenEdit_SetMission(‘Denmark’,’CAP 1′,{OnStation=12})
elseif b==’11’ then
ScenEdit_SetMission(‘Denmark’,’CAP 1′,{OnStation=16})
else
end

Activate Air Defense Area Event:

Trigger: Type: Scenario is Loaded. This fires everytime the scenario is loaded even if from a save.

Lua Action:

local a = ScenEdit_SetTrigger({name=’Red Unit Detected’,mode=update,area={‘rp-1154′,’rp-1155′,’rp-1156′,’rp-1157’}})
print(a)

So in summary here is what happens. Scenario loads and the Activate Air Defense Area fires which modifies the detect trigger to use four reference points (1154-1157) instead of evaluating for everything in sensor range. When an aircraft enters that zone the counter increases and if the value of the counter is 5 the Try to Keep value of the CAP 1 mission is increased to 8, if the value 9 the Try to Keep value of CAP 1 mission is set to 12 and so on and so forth. As you can see we’re scaling our air patrol to a threat.

I hope this helps. This is actually a huge add to being able to use lua to modify Command’s AI. Please let me know if you find any errors or smoother methods.  Hope to see some of it in your future scenarios.

Pushing Through Cold War Scenario Creation Blocks

Pushing Through Cold War Scenario Creation Blocks

Oddly the most historically constraining time period for me to build wargame scenarios in is the Cold War. This is mostly due to the fact that the main protagonists, the US and USSR, were tied down in various proxy wars all over the place leaving little room for hypothetical conflicts to occur without deviating from the course of history too much.  There is also the ever looming spectre of WWIII in Europe followed by an apocalyptic nuclear war as well.  Finally, most of the key battles in this thematic trope have been done repetitively throughout modern wargaming history particular naval gaming.

This rigidity is definitely a product of my wargaming past but I don’t think I’m alone on this one so I’ve decided to walk through how to break most of the hangups.

First, consider that Cold War history had no scripted AI. It was largely reactive.  East and West definitely had larger strategies (rollback, containment, détente, insurgency etc.) but Truman and Stalin never pitched Afghanistan and Vietnam. It was the little things that happened along the way that led Khrushchev and Kennedy/Johnson there.  Your scenario themes and narratives should probably work the same way. Don’t think about the endgame think in the chunk of time you’re building in. It will open up options to you.

Next, consider that European colonialism came to an end during this time period replacing many governments which the Cold War protagonists were keen on recruiting as friendly powers. Could you imagine what the to-do lists of the KGB and CIA were like in 1960 when half of Africa suddenly had new governments? You could do a complete Twilight Struggle game on that alone! Not to mention all the old historical antagonisms that bubbled back up. The chances for deviations are significant; exploit that to build great scenarios and narratives.

There is a book called The Global Cold War by Odd Arne Westad that really wraps together Cold War history and strategy into the end of colonialism and birth of nationalism well.  You’ll need to stay caffeinated while reading but its brilliance is its focus on what was going on in the rest of the world during the Cold War rather than Europe.  You’ll learn a lot and your game will benefit from it.

Next, consider that considerable power projection each side had. The United States had the advantage early on thanks mostly to the logistics needs of WWII, however, the Soviet’s quickly gained in capabilities. The US was able to supply or deploy in strength to Korea, Lebanon, and then Vietnam. The Soviets conducted large airlifts to Angola and then Ethiopia in the 70’s.  These lifts could have happened anywhere and both sides had the resources and armaments to spare.  Do not let distance be a hang-up as it clearly wasn’t in history.

Now let’s address the elephant in the room, nuclear war. Despite all the conflicts that had gone on during the war the US and USSR never had one.  The closest they came was the Cuban Missile Crisis, the Yom Kippur War and a false alarm during the 80’s. It is safe to assume that if these events didn’t lead to an exchange of nukes it likely real life it wouldn’t in your scenarios. Although on second thought what if it did?  Does it really matter?

This brings us to our final point.

These are games and they are supposed to be fun. Fun is achieved by making sure the scenario has action, there are problems to solve and there is some narrative for a player to get sucked into or create. These elements should come before everything else including model, order of battle, historical and political accuracy.  On the entertainment side of things, it’s an art that is supported by the science.  The best scenarios you’ve ever played have these elements.  Walk through it and do it. It’ll make it more fun for you and your players.

Anyways this is what I got on this one. I hope it helps!

CMANO Fooling with Fuel

CMANO Fooling with Fuel

I want to post a few examples scripts for players who want to do some scripts based on fuel but also retain these so I remember them.

First let us do a getunit in lua and see what fuel data looks like. in this case we’ll look at an AIP submarine since it has multiple fuel types.

Code:

u =ScenEdit_GetUnit({side=’Blue’,name=’Son Won Il’})
print (u.fuel)

Results:

{ [4002] = { current = 12750, name = ‘AirIndepedent’, max = 12750 }, [4001] = { current = 6000, name = ‘Battery’, max = 6000 }, [3001] = { current = 90000, name = ‘DieselFuel’, max = 90000 } }

The results are written to a table {}. The [4002] are just numeric values that correspond to a fuel type which is then followed by values for current fuel, name and max fuel.

Good to know but perhaps a setter would be more useful!

In this next example, we’re designing a scenario where ships and aircraft are already at sea or in the air and we want their fuel states to reflect this with some randomness and definitely not be at full fuel at the start. We’ll add a couple print statements to show what we’ve done.

Code:

if ScenEdit_GetUnit({side=”Vietnam”, name=”HQ 182 Hanoi”}) ~= nil then
u=ScenEdit_SetUnit({side=”Vietnam”, name=”HQ 182 Hanoi”})
m=(u.fuel[4001].max)
c=(u.fuel[4001].current)
u=ScenEdit_SetUnit({side=”Vietnam”, name=”HQ 182 Hanoi”,fuel={{4001,(math.random(m*0.6))}}})
print(m)
print(c)
end

Results:

8000
3685

The first thing done is a defensive check to make sure the unit exists (not nil). If it does then the fuel is set to a random number using the random function who’s parameter is max value multiplied by .6. We then call a print to show the max diesel fuel (m) and then print the current fuel amount (3685). You can continuously run this script over and over in the console to change the fuel to random values.

Now let’s look at this from a slightly different angle. Let’s say you want an aircraft to RTB at a certain fuel value.

You can create an event with a regular time trigger and lua code action in the event editor.

Workflow:

  1. Create a regular time trigger. Regular time just means that the event will fire at the time interval specified. In this case, I’ll create one for a second.
  2. Create a lua action.

Code

u =ScenEdit_GetUnit({side=”Blue”,unitname=”Peg #1″})
f= (u.fuel[2001].current)
if f <= 80000 then ScenEdit_SetUnit({side=”Blue”,unitname=”Peg #1″,RTB=”true”})
end

This code just checks to see if current fuel is less than 80000 liters and then if so updates the unit to RTB.

3. Create a repeatable event with this action and trigger with event shown in log turned off.

Results:

Event fires every second checking to see if the current fuel value is equal or less than 80000. If it is it sets the aircraft to RTB. You could also set a defensive line to check for nil and RTB if you want the script to stop at a certain point.

Pretty Cool huh? Hope it helps!

CMANO AI and Cruise Missile Defense

CMANO AI and Cruise Missile Defense

 

One of the bigger issues in designing realistic and challenging scenarios is that if certain national order of battles are used they may have enough cruise missiles to win the war in one salvo. The prime example is any US Carrier Strike Group in the last 30 or so years that if you assume 4 surface combatants with VLS and at least 2 Tomahawk capable submarines with a default DB3000 database load should have 200 Tomahawk cruise missiles. This is realistic and any nation with such a capability should use it to win quickly. However, the combat model is poor when the same respect isn’t paid to the defender and a planned defense against this threat and the limitations of cruise missile technology aren’t accounted for. I hope to discuss some suggestion in this article to help address this and ultimately help produce a more accurate combat model and fun game.

Shoot the Archer

The most effective strategy to defeat cruise missile attacks is to kill the shooters before they can shoot. This strategy goes back to ancient battlefields when ranged weapons first appeared but once detected the best strategy is to Braveheart it and send the entire horde over the hill to hammer and kill the archers before the can attrit your combat power. Hanging back and taking it very rarely if ever makes sense. Giving the opposing force the benefit of using their entire offensive power does. Do it.

To successfully attack you must be able to see a target and you must have combat power in place to react to it. This means getting sensors out where the shooters may be as well as positioning your attack power in places that it can be concentrated on the shooters. This means getting as many ships, subs, and aircraft up in the air and out to sea as possible either looking for targets or being positioned to shoot. You will take losses especially to your scouts but this their job and if successful it will be worth their loss many times over. It is better to lose platforms doing something than sitting on the ground waiting.

Shoot the Arrow

Shooting the arrow became a viable defensive strategy due to advances in the modern surface to air missile. CMANO models the growth in capabilities of these missiles (guidance, rates of fire, maneuverability, speed and altitude limitations) as well as the missiles and bombs they target so it just makes sense to do some quick analysis work to understand the threat and how your systems can defend against them. You do this by experimenting with the game to determine how many weapons are likely to be fired at your facilities, how successful your SAM or gun systems might be against them from detection to kill and how geographic placement impacts line of site. While this kind of homework seems obvious you would be shocked at how many scenarios have defenses that would never work against what is being fired against them. It is worth the time and leads to a better game.

Here’s an example of the kind of input and thought that I do when defending against a known Tomahawk E Strike in CMANO. You could definitely do a more detailed analysis but just addressing the basics should accomplish the goal. If you have some things you do please do let me know. I’m always looking for good approaches.

Tomahawk Capabilities

My thoughts on the Tomahawk missile’s capabilities based on what I know from gameplay and looking at it in the DB viewer is as follows:

  • The Tomahawk is relatively slow but a low flyer that can use waypoints and terrain to mask itself effectively making it relatively stealthy. It is currently fired against known fixed targets.
  • In general, it takes 2 Tomahawks to kill a building or disable a tarmac, 4 to disable a runway access point and 10-12 to kill a hardened aircraft shelter or ammo bunker. I need to keep in mind that despite target toughness any stored aircraft or munitions have a chance of getting destroyed on any penetrating hit.
  • Any launch platform will likely carry 12+ and carrier battlegroups should have 200 or so which means large salvos. it is also fair to say the Salvo’s will not come in alone but could be supported by a concerted SEAD effort.
My Defensive Capabilities
  • MANPADS, SA-2, SA-4, SA-6, SA-5, Roland, Rapier, SA-9, SA-13 have little or no chance due to altitude, speed or guidance restrictions. Ranged SAMS are not as worthless as they do have radar systems that can detect tomahawks at greater ranges than more effective but shorter ranged SAM Systems.
  • SA-3 systems can be fired but their percentage to hit a Tomahawk is 5-10% and limited firing channels.
  • HQ-61, I-Hawk, HQ-64, Crotale, SA-11 can engage but have 30-50% chance of hitting and limited firing channels (salvo sizes).
  • SA-8B, Pantsir, SA-15, SA-19 all excellent short range systems with a 45-65% chance of hitting along with more firing channels and secondary gun systems. Many of these systems are also very good against other fast guided munitions such as HARMS and may be more valuable defending other systems by setting their Weapon Release Authorization (WRA settings to do so). They generally have great radars with low range as well.
  • Patriot, SA-10, SA-17, SA-20, Aster 30, Aspide 2000, HQ-9A all excellent systems with good range and many firing channels. They generally have good long-range radars that can detect Tomahawks and other missile systems at long range as well.
  • Command accounts for missile energy so it is not in my best interest to take the longest range shot or shoot at awkward angles. I can adjust a position and WRA ranges to what makes sense. Tomahawks are slower so it may be best to get higher percentage shots than more of them (or not!). I will account for range and kill percentage in making this decision.
  • I may have aircraft that might have good capabilities seeing or killing missiles. I need to weight out orienting them toward cruise missile defense or carrying out other crucial roles. I need to position them in areas that make sense.
Line of Site Topography

I turn on the relief layer for visual queues for elevation changes and mouse over terrain for exact elevations. The higher your radar systems the better and always be wary of higher elevations blocking line of site. This includes evaluating the altitude of your aircraft patrols as well if you’re using them for low-level sweeps.

Conclusion?

Any conclusion is subjective but I’ve done the homework to place or move units to where I think they ought to be given shooter capabilities, target capabilities and line of site topography. We’ll see. If I’m wrong I learned something for the next game.

Dispersion

Parking Dispersion

Parking dispersion may be the best defense and probably should be practiced in any wartime scenario. If you look at any air base constructed since World War 1 you’ll notice vast amounts of parking spaces and if you look any Soviet Cold War era base you’ll likely see hundreds of dug out revetments in addition to hardened structures and open tarmacs. Aircraft are typically dispersed, moved and shuffled on a regular basis to prevent targeting and the stale intelligence quickly. The practice was even used in Syria recently as the Syrian’s moved many aircraft to new spots and shelters when they learned of an incoming strike.

CMANO allows you to disperse and move aircraft for the same reasons. Aircraft can be added to any individual structures (revetments, tarmacs, shelters, hangars, open parking) within a constructed airbase and the event editor with a lua script action provides a way to periodically move them given a reason (trigger). This will increase aircraft survival and force your enemy to do more reconnaissance to make their million dollar salvos worth it.

Example: I’d like to disperse aircraft to a different bunker periodically.

Workflow

  1. Create a time trigger (regular, time or random time).
  2. Create a lua action that includes the code below.
  3. Create Event and trigger and actions.
  4. Repeat if you’d like to move them to move more than once or back and forth.

Lua Script Example:

a=ScenEdit_GetUnit({side=”Great Isle”, name=”Fulcrum #1″})
b=ScenEdit_GetUnit({side=”Great Isle”, name=”Gander Hardened Aircraft Shelter 13″})
if a ~= nil and b ~= nil and a.airbornetime == “0” then
ScenEdit_HostUnitToParent({HostedUnitNameOrID=”Fulcrum #1″,SelectedHostNameOrID=”Gander Hardened Aircraft Shelter 13″})
end

This code grabs an aircraft and a shelter and assigns them to variables. A defensive if statement is then run to see that both exist and that there is no airborne time to make sure are not airborne. If it passes the HostUnitToParent function then performs the move.

Base Dispersion

US Cold War plans had American bombers and fighter planes going to dispersed airfields in the event of nuclear and conventional war. Given the vast numbers of modern airfields, airports in this country it made sense and would have made the total destruction of forces very difficult. This can also be readily practiced in any Command scenario. You may even consider just getting units up in the air and away from a ground attack as a method of dispersion.

I hope you’ve found this article helpful and it leads to a better game. If you some great suggestions of your own feel free to post or send them along and I’ll update this entry.

CMANO Lua Key Values, Counters and Behaviors

CMANO Lua Key Values, Counters and Behaviors

Command’s Lua implementation provides a powerful tool for players and designers to capture data and use it to do many things using programming logic. Users create custom variables called keys that can be used to store strings of information. The most common example is storing numeric values for counts or a variable name to call again and again throughout their code. Keys can then be used in conditional or relational logic to call on functions to change the behavior of a unit or group.

Example: After 3 P-3 Orion’s  are destroyed I’d like to roll back their patrol mission out of harm’s way by moving the reference points assigned to the mission.

Workflow

  1. Create scenario. Add sides, units, patrol mission with reference points for target side.
  2. Next create a trigger by going to editor drop down menu, selecting Event Editor and then trigger. Specify the side, target type, subtype and target class. Do not specify a specific unit.
  3. Next create an action by going back to the Event Editor drop down and selecting Actions.
  4. When the Event Actions dialog appears select Lua script from the menu at the bottom and press the create action button to open the editor.
  5. Add Lua Counter code:
  6. Build Event

Example Lua Code (Special Thanks for MichaelM for the start on this):

lastCount = ScenEdit_GetKeyValue(“Counter”);
lastCountN = tonumber(lastCount); — convert to number
if lastCountN == nil then
lastCountN = 0; — first time
end
lastCountN = lastCountN +1; — increment
if lastCountN >= 3 then
ScenEdit_SetReferencePoint({side=”Blue”, name=”1″,Lat = “-3.26133743974693”, Lon = “108.809990664818”})
ScenEdit_SetReferencePoint({side=”Blue”, name=”2″,Lat = “-3.51017256235771”, Lon = “109.750259905245”})
ScenEdit_SetReferencePoint({side=”Blue”, name=”3″, Lat = “-4.50056738642672”, Lon = “110.026941321177”})
ScenEdit_SetReferencePoint({side=”Blue”, name=”4″, Lat = “-4.70395785856429”, Lon = “109.031147829498”})
end
ScenEdit_SetKeyValue(“Counter”, tostring(lastCountN )); — save the counter

In this code a key value called Counter is created, assigned to a variable called lastCountN and then converted to a number using the “tonumber” function because keys are strings(text) types. The code then evaluates if a value exists by checking for nil and if so gives it a 0 value (zero is not nil) so that it can be used in a calculation.  The code then adds one to reflect the counter going up. We then check to see if the value is greater to or equal to three and if so move reference points using the SetReference points function. This function lets you move reference points by changing the latitude and longitude values (its a setter). The mission area is then moved to where I think it’s safe based on the latitude and longitude values I’ve specified.

Other useful things you can do in the game with counters.

  • Tracking specific unit types for scoring or a victory condition. Ex. Kill 10 Osa’s triggers a Scenedit Set Score function plus value.
  • Tracking civilian losses to impact victory conditions. Ex. Killing 10 houses triggers a Set Score function minus value.
  • Tracking target fuel storage facility losses to impact air and sea operations as well as land unit movements.
  • Tracking target destruction or losses to impact victory conditions (politics, public opinion etc.).
  • Tracking target destruction to impact morale. Loss of too much would change the quality of the units in CMANO which are configurable.
  • Costing. If you want to track the costs of units, fuel etc. and do not have the pro product this could be used.

I’m sure others will provide some other ideas but I hope this helps!

 

 

 

 

 

 

 

 

 

 

 

 

Air Base Fuel Logistics in Command: Modern Air and Naval Operations

Air Base Fuel Logistics in Command: Modern Air and Naval Operations

There has been occasional discussion on adding air base fuel logistics in Command. The valid concern from players is that fuel is a limited resource that should be a going concern for players. CMANO currently includes storage units such as tanks, bladders, bunkers and trucks but they are not actually required to refuel aircraft and likewise the aviation fuel carried on ships isn’t actually used (as of May 2017).

The reason why this was never added was that casual players would be annoyed at the added complexity of an already cerebral game and in most cases air bases are in places where aviation fuel can be shipped in quickly by truck. CMANO already includes a fairly detailed weapons logistics model where players have to account for the number of bombs, missiles and pods they have. The aircraft readiness model captures how many times they can be used in a period of time and the many reasons why in a couple of simpler variables. Casual players have been very vocal about how complicated all of this currently is and would be further pressured by adding fuel to the mix. It makes total sense why this hasn’t been added and probably won’t until a smart but painless way is implemented.

This being said if you are a modeling savage there are absolutely ways you can do this yourself using the event editor and lua and that’s what I’d like to cover.

I have two suggested methods to accomplish this:

Event Editor without Lua:

Create an event that includes a destroyed or damaged unit trigger (fuel storage unit) and change of the mission status (inactive) on one or more missions.

The upside of this method is no lua scripting is required but the downside is the OR conditions on Event triggers makes it impossible to create one event to cover complete destruction of fuel units.

Workflow

  • Create scenario sides, add units (including an air base that includes fuel storage facilities and aircraft) and missions.
  • Go to target air base side and create mission deactivations for each mission at air base.
  • Go to triggers and create discrete destroyed/damaged triggers that specify the fuel holding facilities for the target side.
  • Create events that include a mix of each. Keep in mind that triggers are currently evaluated as OR statement and actions as ANDS. So any one trigger will trigger all actions in the event list. Set up separate event s if you’d like to create more distinct relationship between the destroyed units and the missions rather than all or nothing.

Event Editor with Lua

Create an event that includes a destroyed or damaged trigger (fuel storage unit) and a lua code action that checks to see if the fuel storing facilities you specify exist every time a fuel storing unit is damaged or destroyed and then deactivating missions based on that.

The upside is you can write minimal code to create one event that covers the complete destruction of fuel units as well as more discrete impacts on specific mission. People will now think you’re good looking and smart.

Workflow

  • Create scenario sides, add units and missions.
  • Create destroyed or damaged triggers for each fuel storing unit.
  • Write Lua Action.
  • Build Event.

Lua Code Example:

a=ScenEdit_GetUnit({side=’Target’,name=’Air Base Tank 1′})

b=ScenEdit_GetUnit({side=’Target’,name=’Air Base Tank 2′})

if a == nil and b == nil then

ScenEdit_SetMission(“Target”,”Strike 1″,{isactive=”false”})

ScenEdit_SetMission(“Target”,”Strike 2″,{isactive=”false”})

end

In this case the first two lines just get the units you’d like to check. The if statement checks to see if they exist (nil means no). The ScenEdit_SetMission statements below just change the missions status (isactive) to false.
If  the side is human you may want to try a slightly different method. Reason is a human player can just reassign to a new mission and start launching aircraft again but if we set the loadout to Maintenance they cannot. A little defense programming could make that a little harder.

a=ScenEdit_GetUnit({side=’Target’,name=’Air Base Tank 1′})

b=ScenEdit_GetUnit({side=’Target’,name=’Air Base Tank 2′})

c=ScenEdit_GetSideIsHuman(“Target”)

if c==false then

if a == nil and b == nil then

ScenEdit_SetMission(“Target”,”Strike 1″,{isactive=”false”})

ScenEdit_SetMission(“Target”,”Strike 2″,{isactive=”false”})

end

if c==true then

ScenEdit_SetLoadout({UnitNameOrID=”Mustang #1″, LoadoutID=4, TimeToReady_Minutes=0, IgnoreMagazines=”True”})

ScenEdit_SetLoadout({UnitNameOrID=”Mustang #2″, LoadoutID=4, TimeToReady_Minutes=0, IgnoreMagazines=”True”})

 

end

end

The c variable in this case checks to see if the player is human or AI. If it is AI it does the mission deactivation and if human it sets the units to a maintenance load out.

Hope this helped!

Mike

** Special thanks to Kushan for pointing out the SetLoadout Code which is available as a setter now!

Forum Discussion on this here.

CMANO Import Files (.inst) to Google Earth (.kml)

CMANO Import Files (.inst) to Google Earth (.kml)

As a game referee one of my initial challenges is to be able to communicate unit positions and line of site without depending on a player actually having Command (although they’d be whole a lot cooler if they did!). Google Earth is the best choice as a viewer as it is platform neutral, free and players can get better visuals of terrain and line of site than Command currently provides. Luckily Command import files (filename.inst) can be leveraged as they have the necessary fields in them (name, latitude and longitude)that with a little regex action you can write your own .kml file to drop placemarks with unit names into Google Earth.. I chose Perl because I know it and its just good at regular expressions.

The workflow to accomplish this is.

  1. Generate an import file in Command.
  2. Place .inst file in script directory.
  3. Replace input and output file names in the perl script with whatever you want.
  4. Run Code using installed perl interpreter (Strawberry).
  5. Click the KML file to launch in Google Earth.

Perl Code:

#!/usr/bin/perl
#You will need a PERL interpreter to run this. Suggest strawberry.
#All files should reside in same directory as script. Make sure you place the Command .inst file in the script directory.
use strict;
use warnings;sub main {
#Name of your input file
my $input = ‘tankpos.inst’;
open(INPUT, $input) or die(“Input file $input not found.\n”);
#Name of your output file.
my $output = ‘tankposout.kml’;
open (OUTPUT, ‘>’.$output) or die “Can’t create $output.\n”;
print OUTPUT ‘<?xml version=”1.0″ encoding=”UTF-8″?>’;
print OUTPUT ‘<kml xmlns=”http://www.opengis.net/kml/2.2″>’;
print OUTPUT ‘<Document>’;
print OUTPUT ‘<name>Tankposout.kml</name><open>1</open><Style id=”exampleStyleDocument”><LabelStyle><color>ff0000cc</color></LabelStyle></Style>’;
while(my $line = <INPUT>)
{
if($line =~/MemberName/)
{
my @fields = split/”/, $line;
my $name = $fields[3];
print OUTPUT “<Placemark>\n<name>$name</name>\n”;
}
if($line =~/Longitude/)
{
my ($long) = $line =~ /(-?\d+\.\d+)/;
print OUTPUT “<styleUrl>#exampleStyleDocument</styleUrl><Point>\n<coordinates>$long,”;
}
if($line =~/Latitude/)
{
my ($latitude) = $line =~ /(-?\d+\.\d+)/;
print OUTPUT “$latitude</coordinates>\n</Point>\n</Placemark>\n”;
}
}
print OUTPUT “</Document>”;
print OUTPUT “</kml>”;
close(INPUT);
close(OUTPUT);
}
main();

 

Future goals for this:

  1. Different language with stand alone executable so users don’t have to install a perl interpreter. My goal is to build systems that have as few steps as possible.
  2. Speaking of. Think about a web language as eventually want to devise a way for players to generate this on their own via a web site button.

Notes:

  • FYI. KMZ files are actually zipped archives. To get to the KML inside just change the file extension from kmz to zip and you can grab the kml.  If you want look at the source open the kml in a text editor.
  • KML source is not complicated but given the range of options you can add it can be tedious. Use only what you need.
Homebrew Wargaming

Homebrew Wargaming

The first and likely a lifelong project I’ll be reporting on will be an exploration of methods and tools wargamers can use to game modern conflicts with others.  My sense is along with many great desktop wargames there are a lot of business oriented IT tools and methods that can be leveraged to help gamers build, process and communicate outcomes efficiently. I also hope to use it to actually host a modern MBX type war gaming in the future. This should benefit any future CMANO multiplayer implementation as well.

The “Why do this” for me goes back to CPX/MBX type wargames such as Global Thunder and Europe 88.   MBX games were play by email games that used human referees, home brew rules and commercial wargames to process interactions and websites and email to report outcomes.  Global Thunder and EU88 were the most successful as the refs actually had the time to do the work of building nice websites and crafting emails and in EU88’s case had a scope was small enough to be manageable. Follow on projects failed one after the other as the work turned out to be too cumbersome and people started having more fun things competing for their free time.

Our solution was Command aka “The Game we always wanted”. The catch is game actually started as two. One was an earlier form of what you see today and the other was strictly a game aid. The idea was a ref could drop some units in, game interactions and we’d come up with some brilliant ways to report out (Flat file to API). This was short lived though as we soon discovered a commercial interest in the game and more or less dropped the less marketable variant in hopes we could first get the game out and then add the wargame tools we needed to accomplish a MBX and/or multiplayer.  Resources were slim and we couldn’t possibly manage two different code bases and meet a deadline for something that might give us a return that we could then use to grow.

Today Warfaresims is still chasing commercial and now professional  requirements but the good news is there has been forward movement. First, many pro requirements actually overlap. Professionals want a great tool and Command really is it. While I can’t get into details my gut feeling is they will drive us closer to full multiplayer, good reporting and the ability to use Command independently of any other system.  Second, in the commercial realm Baloogan has developed Joint Command which is a helper app that allows players to play a turned based form of multiplayer and report results. It has showed real promise and provided good evidence that it is worth time and effort on the commercial side.

So the question is why am I looking at other tools and methods if Command will have these?  The first reason is I am impatient. I have waited years to do this, hit forty and suddenly realize I’m now on the back nine of life and better get some war gaming done. Second, there are pen and paper wargamers that will never use a computer wargame. They don’t like them mostly because the lack of transparency, human interaction and the AI can be a real idiot. I totally agree but the IT weenie in me wants to still find ways to help them find methods and tools to do what they love more efficiently. Exploring ways computers can help people do their thing has always been a thing for me.  Finally, it’s a challenge. I need to work a bit outside my comfort zone and see where I can go and what I can learn.

This all being said the project stuff will be under Homebrew Wargaming. I hope to hear some feedback as things progress and hope you get something out of it.