Home » PLAYER'S HQ 1.13 » v1.13 General Gameplay Talk » Strength of counterattack
Strength of counterattack[message #349221] Fri, 10 March 2017 22:40 Go to next message
Ucho
Messages:4
Registered:July 2015
Is there a way to edit the number of soldiers in the counterattack? On expert difficulty the counterattack contains 80 soldiers. I would like to change it to 60 (as on experienced difficulty). Is it possible?
Thank you.
Re: Strength of counterattack[message #349222 is a reply to message #349221] Sat, 11 March 2017 00:12 Go to previous messageGo to next message
Shanga

 
Messages:3524
Registered:January 2000
Location: Danubia
According to this post from 7 years ago, it should be:

http://thepit.ja-galaxy-forum.com/index.php?t=tree&goto=250272&

But I am not a coder, no idea if that option is still in the INI


Re: Strength of counterattack[message #349226 is a reply to message #349222] Sat, 11 March 2017 06:05 Go to previous messageGo to next message
Tyxe

 
Messages:74
Registered:May 2012
Location: France
I'm extremely interested by your link Shanga, it's what i always wanted for a long time and i was unaware of this ini change !
Unfortunately i can't find the file at http://files.me.com/vetmax/yexffn despite creating an icloud account (i may be dumb !)
How can i apply the ini change ? by a copy paste in the ini as it or can i find the change somewhere ?

[Updated on: Sat, 11 March 2017 06:06]

Re: Strength of counterattack[message #349231 is a reply to message #349226] Sat, 11 March 2017 11:35 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
From what I have seen the only option to modify the number of soldiers is to modify the minimum group size and you won't want that. Counterattacks are always 4 groups with a size of:

min group size + difficulty level * 3

So with default 1.13 values we get:
Easy:		3 + 1 * 3 = 6 * 4 groups = 24 soldiers total
Experienced:	4 + 2 * 3 = 10 * 4 groups = 40 soldiers total
Expert:		6 + 3 * 3 = 15 * 4 groups = 60 soldiers total
Insane:		12 + 4 * 3 = 24 * 4 groups = 96 soldiers total




Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349236 is a reply to message #349221] Sat, 11 March 2017 15:54 Go to previous messageGo to next message
Ucho
Messages:4
Registered:July 2015
The numbers donĀ“t seem be right. On expert difficulty with default minimum group size (6) the counterattack involves 80 soldiers. Or at least this is how it is in version 7609, maybe it was changed latter.
Re: Strength of counterattack[message #349237 is a reply to message #349236] Sat, 11 March 2017 17:02 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
Calculations were the same in 7609. Only the place where the minimum squad size was defined was different (JA2_Options.ini instead of DifficultySettings.xml which is used now).



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349239 is a reply to message #349237] Sat, 11 March 2017 17:54 Go to previous messageGo to next message
Flugente

 
Messages:3096
Registered:April 2009
Location: Germany
At least in the current trunk the calculation is different - while the above calculation is correct for enemy troops, there are additional elites on top per group, which is troopcount - troopcount / difficulty level. As a result, you get

Easy:		3 + 1 * 3 + 6 - 6 / 1 = 6 * 4 groups = 24 soldiers total
Experienced:	4 + 2 * 3 + 10 - 10 / 2 = 15 * 4 groups = 60 soldiers total
Expert:		6 + 3 * 3 + 15 - 15 / 3 = 25 * 4 groups = 100 soldiers total
Insane:		12 + 4 * 3 + 24 - 24 / 4 = 42 * 4 groups = 168 soldiers total

This is somewhat lowered if Jeeps or Tanks are added to the groups.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Strength of counterattack[message #349240 is a reply to message #349239] Sat, 11 March 2017 20:54 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
Oh yes, I overlooked that part and actually it is not something I would expect because usually the game replaces regulars with elites instead of simply adding elites. It's a bit inconsistent. I'd prefer the gradual increase of my original calculation instead of the huge jumps of the actual calculation.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349242 is a reply to message #349240] Sun, 12 March 2017 07:34 Go to previous messageGo to next message
Tyxe

 
Messages:74
Registered:May 2012
Location: France
Are there any way to recover or implement the files from KOKON (the links don't seem to work and i don't find it on the svn repositories) ?

Otherwise i plan to switch to easy difficulty in order to get counter attack but smaller one (as i like to play with minimum group size 10)
Except the Counter attacks, is anything else "hardcoded" by the difficulties ? or can i play on easy difficulty with expert setting if i change all the according "ini" and difficulty parameters (i know where to find them) ?

[Updated on: Sun, 12 March 2017 07:34]

Re: Strength of counterattack[message #349243 is a reply to message #349242] Sun, 12 March 2017 11:42 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
It would be rather simple to add a modifier to DifficultySettings.xml and maybe adjust the formula as well to use the "elites for regulars" replacement rule like the rest of the game code does. I would be willing to do that if there are no objections to altering the formula. However, this change will only be available in the development build unless Sevenfm imports it to his experimental exe.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349244 is a reply to message #349243] Sun, 12 March 2017 13:20 Go to previous messageGo to next message
Flugente

 
Messages:3096
Registered:April 2009
Location: Germany
I have no problems with that, go for it happy. Maybe you could also scratch that stupid random part from difficulty levels too.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Strength of counterattack[message #349249 is a reply to message #349244] Sun, 12 March 2017 16:49 Go to previous messageGo to next message
Tyxe

 
Messages:74
Registered:May 2012
Location: France
It would be nice hehe.
Re: Strength of counterattack[message #349263 is a reply to message #349244] Tue, 14 March 2017 18:20 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
Flugente wrote on Sun, 12 March 2017 12:20
Maybe you could also scratch that stupid random part from difficulty levels too.

I'm not sure what you mean. Is it the probability of jeeps and tanks to be assigned to the attack group? I think it is ok to have a higher chance for those on higher difficulty levels.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349265 is a reply to message #349263] Tue, 14 March 2017 19:28 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
Ok, here you go - as of r8396 and GameDir 2363 you can set the parameter <CounterAttackGroupSize> in DifficultySettings.xml to something you like more than the old hard coded group size.

Default group sizes are:
6 Easy
10 Experienced
15 Expert
24 Insane

Also the assignment of elites now follows the standard game rule that an elite replaces a regular soldier. The formula for this process is:

number of regulars = CounterAttackGroupSize
number of elites = number of regulars - number of regulars / difficulty level
new number of regulars = number of regulars - number of elites

Difficulty levels go from 1 (easy) to 4 (insane) so you can do the math.
This change effectively makes counter attack forces smaller because the elites don't get added on top anymore like before. If you want bigger forces just increase <CounterAttackGroupSize>.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349267 is a reply to message #349265] Tue, 14 March 2017 20:43 Go to previous messageGo to next message
Flugente

 
Messages:3096
Registered:April 2009
Location: Germany
I meant the part where a random value was taken for custom difficulty levels. Wouldn't the current mean that the percentage of elites is now a function of difficulty levels?

[Updated on: Tue, 14 March 2017 20:45]




Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Strength of counterattack[message #349269 is a reply to message #349267] Tue, 14 March 2017 21:23 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
Since custom difficulty levels don't work anyway I restricted them to the basic 4 that we had all along. ;)

Yes, the new logic means that you get many more elites than soldiers on higher difficulty levels. To me that is what I would expect. Would you like me to change that?



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349270 is a reply to message #349269] Tue, 14 March 2017 21:47 Go to previous messageGo to next message
Flugente

 
Messages:3096
Registered:April 2009
Location: Germany
Nah, don't bother. I guess we both agree in our opinion on the custom difficulty system then big grin



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Strength of counterattack[message #349276 is a reply to message #349270] Wed, 15 March 2017 13:50 Go to previous messageGo to next message
Tyxe

 
Messages:74
Registered:May 2012
Location: France
Thanks silversurfer !
Re: Strength of counterattack[message #349294 is a reply to message #349221] Fri, 17 March 2017 13:59 Go to previous messageGo to next message
Tyxe

 
Messages:74
Registered:May 2012
Location: France
I forgot to ask, does this affect all counter attacks (when AGGRESSIVE_STRATEGIC_AI = 1 or 2 and when GAME_PROGRESS_OFFENSIVE_STAGE_1) or only the DCA ?
Re: Strength of counterattack[message #349296 is a reply to message #349294] Fri, 17 March 2017 18:12 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
It affects all counter attacks. I didn't see a reason to have different systems here.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349394 is a reply to message #349265] Sun, 02 April 2017 13:47 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3748
Registered:July 2009
silversurfer wrote on Tue, 14 March 2017 18:28
Ok, here you go - as of r8396 and GameDir 2363 you can set the parameter <CounterAttackGroupSize> in DifficultySettings.xml to something you like more than the old hard coded group size.

Default group sizes are:
6 Easy
10 Experienced
15 Expert
24 Insane

Also the assignment of elites now follows the standard game rule that an elite replaces a regular soldier. The formula for this process is:

number of regulars = CounterAttackGroupSize
number of elites = number of regulars - number of regulars / difficulty level
new number of regulars = number of regulars - number of elites

Difficulty levels go from 1 (easy) to 4 (insane) so you can do the math.
This change effectively makes counter attack forces smaller because the elites don't get added on top anymore like before. If you want bigger forces just increase <CounterAttackGroupSize>.
This appears to have broken UB building.



Chat with us!
#bearpit on IRC
Discord
Get your latest 1.13 Builds
(Pls don't use my forum PMs for general game queries)


Re: Strength of counterattack[message #349396 is a reply to message #349394] Sun, 02 April 2017 19:00 Go to previous messageGo to next message
silversurfer

 
Messages:2133
Registered:May 2009
Oops. That's why I like enums... Fixed in r8398.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Strength of counterattack[message #349438 is a reply to message #349396] Sat, 08 April 2017 18:03 Go to previous messageGo to next message
Tyxe

 
Messages:74
Registered:May 2012
Location: France
The custom counter attack parameters worked very well, makes the game much more enjoyable !
Got a question though.
I set my ini to "min enemy group size" = 8 because i set CounterAttackGroupSize = 8 (activated only for Drassen).
But i would like better my "usual" min enemy group size 10 with a new CounterAttackGroupSize = 6 (i would in this case allow CA for every city).
Could it work or the fact that "min enemy group size" is superior to CounterAttackGroupSize would prevent the 4 groups of 6 units to move/be created/crash the game (or the 4 groups would be allowed to move normally and automatically joined force at first occasion ?)

Bonus question : while having set min group size to 8 i have encountered a group of 6 in C7 on the map, how is it possible considering i did not fight in any square around C7 so the original group have not reinforced another one which would have explained they were only 6 ? Is it possible the group move up there and then meet another one, the IA then decided to reinforce the other groups by giving it 2 units ? if this is the case the group of 6 is it able to move because it is under 8 ?

Sorry to not be very clear...
Re: Strength of counterattack[message #349441 is a reply to message #349438] Sat, 08 April 2017 20:01 Go to previous message
silversurfer

 
Messages:2133
Registered:May 2009
The way I coded the counterattack groups is that the group size will to be at least MinGroupSize. Setting a lower value for counterattack group size is possible but has no effect. And no, I won't change that.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Previous Topic: Ugh... 120 Enemys in Chitzena Mine
Next Topic: San Mona Boxing Matches
Goto Forum:
  


Current Time: Sat Aug 19 19:44:37 EEST 2017

Total time taken to generate the page: 0.01006 seconds