Sneak Peeks, Coming Attractions, Works-In-Progress

The Campaign Series: Middle East 1948-1985 is a new turn-based, tactical wargame that focuses on conflicts in the Middle East.

Moderator: Jason Petho

User avatar
Zovs
Posts: 9203
Joined: Sun Feb 22, 2009 11:02 pm
Location: United States

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Zovs »

Jason Petho wrote: Mon Sep 09, 2024 3:22 am CSVN 1.40 and CSME 2.40 are slated to be released around Christmas.

Shortly before or shortly after.

Depending on scheduling.
Thanks for the update, will check back then.
Image
Beta Tester for: War in the East 1 & 2, WarPlan & WarPlan Pacific, Valor & Victory, Flashpoint Campaigns: Sudden Storm, Computer War In Europe 2
SPWW2 & SPMBT scenario creator
Tester for WDS games
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Zovs wrote: Mon Sep 09, 2024 5:04 pm
Jason Petho wrote: Mon Sep 09, 2024 3:22 am CSVN 1.40 and CSME 2.40 are slated to be released around Christmas.

Shortly before or shortly after.

Depending on scheduling.
Thanks for the update, will check back then.
Cheers Zovs, you can also join the mailing list on our frontpage if you haven't done so yet: https://cslegion.com/
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

It's been a month already? I had an excellent two weeks off, and now I'm back to all things Campaign Series again.

Since the in-game dialog revision round I mentioned last time, I have been studying the C/Lua API, which forms the foundation of the Campaign Series Event Engine (CSEE) framework.

I was in awe not only at how Berto was able to churn out new CSEE functions and features, but also at how well the integration performed. In selecting Lua as the enabler for CSEE, he made an excellent choice. We're hardly the only game to do so, so we are in good company. Take CMANO or CMO, for instance. While I don't own the game myself, I'm aware of the active community building and enhancing the game through the Lua interface.

I have set the month of October as the time window to improve the current version of CSEE. One of my goals is to make life easier for scenario designers when implementing scenario-specific Lua files.

Berto made a CSlint utility available for building scenario-specific Lua files. It's a very neat tool. You run the csmklua.pl script with the scenario file as input and specify the desired Lua file as output. It then creates a comprehensive skeleton, including all the trigger functions required to capture those Campaign Series Events that are essential to our Lua files. It also processes the scenario-specific ORG file and places all the units and formations as Lua variables, ready for scenario-specific programming.

I won't go into further details on CSlint or even csmklua here—do check out those links. However, I will delve into some details on csmklua2.pl, a utility that, I hope, will take Lua skeleton generation to the next level. It will continue to improve in the future as well.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

There's already a lot of stuff in the current Lua skeletons. Berto for instance suggested functionality, and placed them inside comments in the various skeleton functions.

For instance: on_hex_attack(), if there's an attack against the hex, he suggested, that if the hex is inhabitated, there should be a penalty for ordering an airstrike or artillery at it. This is Modern Wars, after all.

Code: Select all

function on_hex_attack (hc, side, nation, attype) -- DO NOT REMOVE

--[[ commonly used; uncomment and adapt as necessary:
    -- lose EPs for indirect fire or airstrike vs. inhabited hex (village, city, suburb), whether or not occupied by the enemy
    -- side is the firing side
    local ha = has_attack(hc, other_side(side))
    if -- is_building_hex(hc) or
       is_habitat_hex(hc) then
        if not_occupied(hc, other_side(side)) then
            if attype == INDIRECTFIRE_COMBAT then
                inc_event_points(side, (ha and -1) or -2)  -- if ha, as with the occupied case (see below)
            elseif attype == AIRSTRIKE_COMBAT then
                inc_event_points(side, (ha and -2) or -5)  -- if ha, as with the occupied case (see below)
            end
        else -- occupied
            if attype == INDIRECTFIRE_COMBAT then
                inc_event_points(side, -1)
            elseif attype == AIRSTRIKE_COMBAT then
                inc_event_points(side, -2)
            end
        end
    end
--]]

end
So in this case, what csmlua2.pl does, it has that code in place as default. Scenario designers do not need to do anything, unless he prefers this effect to not happen. In that case, just comment out the code block. Or alter it, as necessary for that particular scenario to play out.

Here's the new skeleton code for on_hex_attack() for comparison:

Code: Select all

function on_hex_attack (hc, side, nation, attype) -- DO NOT REMOVE

--[[ commonly used; comment out or adapt as necessary:
    -- lose EPs for indirect fire or airstrike vs. inhabited hex (village, city, suburb), whether or not occupied by the enemy
    -- side is the firing side
--]]
    local ha = has_attack(hc, other_side(side))
    if -- is_building_hex(hc) or
       is_habitat_hex(hc) then
        if not_occupied(hc, other_side(side)) then
            if attype == INDIRECTFIRE_COMBAT then
                inc_event_points(side, (ha and -1) or -2)  -- if ha, as with the occupied case (see below)
            elseif attype == AIRSTRIKE_COMBAT then
                inc_event_points(side, (ha and -2) or -5)  -- if ha, as with the occupied case (see below)
            end
        else -- occupied
            if attype == INDIRECTFIRE_COMBAT then
                inc_event_points(side, -1)
            elseif attype == AIRSTRIKE_COMBAT then
                inc_event_points(side, -2)
            end
        end
    end


end
There's quite a few of these code blocks there, that were in place but commented out, but now take effect as default.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

But that's hardly not anything very difficult to do, for me, or for the scenario designer per the current csmklua implementation.

What I intend to do is to have much more complex logic in place as default. We've learn a lot during the CS VIetnam scenario CSEE design, so the intention is to put that experience in play.

Having spent some time to study the C/Lua API from the programming perspective, I've only been at the CSEE generation for some ten days. I started with Scenario Briefing, as that was something that was easy to play with, did not require to play a scenario in parallel to see how everything works out. Yet, a very good workbench for seeing how to add new C or Lua functionality to our existing stock of CSEE functionality.

Here's how the current csmklua implements the Scenario Briefing part of the skeleton file. Note that CS Middle East for most parts do not have Scenario Briefings available. Look for the Teaching Sets or the Sirte scenarios to see one.

Anyways, here's the Scenario Briefing for CSME Bootcamp 1 per the current csmklua:
old_scenbrief.jpg
old_scenbrief.jpg (48.54 KiB) Viewed 1574 times

And here's what the code snippet from the generated scenario Lua file has available. It is not half bad, I mean, there's the structure, and plenty of empty lines for the scenario designer to write the intel he wants to display.

old_scenbrief_code.jpg
old_scenbrief_code.jpg (83.68 KiB) Viewed 1574 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

But, for this next iteration on csmklua, we can do better. How's this for a Bootcamp 1 briefing. It is all generic, the scenario designer has not (yet) input his hints and tips for the scenario:

new_scenbrief.jpg
new_scenbrief.jpg (108.65 KiB) Viewed 1572 times

Here's the autogenerated code for that:

new_scenbrief_code.jpg
new_scenbrief_code.jpg (331.48 KiB) Viewed 1572 times

And yes, we still need that scenario specific intel here, so there are the [TO-DO] blocks to remind the scenario designer to do just that. But next, that is hopefully pretty much all he has to do per Scenario Briefing part of providing Lua files to CS Middle East scenarios for the coming 2.40 update.
Last edited by Crossroads on Sun Oct 06, 2024 10:41 am, edited 1 time in total.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Looking at that code, there's plenty of Lua function calls to retrieve various data and tidbits from the game.

I added a few new ones:

scenario_location() - figures this out from the scenario file name prefix: BC_630815_Bootcamp_1.scn translates as "Bootcamp", AL_580316_Oued_Fodda.lua as "Algeria". If there is no recognizable country code in the file name, this function returns the region_name() instead, so for Long Road Home (Oued Fodda), you would be welcomed to "North Africa".

scenario_title() - what it says, returns the scenario title, not previously available in CSEE library.

scenario_oparea() - returns the scenario Area of Operations, per how the scenario designer had input that to Scenario description. For Bootcamp 1, this is what Scenario Description says, emphasis mine:
[Habilayn, Radfan, Yemen]: [SIDE A] [FIC] [CSL]:

Welcome to Bootcamp One. This scenario is intended to be played as the United Kingdom (SIDE A). It is recommended to open Section 4.1 of the manual, accessed by pressing F1. It will take you through a step by step process of how to play the game and things to think about when you are playing a turn.

Good luck!

[ALL: OPT VV] [CS Event Engine Enabled] [2.10]
... and so forth. Adding these functions to CSEE Lua library meant they had to be implemented in Campaign Series game engine C++ code, which I did. Lua only has a C api, so some tricks were needed, but they were already there by Berto.
Last edited by Crossroads on Mon Oct 07, 2024 12:55 pm, edited 5 times in total.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Crossroads wrote: Sun Oct 06, 2024 8:56 am ... and so forth. Adding these functions to CSEE Lua library meant they had to be implemented in Campaign Series game engine C++ code, which I did. Lua only has a C api, so some tricks were needed, but they were already there by Berto.
But this is a two way street, right. It is not only what Lua can do with C, but also what C can do with Lua. Or: both at the same sequence!

With the in-game dialog code fresh in my mind, this seemed like a good time to implement our top Lua related wish-list item: an interface from scenario Lua files to interact with the players. Enter the...

... new Standing By for Orders! dialog:

Now, I am not quite yet there to start working with actual battle plans for Side A and Side B computer opponent, so you need to excuse me here a bit... But how exciting is this!

standing_by.jpg
standing_by.jpg (107.77 KiB) Viewed 1567 times

So what we have is that by one easy CSEE call, we can now ask players to make scenario specific decisions, from Lua. How neat!

askfororders_code.jpg
askfororders_code.jpg (86.53 KiB) Viewed 1567 times
Last edited by Crossroads on Sun Oct 06, 2024 12:35 pm, edited 3 times in total.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Berto and his son Chris added a ton of CS Middle East and CS Vietnam related images to game Backgrounds folder, they were already available for use on message boxes. If you do not name a file, one is randomly picked.

Asking for orders is a special occasion, so here in particular it is a good practice to include one. "_message6.bmp" seemed to be a good match for this test case.

Here is a random pick for Note() that I used in that CSEE code sample to report the option selected back to game engine. I did not specify an image name, so the game engine randomly chose this one. Bob's Country Bunker seems not quite the same I remember from Blues Brothers...

ordersoption_note.jpg
ordersoption_note.jpg (26.52 KiB) Viewed 1564 times

I hope everyone is enjoying their Autumn Colors, it is beautiful out there, go out and enjoy! For those rainy days and Campaign Series sessions, we hope there are good things to come in our next update, too. Due to Matrix Games scheduling, it was pushed from end of year to early next year, which - as always - gives us just a few weeks more to add to and to test the next update.

My schedule is CSEE for October, bug fixing for November (keep those bug reports coming, I really appreciate them!), and QA and testing for December. By January, we hope, all will be in place to ship out the 2.40. Fingers crossed!
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

It's been a while, so time to scribble a few updates again!

I thought it’d be neat to dive under the hood of our scripted AI feature. Here’s the first part of what I hope will be a three-part blog series:

The link opens the post on our CSLegion site.

Lots of text, not so many pictures. Still, here are some highlights of the latest and greatest updates to our CSEE API library. Next up, we’ll dive into the fun part—dissecting the latest evolution of the anatomy of our Lua scenario file!

CSEE_csmklua2-scaled.jpg
CSEE_csmklua2-scaled.jpg (262.82 KiB) Viewed 1380 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

... and, while playing with Scenario Briefings, I thought to enlargen the Report dialog. I added a title bar to it, too.

Per popular demand, there is now a copy button available to copy the report content to clipboard as well. Should be helpful with those long briefings, in particular with Bootcamps scenarios.

Example shown here is covered in more detail in my next blog explaining the new Lua CSEE stuff available in the next update to both games.

me_smeac.jpg
me_smeac.jpg (178.57 KiB) Viewed 1336 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Preparing to have our first Release Candidate builds out this Sunday for the ME 2.40/VN 1.40 games.

Middle East game now with Lua files for all scenarios, including all Alan R. Arvold's Ode to Arab-Israeli Wars, Divided Ground, and October War scenarios.

That is some 250 scenario Lua files.

Included in this first iteration are Scenario Briefings, Logistics (Ammo and Arty Ammo resupply rounds), and computer player Artillery and Airstrike AI logic. Basic gameplay still by Engine AI.

But it is a start! More to come in the next Updates after this one.

Here's a Scenario Briefing for Alan's Ode to Arab-Israeli Wars situation #20:


smeac_aiw20.jpg
smeac_aiw20.jpg (169.21 KiB) Viewed 1258 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Zovs
Posts: 9203
Joined: Sun Feb 22, 2009 11:02 pm
Location: United States

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Zovs »

YEAH YAHOO!!!
Image
Beta Tester for: War in the East 1 & 2, WarPlan & WarPlan Pacific, Valor & Victory, Flashpoint Campaigns: Sudden Storm, Computer War In Europe 2
SPWW2 & SPMBT scenario creator
Tester for WDS games
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Zovs wrote: Fri Dec 20, 2024 4:12 pmYEAH YAHOO!!!
Good times ahead!
Crossroads wrote: Fri Dec 20, 2024 3:08 pm That is some 250 scenario Lua files.
290, apparently...
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

I have just put out a completely new Vietnam RELEASE CANDIDATE build for Dev Team and the Beta Brigade. How cool is that!

As a late addition, we revamped the Scenarios folder, all scenarios are now grouped under Campaigns, which is a new sortable column in the Scenario Browser front end as well. Tons of content, for my 0.02$ at least this makes it so much easier to find the exact scenarios you wish to play, right?

Also, Alan's Ode to Divided Groud, Arab-Israeli Wars and October War scenarios, when enabled, will appear under these Campaign names as well.


me_frontend_rc01.jpg
me_frontend_rc01.jpg (303.38 KiB) Viewed 1185 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Crossroads wrote: Mon Dec 23, 2024 2:49 pm Also, Alan's Ode to Divided Groud, Arab-Israeli Wars and October War scenarios, when enabled, will appear under these Campaign names as well.

me_frontend2_rc01.jpg
me_frontend2_rc01.jpg (341.03 KiB) Viewed 1184 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Zovs
Posts: 9203
Joined: Sun Feb 22, 2009 11:02 pm
Location: United States

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Zovs »

Well I am ready, willing and able and can't wait for the new updates!!!
Image
Beta Tester for: War in the East 1 & 2, WarPlan & WarPlan Pacific, Valor & Victory, Flashpoint Campaigns: Sudden Storm, Computer War In Europe 2
SPWW2 & SPMBT scenario creator
Tester for WDS games
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Probably the last little code tweak to make it for the coming Middle East 3.0 Update: F5 / Refresh button for Scenario Browser.

Testing the Scenarios subfolders, ie. the new Campaign groupings, I made sure the mods were using those as well. And while testing, I realised that even though I was able to summon JSGME mod enabler from the dialog, I was not able to see the new scenarios there unless I closed and opened it again.

Little thing, and should have thought about this earlier I guess, but here it is, in the bottom right. JSGME button was there already on top of that right pane.

refreshmods.png
refreshmods.png (183.04 KiB) Viewed 1118 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Crossroads
Posts: 18169
Joined: Sun Jul 05, 2009 8:57 am

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Crossroads »

Crossroads wrote: Sat Nov 30, 2024 5:04 pm It's been a while, so time to scribble a few updates again!

I thought it’d be neat to dive under the hood of our scripted AI feature. Here’s the first part of what I hope will be a three-part blog series:

The link opens the post on our CSLegion site.

Lots of text, not so many pictures. Still, here are some highlights of the latest and greatest updates to our CSEE API library. Next up, we’ll dive into the fun part—dissecting the latest evolution of the anatomy of our Lua scenario file!
I originally planned to take time this weekend to write the second part of the Scripted AI series to depict the new features CSEE offers for the coming update.

But since we also decided to take the opportunity to make the next update a full reimage for Middle East 3.00, I've been working on game documentation, too.

For the past several days I have edited Berto's CSEE How-To documents into game manual format, first for Middle East How-to guideline originally written for Middle East 2.0, or Volume I, as I named it. That was some 50 pages to edit, so nothing there, really, except a neat walk in the memory lane. The guideline still serves as a nice briefing on the Event Engine.

What took much longer was to edit his Vietnam 1.0 Rung Sat scenario CSEE scripting efforts he documentend in the Vietnam forum. At around page 180 I thought that covers it well enough, so that is now another CSEE How-To guideline, marked as Volume II.

Both of them are available for download in my CS Legion post: https://cslegion.com/coder-diary/cs-eve ... -i-and-ii/ (link opens to our CS Legion website post).

Also: both guidelines will be available in both games in their Manuals folder for ease of access.

Another teaser from that post is a quick overall summary of latest and greatest with the next Middle East 3.00 update.

What do you think? I am happy to answer any questions you guys might have.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
User avatar
Zovs
Posts: 9203
Joined: Sun Feb 22, 2009 11:02 pm
Location: United States

Re: Sneak Peeks, Coming Attractions, Works-In-Progress

Post by Zovs »

Thanks for the update. Looking forward to the ME patch/upgrade.

From the site I posted a typo in the Volume I guide with regards to linkage to the lua site.

I downloaded the binaires to install lua locally, since lua looks like a neat scripting language to learn.

Do you happen to know what other games might be scripted that use lua?

Interesting concepts.
Image
Beta Tester for: War in the East 1 & 2, WarPlan & WarPlan Pacific, Valor & Victory, Flashpoint Campaigns: Sudden Storm, Computer War In Europe 2
SPWW2 & SPMBT scenario creator
Tester for WDS games
Post Reply

Return to “Campaign Series: Middle East 1948-1985”