Translations for our friends around the world.

Author Topic: CMANO - Making Tactical Decision Aids - The Lua Gag Reel Ep1: By JC  (Read 3199 times)

0 Members and 1 Guest are viewing this topic.

Offline Asid

  • HAVOC
  • *
  • Posts: 26284



Monday, September 18, 2017
By: JC
CMANO - Making Tactical Decision Aids - The Lua Gag Reel Episode 1


In my previous entry, I praised WarfareSims for their farsighted decision to extend the CMANO's base code with the wide capabilities, simplicity and memory management benefits of the Lua scripting language.





I deeply appreciate the interest that many of you have expressed for knowing how I did put together my tactical decision aid, but I have to confess that I dread that you will be disappointed. I'm no programmer, and I grabbed pieces of code from here and there to put together this Frankenstein project. I apologize in advance, as you may see improper coding techniques and some inconsistencies in the logic of my entire scenario.

Without further ado, here is what I did.

If you remember from my previous post, the sequence of events was:

1.   The scenario starts
   1.   A counter is initialized. This counter keeps track of a series recursive ship vs sub simulation runs
   2.   Units are added to the scenario
       1.   The US warship is placed in the center and give a course due south, at flank speed
       2.   A DPRK sub is placed 50 miles from the US ship and given a patrol area delineated by the reference points above
   3.   If the US warship remains undetected and reaches an escape area south of the DPRK patrol's area
      1.   All units are deleted
      2.   The counter mentioned in 1.1 is advanced
      3.   New units are generated
         1.   A US warship is placed in the center and give a course due south, at flank speed
         2.   A DPRK sub is placed 50 miles from the US ship and given a patrol area delineated by the reference points above. The DPRK sub initial position is not the same as the one used in the previous simulation run. This initial position is advanced clockwise from the initial position of the US warship
   4.   If the US warship is detected
      1.   A marker reference point is made at the initial position of the DPRK sub. The marker is labelled "Danger" because this an initial sub position that will generate a headache for the US commander.
      2.   All units are deleted
      3.   The counter mentioned in 1.1 is advanced
      4.   New units are generated
         1.   Same as 3.1
         2.   Same as 3.2

The CMANO scenario editor allows the player to glue together special actions within events. Events are triggered by triggers and conditioned by conditions :) . This is because many times, you want an special action (strike hostile nation's port)  to happen when something has happened (i.e. a friendly ship was attacked, a trigger) and a condition is met (i.e. you have the means to strike nearby the target, a condition).

The logical hierarchy goes: Events do happen when Triggers are triggered, Conditions are met. The output is actions.

The beauty of all this is that conditions and actions can be Lua scripts. And when you unleash a Lua script, the world moon is at your feet.

So, let's start with the events.



Read on: Click Here
funny
0
informative
0
Thanks
0
No reactions
No reactions
No reactions

I stand against Racism, Bigotry and Bullying

Offline Asid

  • HAVOC
  • *
  • Posts: 26284
Re: CMANO - Making Tactical Decision Aids - The Lua Gag Reel Ep1: By JC
« Reply #1 on: September 30, 2017, 03:53:41 PM »
CMANO - Making Tactical Decision Aids - The Lua Gag Reel Episode 2: Click Here
funny
0
informative
0
Thanks
0
No reactions
No reactions
No reactions

I stand against Racism, Bigotry and Bullying

Tags:
     

    Forged of Blood : Tactical RPG

    Started by Asid

    Replies: 7
    Views: 4854
    Last post May 16, 2020, 03:24:18 AM
    by Asid
    Setting Up a Comms Disruption in CMANO: By JC

    Started by Asid

    Replies: 0
    Views: 3222
    Last post June 04, 2017, 01:44:36 AM
    by Asid
    ASL themed top trumps card game for PC windows XP Viista 7/8/10

    Started by gameleaper

    Replies: 1
    Views: 2869
    Last post November 26, 2017, 01:56:35 AM
    by Asid
    Making your own art from photo's

    Started by gameleaper

    Replies: 1
    Views: 1305
    Last post January 12, 2021, 03:51:29 PM
    by Asid
    Tactical Troops: Anthracite Shift

    Started by Asid

    Replies: 19
    Views: 6360
    Last post June 11, 2022, 10:26:42 PM
    by Asid