Post news RSS Research and Development: Scripting

Research and Development: Scripting, all info regarding scripting

Posted by on

Please help with the following scripts

17.---PORTUGUESE EXPANSION
-Would like to have the Portugal AI have a strong bias towards capturing regions on the coast with the spice or textiles resource, mostly ignore taking non-coastal regions at least for most of the game

16.---RAJPUTS
-Should always sally forth after a few turns rather than surrender
-most of civilian population should commit suicide/jandaur if sallying army is destroyed

15.---ATTRITION SCRIPT
-all factions need to take attrition in snowy north
-besieging should have chance to cause attrition/disease on both sides

14.---UNIFIED ARMY TRAIT=MORALE BONUS
-make a list of muslim/christian/hindu/buddhist/pagan units, if over 75% of army is same religion then increase morale of army

13.----VETERAN TRAIT=MOVEMENT INCREASE
=If most of army has silver or gold chevrons or knight attribute, then generl gets "Veteran Army" trait, gives increase in morale, also gives 15% movement increase, increase in authority/personal security, decrease rebel activity

12.----TRAITS FOR ALL AGENTS
-All spies should start with trait that gives increase army movement/sight/personal security of general at higher levels,,, Priests should inspire army, etc

11.----LARGE EMPIRE SCRIPT
=If faction owns over a certain number of regions/troops/navy then faction leader gains authority, but settlements gain corruption income losses

10. ---LARGE ARTILLERY Trait
-Siege guns and other non-light artillery will need to give trait that slows campaign map movement

9.---ARMY MOVEMENT
-larger armies should get slight movement penalty

2.---ELEPHANT ARMY SCRIPT
-Elephant armies get increased upkeep in urban areas/northern areas/desert areas
-Elephants need to move slower on campaign map then cav
-Elephants need to be frightened by fire arrows more

3.Can we make cav/camels/elephants cost more or less upkeep depending on whether they are in a good horse breeding area/desert area/jungle area?

4.Can we spawn a fort via script?

5. Can we make elephants able to knock down pallisades and small wooden wall gates?

7. Any way to script name change for character when/if they become ruler?

8. Is it possible to have a much higher campaign map movement penalty for river crossings and diff ground types

(ANSWERED)

1. Is it possible to have rain affect gunpowder/turk bow users more negatively than indian longbow users? Or would that even be historically accurate? I've read the indian longbow needed to be braced on the ground, and mud would make that difficult

6.Can we make battle maps bigger

Comments  (0 - 50 of 57)
lionheartofengland
lionheartofengland

Twcenter.net

apparently its possible to move the red lines a bit more further back to make a giant battle map.

Youtube.com
how to make maps

Reply Good karma Bad karma+2 votes
KingKorgoth Author
KingKorgoth

lionheartofengland Right On!

Reply Good karma+1 vote
lionheartofengland
lionheartofengland

Twcenter.net

faction leader title change

Reply Good karma Bad karma+2 votes
lionheartofengland
lionheartofengland

has anyone used this before?
Wiki.twcenter.net
the maker says it can be used and doesnt need his permission

Reply Good karma Bad karma+2 votes
KingKorgoth Author
KingKorgoth

lionheartofengland Cool! I hadn't seen that I'll check it out

Reply Good karma+1 vote
KrishnaCN
KrishnaCN

Twcenter.net(WIP)-environment-and-weather-mod-extra-blood

This is the twcenter mod page

Like Lionheart mentioned before ....nice find dude

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

1)I would presume the effect of rain on gunpowder would be dynamic than fixed....for e.g not all generals suffered in the artillery dept because of rain...robert Clive took proper care and shielded his gunpowder from rain in a battle against the natives who in contrast handled it haphazardly

I would say we create some advance military school in fort settlements....whereupon the generals once they move into the settlement they acquire a certain ancillary like say for e,g "secure gunpowder caches" in this particular context

Any general who acquires this ancillary should be able to handle artillery even in rain...

Reply Good karma Bad karma+1 vote
huzurat
huzurat

KingKorgoth

2.Can we make elephants move slower than cav on campaign map?

The game sees elephants as cavalry. So no, I don't think. A hypothetical work around can be to edit elephant units and put them under infantry 'category' in export_descr_unit. But how will it affect the unit in other areas, of that I'm not sure. This will reduce the movement range of stacks with elephants compared to cavalry stacks. Further we can also go to descr_campaign_db and give a slight decrease to the infantry movement points. Also since the supply system gives advantage to a cavalry army when it comes to supplies, the elephants (now categorized as infantry) will not get these benefits.

3.Can we make cav/camels/elephants cost more or less upkeep depending on whether they are in a good horse breeding area/desert area/jungle area?

Not really. But there is a work around: simply make 2 copies of the same unit. One for horse based factions and another for non-horse based factions. Example: Bengal Sultanate's variant of generic Indian cavalry will be more expensive than say Delhi Sultanate's variant.


Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

Just a suggestion.....
KingKorgoth

Let us make the use of artillery early on in the campaign more decisive and deadly.....but let it come with its own problems...let us have some elephant horse and oxen logistic buildings in settlements.....let these give some ancillaries like labour force.....this can increase the movement range of armies with artillery.....while those without come with movement penalties.....is this possible ???.....more than elephants...artillery would slowdown these armies....since many of these kingdoms fielded several hundred artillery pieces in battle....

Reply Good karma Bad karma+2 votes
huzurat
huzurat

KrishCN

Do you think it is possible to make light artillery (ones used by Babur) to be categorized as infantry and thus made lighter through export_descr_units?

I think we should try to make a clear difference between light and heavy artillery.

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

Dude I have no clue about the technicalities XD... The only thing I can mod is export_descr units file XD

I only know the trends of warfare in these times

Reply Good karma Bad karma+1 vote
huzurat
huzurat

What I meant was that there are 2 files that we can edit regarding speed of infantry, artillery and the cavalry.

In the descr_campaign_db file we can edit movement points for cavalry, artillery and the infantry separately.

However, the labels of 'Cavalry', 'Infantry' and 'Siege' (artillery included) are there in export_descr_units file. So if I edit that 'category' section of an artillery unit from 'Siege' to 'Infantry', that would mean that the game would apply infantry effects on it as far as campaign map movement speed is concerned. So my idea being that we slow 'Siege' unit's movement speed (in the campaign) while putting the light artillery under 'Infantry' category. It won't affect your battle, just its categorization on the campaign map. Thus, your light artillery will be significantly different to your regular artillery in terms of speed.

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

huzurat
Yes light artillery should come under infantry....it makes sense....u wouldn't want to see sophisticated light guns travelling at an elephant's pace.....these lighter guns could easily keep up with the army

Reply Good karma Bad karma+1 vote
huzurat
huzurat

KingKorgoth
KrishCN

Campaign Movement Speed: Between Infantry, Artillery and Cavalry

Some suggestions:

1. I propose a general reduction in Infantry and Artillery movement points
through descr_campaign_db.

2. Large armies (irrespective of cavalry or infantry) will receive a movement
point penalty in the form of a Trait. This will be minor if it is just all
cavalry.

3. Factional traits applying to cavalry based factions (especially the hardy
ones) such as Mughals, Sher Shah Suri, Mewar, Marwar and Ahmednagar. The
bonus will allow them to avoid any penalty for large cavalry armies as
pointed in earlier point. The cavalry based factions should have better
horse logistics management.

4. European factions will have a massive infantry and artillery edge over
natives as far as movement points is concerned. Meaning to counter act
the reduced movement speed of the infantry, the European generals will
universally receive a trait bonus of + movement points if they have
infantry unit with them. This bonus will still keep them slower than
all cavalry armies, but will ensure that they remain faster than the
native infantry armies.

5. Light infantry based factions such as those of Calicut (Samudrin) and
Mysore will have infantry speed bonus in the form of factional trait
similar to that of the Europeans, though less.

6. Those native powers wanting to match their infantry efficiency with the
Europeans must build trade posts, mercenary posts or similar special
buildings to then have European experts train their infantrymen and
artillery men. Thus, if a native general stays in a city with such
a building, he'll gain an ancillary 'Firangi Sergeant' with movement
bonus if there is an infantry component in the army. Also other bonuses
to infantry in combat.

Reply Good karma Bad karma+2 votes
KrishnaCN
KrishnaCN

huzurat

These are fine....wow i didn't know they were faster than native Infantries

Reply Good karma Bad karma+1 vote
huzurat
huzurat

Marching drill made all the difference. Even your Pashtun infantry contingent, though better mountaineers will fall behind a Prussian Regiment in the long run.
Gustavus Adolpjus and Marshal Turrene in the early and mid 17th century could march 20 miles regularly with their infantry and baggage. Later Fredrick the Great of Prussia regularly achieved the speed of 20-25 miles with his infantry. Napoleon in Ulm campaign marched with infantry, artillery and baggage amounting to a total of 200000 troops at the speed of 20 miles per day (unheard of with such numbers and baggage). The American Civil War General 'Stonewall' Jackson could march 35-40 miles with his infantry, getting the his Division the moniker of 'Jackson's Foot Cavalry'.

Compare that Aurangzeb's Mughal artillery and infantry moving less than 10 miles per day. In fact often Mughal armies had to detach their cavalry alone for active expeditions while their cumbersome and untrained artillery and infantry simply remained in camp. Mughal cavalry though could still make fast maneuvers, faster than European cavalries, for example when they pursued Netaji Palkar in a running battle over 40 miles for 2 continuous days. Netaji Palkar escape after a desperate forced march through the night (crossing 60 miles in 24 hrs).

Western method of scientific war had made massive

Reply Good karma Bad karma+1 vote
KingKorgoth Author
KingKorgoth

huzurat These are great ideas! and using traits should make them pretty easy to implement, I'll start working on them
A question though, I haven't done much research into it but when I've check twcenter people were saying that it isn't possible to edit movement rates based on different terrain types/river crossings, do you know if it is?

Reply Good karma+1 vote
huzurat
huzurat

KingKorgoth

For the battle map movement speed, you've got the file descr_battle_map_movement_modifiers.

You can adjust terrain effects on units on the battle map further in export_descr_units file.

The Campaign map is a different story.

Maybe not on terrain basis. But what about region/province basis via traits?

Say there is a massive movement points and morale penalty for armies beyond a certain size in provinces near Afghanistan's Khyber and Suleiman ranges, Rajputana's Thar Desert and Aravalli ranges, Deccan's Sahyadri ranges, Kerala's backwaters and Bengal and Assam's Brahmaputra basin.

Now is there a condition in the game system where being in a particular region can be ascertained by the system to then be assigned trigger?

So if in Kerala region you have a cavalry army say over 5 units, your army will receive movement and morale penalties.

I'll look into the conditions and triggers for this and let you know.

Reply Good karma Bad karma+1 vote
huzurat
huzurat

KingKorgoth
KrishCN

Historical Reasons for these suggestions.


During the 16th century, Army speeds across the world varied greatly. A French Cavalry could not ride over 20-30 miles per day, however, Spanish Jinetes and Albanian Stradiots regularly rode 40 miles per day.

Genghis Khan is said to have covered some 80-100 miles through the desert in his Khwarzmian campaign, keeping 3 horses per rider. Mongol invasion of Eastern Europe saw them cover 60 miles per day for 3-4 days straight. Timur is said to have marched 40-50 miles on an average in Iranian campaign. Nader Shah's cavalry without any baggage could make a dash of 60 miles for 2 days continuous, though when joined by infantry and artillery, it was no more than 20-25 miles. Babur in his younger days managed 70 mile forced rapid marches in his struggle for Samarkand.

In India too such disparity existed. An average Indo-Gangetic army (Delhi to Bengal) or ones in deep South and East could not march over 10-20 miles at the most. Even their cavalry contingents marched at maximum of 20-25 miles (owing to poor breed of horses). Only places like Punjab, Sindh, Rajputana and the Deccan were exceptions to this rule, due to good horse breed areas.

The highest continued speed recorded in India comes from early 19th century British sources, referring to the Maratha warlord Jaswant Rao Holkar covering 75 miles in a day, another example comes from Lord Viscount Lake leading his native light cavalry in a 72 mile dash against the same Holkar. These are extreme marches that could not have been sustained over 3-4 days. Average speed of Holkar's predatory horse was anywhere from 40-60 miles per day. Maratha armies are said to have maintained an average speed 40-50 miles for weeks.

Apart from this, the most well recorded account is of Akbar's dash to Gujarat against a rebellion, he is said to have ridden some 50 miles per day, alternating between a horse and camel, leading some 3000-5000 cavalry. Shah Jahan, in his youth as Prince Khurram did manage 40 mile dashes in his Deccan campaigns, raiding Ahmednagar Sultanate.

Another example comes from Mewar, where Rana Sanga's impetuous elder brother Kanwar Prthviraj had said cover over a 100 miles (poetic license) to utterly surprise the Sultan of Malwa. The feat gave him the title of Udna Prithviraj (Winged Prithviraj), both in Rajput and Chronicles.

The above are recorded examples of either all cavalry forces or those of whom that were supplemented by mounted artillery (Nader Shah and British Lord Lake's example).
However, these miles and distances are completely changed once other components are included. For example; even one of the light infantry units such as Shivaji's Malve infantry used to manage less that 20-25 miles per day (A Napoleonic corp with artillery often bested this). The Pashtuns Rohillas under Najib ud Daula and Hafiz Rehmat Khan too never managed over 30 miles when accompanied by his Semi- Modernized Pashtun Infantry.

Hence we see a very clear trend of Indian infantry and artillery management being far inferior to European standards in terms of efficiency and siege. The lack of European drill in the infantry and handling of artillery meant that Indian armies marching with infantry and artillery were clumsy, and more often than not, never reached its destination on time. Lack of real integration in the combined arms of the Indian armies meant that even the normally quickest of commanders like Jaswant Rao Holkar could easily be caught out by Lord Lake, whenever encumbered with infantry and artillery.

I'll put the sources separately for the data.

Reply Good karma Bad karma+1 vote
huzurat
huzurat

KingKorgoth

Sure will share that campaign script.

I'm using a Westeros Total War sub mod as my experiment sample. Since they already have full armies and populated cities. I can share whatever campaign script or set of codes and triggers you require. Please notify me here as to what you require since I could not find your earlier comments location and its context.

I can paste the specific script or trigger as in when you require. And if nothing works I'll post the entire think by google drive.

Reply Good karma Bad karma+2 votes
KingKorgoth Author
KingKorgoth

huzurat
A little more then half way down this page, you commented on the pillaging/resupply script for cavalry/and getting money for winning battles

Moddb.com

But any scripts you have that you think should be included, rn I just have the one you made to prevent cavalry armies from starving

Thanks!

Reply Good karma+1 vote
KrishnaCN
KrishnaCN

KingKorgoth huzurat
Guys regarding the time period discussion...is it possible to mod 3 turns per year....130 years is also fine....and then we can do either colonial period or 1657-1707 like huzurat said...

Reply Good karma Bad karma+2 votes
huzurat
huzurat

KrishCN
KingKorgoth

This can work.

Basically the pre-modern campaigning season was early September to June, while June to early September was the Monsoon period.

So if we can divide the year into 3 quarters; Jan-May, June-Sept and Sept-Dec, we can recreate a very accurate campaign experience. Further if we can somehowscript Movement penalties for the Monsoon season in Indian mainland, and Winter season penalties for Afghanistan region, then I seriously think this mod would probably be the closest thing to a digital simulation of 16th-18th century campaigning.

Great idea! Lets hope there's a implement this, I'll check and let both Korgoth and you know.

Reply Good karma Bad karma+2 votes
huzurat
huzurat

KingKorgoth
KrishCN

I don't think 3 turns per year is possible. Checked the threads. It seems the pattern goes like 12 TPY, 6 TPY, 4 TPY and 2 TPY. Nowhere did I find 3 TPY.

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

same here

Reply Good karma Bad karma+1 vote
KingKorgoth Author
KingKorgoth

KrishCN huzurat
I've wanted to include seasonal changes since the beginning but 1 turn of each would feel rushed, so I'm onboard with 3 turns a year I guess, though emergent factions like Sur Dynasty and the Nayaks would happen later, which is fine, but also 1519-1526 would be 21 turns, which would give the Delhi player a lot of time to build up an army that could easily crush Babur's army. So we could increase rebellions in Delhi areas, and they'll have a starting war with the Mewar Rajputs, but Delhi already has a good cavalry/archer roster that in the hands of the player would easily outmatch the Mughals with their small starting economy.
Babur won because he was a better general then Lodi and Lodi had a **** army, I'm not sure how to script that (other than adding traits to each character). Any thoughts?

It should work I think though. I have 12tpy for my Civil War mod, the events don't show up unless you script them in the campaign script, this is how the 1648 mod did it. I looked up on twcenter and they said (sometimes) an infinitely repeating decimal, like 1/3 turns=0.3333333, will make historical events not show up when they should

Twcenter.net

Reply Good karma+1 vote
huzurat
huzurat

KingKorgoth

Well as far as the challenge is concerned, there a few ways you can go;

Delhi Sultanate was in a crisis throughout the reign of Ibrahim Lodhi. He lost hold on both Gwalior and Mewati (region near Delhi, not to be confused with Mewar) at the start of his reign. Lost half the district of Agra alongwith other large districts of Bharatpur, Dholpur, Karauli etc to Rana Sanga. Lost hold over Jaunpur seat of the Delhi Sultanate right from his accession. If these crisis can be emulated in the mod, I don't think the Mughal player or ai will find Delhi insurmountable/ also considering Babur's vastly superior troops. Also Delhi being at war with the Raputs and having rebels around Gwalior will keep the Delhi player largely occupied before the Mughals show up.

Reply Good karma Bad karma+2 votes
KrishnaCN
KrishnaCN

Also huzurat u forgot he lost control of Punjab i.e areas ruled by daulat khan Lodi which are peshawar Rawalpindi and Lahore...

Reply Good karma Bad karma+1 vote
huzurat
huzurat

Correct, Babur had already made raids and conquests in Punjab before attacking Delhi proper.

Reply Good karma Bad karma+1 vote
huzurat
huzurat

KingKorgoth

Here's the script for campaign map pillaging. Paste this in your campaign script.

;- Pillaging Script

monitor_event GeneralDevastatesTile FactionType denmark
if I_LocalFaction denmark
console_command add_money denmark, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType milan
if I_LocalFaction milan
console_command add_money milan, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType scotland
if I_LocalFaction scotland
console_command add_money scotland, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType moors
if I_LocalFaction moors
console_command add_money moors, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType england
if I_LocalFaction england
console_command add_money england, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType france
if I_LocalFaction france
console_command add_money france, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType hre
if I_LocalFaction hre
console_command add_money hre, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType portugal
if I_LocalFaction portugal
console_command add_money portugal, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType spain
if I_LocalFaction spain
console_command add_money spain, 10000
historic_event pillage_evil
end_if
end_monitor

monitor_event GeneralDevastatesTile FactionType venice
if I_LocalFaction venice
console_command add_money venice, 10000
historic_event pillage_evil
end_if
end_monitor


Paste the the following in your historic_events file in your text folder
(data/text/historic_events)

{PILLAGE_EVIL_BODY}Your general has destroyed a part of your enemy's land, stealing the wealth of the local communities before scorching the earth. It is now time to move on to unspoiled territory!
{PILLAGE_EVIL_TITLE}Pillaged the Enemy's Land!
{PILLAGE_GOOD_BODY}Your general has set fire to this land in order to disrupt your enemy's supply lines. During the fire your army was fortunate enough to recover a cache that was left behind in the confusion.
{PILLAGE_GOOD_TITLE}Cache Discovered!

{PILLAGE_EVIL1_BODY}Your General has successfully raided and levied contributions from the enemy's subjects.
{PILLAGE_EVIL1_TITLE}Levied Contributions!

Reply Good karma Bad karma+2 votes
huzurat
huzurat

KingKorgoth

Do let me know if the script runs fine for you.

Reply Good karma Bad karma+2 votes
KingKorgoth Author
KingKorgoth

huzurat
The game loads fine with the script but yight now devastation isnt showing up on the map, I think i read it may have something to do with TPY, but i'll try to fix it

Reply Good karma+1 vote
huzurat
huzurat

You mean the message is not showing? Or the devastation effect on map (the blackening ash) is not showing?

If the message is not showing, then you'll have to look into look into the historic_events text file.

Reply Good karma Bad karma+1 vote
KingKorgoth Author
KingKorgoth

huzurat the actual devastation effect doesn't show up so the message isn't triggered, I haven't looked around for a fix anymore yet but i'll let you know when its fixed

Reply Good karma+1 vote
huzurat
huzurat

Hmmm... this is the first time I've heard of that. Maybe the 3 TYP messes with the year counting script of the game? Why not put it up on TW Center? Pretty sure someone will know the exact bug.

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

huzurat
My bad my bad....should have known to post the AI behaviour suggestion here...let the discussion be here..

Reply Good karma Bad karma+1 vote
huzurat
huzurat

No problem, could you shift the discussion to this thread? It'll be much more convenient to discuss with your posts to refer to.

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

Yeah sure ....just a moment

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

huzurat
KingKorgoth....guys this is just an idea.....when u read and go through field battles...and analyse the reasons for the victory or defeat ...its mostly down to the nature,traits and experience of the military generals and the also the prevailing conditions...and how they respond to it..

lets examine some famous examples

1)Battle of Hattin Vs Battle of Arsuf

when one goes through the details of Hattin,its perfectly evident how masterfully saladin executed light cavalry tactics....one couldnt help but agree that saladin ensured that the entire battle unfolded like a horror movie for the crusaders...he gave the crusaders no food,no water,poisoned the wells....this coupled with the heavy armor they wore made it even more uncomfortable in the desert heat.....i've read that saladin went as far as psychologically demoralising the enemy with a number of gimmicks.....beating drums,setting fire to release smoke,chanting,yelling...he also brought goatskins full of water from a nearby lake for his soldiers to drink infront of the crusaders....he carried out systematic raids and skirmishes all the while avoiding prolonged melee with the deadly christian knights...continously harassed their flanks enticing them to come out of their formations....the crusaders finally succumbed to this and took the bait....they were surrounded from all directions by saladin's men....and this resulted in a famous victory for saladin on his road to jerusalem

in stark contrast one can notice how differently Richard the lionheart handled saladin ....richard was smart and cautious as a general...he was mindful of the disaster that befell them at hattin....the ship that sailed along the coastline,regulary supplied the moving army....he was worried about the loss of cohesion in his defensive formation right from the beginning and restrained his men from breaking ranks....he avoided breaking ranks and didnt get enticed by saladin's tricks....but as a general he was at the same time brilliant enough to know not to go back or retreat from an action done in the spur of the moment....the moment one of his cavalry contingents broke ranks and attacked, he knew he needed to commit all his men inorder to ensure the success of the attack...mostly in the age of warfare even prudent inaction could be seen as cowardice and a general could not risk his men's morale or their confidence in him

though saladin lost the battle at arsuf,in both scenarios he handled and played his role perfectly....in both scenarios saladin responded exactly how a general should to a situation....in both scenarios saladin knew he stood no chance in a frontal field battle or a committed field engagement against heavy knights...so he let heat,thirst,hunger,nature take its toll on his enemies and when they got desperate,it would make his job much easier....the same cannot be said for the crusaders,while king guy and his leaders played right into saladin's game the other(Richard) restrained himself and was more disciplined since he knew this was exactly what saladin wanted...in the context of hattin saladin knew the psyche of the crusaders whereas in the context of arsuf it was rather richard who gauged saladin's psyche...both knew each others limitations and motives and worked to counter those....saladin had to force a decisive victory after the loss of Acre...he knew richard was miles away from his home and that richard would want a decisive battle to boost his men's morale to ensure the success of the crusade...besides he knew he stood no chance in an engagement....richard on the other hand knew of saladin's tricks and that he was desperate for a victory as well...

(Continued Below...)

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

(Continued From Above...)

2)Battle of Granicus & Battle of Gaugamela & Battle of Issus Vs Napoleon's debacle in russia

this example does not involve a common belligerent since Alexander's never been defeated in his field career but i'm posting two scenarios involving different time periods...besides Alexander's exploits dont require contrasting cases of battles since there is a lot to learn about psyche from his field battles even though he never lost an engagement...

the key to alexander's stunning success is that he knew the psyche of persians and Darius III....whether it is Granicus,Gaugamela or issus or even any of his battles,alexander always seemed to have a crystal clear picture of his adversary's motives and situation....infact all of alexander's manuevers are a counter to a conventional general's response....all of his adversaries' moves were a set piece scenario for which he had a tailormade checkmate

at granicus(after he crossed asia minor to invade persia)...alexander's troops had marched for a long time before they camped on the banks of the granicus river opposite to the persians led by memnon of rhodes who was a decent general of no mean order.....the persian force that fought at granicus was relatively small but still large enough to be threat especially at a river crossing...besides the persians had greek mercenary pike forces but these would probably be smaller in number....nevertheless a conventional general would give his men a day or a night's rest before he took to the field but alexander did the opposite knowing very well that the persians would anticipate this...its kinda like how muhammad ali would stand in-between rounds instead of resting on a chair...the opponent starts thinking twice about his opponents strength...he and his companions on the right charged into the persian left wing(albeit at great personal risk for alexander himself...he was nearly killed here if not for cleitus the black),broke through their lines and wheeled around the persian rear while the phalanx hacked its way through the hapless persian centre...

initially he was seen as a haughty rebellious boy king who scored a fluke victory(But this wasn't one...no offensive warfare or assault on a river front is easy...the river currents and terrain aren't suitable for orderly movement or formations,it takes nerves of steel to fight though such carnage...besides alexander's charge almost appears juvenile here but the charge was a surprise for the persians)

strategy is defined as "how you bring your enemy to a fight"....tactics is "how you fight" to defeat him...alexander knew this perfectly well...persian emperors needed to prove themselves on the battlefield rather than let their slaves do their job....to this end Darius would have to personally take to the field to prove himself and this is exactly what alexander knew...Darius's generals including memnon of rhodes advised him to avoid facing him in the open....they told him to let the heat,nature and starvation do the job for him,but darius went against this advice...

subsequently what happened at gaugamela and Issus are the same reminsicients of multiple other victories of alexander...Darius played right into alexander's game of facing him in the field.... knowing very well that the persian overlord stood no chance in personal combat or a show of personal nerves/bravery alexander consecutively threatened darius position in both battles and in both scenarios the king ran away fearing for his life,thus sealing the fate of his soldiers who had no other incentive to fight for him except for being his slaves...

in contrast like the russians did with napoleon,if the persians denied alexander food,supplies and water....avoided decisive open field engagements with him....strengthened their garrisons in the coastal cities....strengthened their fortified citadels(where alexander would get no opportunity to display his field genius,the unstoppable power of the phalanx or the hammer anvil approach)....cut off his incoming supplies with their more powerful navy(alexander knew he stood no chance against their navy which is why he took the coastal provinces before marching into the persian heartland)....cut off his retreat...then alexander would be left in a vulnerable position and would come to negotiating terms...to his fortune the persian leadership turned out to be absolutely incompetent in dealing with him...

3)Panipat & Khanwa vs Chausa

we've been through this discussion but the same logic stands...in both cases the victors knew their strengths and weaknesses and acted according to it...and both victors chose to bring their adversaries to the field or charge at them the way they wanted....at panipat babur knew ibrahim's psyche...he enticed him with a night raid...this emboldened ibrahim into taking to the field and run stupidly into babur's guns

(continued below...)

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

(Continued from Above...)

Sher Shah wasnt stupid...he would deal with Babur the same way he did with humayun(this would be a given 100% since Sher Shah served under Babur for a short time & he would have knowledge of how the mughal war machine worked...Sher Shah served Babur because he expected to be given his house estate which was in the possession of his half brother)...and though Babur would've fared better than his son,it would still be a setback for him

4)Battle of Cannae(and Hannibal's other victories at rome) Vs Quintus Fabius Maximus's "Fabian approach"

just like alexander before him,Hannibal was seen as an insignificant fly and an impudent upstart....all alarms about him were laughed off until they heard he had crossed the alps and that too with elephants in his entourage...

when the hour of fight came,the romans found it impossible to best him in open field...hannibal proved too cunning and unorthodox for the romans....bereft of continued support from carthage(as well as losing nearly half his force while crossing the alps)despite his stunning success on the field,hannibal used his decent at best men to carry out tactical menuevers,ambushes and military surprises.....used the terrain to his advantage...always misguided the romans with decoys and false nightfire camps....when matters came to a head,the senate appointed Fabius as dictator and tasked him with defeating Hannibal...

There is a saying "No one conquers one who doesn't fight"

fabius went down in history without getting his due...he was a smart bloke who gauged hannibal's motives and his weaknesses...Rather than fight, Fabius shadowed Hannibal's army and avoided battle,instead sending out small detachments against Hannibal's foraging parties,and maneuvering the Roman army in hilly terrain, so as to nullify Hannibal's decisive superiority in cavalry.Residents of small villages in the path of Hannibal's army were ordered to burn their crops and take refuge in fortified towns.He used interior lines to ensure that at no time could Hannibal march on Rome without abandoning his Mediterranean ports, while at the same time inflicting constant, small, debilitating defeats on the North Africans. This, Fabius had concluded, would wear down the invaders' endurance and discourage Rome's allies from going over to the enemy, without having to challenge the Carthaginians to a decisive battle. Once Hannibal's Carthaginians had been sufficiently weakened and demoralized by lack of food and supplies, Fabius and his well-fed legions would then launch the decisive battle and crush Hannibal once and for all.

while fabian strategy worked and gave romans the time to recover,it was seen by statesmen and the roman populace as cowardice since they believed in their roman chauvinism....rome ended fabius's dictatorship and decided to give open battle to Hannibal at Cannae with close to 88,000 men....the battle was rome's worst defeat and the engagement remained as the one which accounted for single largest loss of life until the british offensive at somme in WW I in 1916 (which would be 2200 years after :o)....until this point hannibal knew that the romans prided in themselves and that they would give him exactly what he wanted i.e a field battle....an invader on foreign land without support needs a stunning victory to demoralise his enemies and instill disloyalty amidst his enemy's allies...in time rome realised this and avoided him until they grew strong enough to face him and countered all his antics...at this point Romans gauged that hannibal was a man in desparate need for support/Roman defectors and all they had to do was avoid him...this worked for them until scipio finally and effectively ended Hannibal's career at Zama...

(Continued below...)

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

5)Waterloo
....logic stands the same again....Napoleon had just made a comeback from exile and he needed to silence europe and his detractors back at home with a stunning victory...at waterloo Napoleon did everything perfectly well as a general(there was little he could do about Marshal ney's untimely charge and bloucher's unforeseen flank attack.... and of course there are many factors that are way out of any general's control even if he is at his best...waterloo was a combination of everything against him....inorder to win everything including time,terrain and events had to go his way)....to his credit for that matter nobody whether himself or any general,can easily overturn a 2:1 numbers advantage in the age of modern warfare....his strategy was correct,his tactics were on point...he responded perfectly by crushing the prussians at ligny(he chose to overwhelm the weaker of the 2 armies to lower the odds against him)...Napoleon hoped to drive a wedge between bloucher and Wellesley,separate them and roll them over in opposite directions....but the prevailing conditions were against him and certain events were beyond his control...with due credit to him,napoleon had the upper edge until Bloucher swept him away....at waterloo Napoleon HAD TO WIN at all costs...nothing other than a resounding win would do.....anything less than a win would see him potentially exiled or worse still executed
unfortunately for him the man perched upon the slopes of the hill opposite to him was no less a genius himself(Arthur Wellesley,the duke of wellington)....and this lowered his odds....an attacker has to take a risk to win while all a defender has to do is not fight and lose and that is what exactly wellington did....wellington knew napoleon was desparate and entered the battle only after the assurance of Bloucher's support....it was only after bloucher swept away Napoleon's right in the noon that wellington even made a signal for an all out general advance...here Wellington knew Napoleon's psyche and bloucher's late surprise further helped him win...wellington simply predicted napoleon's response....waterloo is seen by many as napoleon's biggest gamble....he had everything to lose unless he won and the allies only had to avoid defeat....

(Continued below....)

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

(Continued from above...)

6)1st Battle Vs 2nd Battle of Tarain

Like above as usual...like I said before...the first time Ghori tried to fight the ferocious Rajputs conventionally,his entire army was crushed...he himself narrowly escaped with his life...the 2nd time around he had learnt his lesson...this time he wore down prithviraj's cavalry before counterattacking...infact this whole 2nd battle was a military surprise and a deceptive trap,right from the false letter of truce,decoy night campfire to the attack at daybreak(which prevented the Rajputs from having their breakfast)..Ghori knew that the impetuous Rajputs would take the bait and chase his elusive horsemen...

7)Gaugamela Vs Hydaspes

Obviously Alexander famously won both these 2....but I'm trying to fit a "what if Porus at gaugamela" narrative here
Irrespective of Alexander's win at hydaspes,Porus remains in history as his toughest adversary...being a runner up to the greatest field general in antiquity isn't a shame actually....at hydaspes Porus had many things working against him,but he made the right moves and countered Alexander move for move until he ran out of troops and options to fight.
..besides his men and cavalry were lightly armored and stood no chance against the Macedonian professionals...just to put in perspective at hydaspes alexander massed his right wing cavalry and threatened Porus's left...Porus responded to this by pulling out his right wing cavalry and reinforced his left with them...that is when a select group of Alexander's cavarymen exploited the weakness in Porus's right,broke through his wings,wheeled around the rear and charged into the rear of Porus's left wing cavalrymen...here is an interesting snippet,it seems porus's cavalry tried to form a square line to fend off attacks on both sides...this is a testament to Porus's skill in war....all of this and Porus was only a petty king of the punjab,one would agree that militaries further east and south were far more sophisticated,professional and powerful....imagine Porus at Gaugamela...even without his elephant regiment,Porus would be a deadly adversary and he was a fierce warrior himself standing at 7 feet tall.
...Porus was one among the last men fighting late into the battle and he refused to give up until he had no choice.
...Alexander would find this game of countering move for move too costly especially with the strength of numbers against him...even if Alexander managed to outmanuever Porus's cavalry and directly charge Porus like he did at gaugamela,Porus would stand his ground and fight,try to bring more immortals from the reserves to reinforce the centre and not give up in a contest of nerves like Darius did...if Porus would be able hold off alexander's cavalry at the centre for a while,the battle would be easily won...since it would only be a matter of time when the Persians would surround the much smaller Macedonian force..

50% of war is knowing when not to fight and the other 50% is knowing when to fight...when there is a fight it is because both parties believe they can win and more often than not only one of them was right in their belief..

in all these battles the general's psyche and response mattered the most....so is it possible to make the AI general respond on the battle map according to his character traits...like ai brash attacker or confident attacker aggressively charges his enemy....defensive ai general is reluctant to charge...another trait like "takes the high ground" can make the AI use the high ground..another trait like "turtles up" or "camper" can make the AI army get a boost while fighting from a temporary fort or a walled settlement..
....this would make spying(use of spies on the campaign map viz actually analogous to real life reconnaisance) more useful and relevant...that way the player can plan ahead....Whatdya guys think..is it possible??

Reply Good karma Bad karma+1 vote
huzurat
huzurat

KrishCN

I don't think you can make the AI act like great generals that can read opponent's moves and counter them both on strategic and tactical level. At most you can set parameters that make the AI more or less cognizant and active in respect to certain conditions.

As in if you adjust the value of winning odds that the AI would consider before accepting or avoiding a battle, or when the AI would hunker down in fort or when it would come out to battle. These would be the extent that you can directly affect.

In actual battle; you can edit variables to determine the AI priority on the battlefield, say when to prioritize attacking a certain troops, skirmishing behavior, how to prioritize targets on the basis of distance and strength to make a perceived threat level, on the basis of which it determines whom to and where to attack on the battlefield.

However, these will not result in tactical masterpieces. The AI will not be able to perceive complex maneuvers, like unless directly and openly threatened on the flanks, it will still ignore your circumventing troops, unless the AI has a reserve, it will not withdraw or intercept you flanking troops. Also, it does not take account of the speed of an enemy unit, rather just its raw stat, so say I can use my light cavalry to engage 1 or 2 enemy units, or even the strongest unit on goose chase, as long as I maintain a threatening distance from that unit. The AI will not see through the deception that the human player is engaging its strongest units in desultory fighting while opening its formation for a counter attack. Also the AI is not cognizant of formations, in fact it accounts more for unit to unit stats and numbers, calculating always on basis of a straight confrontation.

Beyond this you can choose campaign labels in you desc_strat, influencing their army compositions and size (in our case, we must avoid genghis label as it makes the AI sent small captain stacks).

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

yeah i dont expect some tactical masterpiece but the ai must take some varying approach....i know it doesnt understand complex manuevers and all that...but atleast some traits of the general about aggressive or passive approach should influence its behavior...i have seen in some mods the ai takes the higher ground regularly making my job more difficult
...i know the other things are impossible but i was in general speaking about basic things like forming up and giving battle or taking up a defensive position...in other mods i've seen when i attack the ai army it just retreats passively even if does not have a high ground advantage making it more boring...i just wanted to know if the trait and supply status of the general can actually influence its offensive or defensive approach on the battle map and campaign map....

Reply Good karma Bad karma+1 vote
huzurat
huzurat

Are you referring to any particular mod or ai codes?
Maybe we can check some.

Reply Good karma Bad karma+1 vote
KrishnaCN
KrishnaCN

huzurat
....in stainless steel 6.4 i've seen the ai regularly take the high ground when i initiate the battle....sometimes even when there is no high ground and i attack,the ai retreats anyway and responds only when i approach closer or start skirmishing with it....even when it has numerical and qualitative superiority the ai simply retreats and stands there doing nothing..

Reply Good karma Bad karma+1 vote
huzurat
huzurat

Well, then we can simply use their battle_config and config_ai_battle files. They are the ones that determine battle tactics that the ai uses.

Reply Good karma Bad karma+1 vote
huzurat
huzurat

KingKorgoth

I and KrishCN had discussed about hit and run tactics a while back when we covered Malik Ambar's battles. Basically we came to the conclusion that small cavalry/light infantry bands (less than 5 units including the bodyguard) should be able to attack and then withdraw against a medium or large army (8 units or more) without triggering negative trait(like coward etc) for the withdrawing army's general.

For example, say role-playing Malik Ambar's approach as Ahmednagar Sultanate in the campaign, when the Mughal army invades our territory, we should be able to send in a general with a small contingent that can make a quick attack and then withdraw, or simply lure a Mughal army on to a field and then simply withdraw, delaying and distracting them.

Of course some losses and forced retreating of the army on campaign map is hard-coded, however, Generals receiving negative traits can be changed, so can a few other things as follows:

1. Trait triggers such as Coward or other such triggered by withdrawal or retreat mid battle or by no battle and just a retreat, to be edited to make exception for conditions when the withdrawing army is less that 5 units (including the general's guard), the enemy has a medium or large army (over 8 units).

2. No supply loss for the retreating smaller army.

3. If the smaller army manages to kill 20% of the enemy troops, without losing over 40% of its own troops, then a deduction of supplies for the larger army, as well as a supply addition to the smaller withdrawing army if its supplies are not over 4 (well supplied).

4. Deccan and Afghan factions will get a bonus of movement points for one turn if they can successfully accomplish the above task.

I believe that these changes will successfully be able to simulate an excellent hit and run fight system. Of course units like the Mughal Qazzaki, Pashtun Skirmishers, Maratha Light Cavalry etc that are swift with light armor but good charge or missile ability with high defence skill, will excel in these tactics, being able to avoid a general engagement before quickly charging or pelting projectiles and then retreating quickly.

What say?

Reply Good karma Bad karma+2 votes
KrishnaCN
KrishnaCN

huzurat
thanks for putting it up here...i almost forgot about this discussion since we had it in general info section

Reply Good karma Bad karma+1 vote
KingKorgoth Author
KingKorgoth

huzurat Good ideas, i’ll need help with the script though when you get a chance

Reply Good karma+1 vote
huzurat
huzurat

Sure. Anytime, the entire thing will be done in traits file. Its easy enough, I'll post the scripts in some time.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.