Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

John Tiller's Campaign Series exemplifies tactical war-gaming at its finest by bringing you the entire collection of TalonSoft's award-winning campaign series. Containing TalonSoft's West Front, East Front, and Rising Sun platoon-level combat series, as well as all of the official add-ons and expansion packs, the Matrix Edition allows players to dictate the events of World War II from the tumultuous beginning to its climatic conclusion. We are working together with original programmer John Tiller to bring you this updated edition.

Moderators: Jason Petho, Peter Fisla, asiaticus, dogovich

Post Reply
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by berto »


Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

ORIGINAL: berto

I don't know about you, but: I have played around with these new hot keys some, and they are a game changer. With Display->Highlight(s) now so much more easy and convenient -- simple key presses vs. laborious, tiresome mouse sweeps/menu hunt-and-pecks -- I will do them much, much more often. I will become much more aware of: Moved Units, Disrupted Units, Fired/Fought Units, Indirect Fire Units, Headquarter Units, Out of Supply Units, etc., etc. And being more aware, I will be a better player for it...
In the same spirit of bettering my game play, bringing to the forefront game details that I might otherwise gloss over, I have added hex-only TEM & Morale modifiers to the Info Box display:

Image

The asterisks are there to remind players that other factors -- e.g., hex sides, unit types, etc. -- might also apply.

The overlay to the upper left is the old-style Info Box (sans TEM & Morale values). The overlay to the bottom left is excerpted from the CS Manual. (If the displayed Info Box Morale, 2, doesn't match the Light Jungle Morale Mod from the Manual, +1, the explanation is that the Improved Position (IP) adds another +1 to the Morale. And similarly for Concealment.)

In the game Options Menu, you see Low Details, and Medium Details, but ... no High Details. Why not? Years ago, that choice had been removed from the Options Menu for some reason.

The only way to activate High Details has been to click on the x control in the upper left corner of the Damage Report box -- something so obscure that even veteran players had forgotten about it. (It is documented in the CS Manual, but who reads manuals anyway, right? [8|])

I have restored High Details, to go along with Low & Medium Details:

Image

Unlike Medium Details, where the Damage Report will vanish after a several second pause, with High Details, the Damage Report persists until one clicks the x (exit) control. I like that.

At the request of the unit and scenario devs, I have added two new unit capabilities, shown in highlight near the end of this very long list:

// Unit Move flags.
const int XTracked = 0x00000001;
const int XFoot = 0x00000002;
const int XHalftrack = 0x00000004;
const int XArmoredCar = 0x00000008;
const int XTruck = 0x00000010;
const int XNoLtBridge = 0x00000020;
const int XNoMedBridge = 0x00000040;
const int XAmphibious = 0x00000080;
const int XSki = 0x00000100;
const int XMotorcycle = 0x00000200;
const int XTrain = 0x00000400;
const int XHorse = 0x00000800;
const int XBoat = 0x00001000;
const int XRaft = 0x00001000;
const int XWagon = 0x00002000;
const int XNoHvyBridge = 0x00004000;
const int XAir = 0x00010000;
const int XShip = 0x00020000;

// Unit Carry flags.
const int XLoadable = 0x00000001;
const int XRidable = 0x00000002;
const int XTowable = 0x00000004;
const int XCarryAll = 0x00000008;
const int XCarryRider = 0x00000010;
const int XCarryTow = 0x00000020;
const int XTowOnly = 0x00000040;
const int XPortage = 0x00000080;
const int XCanSki = 0x00000100;
const int XCanMotor = 0x00000200;
const int XCanBicycle = 0x00000400;
const int XCanHorse = 0x00000800;
const int XHeavyGun = 0x00001000;
const int XCarryHorse = 0x00002000;
const int XCarryBicycle = 0x00004000;
const int XCarryMotor = 0x00008000;
const int XCarryBoat = 0x00010000;

// Unit Fire flags.
const int XHardTarget = 0x00000001;
const int XNormalAA = 0x00000002;
const int XReducedAA = 0x00000004;
const int XIndirectFire = 0x00000008;
const int XSmokeFiring = 0x00000010;
const int XFireWater = 0x00000020;
const int XWhiteP = 0x00000040;
const int XSAM = 0x00000080;
const int XATGM = 0x00000100;
// MERGE:
#if defined(MIDDLE_EAST) || defined(VIETNAM_WAR) || defined(KOREAN_WAR) || defined(NATO_WAR)
const int XGunship = 0x00000200;
#elif defined(EAST_FRONT) || defined(WEST_FRONT) || defined(RISING_SUN)
const int XICM = 0x00000200;
#endif
const int XSneaker = 0x00000400;
const int XATG = 0x00000800;
// MERGE:
#if defined(MIDDLE_EAST) || defined(VIETNAM_WAR) || defined(KOREAN_WAR) || defined(NATO_WAR)
const int XDaisyCutter = 0x00001000;
#endif

// Unit Other flags.
const int XCanDigIn = 0x00000001;
const int XMineClearing = 0x00000002;
const int XFireHardAI = 0x00000004;
const int XFireSoftAI = 0x00000008;
const int XReconAI = 0x00000010;
const int XAssaultAI = 0x00000020;
const int XRetreatAI = 0x00000040;
const int XCanDamage = 0x00000080;
const int XCarryAny = 0x00000100;
const int XIsDiveBomber = 0x00000200;
// MERGE:
#if defined(MIDDLE_EAST) || defined(VIETNAM_WAR) || defined(KOREAN_WAR) || defined(NATO_WAR)
const int XPathfinder = 0x00000400;
#endif
const int XAirPlane = 0x00000800;
const int XHelicopter = 0x00001000;
const int XRecovery = 0x00004000;
const int XLayVehBridge = 0x00008000;
const int XLayFootBridge= 0x00010000;
// MERGE:
#if defined(MIDDLE_EAST) || defined(VIETNAM_WAR) || defined(KOREAN_WAR) || defined(NATO_WAR)
const int XSpecOps = 0x00020000;
const int XCommando = 0x00040000;
#endif

// Unit More flags.
const int XAssault = 0x00000001;
const int XOffAT = 0x00000002;
const int XDefAT = 0x00000004;
const int XInfSup = 0x00000008;
const int XFireHelo = 0x00000010;
const int XLayMines = 0x00000020;
const int XErectBarrier = 0x00000040;
const int XSuicide = 0x00000080;
const int XBomber = 0x00000100;
// MERGE:
#if defined(MIDDLE_EAST) || defined(VIETNAM_WAR) || defined(KOREAN_WAR) || defined(NATO_WAR)
const int XReconUnit = 0x00000200;
const int XBldFtBridge = 0x00000400;
const int XFastUnit = 0x00000800;
#elif defined(EAST_FRONT) || defined(WEST_FRONT) || defined(RISING_SUN)
const int XBldVehBridge = 0x00000200;
const int XBldFtBridge = 0x00000400;
#endif
const int XShovels = 0x00001000;
// MERGE:
#if defined(MIDDLE_EAST) || defined(VIETNAM_WAR) || defined(KOREAN_WAR) || defined(NATO_WAR)
const int XRaider = 0x00002000;
const int XNightVision = 0x00004000;
const int XSetIED = 0x00008000;
const int XLayManyMines = 0x00010000;
#endif

The new Commando capability allows special units to climb otherwise unscalable cliffs.

The new LayManyMines capability allows some (but not all) minelaying units to lay mines more than once.

That's a lot of unit attributes and capabilities! Many of them you maybe don't know about. How would you? Traditionally, just a handful of them were displayed in icon form at the bottom of the unit Info Box left sidebar.

Let's take a look at a not atypical unit Info Box display:

Image

As you can see, the so-called "UpperIcons" -- the ones that show unit status -- indicate (top to bottom):

[*]Disrupted Status
[*]Unit is in LOS of enemy combat unit
[*]Unit is currently marked to "Save APs for Firing"
[*]Unit has spent APs to move this turn
[*]Unit has spent APs to fire this turn
[*]Fatigued Status

Below those, you can see the so-called "LowerIcons" -- the ones that show unit attributes and capabilities. Not much room left, is there?

Even if, for a multi-capable unit, we could fit all of the unit capability icons into the Info Box sidebar, as that unit's status changes (because moved, fired upon, disrupted, etc.), the unit status icons would crowd out (scroll down?) the unit capability icons.

A thorny problem. The adopted solution was to move the unit capability display to the Unit Handbook:

Image

In the Unit Handbook, circled in red, you will see:

[*]UNIT CAPABILITIES (a new category title, followed by a list of all special unit capabilities for the selected unit)
[*]UNIT DESCRIPTION (this new category title, followed by the usual descriptive unit text)

So, for example, if a unit is set to use the new XLayManyMines capability, under UNIT CAPABILITIES you would see: LayManyMines.

Note that in the unit Info Box (the rightmost green circle), the left sidebar is empty. That's because we no longer list unit capabilities there, only icons for unit status (e.g., moved, spotted, disrupted, etc.). (Since this screenshot was taken at scenario's beginning, the displayed units have no change in status to show yet.)

A happy consequence of this is that we might devise additional unit status icons to display in that now less crowded space.

We surely can no longer display unit capabilities in the traditional way as graphical icons in the unit Info Box left sidebar. There are way, way too many of them!

What about so-called "Command Post" units, company-command platoons, if the Command Control optional rule is selected?

Image

In the green circles, you see two infantry units. The top unit, the Rifle Platoon 42, is a Command Post unit, with a CP icon at the top of its Info Box left sidebar. (The Info Box here is an image overlay, of course.) Since neither of these units have taken any action yet, they have no status icons displayed.

In the red circles, you see two armored units. The bottom unit, the M4A1 Shermans, is a Command Post unit, with a CP icon at the top of its Info Box left sidebar. Since both armored units have moved, and been spotted, in addition they show the two status icons indicated.

(Since I had hit the Q hot key, all headQuarter units are outlined in red.)

In the code, I have this:

// for company-level "Command Post" units, draw the CP icon, if the Command Control optional rule applies;
// this is the only former "lower icon" that now gets shown in the "upper icon" display

I don't know about you, but it helps me to display the "radio" CP icon so prominently. At the top of the unit Info Box left sidebar, it's easier to see that way.

Are any of these improvements earth shattering, game changers? No. But little by little, feature by feature, bug fix by bug fix (yes, there have been bug fixes too) -- the totality of our fixes and changes might amount to something.

Until the next time ...
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
scottintacoma
Posts: 192
Joined: Fri Jan 25, 2008 1:15 am

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by scottintacoma »

Cool changes. I am more likely to use the status than Capabilites most of the time, and being able to tell the command unit still is a great idea.

Now for a question. When selecting a secenario, campain, or reopening one, you need to click on the arrows to move the selection up or down. What about adding the capability to click on the secenario, ect, and using the scoll or at least up and down arrows to move the screen to show additional choices.
User avatar
budd
Posts: 3070
Joined: Sat Jul 04, 2009 3:16 pm
Location: Tacoma

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by budd »

This is all great sounding stuff, thx for doing this berto. I read all the coder diaries and cant wait for this to come out. It's been so long since i loaded the game up i have to ask a question. Is there something to click on screen when a unit is selected to take you right too that units description in the handbook? Could something click=able be added to the unit info box[i know you mentioned lack of room, maybe something small]to take you to that units info in the handbook? Maybe something is already there and i forgot about it. thx again.
Enjoy when you can, and endure when you must. ~Johann Wolfgang von Goethe

"Be Yourself; Everyone else is already taken" ~Oscar Wilde

*I'm in the Wargamer middle ground*
I don't buy all the wargames I want, I just buy more than I need.
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by berto »

ORIGINAL: **budd**

Is there something to click on screen when a unit is selected to take you right too that units description in the handbook? Could something click=able be added to the unit info box[i know you mentioned lack of room, maybe something small]to take you to that units info in the handbook?
It's on the to-do list, but been back-burnered for now.

In general, we want to have every game function to be selectable by both (a) hot key and (b) toolbar (or other) button (on-screen control).

We want to support both playing styles. Different strokes for different folks. [:)]
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by berto »

ORIGINAL: scottgibson

When selecting a secenario, campain, or reopening one, you need to click on the arrows to move the selection up or down. What about adding the capability to click on the secenario, ect, and using the scoll or at least up and down arrows to move the screen to show additional choices.
Another item on the to-do/wish list. As much as possible, we want to modernize the UI in every aspect. (Some modernizations may be longer term, not doable in near-term updates.)

If you didn't know: The front-end game/editor launcher was a separate Talonsoft add-on. It stands apart from the game engine and editors. As such, it is coded differently, and presents unique challenges to update. But we'll try.
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
junk2drive
Posts: 12856
Joined: Thu Jun 27, 2002 7:27 am
Location: Arizona West Coast

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by junk2drive »

It is a minor annoyance for me to finger the F2 key but I can not remember most of the little icons meanings anyway. Having a list is much better. Awesome would be clickable words that open a description panel or at least a tool tip.

I would be willing to help with such tasks as typing or copy/paste or compiling a doc to support these types of features.
Conflict of Heroes "Most games are like checkers or chess and some have dice and cards involved too. This game plays like checkers but you think like chess and the dice and cards can change everything in real time."
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by berto »

ORIGINAL: berto

Let's take a look at a not atypical unit Info Box display:

Image
I considered enlarging the Info Box, by for example widening it and adding a right sidebar for displaying unit attributes/capabilities. (Still not a good idea, because there are so many different unit capabilities/attributes: still not enough room to display them all; and it's difficult to impossible to convey complicated capabilities/attributes by means of itty-bitty little icons -- better to use words, as in the text-mode Unit Handbook.)

But it's not so simple. (Is life ever simple? [8|]) It's not so much a coding problem as it's a graphics issue.

Changing the Info Box entails changing many .bmp files for many nations across many games. Similarly for the Unit Handbook and other .bmp's.

Moreover, if we want to add new labels to the Unit Handbook, we don't have access to the original graphics fonts. So we would either have to redo all dialog box labels with entirely new fonts; or we would have to kludge together, fake the fonts somehow.

If I could turn back the clock; if I had access to all the tools and data that John Tiller had; if I could start over and re-build this game from scratch (a huge if, that one); if I had perfect foresight -- I would have done some things quite differently.

But you work with what you have. You resign yourself to accepting certain constraints (among them: old-time players dislike overly radical change).

We do the best we can.
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by berto »

ORIGINAL: junk2drive

Awesome would be clickable words that open a description panel or at least a tool tip.
Yes, it would be awesome.

Tooltips? They're on the to-do/wish list, but we want to use them judiciously and tastefully.
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
R_TEAM
Posts: 178
Joined: Fri Aug 03, 2007 9:37 am
Location: Germany

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by R_TEAM »

Hi,

nice work :)
But i would from time to time or to compare unit capabilities/attributes like to have the icons on the info box ...
I know - to less space ... but i suggest an other way ->
Make the Left info bar clickable, like the buttom info bar with the info for Action/strenght/moral in diff colors.
If you click on the left bar space, the info change from capabilities/attributes icons (who have now, alone enough room) to unit status icons alone ... so you have the right info every time on screen ...

Regards
R-TEAM
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by berto »


Look at the dozens and dozens of unit attributes and capabilities. Many units have more than the eight or so icons that might fit in that limited sidebar space.

As they say, a picture is worth a thousand words. Except in this case, where it is easier to just see the unit capabilities spelled out in words (in the Unit Handbook) than to remember the meaning of dozens and dozens of obscure little icons. Until lately, the code was programmed -- and icons had been devised -- to display just a small fraction of those dozens and dozens of unit attributes/capabilities. Even with that small subset, oftentimes I couldn't remember what this or that little icon signified by its appearance alone.

Finally, every time we add a unit attribute/capability, we would have to edit icon .bmp files across several games -- icon .bmp files that might have been developed in unison, but they were not, so we would need customized code to handle each game's individualized icon .bmp file as a special case.. A Royal PITA.

All things considered, I adopted the best solution, I think. Certainly, a neat, tidy & easy solution. And it's logical to list unit attributes/capabilities in the Unit Handbook, no?

I do still need to add a clickable graphic control to summon the Unit Handbook, though. And tooltips are another possibility under serious consideration.
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
Crossroads
Posts: 17498
Joined: Sun Jul 05, 2009 8:57 am

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by Crossroads »

I had to reinstall JTCS a couple of times as I was having some serious issues with my old rig. It sort of reminded what JTCS looks out of the box, and there was several options I needed to set on to get to my favourite look and feel of the game.

I believe we can improve that experience as well so that anyone new to the system won't be overwhelmed from the very beginning.

I think all the "helpers" should be ON in the beginning, and can then be switched off by experienced players.

Menu ON, to begin with :)

Unit bases ON, Highlight Organization ON, Ask before advancing to Next Turn ON. Map Names ON.

Animations on high enough speed for both Human and Computer player so the game will not behave in slow mo.

Anything to make it as friendly and intuitive from the word go as possible...

You guys can probably add more I am sure
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < Available now
CS: Middle East 1948-1985 2.0 < 3.0 In the works
User avatar
wings7
Posts: 4586
Joined: Mon Aug 11, 2003 4:59 am
Location: Phoenix, Arizona

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by wings7 »

Great work berto! I especially like the new hex-only TEM & Morale modifiers to the Info Box display and the new Commando capability! We are in great hands with berto at the helm. [&o] The new Campaign Series just keeps getting better and better [:D]...I'm sure Jason is tickled pink also!

Patrick
Please come and join and befriend me at the great Steam portal! There are quite a few Matrix/Slitherine players on Steam! My member page: http://steamcommunity.com/profiles/76561197988402427
User avatar
Jason Petho
Posts: 16629
Joined: Tue Jun 22, 2004 10:31 am
Location: Terrace, BC, Canada
Contact:

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by Jason Petho »

I'm sure Jason is tickled pink also!

Understatement of the decade, definitely!

Jason Petho
User avatar
wings7
Posts: 4586
Joined: Mon Aug 11, 2003 4:59 am
Location: Phoenix, Arizona

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by wings7 »

ORIGINAL: Jason Petho
I'm sure Jason is tickled pink also!

Understatement of the decade, definitely!

Jason Petho

Jason, I should mention that without all your hard work and valuable efforts on the Campaign Series we really would never have had this fantastic updated Talonsoft (and John Tiller!) series of games! We are also in great hands with YOU at the helm! [&o]

Patrick
Please come and join and befriend me at the great Steam portal! There are quite a few Matrix/Slitherine players on Steam! My member page: http://steamcommunity.com/profiles/76561197988402427
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by berto »


Right. Let's please all remember that Jason mans the helm.
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
junk2drive
Posts: 12856
Joined: Thu Jun 27, 2002 7:27 am
Location: Arizona West Coast

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by junk2drive »

In the green circles, you see two infantry units. The top unit, the Rifle Platoon 42, is a Command Post unit, with a CP icon at the top of its Info Box left sidebar. (The Info Box here is an image overlay, of course.) Since neither of these units have taken any action yet, they have no status icons displayed.

In the red circles, you see two armored units. The bottom unit, the M4A1 Shermans, is a Command Post unit, with a CP icon at the top of its Info Box left sidebar. Since both armored units have moved, and been spotted, in addition they show the two status icons indicated.

(Since I had hit the Q hot key, all headQuarter units are outlined in red.)

In the code, I have this:


--------------------------------------------------------------------------------

// for company-level "Command Post" units, draw the CP icon, if the Command Control optional rule applies;
// this is the only former "lower icon" that now gets shown in the "upper icon" display


--------------------------------------------------------------------------------

I don't know about you, but it helps me to display the "radio" CP icon so prominently. At the top of the unit Info Box left sidebar, it's easier to see that way.

Seeing the Diary #9 shots with the tool bar I was fearing that these were gone. Glad I found this reassurance. I like them too.
Conflict of Heroes "Most games are like checkers or chess and some have dice and cards involved too. This game plays like checkers but you think like chess and the dice and cards can change everything in real time."
User avatar
junk2drive
Posts: 12856
Joined: Thu Jun 27, 2002 7:27 am
Location: Arizona West Coast

RE: Coder Diary #7 -- Morale Modifiers, Unit Capabilities, and More

Post by junk2drive »

bump 7
Conflict of Heroes "Most games are like checkers or chess and some have dice and cards involved too. This game plays like checkers but you think like chess and the dice and cards can change everything in real time."
Post Reply

Return to “John Tiller's Campaign Series”