CS Event Engine How-To Volumes I and II

I thought I’d have the second part of the CSEE Lua Scripting posts available by now, but with the decision to update both games to full reimages for the next update (due in about a month), it’s been a very busy time!

As a little teaser, the upcoming Vietnam 2.00 and Middle East 3.00 updates—while requiring a complete uninstall and reinstall—are packed with goodies:

  • A completely new Scenario Browser front-end dialog, replacing the old Main Menu front-end dialogs. Redesigned in-game dialogs, too.
  • Completely revamped 3D map graphics for both games, courtesy of Bill ‘Mausman’ Blake
  • Brand-new Orders of Battle for Middle East, featuring Iran and a fully revised Iraq (1948–1985)
  • Ditto for Vietnam, with the addition of North Korea’s Order of Battle (1948–1985)
  • All Middle East scenarios now include accompanying CSEE Lua files

… and that last item brings me back to the topic of this post: CSEE How-to manuals for all you Lua programming fans out there.

CSEE How-To Volume I (2017)

I don’t know how many of you have noticed, but part of the Middle East Manuals subfolder has included this How-to guideline since the release of Middle East 2.00 back in early 2018.

CSEE How-To Vol I Table of Contents

CSEE How-To Vol I Table of Contents

Alongside the guideline, there was (and still is) also a scenario Lua file containing all the examples detailed in the document, showcasing various Scripted AI (SAI) battle plans coded there. Those were the early days, and there was still quite a bit for scenario designers to handle beyond battle tactics such as saving and restoring Lua variable values between game saves and resumes.

Featuring around 50+ pages of detailed examples, I’ve updated the document to meet our current game manual standards. While it includes Middle East content, this guideline will also be part of the Vietnam Manuals for added utility.

CSEE How-To Volume 2 (2022)

Fast forward four years to early 2022, and the second revision of the CS Event Engine was released alongside Vietnam 1.00. This iteration was a far more advanced system, with significant automation of the nitty-gritty tasks, improved placeholders for Scripted AI battle plans and events, and a robust application programming interface (API) that allowed Lua scripts to call the game engine for various actions and data retrieval.

This time, there wasn’t a formal guideline document. Instead, Berto produced a highly detailed blog series in the Matrix Games Vietnam forum (link opens there). The series focused on scripting for the Battle of Rung Sat, where he first created a defensive battle plan for Side B and, once that was complete, scripted the offensive actions for Side A.

Through these posts, Berto not only explained the scripting process in depth but also demonstrated how to use the game’s auto-testing feature. This feature allowed the Scripted AI for both sides to engage each other, pausing at predefined intervals to observe results, analyze performance, and refine the Scripted AI further for optimal effectiveness.

CSEE How-To Volume II Table of Contents

Over the past several days, I’ve been determined to turn this CSEE intel into a proper guideline document. After editing roughly 50% of Berto’s blog content into our manual format, I paused, at around 170+ pages. The result is an impressive How-to guideline for mastering the CSEE API.

This document includes the first complete iteration Berto created based on his auto-tests. At 173 pages, I felt it was sufficient to cover the essentials. However, Berto continued refining the scenario’s CSEE, and I’ve included links in the guideline to his follow-up work he posted in the Matrix Games forum for those interested in diving even deeper.

This truly is the document to read. While the CSEE Lua API continues to evolve—and has evolved further with the release of Vietnam 2.0 and Middle East 3.0—this evolution builds on the foundation established in the Volume II feature set. It’s more refinement than revolution, making the guideline an essential resource for understanding the core API.

This guideline, too, will be included in Manuals folder content for the both games in the coming Updates.

I’ll continue my Scripted AI blog series with the next installment, focusing on the evolved Scripted AI in this coming next iteration. Not quite a revolution, but perhaps a Volume 2.5—with further improvements to explore.

Before that, I strongly recommend reading these guideines, as they provide the foundation needed to grasp the next set of CSEE API features.

 

Thank you for reading this far, and until next time!