If it is widely regarded as the best solution, I'll put this in as our first settled fix. Do you know who devised the solution?Originally Posted by Bob the Insane
If it is widely regarded as the best solution, I'll put this in as our first settled fix. Do you know who devised the solution?Originally Posted by Bob the Insane
Last edited by therother; 02-24-2005 at 00:25.
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
delete the battlescarred effect from the battle1r trigger. Otherwise a roman general tests for scarring once under battle1 and again under battle1r. There's enough double traits from playing out battles, we don't need more. :)
And you're right, Bob, that was only what I posted. I thought it was the general consensus, and by claiming it as such I thought I could draw out the last of the undecideds :)
"Let us wrestle with the ineffable and see if we may not, in fact, eff it after all." -Dirk Gently, character of the late great Douglas Adams.
That's really not needed.Originally Posted by Pode
There is already "and not CultureType roman" around first battlescarred check.
Why edit files more then necessary?
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
By default the "and not CultureType roman" is not there, I added it above to try and fix the issue (not orginially my idea I must point out)... Pode was just pointing out that removing the line in Trigger battle1R was more elegant than adding extra lines of code to achieve the same effect...Originally Posted by player1
I thought it might be helpful to include a few notes on how the triggers work given some of the apparent confusion.
I'll use the probably now familiar GoodFarmer trigger as my example...
Trigger governing5
WhenToTest GovernorBuildingCompleted
Condition SettlementBuildingFinished >= farms
Affects GoodFarmer 1 Chance 100
First we have the trigger's identity, governing5, which is nothing more than a convenient label to make it easier for people to locate a specific trigger. I could rename this trigger as get_badfarmer and it would have no effect on its functionality, equally I could change its name to governing1, duplicating that of another trigger, and it will have no effect - both triggers will still function correctly.
Next is the event when the trigger is tested, GovernorBuildingCompleted. Many events can be determined from the examples already available in the traits file, while others can be found in the Events, Conditions, & Commands thread. It's important to note that only CA can edit existing events or create new events, so we can only work with what is available, no amount of modding will get around this.
In the case of the GovernorBuildingCompleted event, it occurs when a building is completed in a settlement that has a governor.
Next we have the condition, SettlementBuildingFinished. Despite how many of them appear conditions are not mathematical equations. Conditions are functions that return a true or false answer given one or more parameters. Some of these parameters are variables that are automatically passed to the function, and are otherwise hidden, while others have to be specifically declared in the trigger and are thus visible and amendable.
In the case of this trigger, the condition function SettlementBuildingFinished is intended to test a building that has just been completed. It is passed a variable parameter that contains the identify of the completed building, plus two declared parameters - >= and farms - that the function tests that building against. This trigger will return true if the completed building is Land Clearance or any other higher-level farm.
All conditions for a trigger in effect have to return an answer of true for the trigger to cause any results. I say 'in effect' because we have the possibility of 'not' switches, such as and not SettlementBuildingFinished >= farms, which would mean you'd get GoodFarmer for completing anything other than a farm. The 'not' switch simply reverses the true/false answer from the function, so you'd need the function to return false for that condition if the trigger is to cause any results. Confused? You will be!
A trigger can have multiple conditions... for example if we only want Julii characters to gain GoodFarmer when they complete a farm, we'd add and FactionType romans_julii under the Condition SettlementBuildingFinished >= farms line. In the case of multiple conditions, all conditions must return true, after any 'not' switches if appropriate, for the trigger to cause any results.
Finally we have the results caused, Affects GoodFarmer 1 Chance 100 if all conditions are met. In this case the governor's GoodFarmer trait has a 100% chance of gaining 1 point. Obviously if the chance is less than 100% then it's possible that random chance will result in no points gained even if all the conditions have been met. If the points gained are enough to equal or exceed the threshold of a trait level then the character will gain the appropriate effects.
As a note up to 10 traits can be effected by any one trigger, but the trigger can be duplicated and different traits effected if more than 10 are required for the same trigger event and conditions.
Last edited by Sinner; 02-26-2005 at 12:37.
By the way, has anyone investigated what Camp Freddie has done in regards to Coward trait.
I refer to changes done in his RTWv12_bugfixes patch.
In line:
Add not before "PercentageEnemyKilled"Code:Condition not GeneralFoughtInCombat and PercentageEnemyKilled = 0 Affects Coward 1 Chance 10
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Also, he made some changes to shieldbearer and heroic saviour ancillaries, since they also use GeneralHPLostRatioinBattle (and were maybe bugged).
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Yikes, who originally thought this one up?? I guess you would have to pour through the forums here and at TWCenter to see who posted it first... Or you could say the resolution developed by the consensus in the RTW community...Originally Posted by therother
Much neater that way...Originally Posted by Pode
Code:;------------------------------------------ Trigger battle1 WhenToTest PostBattle Condition GeneralHPLostRatioinBattle < 0.7 Affects BattleScarred 1 Chance 30 Affects Brave 1 Chance 15 ;------------------------------------------ Trigger battle1b WhenToTest PostBattle Condition GeneralHPLostRatioinBattle < 0.7 and Trait Berserker >= 1 Affects Berserker 1 Chance 30 ;------------------------------------------ Trigger battle1R WhenToTest PostBattle Condition GeneralHPLostRatioinBattle < 0.7 and CultureType roman Affects RomanHero 1 Chance 15 ;------------------------------------------
Bookmarks