Lua in Play – Using Lua to Implement Scenario Functionality

Take command of air and naval assets from post-WW2 to the near future in tactical and operational scale, complete with historical and hypothetical scenarios and an integrated scenario editor.

Moderator: MOD_Command

Post Reply
RoryAndersonCDT
Posts: 1825
Joined: Mon Jun 15, 2009 11:45 pm

Lua in Play – Using Lua to Implement Scenario Functionality

Post by RoryAndersonCDT »

I'm pleased to announce Baloogan Campaign's newest author: ckfinite! Today ckfinite writes about his scenario Operation Fei Lian and an overview of how Lua helped him make the scenario he wanted!

Lua in Play – Using Lua to Implement Scenario Functionality by ckfinite
Lua provides a vast number of new possibilities for scenario creators, letting you automate tasks. Today we’re going to discuss how you can use Lua in a real scenario, using my upcoming Operation Fei Lian as an example. We’ll discuss how to integrate Lua into your scenario development workflow, and also how to implement solutions to some common problems.

Planning
Lua requires some forethought, like any other scenario. You need to figure out what needs to happen in your scene to implement it with Lua. The major component in Fei Lian was the North Korean nuclear retaliation pipeline – integrating a process including missiles, airplanes, trucks, and a palace.

In-game, the process works like this:

T+0: Realization of PRC hostility (attack/entry into NK airspace)
T+20m: Conventional forces launch (KPAF mass scramble), special forces ready (IRBMs to launch locations)
T+30m: Nuclear go: Trucks carrying NK nuclear weapons depart from Kim Jong Un’s palace to the aircraft and (randomized) missile launch site
T+~1h: Nuclear weapons arrive at ballistic missile launch site, and begin integration.
T+1h30m: Nuclear warhead integration complete, missile launch against Beijing
T+1h45m: Nuclear bombs arrive at MiG-23 bases
T+2h: MiG-23 with nuclear gravity bomb ready – air attack on Shenyang

This chain of events would be hard to do in Command in the pre-Lua days – especially the randomized nuclear missile selection process. To implement this sequence of events, you have to keep track of which units are where and when they start out, hard with the traditional mission editor, much easier with Lua.
Command Dev Team
Technical Lead
User avatar
1nutworld
Posts: 385
Joined: Sun Apr 13, 2014 12:34 pm

RE: Lua in Play – Using Lua to Implement Scenario Functionality

Post by 1nutworld »

I'm really looking forward to the LUA scripting info and uses.

Thanks Baloogan and ckfinite!
USS Dwight D. Eisenhower (CVN-69) 1990-1994.
Post Reply

Return to “Command: Modern Operations series”