User avatar
JacquesDeLalaing
Colonel
Posts: 344
Joined: Tue Mar 09, 2010 11:05 pm
Location: Vienna (Austria)

Question regarding charge- and countercharge-bonus-abilities

Fri May 02, 2014 11:29 am

What I am trying to achieve is to reliably interpose the charge-countercharge mechanic in assault combat, so that EVERY unit counts as "charging" in battle and therefore every unit has a chance to "countercharge" (which I've set to deal no damage). So, what I've done is to give two attributes (charge and countercharge) and the following two abilities to all models:

ShockResistance (battle-bonus; appliance = self; Param 14 is set high)
ShockUnit (battle-bonus; appliance = self; Param 13 is set high)

The first ability is supposed to increase the probability of an element to countercharge (Param 14), the second one is supposed to increase the probability of an element to charge (i.e. not "just" assault; Param 13). I really want to get rid of ordinary assaults altogether. Unfortuantely, it doesn't seem to work. Still only a tiny fraction of the elements that take part in combat actually charge (and only at the start of battles, when their cohesion seems to be still high), and squares/countercharges fail 90% of the time. I've tried out all kinds of values already (also set the "level" high instead of the parameter). What am I doing wrong? Perhaps it doesn't work with "appliance = self"? I also found it strange that the description for Param 14 on the wiki said: "Param14 Square Bonus +3 bonus to D20 check 'form the square'". Is this a fixed value (it is actually set to 3 in the ability-file, so I guess not)?

Why do I even need this?
siege-assaults: you should either break through or not; The charge-mechanic is the key here. Once an element manages to actually charge, the effects on the opposing element should be severe. (charge, countercharge fails --> damage x6 --> opposing element routed --> will be attacked and destroyed without inflicting further casualties to the opponent, which resembles a surrender)
light troops: they should always countercharge, so that they practically can't be engaged in melee. The ordinary assault-mechanism alone cannot achieve that, mainly because the chance to hit is independent of the characteristics of the target - bad for light troops! Their protection only helps in fire-combat. You still can't play them as "partisans" as they will get utterly destroyed in melee-combat even with small frontages.
also cavalry-charges could be modeled better this way (all or nothing!) instead of the trickling of a few hits every round


PS: Perhaps at least the light troops-problem can be solved differently. Quote from the wiki (seems to be outdated, better see here):
Param7 Legacy: Specific Flag against which the bonus is applied from $abiIDFlag Param0 [ex: $Indian] - Use attributes now
Param8 IDFlagMustBe: Use attributes now


Even though I don't fully understand what this means yet, I guess one could give all elements an assault-malus against light troops? Unfortunately the description how one could achieve that is not clear at all. (do I have to use string-parameters or the battle-bonus parameters? And I just need to add the attribute to the models (no alias for attributes, it seems?).
[CENTER][color="#A52A2A"] S I L E S I A I N R U P T A[/color]
- a work-in-progress mod for Rise of Prussia - [/CENTER]

User avatar
JacquesDeLalaing
Colonel
Posts: 344
Joined: Tue Mar 09, 2010 11:05 pm
Location: Vienna (Austria)

Fri May 02, 2014 7:34 pm

I even fail at implementing a battle bonus (actually its a malus) ability when fighting a certain kind of opposing element. :bonk: Does anyone have a clue what kind of quality of the OPPOSING element (attribute, ability, element family) I have to enter in which parameter (Param8? ListParams2? ListParams7? StrParam7?) in the battle-bonus-ability? (Appliance should be self)

I want the "bonus" to trigger if the element faces an opposing element of a certain quality (whatever works).
[CENTER][color="#A52A2A"] S I L E S I A I N R U P T A[/color]

- a work-in-progress mod for Rise of Prussia - [/CENTER]

User avatar
JacquesDeLalaing
Colonel
Posts: 344
Joined: Tue Mar 09, 2010 11:05 pm
Location: Vienna (Austria)

Sun May 04, 2014 9:27 pm

Well, hurray! At least I've figured out how to make light troops less vulnerable in battle, after several hours of testing different combinations.

I've given an "battle bonus" ability (actually it's a malus on troop quality and assault-value) to all "regular units" with the following important stats:
Appliance = Unit
ListParams7 = *LightTroops*

Then I've added the attribute (=/= ability) *LightTroops* to all models against which I want the malus to kick in.

Battle log tells me it works:

22:18:29 (Reporting) *** Start of action # 87 1001234 German Infantry vs 1000507 Hussars ***
22:18:29 (Reporting) Attacker belong to a defending group SubType: Regular Defender belong to a attacking group SubType: Cavalry
22:18:29 (Reporting) Leader Battle Bonus (attacker): OffFire(%): 100 DefFire(%): 100 Assault(%): 10 TQ Bonus(pts): -6 Prot Bonus(pts): 0
22:18:29 (Reporting) Terrain: Clear Weather: Snow Complete list of values from TEC:
22:18:29 (Reporting) German Infantry (Fire: 100 TQ: 0 )
22:18:29 (Reporting) Hussars (Prot: 3 TQ: 0 )
[color="#FF0000"]22:18:29 (Reporting) Assaulter base + BB-abi TQ: 2.00[/color] [my ability gives a -6 malus on TQ]
22:18:29 (Reporting) Assaulter TQ with terrain: 2.00
22:18:29 (Reporting) German Infantry - Commander: Wilhelm Moritz von Roth Cmd Coeff. %: 106
22:18:29 (Reporting) German Infantry - Unit Commander: Wilhelm Moritz von Roth Cmd Coeff. %: 100
22:18:29 (Reporting) Battle effectiveness with leader rating: 106.00%
22:18:29 (Reporting) Assaulter value with leader tactical rating: 2.12
22:18:29 (Reporting) Assaulter final TQ value: 2.12
22:18:29 (Reporting) Assaulter base value : 7.00
22:18:29 (Reporting) Assaulter value with cohesion: 4.90
[color="#FF0000"]22:18:29 (Reporting) Assaulter value with leader battle ability: 0.49[/color] [my ability set the assault value to 10%]
22:18:29 (Reporting) Assaulter value with penalty from losses: 0.49
22:18:29 (Reporting) Assaulter final Assault value: 0.49
22:18:29 (Reporting) Receiver base + BB-abi TQ: 10.00
22:18:29 (Reporting) Receiver TQ with terrain: 10.00
22:18:29 (Reporting) German Infantry - Commander: Wilhelm Moritz von Roth Cmd Coeff. %: 106
22:18:29 (Reporting) German Infantry - Unit Commander: Wilhelm Moritz von Roth Cmd Coeff. %: 100
22:18:29 (Reporting) Battle effectiveness with leader rating: 100.00%
22:18:29 (Reporting) Receiver final TQ value: 10.00
22:18:29 (Reporting) Receiver value with cohesion: 3.00
22:18:29 (Reporting) Receiver value with penalty from losses: 3.00
22:18:29 (Reporting) Receiver final Assault value: 3.00
22:18:29 (Reporting) Attacker failed to assault (Quality check failed)
22:18:29 (Reporting) *** End of action ***


Perhaps the charge/countercharge-boni I wanted to implement also work if applied to unit instead of model/self. I'll see.
[CENTER][color="#A52A2A"] S I L E S I A I N R U P T A[/color]

- a work-in-progress mod for Rise of Prussia - [/CENTER]

User avatar
JacquesDeLalaing
Colonel
Posts: 344
Joined: Tue Mar 09, 2010 11:05 pm
Location: Vienna (Austria)

Sun May 04, 2014 10:24 pm

Another evening of experimenting and testing was unsuccessfull.

I was only able to make the battle-"bonus" work with appliance = unit (not self) with the following settings: 1) either set the ability to "ListParams7 = *lighttroops*" and give all light troops the *lighttroops*-attribute accordingly or 2) set light troops to subtype Irregular and set "Listparams2 = $Irregular" in the ability.

However, these settings don't seem to work on a unit-level (which would be bad, but tolerable), but at a stack level. In both cases, the "bonus" apply to all elements of a stack (or unit, not sure here) that fight against a STACK in which there is at least one *lighttroops"/$Irregular unit (or element?). In other words: if there is one hussar unit/element in a stack, any opponents get the "fighting against light troops"-assault malus against all elements of this very stack. This is of course not what I want to achieve.

Setting the appliance of the ability to "self" doesn't work (noone ever gets the bonus in this case).

It's all quite frustrating and I have no clue where to continue. :( While for fire combat there is protection, melee-chances are almost totally independent of any condition/stat/attribute of the target-element (except for charges, but increasing charge-/countercharge-chances doesn't work). Does anyone have an idea how to make certain ELEMENTS un-attackable in melee-combat?

My very last and sad resort would be to practically get rid of close combat alltogether and set very very low assault-values across the board and/or a very low assault-coefficient. Cavalry could keep a higher assault value but have it's damage changed so that it only inflicts cohesion damage (which is essential for routing), not actual hits. I hope it would still inflict casualties during pursuit. Infantry, on the other hand would get its assault value drastically reduced (like 1 for ordinary inf, 2 for grenadiers), but the attackers would get a high TQ-bonus when attacking a fort (no offensive fire allowed in my case) so that this would be the only situation in which they really get a chance to successfully assault. Therefore, however, a single successfull melee-hit by infantry would do lots of damage (representing a successfull surprise/attack on a fort, which takes out a whole element/company of the opponent).

It's needless to say that this would be a very bad solution which takes away lots of fine-tuning and modeling battle-situations, but it's the only one I can think of to make light troops fulfill their role if I can't get charge-countercharge and abilities to work according to my intention.
[CENTER][color="#A52A2A"] S I L E S I A I N R U P T A[/color]

- a work-in-progress mod for Rise of Prussia - [/CENTER]

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

Tue May 06, 2014 3:49 pm

You want to have an ability 'BattleBonus' works only for elements with a specific attribute, then that's StrParams6. If you want an ability to work only if the element targeted by your element has a specific attribute, then you put it in StrParams7.

With the first case, you can have an ability that give a bonus only for say Cossacks cavalry. With the second, you can have a damage bonus only against woodenships targets, and only also (by combining with formers) if your own ship has a specific type of guns.

It should work, it was tested before. Hope it did not break!

Best way would be to have a fight with say 2 elements vs 2 elements. No big battle.
Image


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

User avatar
JacquesDeLalaing
Colonel
Posts: 344
Joined: Tue Mar 09, 2010 11:05 pm
Location: Vienna (Austria)

Tue May 06, 2014 5:01 pm

Thank you for your answer, Pocus! Much appreciated! :)

I wanted to test it, but I must have committed some blunder somewhere. Right now, I can't even recreate my results from post 3. I cannot trigger the malus at all right now (edit: found! Param6 was set to 10, not to 010). But I keep searching for my error! :)

So, just to make sure that I set everything right:

Ability:

UID = 33
[color="#808080"]Name = $abi_nam_ShockUnit1[/color]
Alias = RegularUnit
Kind = $abiBattleBonus
[color="#808080"]Text = $abi_txt_ShockUnit1
ImageID = abi_Medical.png
Color = $colAbi_Orange[/color]
Appliance = Self
Family = 0
Level = 1
Param6 = 010 [it's a malus]
ListParams7 = *lighttroops*

(ignore the image and text-references for now) I've also made sure to delete the original 33-ability (as I'm running out of abilities I need to overwrite some vanilla ones) - a mistake that has cost me some hours already ;) .

And I add the corresponding attribute *lighttroops* to all light troops (models). As there is no alias for attributes, I just have to add this to the model-files.

And then I test it in the game by sending a hussar unit (*lighttroops*) against a stack of §RegularUnit-guys and check the battle log whether I can find the assault-value reduced to 10% for any element that assaults a hussar-element (and hopefully those that assault other elements of a stack containing a hussar-element don't).
[CENTER][color="#A52A2A"] S I L E S I A I N R U P T A[/color]

- a work-in-progress mod for Rise of Prussia - [/CENTER]

User avatar
JacquesDeLalaing
Colonel
Posts: 344
Joined: Tue Mar 09, 2010 11:05 pm
Location: Vienna (Austria)

Tue May 06, 2014 7:31 pm

Okay, after intensive testing still no solution at hand.

I've summed up my results in the attached image due to formatting-issues. Explanations:

Combination = How I've defined the quality of the element that "triggers" the ability/malus
Environment 1 = stack of "regular" elements engages stack entirely consisting of "light" elements ("regular" means elements that have the ability (melee-malus against "light" troops); "light" refers to elements that trigger the malus, defined as per "combination" - either via attribute or via subtype)
Environment 2 = stack of "regular" elements engages mixed stack ("light" and "regular" elements, but they're not in the same brigade/unit)
works = the malus sets in, as can be clearly seen in the battle log:

20:02:15 (Reporting) Assaulter base value : 7.00
20:02:15 (Reporting) Assaulter value with cohesion: 7.00
[color="#FF0000"]20:02:15 (Reporting) Assaulter value with leader battle ability: 0.70[/color] [this is caused by the 010 - value in Param6]
20:02:15 (Reporting) Assaulter value with penalty from losses: 0.70
20:02:15 (Reporting) Assaulter final Assault value: 0.70


does not work = the malus does not set in; the red line in the quote above is simply missing, and the assault-value is not reduced to 10%. In other words: outnumbered hussars die horribly in the melee-phases
works in unintended way = In environment 2, all elements of the regular-unit-stack suffer the malus - not just those elements that actually engage the "light" elements, but even those that engage regular elements (which are NOT mixed with the light elements in one unit!). So unit-appliance actually seems to work like group-appliance in this case. But I'm not sure about the exact workings - perhaps this only sets in if a light element is picked to take part (is part of the frontage), perhaps it even works if there is just a light element in the region (in a different, unengaged stack). I don't have a clue. All I know is that it's not working as I was expecting.

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

So unfortunately, none of these combinations allow the malus to set in only for those "regular" elements that engage "light" elements. Self-appliance doesn't work at all, and unit-appliance works like group-appliance. I guess I have to make due with disabling melee alltogether as described in post 3 - it's not even that bad. But overall I think this is an issue to be looked at (if it is used a lot in this and other games).

[Regarding the original topic: I guess that something similar will be the case with the charge/countercharge-abilities. They don't seem to work with self-appliance at all.]
Attachments
Unbenannt.png
[CENTER][color="#A52A2A"] S I L E S I A I N R U P T A[/color]

- a work-in-progress mod for Rise of Prussia - [/CENTER]

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

Wed May 07, 2014 8:26 am

Thanks for your scholar research, it will probably take me some time to check the issues, but I'll verify what's going on in any case. I'll keep you posted.
Image


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

User avatar
JacquesDeLalaing
Colonel
Posts: 344
Joined: Tue Mar 09, 2010 11:05 pm
Location: Vienna (Austria)

Wed May 07, 2014 6:03 pm

No problem! I'm thankfull and happy that this game is so transparent and moddable in the first place! :)
[CENTER][color="#A52A2A"] S I L E S I A I N R U P T A[/color]

- a work-in-progress mod for Rise of Prussia - [/CENTER]

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

Mon May 26, 2014 2:47 pm

Still have this thread stickied but no time to check the issue (seems to be a complex one...).
Image


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

Jagger2013
General of the Army
Posts: 641
Joined: Sat Apr 27, 2013 2:14 am

Tue May 27, 2014 3:41 pm

-----You want to have an ability 'BattleBonus' works only for elements with a specific attribute, then that's StrParams6. If you want an ability to work only if the element targeted by your element has a specific attribute, then you put it in StrParams7.

With the first case, you can have an ability that give a bonus only for say Cossacks cavalry. With the second, you can have a damage bonus only against woodenships targets, and only also (by combining with formers) if your own ship has a specific type of guns.---


I could see this as useful. Perhaps in RUS, give regular/elite cavalry a bonus against conscript troops with less than a level 4 entrenchment in RUS. Although is it possible to check for two or more conditions of the target?

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 2 guests