Results 1 to 30 of 76

Thread: Research: Fixing the trait bugs

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Research: Fixing the trait bugs

    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.

  2. #2
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Research: Fixing the trait bugs

    Quote Originally Posted by Pode
    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. :)
    That's really not needed.
    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

  3. #3
    Ricardus Insanusaum Member Bob the Insane's Avatar
    Join Date
    Sep 2002
    Location
    London, UK
    Posts
    1,911

    Default Re: Research: Fixing the trait bugs

    Quote Originally Posted by player1
    That's really not needed.
    There is already "and not CultureType roman" around first battlescarred check.

    Why edit files more then necessary?
    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...

  4. #4
    Squirrel Watcher Member Sinner's Avatar
    Join Date
    Aug 2004
    Posts
    390

    Default Re: Research: Fixing the trait bugs

    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.

  5. #5
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Research: Fixing the trait bugs

    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:
    Code:
        Condition not GeneralFoughtInCombat
              and PercentageEnemyKilled = 0
    
        Affects Coward  1  Chance  10
    Add not before "PercentageEnemyKilled"
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  6. #6
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Research: Fixing the trait bugs

    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

  7. #7
    Ricardus Insanusaum Member Bob the Insane's Avatar
    Join Date
    Sep 2002
    Location
    London, UK
    Posts
    1,911

    Default Re: Research: Fixing the trait bugs

    Quote Originally Posted by player1
    Also, he made some changes to shieldbearer and heroic saviour ancillaries, since they also use GeneralHPLostRatioinBattle (and were maybe bugged).
    These are definately still broke as they are still expressing a percentage...

    i.e. GeneralHPLostRatioinBattle >= 80

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO