To save anybody else wasting their time, it doesn't look like the PreBattlePanelOpen event works for what we want - I think the reason being that the only value it returns is the faction and we need the character record as well.
To save anybody else wasting their time, it doesn't look like the PreBattlePanelOpen event works for what we want - I think the reason being that the only value it returns is the faction and we need the character record as well.
Zrave's fix seems best for now. To improve on it slightly, we might be able to remove the Bug trait every time some other common inter-battle triggers fire, like maybe GeneralCapturesSettlement, GeneralAssaultsResidence, CharacterTurnStart (all three of which may not work, since CA didn't use them, and we'd have to make sure the first two wouldn't get checked in between the double check), HireMercenaries, EnslavePopulation, Exterminate Population, and PreBattleWithdrawal. BecomesFactionLeader, CeasedFactionHeir, AcceptBribe, GovernorBuildingDestroyed, and a host of LeaderX are also possible and non-redundant, but probably too marginal to bother with.
Edit: CharacterSelected would probably work, Sinner, although probably only for the player's selection of his own characters.
-Simetrical
CharacterTurnStart definitely works. CharacterSelected: hmm, has possibilities...
Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus
History is a pack of lies about events that never happened told by people who weren't there -- George Santayana
ALERT!
Scarrface fix is not working well!
It seems that GeneralHPLostRatioinBattle is working as itended when doing autocalc battle (checking % of health lost).
Only in manual battle it checks % of health remaining.
So, the fix for Scarrface has fixed the trait for manual battle, but broke it for autocalc.
P.S.
As sideffect, there would be more brave and scarred AI generals.
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Okay, tested CharacterSelected. It works well; using the trigger below, I removed the DoubleCombat1 trait by clicking on the general.
Code:;------------------------------------------ Trigger CharacterSelected Test WhenToTest CharacterSelected Condition CharacterIsLocal and IsGeneral and Trait DoubleCombat1 = 1 Affects AntiDoubleCombat1 1 Chance 100
Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus
History is a pack of lies about events that never happened told by people who weren't there -- George Santayana
Okay, putting ideas together.
Do the steps in the first 2 code boxes in this post, just forget about the 2nd level.
At the end of the Character file, add this:
Then add:Code:;------------------------------------------ Trigger Remove DoubleCombat1 if = 1 WhenToTest PostBattle Condition IsGeneral and Trait DoubleCombat1 = 1 Affects AntiDoubleCombat1 1 Chance 100 ;------------------------------------------ Trigger Add 1 to DoubleCombat1 WhenToTest PostBattle Condition IsGeneral and Trait DoubleCombat1 = 0 Affects DoubleCombat1 1 Chance 100 ;------------------------------------------ Trigger Remove DoubleCombat1 aEoT WhenToTest CharacterTurnEnd Condition IsGeneral and Trait DoubleCombat1 = 1 Affects AntiDoubleCombat1 1 Chance 100 ;------------------------------------------ Trigger CharacterSelected remove trait WhenToTest CharacterSelected Condition CharacterIsLocal and IsGeneral and Trait DoubleCombat1 = 1 Affects AntiDoubleCombat1 1 Chance 100
as a condition for every battlefield trait.Code:and Trait DoubleCombat1 = 0
Notes/Comments/Problems:
- This will stop the double traits for all battlemap battles (for AI and player), assuming that this type of battle is all that they have taken part in (i.e. no autocalc, or prebattle withdrawals).
- This will allow as many autocalcs as the player likes - as soon as you select your general to attack anyone else, the DoubleCombat1 trait is removed.
- There is still a problem for AI generals after a player-initiated autocalc, and multiple AI autocalcs involving the same AI general in one turn. For the 2nd, and all subsequence battles that turn, that AI general will receive no traits.
- Perhaps more annoyingly, if an AI General retreats from the initial attack, he will be given the DoubleCombat1 trait. Whilst the player's is expunged by the character select trigger, the AI's remains, meaning he will not get any traits if the player follows up and attacks on the same turn (I do this often). If only PreBattle worked!
- Similarly, it is possible that this could affect the player's general if he is attacked more than once during the AI's turns, and choses to withdraw or autocalc.
- …
What we need, assuming PreBattle is not implemented, is a condition that is always automatically triggered in between battles (even during AI turns), and can remove the DoubleCombait1 trait for all generals, irrespective of faction. I would even settle for a player activated one...
At the moment, the Code tags don't seem to be working correctly. Hopefully they will be fixed soon. In the meantime, you can quote the post to get the proper formatting.
Last edited by therother; 03-01-2005 at 04:35.
Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus
History is a pack of lies about events that never happened told by people who weren't there -- George Santayana
What is that about Condition CharacterIsLocal? Can't we set CharacterSelected in a way that all generals you select lose the marker trait?
I just nicked it from a CA use of the trigger (to trigger advice in export_descr_advice.txt). It is meant to check if the character selected is from the player's faction. Removing it doesn't seem to do anything, as you can’t 'select' characters of another faction, so I guess it's a bit redundant. Though I may be missing something.Originally Posted by Zrave
Last edited by therother; 03-01-2005 at 04:41.
Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus
History is a pack of lies about events that never happened told by people who weren't there -- George Santayana
Actually, only the even numbered autocalc battles will give no traits, so its not terrible, only bad :)Originally Posted by therother
Yeah I had thought that it would not get applied on retreats, but upon further reflection, I guess it would apply. That being said, if the second battle is manual controlled instead of autocalc, everything will work as intended, even if you lose the marker trait by selecting yourself and the AI doesn't.Originally Posted by therother
As long as the battles are manually controlled, the fix will work. This is because regardless of whether the marker is active or not, either the first or the second pass will cause the triggers to go off.Originally Posted by therother
Hmm, perhaps my formulation is faulty. In the scheme I outline above, once a general enters a battle on the campaign map, or the battlemap, with DoubleCombat1 = 1, that general will receive no battlemap traits, as it will always be 1 throughout the file, and will end the battle as 1 also.
Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus
History is a pack of lies about events that never happened told by people who weren't there -- George Santayana
Ah, sorry for not analyzing your code in detail, I recognized elements of my fix and assumed that it was such.
The difference is that my second trigger always goes off, and my first trigger gives 2 points.
What this means is that if you already have the marker, my second trigger returns you to a neutral state, allowing the triggers during the "bugged" pass to work. If you do not have a marker, then you will gain one and the "bugged" pass will not work.
Ah, you are using a two-trigger system, like I tried last night. I don't know how I missed that.
To be honest, I'm still tending towards the manual "withdrawal" trigger, as that has no effect on the AI unless it, in one turn, it withdraws from battle x times (x being user definable, 2 in the case outlined above). Maybe it is unwieldy, bit it works like a charm.
Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus
History is a pack of lies about events that never happened told by people who weren't there -- George Santayana
Have an idea about possibile compromise:Originally Posted by player1
Code:Trigger battle1 WhenToTest PostBattle Condition GeneralHPLostRatioinBattle > 0.3 and GeneralHPLostRatioinBattle < 0.7 Affects BattleScarred 1 Chance 30 Affects Brave 1 Chance 15
So that you get checked for trait in cases when general remains with 30-70% health, regardless is it autocalc or manual battle?
Not perfect, since it doesn't check those that are very badly injured (less then 30% heath).
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Is it somehow possibile, by useing some already bygged triggers like GeneralHPLostRatioinBattle or GeneralFoughtInCombat, to detect is combat, in fact, autocalc or manual?
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
What are default general hit points anyway?
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
I've been told that Generals have +5 HP. So that's 7 HP, since the bodyguard unit has 2 already.
Damn! I thought that would work for GeneralHPLostRatioinBattle but the best it can give is:Originally Posted by player1
GeneralHPLostRatioinBattle "less than"0.95 is true when you autocalc (and didn't die) or when your battlemap general loses HP.
For battlemap: GeneralHPLostRatioinBattle > 0.05 is true when you battlemap or when your autocalc general loses any HP.
I can't think of a way to further distinguish between battlemap and autocalc.
Camp Fweddie - Wanking higher than any in Wome since 273 BC
player 1, are you the guy from the civ forums that made the patch suggestion mod? Anyway, I think the General by default has 6 hitpoints. Edit: actually campfreddie might be right.
As well as the battlescarred, your fixes will also have to be applied to berserker trigger and the shieldbearer and heroic saviour ancillaries.
Last edited by Jambo; 03-01-2005 at 11:21.
=MizuDoc Otomo=
yesOriginally Posted by Jambo
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Okay, using the rules (in this order) that I think Zrave is suggesting above:
- If (bug, Fix) = (1,2), then (bug, Fix) reset to (0,0)
- Parse battlemap triggers - no trait if Bug = 1
- If Bug = 1 then Fix = 2
- If Bug = 0, then Bug = 1)
And (1,2) is the maximum level for (Bug, Fix)...
If so, then these are the outcomes I expect from a few senarios:
If this is accurate, then I'm much happier. Although it is still penalising the AI, as the AI will normally fight far more A/Cs than the player. My preference, given the current situation with the AI, would be to penalise the player in situations such as this.
Last edited by therother; 10-19-2005 at 23:04.
Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus
History is a pack of lies about events that never happened told by people who weren't there -- George Santayana
Consdering that scarred is buggy for autocalc, maybe something like this could be a quick-patch
;------------------------------------------
Trigger battle1
WhenToTest PostBattle
Condition GeneralHPLostRatioinBattle < 0.7
and GeneralHPLostRatioinBattle > 0
Affects BattleScarred 1 Chance 30
Affects Brave 1 Chance 15
;------------------------------------------
Added GeneralHPLostRatioinBattle > 0 prevents getting Scarred in autocalc battles in which general didn't got injured at all. Same condition for manual cointrolled battles is not problem considering that general would be dead, for =0 anyway.
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Actually, when I think about it GeneralHPLostRatioinBattle > 0.15 is probably the best option.
For autocalc that means generals which lost more then 1hp.
7hp*0.15=1.05
9hp*0.15=1.35
11hp*0.15=1.65
13hp*0.15=1.95
That should leave enough room for autocalc to award scarred not to often.
For manual battles that just means that general which have 1hp left won't get checked for scarred trait (no big deal).
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
I ran a test of the scarred bug player1 has just described and he's right on the money. So much for the theory that the double trigger bug was due to a "battle" pass and a "strat" pass, the autocalc engine uses its own ruleset.
My test was as such:
trait1 -> GeneralHPLostRatioinBattle > 0
trait2 -> GeneralHPLostRatioinBattle < 1
A tactical battle without general engaging gave me two points of trait1 and no trait2. the same battle with autocalc gave me no trait1 and one point of trait2. This means there was no engagement, because for only trait2 to be awarded the ratio had to be exactly 0, which by the tactical ruleset would mean dead.
As for fixing it, how about this:
;------------------------------------------
Trigger scarred1
WhenToTest PostBattle
Condition GeneralHPLostRatioinBattle < 0.3
and GeneralNumKillsInBattle > 6
Affects Battlescarred 1 Chance 100
;------------------------------------------
Trigger scarred2
WhenToTest PostBattle
Condition GeneralHPLostRatioinBattle > 0.7
and GeneralNumKillsInBattle > 6
Affects Battlescarred 1 Chance 100
100% chance?Originally Posted by Zrave
No thanks
Personnaly, I think that my variant
0.15 < GeneralHPLostRatioinBattle < 0.7
is just closer to the rules.
Barely changes things for manual, while making autocalc don't give weird results.
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
the 100 chance is a typo left over from my testing triggers, again a victim of no edit button and not willing to double post. Of course it would be reduced to 30% as usual.
The triggers work like this:
In battle mode, trigger 1 will go off like we would want it to in a normal scenario. Trigger 2 will likely never go off unless the general can get X kills, in the proposed case 6, without losing at least 30% of his health - I viewed this scenario as unlikely, but the numbers may need adjustment.
In autocalc mode, the reverse is true. Trigger 2 will go off like we would want it to, and trigger 1 will likely never go off.
Another important thing is that the two triggers will never go off simultaneously, so you can't "double" up.
My proposition has two faults:
1) The unlikely case your scenario can rack up a high number of kills without losing much HP, he'll get battlescarred, and if we can adjust that number to satisfaction I'm willing to live with the ocasional fluke.
2) If your general gets severely hurt but never reaches the desired number of kills, he won't get scarred even though we would want him to.
That being so, I think that it is a viable alternative to your proposition, to be compared and contrasted for a consensus solution.
Well, the problem is see, is that when playing manual, general can get a lots of kills (especialy if flanking or routing enemies), without almost getting any loses (and I'm talking things like 50+ kills).
Then, there would be a good chance to get battlescarred with second trigger, and that's bad.
On the other hand, such thing don't happen often in autocalc, so you can't really increase generalnumkills and make it ok.
Why I like my modif, is that it is almost 100% same as original should work, when doing manual battle (with exeption if 1hp is left because of >0.15).
Of course, it's a bit different, when making autocalc, but when you look at it, you don't really know what happend in autocalc battle.
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Yes, you bring a valid point with respect to routing enemies, which I'll consider in more detail. I think I have a better fix in the works.
There is another reason why I prefer my value - you actually have to be heavily wounded for it to work. I don't think we can say at this point what CA intended for the ratio value to be, because of the slew of bugs in its implementation. These are:
1) originally had a 30 instead of 0.3
2) with standard files their settings always give trait in manual
3) romans getting battlescarred twice shows they didn't analyse this area in much detail
4) autocalc/manual interpret the value differently
All this being said, I think what really matters is common sense. If someone is supposed to be tough to kill, then I would suspect that should be modelled by near-death values.
I tested my new idea for the fix and it seems to work properly. I still need to figure out the best values and see if it needs any more conditions.
;------------------------------------------
Trigger scarred1
WhenToTest PostBattle
Condition GeneralHPLostRatioinBattle < 0.3
and PercentageBodyguardKilled > 50
Affects Battlescarred 1 Chance 30
;------------------------------------------
Trigger scarred2
WhenToTest PostBattle
Condition GeneralHPLostRatioinBattle > 0.7
and PercentageBodyguardKilled > 50
Affects Battlescarred 1 Chance 30
Well, as I said, now it won'n fire for autocalc as often as it should, since getting 50 kills is a lot for that.
Also, it won't fire in case of manual battle with careless general (which killed a little and almost died in process).
While I find idea interesing, number of kills is too undependable method to aprox. how much is general injured.
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
If GeneralHPLostRatioinBattle is bugged, perhaps we should just do without it?
So how about something like this:
This would mean that general's unit has been in tough combat, as he's lost over half his unit, and has engaged the enemy personally, as he's killed more than 6 men. The thresholds, of course, could be tweaked.Code:;------------------------------------------ Trigger scarred1 - WhenToTest PostBattle - - Condition IsGeneral - and PercentageBodyguardKilled > 50 - and GeneralNumKillsInBattle > 6 - - Affects BattleScarred 1 Chance 30
Last edited by therother; 03-02-2005 at 19:44.
Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus
History is a pack of lies about events that never happened told by people who weren't there -- George Santayana
Personnally, I'm not fan of complete trigger rewrite when doing bugfixing. I would rather leave it to some good MOD.
For that reason I proposed soultuion that keeps problem almost 100% fixed for most often uses (manual battle), while not giving too big deviation in autocalc.
Of course, if anyone ever finds solution for double combat traits, it would easily solve scarred problems too.
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Bookmarks