Guardsman promotion

JanusTalaiini

Prince
Joined
Dec 12, 2005
Messages
340
Redirected from the bug thread so as not to clog that thread with this discussion.

Recap of discussion thus far:

Playing .32, patch a:

the guardsman promotion is not working as advertised. My archmages that were in the same stack as phalanx units with the guardsman promotion were attacked and killed by svartalfar assassins and shadows, phalanx units were untouched.

That's the whole point of using assassins and shadows... they can do "precision strikes" and kill physically weak units first.

I realize that, but I was under the impression that the Bannor's "guardsman" promotion was designed to counter that. Am I mistaken? And if so, what's the point of the promotion?

Taken from the pedia entry on the guardsman promotion: Guards against enemy marksman units. So, Janus Talaiini was in fact correct in reporting said bug.

Yeah, well, the promotion doesn't actually make the unit always defend against marksmen, it just makes this much more likely. The fact that Phalanxes ' strength is so much higher than an Archmages, and the fact that Archmages have channeling 1-3 (all of which make them better targets for marksmen), make their failure to defend the archmage reasonable.


I don't think it is a bug, but it among the many things that could use better documentation

Given that, the next turn, my Chalid hero was attacked by ten assassins in the same stack with the guardsman-phalanxes and defended each and every time, I would question how often "much more likely" is. As I've observed it, it's having absolutely no effect whatsoever.

Hearing this, it sounds quite likely that your Archmages and Chalid have the Guarsdman promotion, too. In that case, it wouldn't help at all, or, at the very least, not much.
The idea of the Guardsman promotion is to have units with Guardsman in a stack with other weak units who don't have it, therefore increasing their chance to defend in relation to those units without the Guardsman promotion.

It might also have become buggy somehow, though.

The Guardsman promotion isn't supposed to be random as far as I know. But it's possible that it wouldn't be able to counter Channeling I, II and III. In that case, you'd still have to put Hawks, Workers, Scouts etc. into your stacks.

That was one of the first things I checked, actually. The archmages and Chalid did not have the guardsman promotion.

The problem is in how the defender is selected. If the attacker has the Marksman Promotion, then it uses this pass to get the defender:

Code:
                                    if (pBestUnit == NULL || (pBestUnit->isBetterDefenderThan(pLoopUnit, pAttacker) && !pBestUnit->isTargetWeakestUnitCounter()))
                                    {
                                        pBestUnit = pLoopUnit;
                                    }

That IF statement says that if there is nothing targetted yet, to target whatever unit is being tested. But if there already is a potential Victim, then it checks to see if the new checked unit is weaker. If the new unit is weaker, it becomes the best target Unless the old target was set to block the Marksman Promotion.



Now, this works perfectly well in the cases where the attacker attempts to target the Guardsman Unit first. But if it attempts to target some other unit instead, then the Guardsman Unit will never be weaker than that unit, so will never be selected (notice that there wasn't a statement in the IF line to check if the new unit we are looking at was set to Guardsman).

Example: Assassin Attacks, first unit checked is an Archmage, barring a Hawk, Worker or Corlindale in the stack, nothing will ever be a worse defender option, so the target will never change. If instead the first unit checked was the Warrior with Guardsman, then since he has Guardsman, the target would never change (not even if the Mithril Golem himself was on the tile and happened to have Guardsman somehow)

What should work in place of this would be:

Code:
                                    if (pBestUnit == NULL || (pBestUnit->isBetterDefenderThan(pLoopUnit, pAttacker) && !pBestUnit->isTargetWeakestUnitCounter()) [COLOR="Red"]|| (pLoopUnit->isTargetWeakestUnitCounter() && (pLoopUnit->isBetterDefenderThan(pBestUnit, pAttacker) || !pBestUnit->isTargetWeakestUnitCounter()))[/COLOR])
                                    {
                                        pBestUnit = pLoopUnit;
                                    }

This way if the attacker has the Marksman Promotion and any defender in the stack has Guardsman, it will select the strongest of the Guardsman units to defend, but no matter what it WILL select a unit with Guardsman every time.

I don't think that makes much sense. The more raw strength a unit has, the more it will have to focus on the frontlines - it certainly won't be able to keep assassins at bay. The Guardsman promotion shouldn't make 100% of Assassins, etc. useless, I think.

Totally reworking the Guardsman promotion (random suggestion: change it into a spell that applies a promotion that decreases strength but further increases chance to defend against assassins, wears off after one turn/wears off when deactived, but I don't like that one, either) might work better, but I don't see the point of having one Guardsman Paladin in the stack obsoleting 10 Assassins (which cannot even use Bronze/Iron/Mithril weapons exactly because they aren't supposed to attack T4 units with high strength values)). If that was the case, I think the promotion would become too strong or at the very least make another game mechanic useless. (Which is the definition of a balancing problem.)

Yes, it needs to be changed, but certainly not in a way that makes Guardsman useful and another mechanic useless. (Besides, it's supposed to make defending more likely in every case, whereas Channeling is supposed to make defending less likely. I don't see why Guardsman should be able to counter Channeling I, II and III on a unit and then still select a 10+ strength unit against the Marksman promotion which is supposed to target the weakest unit in the stack.)
If it was changed like that, one would probably have to change the Marksman promotion so that choosing one's targets becomes possible (if the opponent has Guardsman you can only select units with Guardsman), but that would probably be a micromanagement hassle.
 
I don't think that makes much sense. The more raw strength a unit has, the more it will have to focus on the frontlines - it certainly won't be able to keep assassins at bay. The Guardsman promotion shouldn't make 100% of Assassins, etc. useless, I think.

Totally reworking the Guardsman promotion (random suggestion: change it into a spell that applies a promotion that decreases strength but further increases chance to defend against assassins, wears off after one turn/wears off when deactived, but I don't like that one, either) might work better, but I don't see the point of having one Guardsman Paladin in the stack obsoleting 10 Assassins (which cannot even use Bronze/Iron/Mithril weapons exactly because they aren't supposed to attack T4 units with high strength values)). If that was the case, I think the promotion would become too strong or at the very least make another game mechanic useless. (Which is the definition of a balancing problem.)

Yes, it needs to be changed, but certainly not in a way that makes Guardsman useful and another mechanic useless. (Besides, it's supposed to make defending more likely in every case, whereas Channeling is supposed to make defending less likely. I don't see why Guardsman should be able to counter Channeling I, II and III on a unit and then still select a 10+ strength unit against the Marksman promotion which is supposed to target the weakest unit in the stack.)
If it was changed like that, one would probably have to change the Marksman promotion so that choosing one's targets becomes possible (if the opponent has Guardsman you can only select units with Guardsman), but that would probably be a micromanagement hassle.

To respond to this: I had thought that the point of the Guardsman line was to render stacking workers/hawks/etc. for defense against marksmen unnecessary. Being that the only civ that can get the promotion is the Bannor (and they really don't have much else that lets them shine), do you really think it'd be unbalanced? Isn't this supposed to be one of their civ strengths?
 
Two things:

since the birth of Guardsman as promotion I have reported that it causes more damage than help. The staff has been deaf to this though. I wish it was at least an option that I could safely discard, because Guardsman does no good since:
- as you reported, it doesn't always work against marksmen units
- in most occasions, it works when you DON'T want it to work, IE vs NON marksmen units, since you have a better defender in that tile (typically an archery unit).

Note that the Guardsman promotion is only applied to melee units. Chalid, mages or archers can't have it -_-"


edit: I want to clarify that I don't think this promotion should always stop marksmen units. What I think should be a MUST though, is that a Guardsman unit doesn't go to defend when it is not the best option. Yet this regularly happens. For example, if it consider only strenght and not first strikes, this is already a huge flaw.
 
So few units can get Guardsman that making it work as intended is perfectly acceptable. Yes, Shadows and the like become nearly useless against the Bannor, but that is a design decision and it is properly balanced.


I really do think that the way I have re-written the code is how it was intended to work. Now you have to bring along some normal units to pick off the Guardsmen, THEN you can smack the mage with your Marksman unit.


The way it was written would work 90% of the time. Since the check for ideal defender starts with the "head unit," and I am reasonably certain that the "head unit" is selected as the unit who ought to have the highest strength. Thus the only times you should run into the problem mentioned is when your Head Unit isn't the guy with Guardsman and then your Mage comes up before your Guardsman does. Or when your mage happens to be stronger than your guardsman (which is why I used a Warrior in my example with the code. Stack a warrior and a Mage and the Mage will be the visible unit while the stack is not actually selected, which means that he is the "head unit")

EDIT: Also, as I have re-written it, you wouldn't need to have the boost to defense chances which Guardsman also carries. Which would be nic eto drop IMO.
 
So, as long as the guardsman has a higher strength then archmages and other softies, guardsman will protect against shadows and the like?
 
If I am translating how the Head Unit function works... possibly. But I have not yet looked into precisely how the whole Head Unit thing works precisely, so I cannot say exactly what order the units are checked in. But how it is written, if the guardsman is checked before any units weaker than himself are checked, he works. Otherwise, he doesn't.
 
Voicing my opinion here, having guardsmen work against marksmen 100% of the time is perfectly acceptable to me. You don't see guardsmen all that often, and marksmen is quite a powerful promotion that having a counter is important (other than stacking hawks and workers, etc. which seems completely out of flavor).
 
Stacking hawks and workers makes absolutely zero sense from a gameplay perspective and should be replaced with a reasonable alternative.
 
I still think that (barring a mechanism to let us actually target a specific unit in a stack) Assassins should target attack workers, birds, or equipment. They probably shouldn't take out ships in cities either.

I'm thinking that only DOMAIN_LAND units with a UNITCOMBAT should ever be targeted.

(Of course, this would mean that workers would still be assassinated in modmods based on xienwolf's worker modmod. Maybe the targeting mechanism should be exposed to python so we can exclude certain unitcombats on our own. or make certain units more vulnerable)


I'm also hoping that <UnitClassTargets>, <UnitCombatTargets>, and a new <PromotionTargets> tags will be added to promotions. That way, the marksman promotion could allow several targeting spells that let you pick what type of unit you want to target.
 
If the issue is having special mage-guarding units to protect against assassins, without being strong enough function on the front line, what about a new, slightly weaker unit? Call it Honor Guard, give it a Xienwolf's reworked guardsman promotion (increased change to be selected by a marksman with no increased chance to defend the stack), and a bonus versus poison. Not sure what strength value would be appropriate, maybe Strength 6 with 50% bonus versus poison? Not sure if it should use weapons, or at least not mithril, since that would be pretty much autowin except against high level shadows. Put it in with Honor. Unique unit for Bannor; Royal Guardsman could work like this also but with higher strength. Or is this exactly what people want to avoid: something that is meant purely to defend against marksman units?
 
Stacking hawks and workers makes absolutely zero sense from a gameplay perspective and should be replaced with a reasonable alternative.

I agree.

The technology precision gives your beastmasters with combat 4, if i remember correctly, the ability to learn the marksmen promotion.
So why should i try to get shadows if i get these promotions on these units anyway (well i think guilds isnt so expensive, and shadows are most time invisible...)
If guardsmen protects vs marksmen, why not let units with a certain requirement get the guardsmen promotion, too?
 
My problem with the guardsmen promotion, is that my earlier built Bannor units won't ever defend if they are in a stack with ones I built later, even if they have much more health
 
My problem with the guardsmen promotion, is that my earlier built Bannor units won't ever defend if they are in a stack with ones I built later, even if they have much more health

I have a similar problem, though for an entirely different reason. My early units, obviously, don't have Guardsman. Then comes a period of the problem described above, though it tends to be relatively short as I'm usually at peace rushing fanaticism at this point. Then, I hit Fanaticism and the moment Donal Lugh arrives, off I go on my merry crusade, until either my economy implodes or I run out of accessible victims. Now, something like 1% of my units actually have Guardsman, because of the other 99%, half are free Demagogues from Crusade/Rally, and the other half are recruits from Donal Lugh.

Of course, one could argue that I really don't need Guardsman since a) I don't have archmages and b) in the time it takes to lose one priest or mage to assassination I've trained another dozen due to not needing to train other units, but it would be nice if at least some of my recruits and demagogues got Guardsman.
 
My problem with the guardsmen promotion, is that my earlier built Bannor units won't ever defend if they are in a stack with ones I built later, even if they have much more health

More correctly, your problem is the one I described: units with the Guardsman promotion will defend when they are not the best defender. This is the antithesis of strategy. It can be very well considered a bug, not just a design flaw.
 
Well that aspect is due to being flagged with "BetterDefenderThan" as well as "CounterTargetWeakest." You could remove the first tag and the units would be considered just like any other unit UNTIL a marksman tries to snipe your weakest unit out of the stack.

IMO, that second attribute was added to balance out the Guardsman Promotion. Now you have the Guardsman to protect the Mages, but you need to have someone REALLY strong to protect the guardsman (or the Mages have to be on the Offensive to help protect him)
 
REALLY strong is not enough Xienwolf (not compared to the melee line, heh). Someone else will take over only in case it is a guarsdman itself or if this guardsman is REALLY weakened.

This promotion completely screws the whole melee line for Bannor. All I am asking for is an option to apply it or not. THIS would be strategy.
 
Back
Top Bottom