Campaign Series Event Engine How-To

The Campaign Series Event Engine, hereinafter referred to as the CSEE, is a standard, built-in extension to the game engine giving you the ability to script special messaging and all manner of in-game events.

With the CSEE, you can for example, based on changing circumstances:

  • Show on-screen briefings, in the form of pop-up message dialogs, at game’s start, then provide hints and commentary throughout the game
  • Award positive Event Points (much like traditional Strength Points, and Objective Points) for special in-game achievements (e.g., killing an enemy commander or HQ; clearing out a map sector of all enemy units; etc.)
  • Assign negative Event Points for politically bad behavior (e.g., crossing over a border into a forbidden or demilitarized zone; ordering an airstrike on a mosque or temple; etc.)
  • Alter the value of objective hexes
  • Hasten or delay reinforcements, even change the location of entry hexes
  • Increase or decrease one side’s or the other’s general morale level
  • Raise or lower ammo levels, available air strikes, star shell (flare) count, etc
  • Change Adaptive AI parameters
  • Alter victory conditions

…and so much more.

In this How-To, I will build a CSEE .lua script, from start to finish. For our purposes, I will focus on the Jerusalem48.scn (Assault on an Ancient City) scenario, which is part of the Alan R. Arvold’s Ode to Divided Ground collection (a standard mod, included in CSME 2.0 by default).

This is no quick How-To. Inevitably, I will bog down in details. If you want to do anything more than the most trivial of CSEE Lua scripts, there is no escaping the details. A picture is worth a thousand words, they say. So too concrete examples.

This How-To will show plenty of examples, and more than a few pictures too!

Download it here:

 

Accompanying Lua Reference document and Jerusalem48_csee.lua files can be downloaded from here: csee_howto_reference_sample

If you have any questions just ask, either here, or at the Matrix Games CSME Forum

 

CS Graphics Under the Hood #4 – Hex Sides Galore!

Welcome to Part Four of the CS Graphics Under the Hood series! This time, let us look at the hex sides, which comes in the form of Sides, Blocked, and Slopes. Then there’s the Full Bridges and Side Bridges.

That leaves only the various Water tiles for the fifth and last edition of Map Graphics. There, we’ll discuss the new Night tiles as well,  before moving to various Unit and User Interface files in the coming episodes of these developer diaries.

Sides

Sides is a major exception to rule for having similarly named and composed files for both 2D and 3D.

In 2D, the following tiles are included in the one Sides[view moniker].bmp file

  1. Stream
  2. Minor River
  3. Gully
  4. Dune
  5. Ditch
  6. Crest

 

Here’s the 2D Sides7d.bmp Normal view file:

Click to enlargen the image

However, with 3D, due to its more complex layout, there’s a separate set of files for each of the rows within the composite Sides 2D file:

  • Streams[view moniker].bmp
  • MinorRivers[view moniker].bmp
  • Gullies[view moniker].bmp
  • Dune[view moniker].bmp
  • Ditch[view moniker].bmp
  • Crest[view moniker].bmp

Here’s 3D DesertDitches3d.bmp. Note how inherently more complex the 3D map can be, as each hex side can be viewed from various directions, when rotating the map around for instance:

Click to enlargen the image

Sides and the respective 3D sets of files use the Regions + Biomes convention to differentiate one map from another:

  • DesertSides8d.bmp
  • MediterraneanCrest0d.bmp

Blocked

With Blocked, we are back to both 2D and 3D sets being similarly put together. The tiles available in Blocked are:

  1. High Wall
  2. Damaged High Wall
  3. Stone Wall
  4. Hedge
  5. Bocage
  6. -reserved-
  7. -reserved-
  8. Reef

Due to Hedge and Bocage tiles present in this file, Blocked follows the GreenBrownBarren Conditions as set in Scenario Editor.

Here’s the two file sets, first 2D with GreenBlocked7d.bmp:

Click to enlargen the image

And here’s 3D with GreenBlocked3d.bmp:

Click to enlargen the image

Slopes

With Slopes, we have the second major set that differentiates between 2D and 3D map views. Slopes follow the Ground Condition notation of Normal (no prefix), Soft, and Mud versions of them. (Later, the Frozen, Snow and Deep Snow versions need to be added.)

2D again is quite easier to put together, containing just four rows with six columns:

  1. 3D Contours in 2D maps (not implemented yet)
  2. Cliff
  3. Embankment
  4. Escarpment

Here’s the file in all its simplicity, with Slopes8d.bmp as the sample:

Click to enlargen the image

3D Slopes is much the busier beast, as it needs to cover all the hex sides with Reverse Map views too. Here’s MudSlopes3d.bmp, with lots of Slope variants, like Caves, Streams and Minor Rivers, and Tunnels, flowing through them:

Click to enlargen the image

 

We’re not nearly done though. Hexes Galore! it is.

SideBridges

As name implies, these are the Hex Side Bridges (and a Fjord) for both 2D and 3D. Here’s the 2D SideBridges8d.bmp:

Click to enlargen the image

And here’s the respective 3D SideBridges0d.bmp:

Click to enlargen the image

Rows included are:

  1. Fjord
  2. Light Bridge
  3. Light Bridge, Destroyed
  4. Medium Bridge
  5. Medium Bridge, Destroyed
  6. Heavy Bridge
  7. Heavy Bridge, Destroyed

And since we need something to pass full hex obstacles as well (Rivers, Major Rivers, Canals, Major Canals, and Water one hex wide, we need to have…

FullBridges

Full Bridges include two bridge types: a Heavy large-span Bridge, and a Pontoon Bridge. And here they are.

2D

Click to enlargen the image

3D

Click to enlargen the image

 

And that’s the hex sides covered, for most parts at least. Wheew, this one was quite a biggie… Any questions, give us a holler.

Uncle Ho’s Hideout #2 – MGRS Coordinate Conversions

Campaign Series Vietnam | Uncle Hos Hideout

In Uncle Ho’s Hideout series, David Galster shares some of his tips and techniques in scenario research and design for CS: Vietnam. 

Welcome back, Komrades!

Sometimes we find location information in the form of the MGRS or military grid reference system. And naturally, we may want to convert these coordinates to latitide and longitude, commonly known as geographic coordinates.

Fortunately, there are several good webpages that make this conversion online. One such webpage is “Legal Land Converter” Here is the link:

http://legallandconverter.com/p50.html

 

To use this site, the MGRS coordinates must be in the form 48Q YD 929072.

  • The first number-letter combination, 48Q is the Zone Code. Each zone is 6° by 8°, longitude by latitude.
  • The next two letters, column and row are sub-zones.
  • Finally, the numbers are always given in even numbered digits. The first half is “easting” and the second is “northing.”

In this example, 929 is 92.9 km east of the “Y” western boundary. The more numbers given, the more precise the location.

If the MGRS coordinates have the full form, then use the website to find the geographic coordinates. This is what the entry looks like:

Campaign Series Vietnam | Uncle Hos Hideout

In this case, the geographic coordinates are 16.32810°N, 107.74123°E.

A new screen in the webpage shows this information and provides links to Google, Bing, and MapQuest maps for convenience.

Sometimes, reports will only show the row-column letters followed by the grid digits. For example, in a list of firebases, only the MGRS coordinates: YD 929072 are given. In this situation, you can still do the conversion, but must first find the zone code. The Indochina area zone map shows these codes.

What if you pick the wrong zone code?

Fortunately, the way the MGRS is organized, a pair of row-column letters in one zone cannot be found in an adjacent zone.

For example, if instead of entering 48Q, we used 48P, the webpage would give an error message: 100K row letter = ‘D’ is not inside Zone ’48P’. This may help avoid mistakes.

Campaign Series Vietnam | Uncle Hos Hideout

Indochina Zone Codes

This is one way to convert MGRS coordinates to geographic ones.

Conclusion

I don’t know whether Uncle Ho knew about the MGRS system, but if he did, he would surely have sent out spies to get as much information, and as many US military maps as possible!

[hr]

In next episode of Uncle Ho’s Hideout, I’ll provide a little explanation and background about what appears to be a strange code for PAVN unit identification. Until then!

CS Graphics Under the Hood #3 – Terrain, Vegetation, and Trees

Building further from the previous Biomes and Regions and Open Terrain entries, let us introduce the next set of map graphics, namely Terrain, Vegetation, and Trees files.

Note: Vegetation and Trees, but not Terrain, are affected by Scenario Editor’s Conditions dialog. But let us look at the graphics tiles first.

Terrain

First, let us look at the various terrain types depicted in Terrain files. They are the same for both 2D and 3D:

  1. Impassable hex (first cell of first row used only)
  2. Colored dirt (for instance the red soil in Vietnam)
  3. Beach
  4. Soft Sand
  5. Rough
  6. Hammada
  7. Wadi

Here’s the Desert 2D Normal View file, with white background. With 2D, these tiles are always drawn on top of the underlying hex tile. Hence, for instance with Rough, those rocks appear on top of the open terrain present in the hex.

Click to enlargen the imageHere’s the corresponding Desert 3D Normal View file. With 3D, these tiles are drawn as a whole.

Click to enlargen the image

Vegetation

Again, rows and cells in Vegetation are similarly positioned both with 2D and 3D:

  1. Grain Field (first three cells: Normal, next three cells: Plowed)
  2. Produce Field (first three cells: Normal, next three cells: Plowed)
  3. Vineyard
  4. Scrub
  5. Cactus
  6. Tall Grass
  7. Meadow
  8. Marsh
  9. Wet Paddy
  10. Dry Paddy

Note: Grain and Produce Field apperance (Normal, Plowed, None) are defined with Scenario Editor’s Conditions dialog.

Here’s the 2D Brown (Autumn) Vegetation file. Tiles are drawn on top of the open terrain tile below:

Click to enlargen the image

 

Here’s the 3D Green (Summer) Vegetation file.

Click to enlargen the image

Trees

Finally, here’s the Trees file sets as how they are defined. It’s quite a big one, with row and cell composition between 2D and 3D is the same:

  1. Orchard
  2. Sparse Orchard
  3. Palm Trees
  4. Sparse Palm Trees
  5. Thicket (for instance Nipa palms in Vietnam)
  6. Sparse Thicket
  7. Swamp
  8. Sparse Swamp
  9. Forest
  10. Sparse Forest #1
  11. Sparse Forest #2
  12. Sparse Forest #3
  13. Light Jungle
  14. Sparse Light Jungle #1
  15. Sparse Light Jungle #2
  16. Sparse Light Jungle #3
  17. Dense Jungle
  18. Sparse Dense Jungle #1
  19. Sparse Dense Jungle #2
  20. Sparse Dense Jungle #3

Note: “Sparse” variants are used when say a road or railroad goes through the hex.

Here’s 2D Green Trees file with white background:

Click to enlargen the image

Here’s 3D Barren Trees file. Note that this is from Middle East, therefore the various Jungle related cells were not yet completed at the time of posting this.

Click to enlargen the image

Scenario Editor Conditions

Here’s the Conditions dialog again:

Relevant Conditions for Trees and Vegetation are:

  • Trees: Normal, Brown and Barren available with Middle East, with Snow to be available in other Regions and Biomes.
  • Fields: All conditions available with Mediterranean biome where both Field types are  present. There is no stopping to add them to Desert maps with Map Editor either, but no stock map has them.

 

That’s it for Terrain, Vegetation and Trees. Any questions, shoot!

Uncle Ho’s Hideout #1 – Vietnamese Language Searches

Campaign Series Vietnam | Uncle Hos Hideout

In Uncle Ho’s Hideout series, David Galster shares some of his tips and techniques in scenario research and design for CS: Vietnam. 

Welcome to the site, Komrade!

Our first article explains how you can use Google Translate and the Vietnamese language for research on PAVN units.

Sometimes, searching these units in English just doesn’t yield much information. But, if these internet searches are carried out in the Vietnamese language, then you can find more hits related to your keywords. And, using Google Translate, you can get the results back in English. Admittedly, the Google translations back into English don’t always sound like a natural English speaker’s style, but you can get the information you are seeking.

How to translate English keywords into Vietnamese?

One approach I have used is to use the Vietnamese Military Terms Glossary. For example, to find a commander name for the 316th Infantry Division, the word for “Division” is “Su Doan” in Vietnamese and “commander” is “chi huy.”

So, a possible search text is “Su Doan 316 chi huy”.

Using Google to search this set of keywords, the following first three hits were obtained at the time of writing this article:

[hr]

Sư đoàn 316, Quân đội Nhân dân Việt Nam – Wikipedia tiếng Việt

https://vi.wikipedia.org/…/Sư_đoàn_316,_Quân_đội_Nhân_dân_Vi… Translate this page
Sư đoàn được thành lập ngày 01 tháng 5 năm 1951, sư đoàn trưởng đầu tiên là tướng Lê Quảng Ba, chính ủy là đồng chí Chu Huy Mân. Là một trong 6 sư …
Thành phần · ‎Chiến tranh Đông Dương · ‎Trong chiến tranh Việt

Tìm kiếm | Sư đoàn 316 (Quân khu 2) – Báo quân đội nhân dân

www.qdnd.vn › Tìm kiếm Translate this page
QĐND – Sư đoàn 316 (Quân khu 2) với lực lượng chiến sĩ trẻ chiếm đa số, công tác quản lý tư tưởng gặp không ít khó khăn. Những năm qua, Đảng ủy, chỉ huy …

Đoan Hùng kiểm tra lực lượng dự bị động viên Sư đoàn … – Chi tiết tin

doanhung.phutho.gov.vn/Chuyen-muc-tin/Chi…/Default.aspx Translate this page
Tại buổi khai mạc, Ban Chỉ huy Quân sự huyện đã công bố quyết định kiểm tra … 25 của trung đoàn 148 và đại đội 15, 16, 25 của trung đoàn 174 sư đoàn 316.

[hr]

Examine the first hit by clicking the link “Translate this page.” (These work, and you can click them to get the webpage.)

A Wikipedia article comes up in English. The “harvested” information is that on May 1, 1951, the first division commander was General Le Quang Ba, and the political commissar was comrade Chu Huy Man. These commander names could be used in an .ORG file for a scenario that took place in the First Indochina War with the French.

Some of the hits refer to modern PAVN units and commanders, and the years or locations can be included in the search text to get more refined hits.

More exact search words can be obtained by translating from English to Vietnamese. MS Word can do this using the translate option, or the Google translate module is available. In this case, the search words would look like: “Chỉ huy sư đoàn 316.” This may get a better set of results than the first search word set without the accent marks. This should open up whole new vistas for CS Vietnam scenario research.

[hr]

In next episode of Uncle Ho’s Hideout, I explain how to convert MGRS coordinates to latitude and longitude.