User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

New Command: SetFacMaxEntrench

Tue Dec 18, 2007 3:37 pm

SetFacMaxEntrench

Set Faction Max Entrenchment Level.

SetFacMaxEntrench = Value, for the currently selected faction.

With the now possible alteration of the MaxEntrench level by faction and turn, you can fine tweak what can be done in AACW on this topic.

Limitation: You can't set to zero the max entrench level, if by default the level is not zero in the game (AACW and BOA), you are stuck to having at least 1 level minimum. In NCP, the default entrench level is zero, so it can be modified without problem.

The Max level of entrenchment if no artillery is present is not modifiable by script, but is limited by SetFacMaxEntrench anyway. For AACW the values are:

cbtMaxEntrenchLevel = 8
cbtMaxEntrenchNotArt = 4

These 2 variables are exported to a file in the settings directory though.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Wed Dec 19, 2007 9:33 am

Good addition.

Have you considered making an official change to max entrech levels by year for 1.08? Say one setting for early war 1861-1862, and the full entrenchments for 1863-1865?

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Wed Dec 19, 2007 10:03 am

I would be for, but it asks me to recreate all scenarios, which is always too much time I can spend these days.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Sat Dec 22, 2007 12:17 am

Pocus, are the commands suppose to work with version 1.07h? Or will we need to wait for the next patch?


SelectFaction = $USA
SelectRegion = $Prince George's, MD
StartEvent = evt_nam_USA_1EntrenchmentValueincrease|999|1|NULL|NULL|$Prince George's, MD|NULL

Conditions
FixedDate = 1862/11/01

Actions
DescEvent = evt_desc_USA_1EntrenchmentValueincrease

SelectFaction = $USA
cbtMaxEntrenchNotArt = 3
cbtMaxEntrenchLevel = 6
Apply

EndEvent

SelectFaction = $USA
SelectRegion = $Prince George's, MD
StartEvent = evt_nam_USA_2EntrenchmentValueincrease|999|1|NULL|NULL|$Prince George's, MD|NULL

Conditions
FixedDate = 1863/11/01

Actions
DescEvent = evt_desc_USA_2EntrenchmentValueincrease

SelectFaction = $USA
cbtMaxEntrenchNotArt = 4
cbtMaxEntrenchLevel = 8
Apply

EndEvent

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Sat Dec 22, 2007 12:20 pm

No you'll need 1.07i
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Tue Dec 25, 2007 3:09 am

Pocus wrote:No you'll need 1.07i


After taking a look at 1.08 today I did not see where this setting was exported.

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Dec 27, 2007 8:29 am

in combats.opt
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Thu Dec 27, 2007 8:44 am

I double checked my clean 1.08 install and it is not there in combats.opt

User avatar
Gray_Lensman
Posts: 497
Joined: Mon Jun 18, 2007 4:04 am
Location: Who is John Galt?

Thu Dec 27, 2007 8:50 am

deleted

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Thu Dec 27, 2007 3:21 pm

I am using 1.08.

The entrenchment values are in the combats file in the settings folder.

However I am having trouble with the event command. The event phrasing I used are in the 4th post from the top of this thread.

Here is the script report citing unknown keyword:

Line 3119: SelectFactions, 1 Faction selected: United States of America
Line 3121: Started processing event: evt_nam_USA_1EntrenchmentValueincrease
Line 3121: Event already referenced, current occurences 0 Max allowed: 999 <<Active>>
Line 3124: Fixed date evaluated: 1862/11/01 converted to turn 2709 current turn 2675 False
Line 3129: SelectFactions, 1 Faction selected: United States of America
Unknown keyword at line 3130 cbtMaxEntrenchNotArt
Unknown keyword at line 3131 cbtMaxEntrenchLevel
Line 3134: Finished processing event: evt_nam_USA_1EntrenchmentValueincrease

BTW, the changeactorpool command is working like a champ!!

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Dec 27, 2007 3:35 pm

combats.opt (mine, vanilla by essence):

cbtHitCoef = 125 // is the % chance, in 1/100 (meaning 1.25% here) to hit the enemy, for each final firepower point.
cbtAsltCoef = 40 // same, but for assault
cbtMinToHit = 5 // is the minimum % to hit someone (rising this value help the side with the lower quality units)
cbtNbRoundsPerDay = 6 // Number of rounds per day
cbtProtCoef = 90 // coefficient (in 1/100) for each protection point (3 pts = 0.9 x 0.9 x 0.9 damages sustained)
cbtLeaderBonus = 5 // % bonus for each point of stat of the stack leader
cbtUnitLeaderBonus = 3 // % bonus for each point of stat of the unit leader
cbtLdrCasuDiceSides = 500 // Nb of sides for the casualty dice for rank 1 leaders, at the end of combat (twice as low for rank 2, rank 3 excluded)
cbtMaxEntrenchLevel = 8 // Max absolute entrenching level
cbtMaxEntrenchNotArt = 4 // Max entrenching level, if the stack has no artillery (high levels don't benefits non artillery anyway)
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Dec 27, 2007 3:36 pm

Jagger:

Unknown keyword at line 3130 cbtMaxEntrenchNotArt
Unknown keyword at line 3131 cbtMaxEntrenchLevel

is normal, these are general variables to be tweaked in general.opt, the script engine don't act on that.

A correct syntax would be:
SelectFaction = $USA
SetFacMaxEntrench = 2

The code will take the lower of the two.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Thu Dec 27, 2007 4:14 pm

Pocus wrote:Jagger:

Unknown keyword at line 3130 cbtMaxEntrenchNotArt
Unknown keyword at line 3131 cbtMaxEntrenchLevel

is normal, these are general variables to be tweaked in general.opt, the script engine don't act on that.

A correct syntax would be:
SelectFaction = $USA
SetFacMaxEntrench = 2

The code will take the lower of the two.


Are you saying that the event engine cannot be used to make the change since the script engine won't act on these general variables?

If so, how do I make the engine perform the change in general.opt on specific dates?

BTW, I am not a programmer. I am doing a lot of my changes by inference or deduction from existing commands.

Thanks!

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Thu Dec 27, 2007 5:01 pm

I think I understand better now. I was litterally looking for SetFacMaxEntrench settings in the combats.opt, and now I understand it is a new command for the events.

Jagger, I think Pocus means that the cbtMaxEntrenchLevel is a general setting to be adjusted in the combat.opt while the SetFacMaxEntrench would be written as an event.

In the event file for the scenario in question, I would try:

SelectFaction = $CSA
SetFacMaxEntrench = 2

Conditions
FixedDate = 1861/04/01

EndEvent

for example.

Don't know if that would actually work. I'm no programmer either.

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Thu Dec 27, 2007 5:29 pm

runyan99 wrote:I think I understand better now. I was litterally looking for SetFacMaxEntrench settings in the combats.opt, and now I understand it is a new command for the events.

Jagger, I think Pocus means that the cbtMaxEntrenchLevel is a general setting to be adjusted in the combat.opt while the SetFacMaxEntrench would be written as an event.

In the event file for the scenario in question, I would try:

SelectFaction = $CSA
SetFacMaxEntrench = 2

Conditions
FixedDate = 1861/04/01

EndEvent

for example.

Don't know if that would actually work. I'm no programmer either.


I think your right but I won't be able to test anything till tonight. However when Pocus stated the "script engine" won't work on it, I wondered whether an event will work at all and some other method required.

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Dec 27, 2007 5:36 pm

Runyan explaination is the right one, sorry if I'm confused sometime :)
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Thu Dec 27, 2007 6:59 pm

Pocus wrote:Runyan explaination is the right one, sorry if I'm confused sometime :)


No problem! And thanks for clarifying. :hat:

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Thu Dec 27, 2007 8:04 pm

As a suggestion, I might mod the max levels by year as follows:

1861 - 2
1862 - 3
1863 - 4
1864 - 6
1865 - 8

User avatar
Clovis
Posts: 3222
Joined: Wed Nov 09, 2005 7:43 pm
Location: in a graveyard
Contact: Website

Thu Dec 27, 2007 10:19 pm

runyan99 wrote:As a suggestion, I might mod the max levels by year as follows:

1861 - 2
1862 - 3
1863 - 4
1864 - 6
1865 - 8


Considering fortification works CSA made at Manassas after the first Bull Run, I wouldn't be so systematical. from my readings, I got the feeling:

- entrenchment level wasn't the product of a technological change
- it wasn't more the result of a sudden tactical discovery, value of field fortifications being known from the start
-it was as always the reluctance to adopt new solutions rather than apply the old tactics which was the determinant factor. Field fortifications were seen as unuseful because they were unused in the past.

The trend was in the first years to see troops build fieldworks after the battles... In 1863, troops were now fully aware of the necessity to get protection in the field and the next year, all command levels were precognizing fortification building....Here and there, you will find 1861 and 1862 counterexamples of fortification efforts before the battle ( Halleck maneuver toward Corinth after Shiloh).

I will create in my mod 3 levels:

61-62: level 4
63: level 6
64-65: level 8

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Thu Dec 27, 2007 10:43 pm

runyan99 wrote:As a suggestion, I might mod the max levels by year as follows:

1861 - 2
1862 - 3
1863 - 4
1864 - 6
1865 - 8


I am using the following in my PBEM Mod. As a general rule, it works well within the mod. Also the increased defensive strength of entrenchments towards mid and late war helps the rebs as the Union manpower advantage builds.

04/61-10/62 2/5
11/62-10/63 3/6
11/63-end 4/8

Minimum for max entrenchment needs to be 5 to allow interdiction of supply by entrenched artillery.

The reality is there were two entrenchment situations. Field entrenchments and long term entrenchments for important towns/cities. As a whole, greater tactical emphasis was placed on field entrenchments as the war progressed.
Long term entrenchments were always strong regardless of the time frame.
Also the emphasis on entrenchments was often dependent on the field commander regardless of the time frame which can be handled as a leader ability.

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Thu Dec 27, 2007 11:20 pm

Ok, the max entrenchment event using "set" works great!

But I just realized we cannot adjust cbtMaxEntrenchNotArt.

That hurts.

Any chance a command can be added to adjust MaxEntrenchmentNotArt? :innocent:

The reason I ask is because in PBEM's, militia is often used to create backup entrenchment lines. By limiting the MaxEntrenchmentNotArt, it prevents militia, without artillery, from creating alternative, backup, maximum entrenchment lines for the primary armies.

With the MaxEntrenchmentNotArt set to 2, militia can create basic fallback entrenchments of level 2 for a primary army but the army will still need to spend significant time to create maximum level 5-8 entrenchments.

Also limiting MaxEntrenchmentNotArt prevents garrisions, lacking artillery, from creating massive entrenchment defenses in every little, rinky-dink American town with a single militia regiment. The lower entrenchment level means a significant cavalry force can actually attack and capture towns garrisoned by a single militia regiment. And again, town defenses are relatively weak unless you station a larger force with artillery. Militia garrisoned towns, lacking artillery, will not be fortresses.

A final advantage is that multiple militia cannot be used to create numerous max entrenchment regions along rivers which only need artillery to interdict river supply. So river supply cannot be interdicted unless artillery is actually present in a region to create the 5 level or greater entrenchment levels necessary for supply interdiction. It takes time to reach the level 5 entrenchments once the artillery is put in place.

I have been using 2 for the MaxEntrenchmentNotArt for the first couple of years but have been seriously considering using it for the entire war.

The primary problem is each militia regiment can create very strong entrenchments which can be utilized immediately by an entire army.

I know you are probably swamped but if you have some time, a command adjusting MaxEntrenchmentNotArt would be very valuable. :siffle:

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Fri Dec 28, 2007 2:55 am

You can still build forts to interdict naval supply I expect, and maybe players should be encouraged to build forts for this kind of thing.

Jagger, I am suprised you would still want to use 2/5 right off the bat in 1861, given your prior statements about strong intrenched lines. It seems to me the best way to insure mobility in the early years is to reduce the maximum level below 5.

By the way, I regard the difference between infanty only and artillery maximums to be unimportant, as any important position in the game is going to include artillery anyway.

User avatar
Gray_Lensman
Posts: 497
Joined: Mon Jun 18, 2007 4:04 am
Location: Who is John Galt?

Fri Dec 28, 2007 3:15 am

deleted

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Fri Dec 28, 2007 3:20 am

runyan99 wrote:You can still build forts to interdict naval supply I expect, and maybe players should be encouraged to build forts for this kind of thing.

Jagger, I am suprised you would still want to use 2/5 right off the bat in 1861, given your prior statements about strong intrenched lines. It seems to me the best way to insure mobility in the early years is to reduce the maximum level below 5.

By the way, I regard the difference between infanty only and artillery maximums to be unimportant, as any important position in the game is going to include artillery anyway.


The primary reason I use level 5 is due to the rebs need for some capability for river interdiction of supply outside of forts. Without the need for river interdiction, I would probably be happy with 2 for all troops in 61.

I find the differences have an impact in regards to militia creating fall back positions for the primary armies. Militia are cheap, numerous and can create many strong, fallback, entrenched regions without a limitation on the MaxEntrenchedNotArt values.

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Fri Dec 28, 2007 3:39 am

Clovis wrote:Considering fortification works CSA made at Manassas after the first Bull Run, I wouldn't be so systematical. from my readings, I got the feeling:

- entrenchment level wasn't the product of a technological change
- it wasn't more the result of a sudden tactical discovery, value of field fortifications being known from the start
-it was as always the reluctance to adopt new solutions rather than apply the old tactics which was the determinant factor. Field fortifications were seen as unuseful because they were unused in the past.

The trend was in the first years to see troops build fieldworks after the battles... In 1863, troops were now fully aware of the necessity to get protection in the field and the next year, all command levels were precognizing fortification building....Here and there, you will find 1861 and 1862 counterexamples of fortification efforts before the battle ( Halleck maneuver toward Corinth after Shiloh).


It wasn't that the armies didn't know how to dig a trench in 1861, I agree. The important thing however was that they became more and more extensive as the war went on, and more and more the armies tried to fight from these positions, instead of in the open field.

That's why I would use a progressive system that starts at a low level in 1861 and 1862. Not necessarily to represent better entrenchments per se, but just better employment.

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Fri Dec 28, 2007 3:43 am

Jagger wrote:The primary reason I use level 5 is due to the rebs need for some capability for river interdiction of supply outside of forts. Without the need for river interdiction, I would probably be happy with 2 for all troops in 61.

I find the differences have an impact in regards to militia creating fall back positions for the primary armies. Militia are cheap, numerous and can create many strong, fallback, entrenched regions without a limitation on the MaxEntrenchedNotArt values.


*shrug* I think that's too much focus on river supply at the expense of what was going on in the rest of the war.

User avatar
runyan99
Posts: 1420
Joined: Tue Dec 19, 2006 6:34 am

Fri Dec 28, 2007 4:18 am

runyan99 wrote:It wasn't that the armies didn't know how to dig a trench in 1861, I agree. The important thing however was that they became more and more extensive as the war went on, and more and more the armies tried to fight from these positions, instead of in the open field.

That's why I would use a progressive system that starts at a low level in 1861 and 1862. Not necessarily to represent better entrenchments per se, but just better employment.


From the Confederate perspective, limiting entrenchment levels to a low setting in 1861-1863 would tend to reflect their proclivity not to rely on them. If entrenchment levels maxed out at 2 or 3 for the first two years of the war, I might not be able to pursue a strictly 'Petersburg Strategy' starting right away in June of 1861.

Generally speaking, I cannot think of any Confederate commander except maybe Magruder who was keen on fighting in entrenchments until August or September of 1863, when the ANV returned from the Gettysburg campaign. Even Fredericksburg relied more on natural strength than entrenched lines, and the right flank was vulnerable.

It is worth playing with and testing anyway.

User avatar
Gray_Lensman
Posts: 497
Joined: Mon Jun 18, 2007 4:04 am
Location: Who is John Galt?

Fri Dec 28, 2007 7:24 am

deleted

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Fri Dec 28, 2007 10:06 am

I'll see when I can do that Jagger.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Jagger
AGEod Grognard
Posts: 949
Joined: Sat Mar 18, 2006 2:31 pm

Fri Dec 28, 2007 6:36 pm

Pocus wrote:I'll see when I can do that Jagger.


Many thanks!

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 7 guests