PDA

View Full Version : export_descr_character_traits: Section 1.1.1 - Primary Triggers - ICE Rating - Cha...



Twigvest
09-15-2014, 15:29
Hi, I volunteered to help look at the export_descr_character_traits file in the recruitment thread today. I noticed people were complaining about having crappy generals, and how when they come of age they are Sharp/Uncharismatic/Lagarous. I believe I have found my first bug!

When determining the Intelligence/Charisma/Energy (ICE) when "CharacterComesOfAge" there are a couple of conditions in the initializations (as opposed to OfferedForMarriage or OfferedForAdoption etc, where there are no conditions).

Intitialize1 has:
"Condition Trait NaturalIntelligence < 1"
Which will be true for any fresh general. Then he is given +1 to each of Intelligence/Charisma/Energy as well as being assigned random Intelligence (rendering him likely Sharp in ICE)

But,
Intitialize2 has:
"Condition Trait NaturalCharisma < 1"
Which will always be false becase he was granted +1 Charisma in Intitialize1. Hence the Character is not granted the random Charisma/Energy (rendering him Uncharismatic/Lagarous). (Likely a copy paste bug, like I expected to find in places).

I suggest:
1) Remove the Conditions of Triggers:
random_birth_1_ICE_Trigger_Initialize1 (Condition Trait NaturalIntelligence < 1)
random_birth_1_ICE_Trigger_Initialize2 (Condition Trait NaturalCharisma < 1)

2) Change Condition of random_birth_1_ICE_Trigger_Initialize2 to something that will more likely be true, like:

Condition Trait NaturalCharisma = 1

I suspect these conditions exist because before this initialization, there are predefined characters who have specific ICE settings already. So fix 2 should be what is used.


I don't know if should bother, but I'll post this to the other forum too

QuintusSertorius
09-15-2014, 15:51
Great to hear someone's looking at this. The triggers for BadDisciplinarian and IndecisiveAttacker are wonky, too, so worth a look when you get round to it.

I must admit TWC has become much less attractive to post with that crappy sidebar thrust into my face all the time.

Twigvest
09-15-2014, 15:59
I don't see any side bars (AdBlock) here.

Other forum insists I be moderated before my post shows up :(

I'll add that to my list of places to look, otherwise I'll gradually trudge through everything.

Quickly looking at BadDisciplinarian, it has a NoGoingBackLevel 4, so once it racks up a little you will get stuck with it, it can even be gained randomly at end of turn (as with Disciplinarian).
Triggers suggest Disciplinarian should be an AntiTrait but it isnt stated in the trait definition. NoGoingBackLevel for them both is 4, but they go up to 9 and 12 respectively. NoGoingBackLevels should maybe be set at 10 and 13 respectively (to avoid the bug of losing level on level change), and an AntiTrait defined.
Other than that if you are seeing it go up in a battle where you had none of your guys rout, then that means that "PercentageRoutedOffField" is actually referring to the enemy army, rather than your army.

QuintusSertorius
09-15-2014, 16:47
I don't see any side bars (AdBlock) here.

Other forum insists I be moderated before my post shows up :(

I'll add that to my list of places to look, otherwise I'll gradually trudge through everything.

Quickly looking at BadDisciplinarian, it has a NoGoingBackLevel 4, so once it racks up a little you will get stuck with it, it can even be gained randomly at end of turn (as with Disciplinarian).
Triggers suggest Disciplinarian should be an AntiTrait but it isnt stated in the trait definition. NoGoingBackLevel for them both is 4, but they go up to 9 and 12 respectively. NoGoingBackLevels should maybe be set at 10 and 13 respectively (to avoid the bug of losing level on level change), and an AntiTrait defined.
Other than that if you are seeing it go up in a battle where you had none of your guys rout, then that means that "PercentageRoutedOffField" is actually referring to the enemy army, rather than your army.

I think you need 20 posts before they show up automatically, and can edit. That must be the probation period on TWC. How did you AdBlock the sidebar? Was it http://www.twcenter.net/forums/images/y2skin/backgrounds/* ?

BadDisciplinarian seems to be triggered too easily, and I don't think it's even discriminate about who's routing, whether yours or enemy. I rarely have my own units rout, yet every single general who fights battles picks it up. Usually within 2-3 battles.

Twigvest
09-16-2014, 01:44
Seems there is already a bug report regarding BadDisciplinarian: https://forums.totalwar.org/vb/showthread.php?148012-Bad-Discipline-%28and-temporary-fix%29&p=2053617154

Seems it is indeed the PercentageRoutedOffField that is failing, and counting everyone in the battle routing, not just your guys.

Googling around he is not the only one to have this issue and it is a common problem with that variable. I don't know how EB2 team will try to work around it, but at the moment its going it spread BadDisciplinarian around to everyone if they fight.

Regarding IndecisiveAttacker, If you end up in the enemy zone of control with move points left, you might gain it, and you will gain it if you actually click to attack and have a look at the odds, and the are 0.7 or better, and then decide not to attack i.e. withdraw before battle (with a good chance of hitting the NoGoingBackLevel for the trait, meaning you are stuck with it). it it was 1.3 or better, you are screwed if you decide you don't want to fight. Overall, other than seeming harsh it doesn't read as buggy. It is you the player who is being Indecisive about attacking in these cases.


As for adblock, I simply have the EasyList blocking filter downloaded, I have no custom filters for this site.

Poppis
09-16-2014, 06:30
Great to hear someone's looking at this. The triggers for BadDisciplinarian and IndecisiveAttacker are wonky, too, so worth a look when you get round to it.

I must admit TWC has become much less attractive to post with that crappy sidebar thrust into my face all the time.

I remember you saying somewhere that you get the indecisiveattacker when besieging a settlement. Was that right? If so, were there any other enemy stacks next to your army? If not, the trigger might be bugged(or at least not working as people thought):


Trigger failed_to_attack
WhenToTest CharacterTurnEnd

Condition EndedInEnemyZOC
and RemainingMPPercentage > 10

Affects IndecisiveAttacker 2 Chance 40

If there were other enemy stacks near you, then this is working as it should. If not, I wonder if the trigger is also counting the city defenders ZoC.

PS. By the way, is there a list of all the conditions and stuff you can use in this file. Would help a lot to know what I can actually do to trigger stuff.

V.T. Marvin
09-16-2014, 07:04
Hi, I volunteered to help look at the export_descr_character_traits file in the recruitment thread today. I noticed people were complaining about having crappy generals, and how when they come of age they are Sharp/Uncharismatic/Lagarous. I believe I have found my first bug!

When determining the Intelligence/Charisma/Energy (ICE) when "CharacterComesOfAge" there are a couple of conditions in the initializations (as opposed to OfferedForMarriage or OfferedForAdoption etc, where there are no conditions).

Intitialize1 has:
"Condition Trait NaturalIntelligence < 1"
Which will be true for any fresh general. Then he is given +1 to each of Intelligence/Charisma/Energy as well as being assigned random Intelligence (rendering him likely Sharp in ICE)

But,
Intitialize2 has:
"Condition Trait NaturalCharisma < 1"
Which will always be false becase he was granted +1 Charisma in Intitialize1. Hence the Character is not granted the random Charisma/Energy (rendering him Uncharismatic/Lagarous). (Likely a copy paste bug, like I expected to find in places).

I suggest:
1) Remove the Conditions of Triggers:
random_birth_1_ICE_Trigger_Initialize1 (Condition Trait NaturalIntelligence < 1)
random_birth_1_ICE_Trigger_Initialize2 (Condition Trait NaturalCharisma < 1)

2) Change Condition of random_birth_1_ICE_Trigger_Initialize2 to something that will more likely be true, like:

Condition Trait NaturalCharisma = 1

I suspect these conditions exist because before this initialization, there are predefined characters who have specific ICE settings already. So fix 2 should be what is used.


I don't know if should bother, but I'll post this to the other forum too
Thank you for this find - I indeed screwed this up big time! :wall: :shame:

Please keep posting here - it is our "home" forum and I feel much more comfortably here than at TWC.

Anyway, I will fix the ICE triggers myself later today - mea culpa, mea maxima culpa.

As regards the NoGoingBackLevel - be careful if this refers to trait levels or trait points. In your post you suggest the latter, but I think it is the former.

The anti-trait bug is NOT fixed by by setting the "NoGoingBackLevels" to a number strictly above the highest threshold for the trait - this way the traits as listed on the character scroll APPEAR to work as intended, but the effects they have remain stuck on the character - best exemplified by movement restrictions (https://forums.totalwar.org/vb/showthread.php?148040-Spartan-Agoge-movement-bug). The only way to deal with this bug is to construct the triggers so that if you ever need to reduce a trait, you dont do it by adding point to an anti-trait, but taking away points from tha trait. Pretty frustrationg I can tell you - I managed to fix dozens of such instances (with a risk of intoducing other bugs of my own) but some - like agoge or spoils of victory remain afflicted by this bug.

The list of events and conditions is to be found in docudemons (http://www.twcenter.net/forums/showthread.php?118578-M2TW-Ultimate-Docudemons-4-0).

Twigvest
09-16-2014, 07:59
Thank you for this find - I indeed screwed this up big time! :wall: :shame:

Please keep posting here - it is our "home" forum and I feel much more comfortably here than at TWC.

Anyway, I will fix the ICE triggers myself later today - mea culpa, mea maxima culpa.

As regards the NoGoingBackLevel - be careful if this refers to trait levels or trait points. In your post you suggest the latter, but I think it is the former.

The anti-trait bug is NOT fixed by by setting the "NoGoingBackLevels" to a number strictly above the highest threshold for the trait - this way the traits as listed on the character scroll APPEAR to work as intended, but the effects they have remain stuck on the character - best exemplified by movement restrictions (https://forums.totalwar.org/vb/showthread.php?148040-Spartan-Agoge-movement-bug). The only way to deal with this bug is to construct the triggers so that if you ever need to reduce a trait, you dont do it by adding point to an anti-trait, but taking away points from tha trait. Pretty frustrationg I can tell you - I managed to fix dozens of such instances (with a risk of intoducing other bugs of my own) but some - like agoge or spoils of victory remain afflicted by this bug.

The list of events and conditions is to be found in docudemons (http://www.twcenter.net/forums/showthread.php?118578-M2TW-Ultimate-Docudemons-4-0).

Oh thanks for that list, I was looking for it.

Yep I misunderstood the "NoGoingBackLevels", I see how it works now. It begs the question, can a trait have Levels with negative thresholds defined? If so it would mean that having an opposite trait defined is not needed, and you can use a single trait to define the entire spectrum of levels.

If, as I suspect, we can't do that, then for every trigger that assigns points to one of a pair of traits, you would need to also lower the other trait. EG:


Trigger SomewhatGoodDiscipline_Disciplined
WhenToTest PostBattle

Condition IsGeneral
and BattleOdds < 1.2
and PercentageRoutedOffField < 6
and Trait BadDisciplinarian < 1

Affects Disciplinarian 1 Chance 10

I think this should look like:


Trigger SomewhatGoodDiscipline_Disciplined
WhenToTest PostBattle

Condition IsGeneral
and BattleOdds < 1.2
and PercentageRoutedOffField < 6
and Trait BadDisciplinarian < 1

Affects Disciplinarian 1 Chance 10
Affects BadDisciplinarian -1 Chance 10

This is obviously wrong, because they have independent 10% chances, but I hope you see what I mean. Maybe there needs to be a tertiary trigger that sees "Disciplinarian #" happen, and autoamtically offsets with "BadDisciplinarian -#". Or perhaps something like :


If Affects Disciplinarian 1 Chance 10
Then Affects BadDisciplinarian -1 Chance 100

But I have my doubts as to whether the language is that robust. I need to find some documentation on it. Maybe all these interactions are monitored and offset by scripts, I dont know.

I kinda see how its all working at the moment, but its very hack-y and round-about-y. If any of what I have written is possible, it would lead to a huge clean up and simplification of a lot of traits and triggers.

Tux
09-16-2014, 08:25
Great to hear someone's looking at this. The triggers for BadDisciplinarian and IndecisiveAttacker are wonky, too, so worth a look when you get round to it.

I must admit TWC has become much less attractive to post with that crappy sidebar thrust into my face all the time.
And too considerate/kills with kindness, happens all the time even after an heroic battle.

Twigvest
09-16-2014, 08:43
And too considerate/kills with kindness, happens all the time even after an heroic battle.

These are the second and third levels of BadDisciplinarian. There is a thread here offering fixes even.

Problem is that BadDisciplinarian gains points after battles depending on the TOTAL % troops that have routed [Rather than YOUR % troops that have routed.] It is a M2TW bug in the definition of troops routed, and is not EB2 specific.

Bava
09-16-2014, 12:31
Very interesting thread :)

VT Marvin or Twigvest, would you mind posting an updated export_descr_character_traits file here?
I´m about to start a new campaign and that would come in handy.

By the way, someone also mentioned the agoge being bugged. I think I have the same issue in my current pergamon campaign, the chars that have the ' (barely :P) completed agoge' trait can´t move anymore, not even one footstep out of sparta.

Twigvest
09-16-2014, 12:54
Very interesting thread :)

VT Marvin or Twigvest, would you mind posting an updated export_descr_character_traits file here?
I´m about to start a new campaign and that would come in handy.

By the way, someone also mentioned the agoge being bugged. I think I have the same issue in my current pergamon campaign, the chars that have the ' (barely :P) completed agoge' trait can´t move anymore, not even one footstep out of sparta.

I haven't read up to the Agoge, but I'll upload you what I'm using now (7zipped). It will fix Characters coming of age, and used the beta code I have posted in the BadDisciplinarian thread. Tried it out a bit before, and I have since tweaked the percentages a bit, I hope it fixes the woes with BadDisciplinarian.

14421

Bava
09-16-2014, 13:13
Whoa, that was fast. Thanks a ton, Twig, will test it asap and report back :)

QuintusSertorius
09-16-2014, 13:23
Regarding IndecisiveAttacker, If you end up in the enemy zone of control with move points left, you might gain it, and you will gain it if you actually click to attack and have a look at the odds, and the are 0.7 or better, and then decide not to attack i.e. withdraw before battle (with a good chance of hitting the NoGoingBackLevel for the trait, meaning you are stuck with it). it it was 1.3 or better, you are screwed if you decide you don't want to fight. Overall, other than seeming harsh it doesn't read as buggy. It is you the player who is being Indecisive about attacking in these cases.

The penalties for forced marching are such that I never use up all the movement points, but I never attack and then withdraw. So it seems to be triggering simply because I don't use up all the movement points.

Poppis
09-20-2014, 07:34
Ok these might seem like stupid questions but I need some confirmation as I'm still learning to read this thing.:)

1. Are the trait points capped to the highest level threshold? For example, if your character has the highest level trait in goodtactician trait line(Tactical Genius, which has threshold 64) and activates a trigger to get +2 points in goodtactician, will he now have 66 points or is it capped at 64.

2. Let's say a trigger has a condition like this

Trait GoodTactician > 1

Does this mean that to activate the trigger the character has to have goodtactician level 2 or is it enough to simply have more points than the first level requires? In this example, goodtactician level 1 has threshold 4 and level 2 has threshold 8, so do you need 8 points, or would 5 points be enough to activate the trigger?

Thanks in advance.

bovi
09-20-2014, 10:53
1. Don't think it caps to the highest threshold, no.

2. A trait condition refers to level, yes, and points are not considered. The level in that condition must be higher than 1 (2 or higher), so you must reach 8 points in the trait for the condition check to return truth.

Poppis
09-20-2014, 11:17
1. Don't think it caps to the highest threshold, no.

2. A trait condition refers to level, yes, and points are not considered. The level in that condition must be higher than 1 (2 or higher), so you must reach 8 points in the trait for the condition check to return truth.

Thanks for the quick answers.

I think I found a minor bug with the triggers for electing a military tribune:



Here's the three triggers. I have highlighted the the lines that don't seem right

Trigger Elected_MilitaryTribune1
WhenToTest CharacterTurnEnd

Condition FactionType f_rome
and I_EventCounter ecWinter = 1
and Trait RomanRank = 1
and Trait MilitaryTribune < 1
and Trait RomanMilitaryService > 1

Affects MilitaryTribune 1 Chance 10

;------------------------------------------
Trigger Elected_MilitaryTribune2
WhenToTest CharacterTurnEnd

Condition FactionType f_rome
and I_EventCounter ecWinter = 1
and Trait RomanRank = 1
and Trait MilitaryTribune < 1
and Trait RomanMilitaryService > 2

Affects MilitaryTribune 1 Chance 25

;------------------------------------------
Trigger Elected_MilitaryTribune3
WhenToTest CharacterTurnEnd

Condition FactionType f_rome
and I_EventCounter ecWinter = 1
and Trait RomanRank = 1
and Trait MilitaryTribune < 1
and Trait RomanMilitaryService = 3

Affects MilitaryTribune 1 Chance 100
I assume they should be like the last trigger(ie RomanMilitaryService = 1 and RomanMilitaryService = 2 respectively)

V.T. Marvin
09-20-2014, 14:06
Good catch - thank you! :bow:

Poppis
09-21-2014, 11:27
Another(possible) minor bug:


Trigger Elected_Consul_Becomes_Novus_Homo
WhenToTest CharacterTurnStart

Condition FactionType f_rome
and Trait Consul = 1
and Trait Nobile < 1
and Trait NovusHomo < 1
and AgentType = family

Affects NovusHomo 1 Chance 100

This gives you Novus Homo as long as you have the "Eligible for Consul" trait. I assume it should only give it once/if you get elected.

Kull
09-23-2014, 23:52
Twigvest Poppis - You guys are doing great things in here. Please keep it up. The team is watching closely!

Poppis
09-28-2014, 10:17
How does management work? There are still some ancillaries that give you management. I thought Piety took it's place.