Results 1 to 10 of 10

Thread: Need help with traits

Hybrid View

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

    Default Need help with traits

    Due to the ridiculous inaccuracy of naval sailing distance (one year to Carthage from the west tip of Sicily), I tried to make a trait that would give all admirals a farther sailing distance. Here's the description from export_VnVs:

    Code:
    ¬--------------------
    
    {faster_admiral}    Naval Vessel
     
    {faster_admiral_desc}
    As a naval vessel, this ship can travel the world far faster than any land-based army could ever hope to.
     
    {faster_admiral_effects_desc}
    Further movement per turn.
    and the code from export_descr_character_traits:
    Code:
    ;------------------------------------------
    Trait fasteradmiral
        Characters admiral
     
        Level faster_admiral
            Description faster_admiral_desc
            EffectsDescription faster_admiral_effects_desc
            Threshold 1 
     
            Effect MovementPoints 500
    Code:
    ;------------------------------------------
    Trigger admiral_speed_increase
    WhenToTest CharacterTurnEnd
     
    Condition AgentType = admiral
    and not Trait fasteradmiral = 1
     
    Affects fasteradmiral 1 Chance 100
    What have I done wrong?

    Also, off-topic, but the epithet/family names traits now work perfectly for both Romans and Greeks, and I'm on my way to finishing my mini-mod!

  2. #2

    Default Re: Need help with traits

    What error message does -show_err give? Also, do use Squid's Trait Validator, very useful tool.

  3. #3

    Default Re: Need help with traits

    Quote Originally Posted by Aradan View Post
    What error message does -show_err give?
    It doesn't give one. I think I may have made capitalization or something non-uniform between files, so I'll try and fix that.

    I couldn't find the trait validator in the downloads section. could you post a link, please?

  4. #4
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Need help with traits

    Probably you have too high of a value for the movement bonus, as I can't see anything off the top of my head. However be warned that admirals behave very funny when you give them traits, in some cases you lose the ability to merge fleets together if the admiral has any non-vanilla traits.

    As Aradan said, make sure you grab my validator tool. It checks for a lot of the potential errors in the trait/ancillary files.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  5. #5

    Default Re: Need help with traits

    As Squid said, giving 500 as a value for movement points must be confusing the engine, try sth like 100.

    Validator here ===> http://www.twcenter.net/forums/showthread.php?t=142568

  6. #6
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Need help with traits

    PI has 300 as the base value, but I don't know if the value in the Effects line can be over 256...
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  7. #7

    Default Re: Need help with traits

    I increased starting movement points to 1000 for Troy:Total War, so unless adding movement points by trait is different, I don't think that should be an issue. I'll try it, though.

    EDIT: I changed the effect to +100 movement points, but it's still not responding. I have a sneaking suspicion that I've misplaced underscores in a few places. Back with results soon. When I put it through the validator, it says that "agent type = admiral" is undefined, but it seems to work for other triggers.
    Last edited by cfan01; November 21, 2008 at 04:16 PM.

  8. #8
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Need help with traits

    The
    The AgentType = admiral check seems redundant anyhow, since you already set the trait so only admirals can get it.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  9. #9
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Need help with traits

    It will either say "Error: Condition AgentType is not defined" or it will say one of "Error: For condition AgentType, = is not a valid logic token" or "Error: For condition AgentType, admiral is not a valid character type". It won't give you the error as you're giving it.

    If it's seeing the first one, then you've got a hidden character or something in the AgentType condition. As HouseOfHam pointed out the condition is redundant anyways, but you can improve the trigger even more by removing the AgentType check and by changing the event to NewAdmiralCreated as this will only trigger when a new admiral is created.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  10. #10

    Default Re: Need help with traits

    That did it, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •