AWI scenario with ToT and Lua

civ2units

Emperor
Joined
Feb 1, 2009
Messages
1,187
Location
Somewhere in nowhere
Playing Techumseh's 1937 scenario gave me a push to update my AWI scenario which I've finished years ago. For this I will stop the work for the Spanish War of Succession project which is still a giant project.
The AWI scenario will be much easier to complete and hopefully doesn't take too much time.


The first version was realized without Lua, the new version should use much of Lua's potential as possible. My goal is to create a strategic scenario like the WW2 masterpieces of @techumseh, @tootall_2012 and @JPetroski.
Currently we have a lack of strategic scenarios covering 18th century warfare and AWI should fill at least a part of this lack.


AWI will only be playable as the British Empire. Focusing on only one playable civ makes the design process much more easier.
Technology research and city management doesn't play a major role. Unit recruitment will be reduced to only a few ones. Every British leader like Cornwallis or Howe will get his own army. You will have two or maybe three chances to get more reinforcements via events or pressing a certain key. I would also like to use the mercenary system I'm currently using in Age of Reformation which will allow you to hire Hessian troops.

Techumseh using in his 1937 scenarios functions like units can only make two attacks per turn and every attacks costs money from the treasury. Artillery units only damage enemy units, mostly don't kill them. These are functions I would like to use in AWI too if @techumseh allows me.

Currently the design process is on a very early stage.
 
The website British Battles has a detailed list including most of the units who participated during the major battles of the Revolutionary War. I've used Fairline's units he posted some time ago as template and create the regimental units according British Battles. The uniforms are mostly from uniform plates I found in the internet, sources are Osprey, Knötel and plates from other books/pdfs.

In AWI the following four commanders including their armies will be available:
- William Howe will be availabe at the start of the scenario, located in New York
- Charles Cornwallis and Henry Clinton will be available by a choose driven event at the start of the scenario. The player has to choose between them
Cornwallis will be spawned in New York while Clinton's army will be available near Charleston.
- John Burgoyne will be spawned via event if certain cities are under control of the Brits or their allies until October 1777
- Banastre Tarleton and his Legion can be spawned by researching a certain technology.
British_Armies.png


These units are not buildable except the Royal Artillery Regt.. Of course there will be more available than only one unit of each regiment. A good balance between spawned units and difficult of the scenario will be a challenge for sure.
Within the colonies the Brits can build Loyalist militias. They are not strong but therefor cheap.
 
The website British Battles has a detailed list including most of the units who participated during the major battles of the Revolutionary War. I've used Fairline's units he posted some time ago as template and create the regimental units according British Battles. The uniforms are mostly from uniform plates I found in the internet, sources are Osprey, Knötel and plates from other books/pdfs.

In AWI the following four commanders including their armies will be available:
- William Howe will be availabe at the start of the scenario, located in New York
- Charles Cornwallis and Henry Clinton will be available by a choose driven event at the start of the scenario. The player has to choose between them
Cornwallis will be spawned in New York while Clinton's army will be available near Charleston.
- John Burgoyne will be spawned via event if certain cities are under control of the Brits or their allies until October 1777
- Banastre Tarleton and his Legion can be spawned by researching a certain technology.


These units are not buildable except the Royal Artillery Regt.. Of course there will be more available than only one unit of each regiment. A good balance between spawned units and difficult of the scenario will be a challenge for sure.
Within the colonies the Brits can build Loyalist militias. They are not strong but therefor cheap.
I like the mods - especialy the regimental flags - a lot. As constructive criticism I'd not use the Seven Years War style tricorne hat on the centre company infantry as this had been totally replaced with the Prussian-style hat which had almost become a bicorne with a far less pronounced front 'corner'. Also, the muskets are a bit short on the regular infantry. I've included both adjustments on some tweaks of my old units below, with a couple of variations of hat and a tweaked grenadier cap to look more appropriate for the AWI. Last point is that I think the whole of Burgoyne's centre company infantry in the Saratoga campaign wore either shotened coatees or 'round' waistcoat-style jackets cut down from their old uniforms as they didn't receive new issue uniforms; similarly all the infantry tricorne hats were cut and reformed into light-infantry style caps. This was also the case for the appearance of a lot of the troops in the later Southern campaigns, together with tricornes turned into slouch hats. In both cases gaitered-overalls had largely replaced breeches and socks.

AWI brit inf.png
 
Many thanks @Fairline:)

I didn't know that the tricorne looked different from those of the Seven Years War. Good to know, I've updated the units and gave them the hats you are using in the attached AWI units examples.
I`ve also made changes on the units of Burgoyne's army as well as the units from the Southern theater according to you discription.
 
For the AWI scenario I'm using so called 'leader' units like Charles Cornwallis or William Howe. These units will give certain ground units, who shares a square with the leader unit, a certain attack bonus.
In parameter.lua I can set the bonus, in combatSettings I can define if the leader unit give an attack or defence bonus.

But what does it mean, when I, for example, give Charles Cornwallis an attack bonus of 2 for each grenadier unit who shares a square with him?
Will be the attack value of the grenadier unit doubled for example from 8 to 16?
 
But what does it mean, when I, for example, give Charles Cornwallis an attack bonus of 2 for each grenadier unit who shares a square with him?
Will be the attack value of the grenadier unit doubled for example from 8 to 16?
Here's the relevant code in the computeCombatStatistics function in combatSettings.lua for Charles Cornwallis:
Code:
-- Charles Cornwallis
if traits.hasTrait(attacker.type,"Cornwallis") and gen.unitTypeOnTile(attacker.location,object.uCharlesCornwallis) then
    combatModifierOverride.aCustomMult = param.CornwallisBonus*combatModifierOverride.aCustomMult
end
This if statement will activate only once, for a unit with the "Cornwallis" type, whether there is 1 Cornwallis unit on the tile or 20, doubling that unit's attack value. Note that Cornwallis himself doesn't get an attack bonus for sharing squares with units with the "Cornwallis" type.

You may find it more convenient to use the file registerCombatModifiers.lua (and possibly leaderBonusSettings.lua) to define your bonuses. I know the documentation at the top of these files is intimidating, but there are a number of simple examples at the end of registerCombatModifiers.lua which will probably be sufficient for your needs.
 
The codes on registerCombatModifiers.lua meets my requirements (easy to handle) :D
Cornwallis for example giving grenadier units who shares a square with him an attack bonus of +8, so the grenadier has a total attack value of 16 (8+8 (Cornwallis bonus))

However, when I make an attack with two grenadier units (one with Cornwallis bonus, the another without) I don't see a real different. Both units suffering the same damage. The code itself working fine, the console shows me the correct values. Do I have to change any values on leaderBonusSettings.lua too?
 
However, when I make an attack with two grenadier units (one with Cornwallis bonus, the another without) I don't see a real different. Both units suffering the same damage. The code itself working fine, the console shows me the correct values. Do I have to change any values on leaderBonusSettings.lua too?
You need to use leaderBonusSettings.lua if you want only one leader to give a bonus at a time to units. From what I understand about your code, however, each unit only has one leader unit they can get a bonus from anyway, so it shouldn't matter. The text box popup gives the attack/defence values supplied to the game, so they are the true final values. Perhaps you just got unlucky that the damage was similar. Or, did you attack a unit that already had low defence?

I also noticed this code
Code:
-- William Howe gives British Artillery units an additional attack bonus of +4
combatMod.registerCombatModificationRule({
    attacker = "Howe",
    attackerDetail = object.uWilliamHowe,
    defender = object.uFlandersGrenadierRegt,
    aCustomAdd = 20,
    dCustomAdd = -4,
    
})
This probably doesn't do what you want it to do. This bonus/penalty will only happen when a "Howe" trait unit, stacked with William Howe, attacks a Flanders Grenadier Regt, at which point the attacker will get +20, and the defender will get -4.
 
Ok, then the code makes exactly what I would like to have. The leader unit should give a certain trait unit a bonus if they both share the same square.
The code with the Flanders Grenadiers was a test to see how the code works and what values I can use. I think I have to play a little bit around with it to find the best settings.
 
Back
Top Bottom