[BNW] "Napoleon at War - The Battlefields Expansion" Collaboration Thread

sman1975

Emperor
Joined
Aug 27, 2016
Messages
1,376
Location
Dallas, TX
This thread is a collaboration area to exchange ideas, thoughts, issues, etc., concerning the development of this new mod.

The intent of the NAW-BE is to totally replace the AI and develop a new version with more capable "Battle Management" abilities.

More info TBD...
 
Stream of Counsciousness Notes - capturing design thoughts early on to aid in coding. These should change early and often...


upload_2018-2-9_15-59-17.jpeg upload_2018-2-9_15-53-56.jpeg upload_2018-2-9_15-54-1.jpeg upload_2018-2-9_15-54-5.jpeg upload_2018-2-9_15-54-10.jpeg


Right now, here's what works in Part A (Generic AI Battle Manager) - Start of Game
#1: The mod is making set up adjustments, but many more needed
#2: Several of the promotions, database adjustments, etc. are in place and working
#3: Mod determines who is attacker/defender
#4: Mod is selecting the Battle Plan for attacker and defender, based on the overall force ratios, with a small random adjustment added to provide some variety - so the AI will use different battle plans on the same maps, within reason, of course

I've just started to work on the "During Game" functions - these are the heart of the mod, and obviously will take some time. Especially since there are several criteria that must be developed that will drive the code. For example, how often do we change Battle Plans, if at all? And so forth.
 
Last edited:
Hi Sman, a lot of food for thought ... I will add comments as I browse through, numerals correspond to your discussion papers.

1) I am assuming that what you mention here is basically the set up, e.g. supply logistics is "none" as this is a tactical scenario and we can asume the armies got there properly supplied, unless you want to use logistics as a "difficulty" element (i.e, try to win Waterloo having limited supplies that will last only 25 turns before restrictions kick in ...)
2) Again, set up of tactical scenario. I would not do the whole battle map visible, as visibility is one of the tactical elements used by generals (e.g. Wellington hides his troops in the terrain to complicate things for Napoleon's army). About ranged attack, reality is that the weapons used at the time did not have a very long reached (a few hundreds of meters); thinking in the scale of he map it would not be realistic to allow ranged for infantry. Furthermore, if you allow ranged for infantry then you would need to add much longer ranged distance to artillery, and eventually cavalry gets negated as most of it is sword/lance based.
3) Isn't attack/defend determined by the historical scenario itself? (e.g. Waterloo, Napoleón attacks, Wellington defends)
 
The notes are using my shortcut "QuAD" (quick and dirty) terminology - so I know it's probably a bit confusing. The notes deal with the game and LUA-related features that need adjusting - nothing to do with the greater reality of campaigns or geopolitics. My goal is to write a replacement AI that maneuvers and engages on a relatively small map for a limited number of terms. Most of my notes/discussions are related to figuring out what needs to be done and how to do it to accomplish this.

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

1. Yes, need to change the unit supply formula so Civ V Supply is no longer an issue in the game. It can't be disabled, so the basic formula needs revising to it no longer impacts game play. Adding a new concept of "supply" is pretty easy - say, if you're over X tiles away from a city, your combat strength is temporarily lowered, and things like that. But for 10 hour battles, perhaps supply isn't much of an issue. I'm much more interested in "healing rates" than supply - i.e. how many HP can a unit heal if it does nothing during a turn? There are many more of these normal game mechanics that need defining/redefining to better simulate a battlefield.

2a. The "map visibility" in question is the feature that removes the "fog" from the tiles. Completely for aesthetics. "Unit visibility" is an entirely different, unrelated issue. With "map visibility" removed, you can still see the terrain of the entire battlefield, but you won't see enemy units moving unless one of your units sees it. In the old NAW battlefield maps, a "tactical promotion" is added to all units that expands unit visibility a lot - somewhere like 10 tiles (instead of 2 for most normal game units). You still can't see the entire enemy army, but at least you can see about 5-10 times longer than you can shoot.

2.b. The proposed "ranged attack" is again an aesthetic issue. If you keep the melee units in melee attack only, the attack animation has them charging into the enemy tile and clubbing/shooting point-blank at each other in the same tile to resolve combat. In the Napoleonic Era, to me this just looks wrong. And since the tiles are now representing say 100 meters and not 100 miles, having a nice 1 tile gap, with ranged fire while in line (no clubbing) between the sides just looked more correct to me. Even if the range is only 1 tile, at least they'll fire in formation and not rush in with clubs.

2b1. Also, the artillery ranges in the NAW tactical maps was increased, to 4 or more tiles, I think. If you stay with 1 UPT, then the arty stands behind the infantry. With a range of 2 the arty can only engage the unit directly adjacent to its screening infantry. That just seems insufficient to me.

2b2. Cav makes up for its lack of range with speed. They should still have a move of 4-7, which in the battlefield's scale is quite an advantage, especially if they can move after combat - which they all should probably.

3. Attacker/Defender - in terms of this situation (my notes) - think more in terms of "who has the initiative at that moment/game turn?" In historical sense, who is attacking and who is defending is dictated more by the geopolitical and strategic picture. In this mod's terms, the replacement AI has to determine what a maneuver/engagement plan should be assigned to each team. This battle plan is then used by each unit each turn to decide - am I in the right tile or should I move? If I need to move, what direction should I move in? Should I/can I attack? etc. The process used to answer these few questions is the heart and soul of the new AI.

So, how does the AI decide what the big battle plan should be? Historically, in quite a lot of battles, decisions were made on the fly based on what units showed up at what time - no matter what the broader plan might have been. Maybe team A was the attacker in the historical sense, but if units they'd planned to launch the attack at H-Hour didn't show up (Herr Bluecher?) they changed their plan, and decided to stand by until more forces arrived.

For simplicity sake, I'm using force ratios, with some minor random allowance to provide variability. If the AI chooses battle plans solely based on ratio, you'll get the same basic game every time you play it. So a bit of variety is a good thing for replayability's sake.

I'm tentatively planning to have the mod examine the situation several times during the game to decide if that battle plan needs changing - for example, because of changes to force ratios. Say the French have a 2:1 advantage in numbers at game start so they decide to press the issue and launch the attack. They get mauled. After a few turns of fighting the ratio is now 1:1 or even less. In this situation, it would be unrealistic to expect the French AI to keep pressing the attack. More likely, they'd pull back, reconstitute the line, and prepare for a counter-attack. And if reinforcements arrive a few turns later, the force ratios change again, and they should have the option to relaunch the counter-counter-attack.

So "attacker" and "defender" are terms that would change meaning several times in a battle. The big questions are things like these: how often is this re-evaluation made, what criteria are used to change battle plans, etc? My current assumptions envision a 20-30 turn game, with a re-evaluation about every 5 turns, using force ratios (with a minor random adjustment) to decide whether to change the battle plan or not.

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

The thing to remember is I'm trying to write an AI replacement that will be able to look at any map loaded - and based on some rules - decide how each team should best fight the map. The AI must make these decisions solely based on the data it sees in the map file. There is no way (well, more on that later) to pass information to the mod to help it decide how to play it. Otherwise, we have the same situation with the current NAW tactical maps - each time you add a new map, you need to write a controlling function on how the AI should fight the map, then rebuild/republish the entire mod. If you want to add 1 map a year, no problem. If you want to add 10, or experiment with a different map, it's more of a problem.

I have some thoughts, but need to test more, about how to pass at least some information to the mod from the map file, using the "Description" of the map in WorldBuilder. The types of data I'd like to pass in are things like each team's objectives in the map, maybe High-Value Targets, and of course, reinforcements. I think I can get that working OK, but it's quite low on the priority right now. Way too much more important work in front of that.

EDIT: one thing I'm seeing in the development - there are times when both sides may want to attack using offensive Battle Plans. Will adjust some of this in the notes to reflect that. So, there really won't be an "attacker" or "defender" ROLE, it will be a team using either attacking or defending battle plans, based on whatever criteria we develop to drive that.
 
Last edited:
Back
Top Bottom