Results 1 to 6 of 6

Thread: Trait not working for one specific family member in descr_strat.txt

  1. #1
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    3,871

    Default Trait not working for one specific family member in descr_strat.txt

    I'm working on traits and I've come across a curious thing. The aim of the traits that I'm creating is to give an epithet to faction leaders and heirs. For example, normally you'd get a faction leader or heir named "King/Prince William" without a surname, while his full name in-game might actually be William Smith. I created the epithet in order to get the surname "Smith" displayed as well when the character is a king or prince.
    The problem: I can't get one trait to work for one particular character when I enter it in descr_strat.txt.

    It's this character:

    Code:
    character	Yoshishige Otomo, named character, male, heir, age 18, x 90, y 93 
    traits Otomo 1 
    army
    Without the trait, the name would simply show up in-game as "Prince Yoshishige", with the trait this should become "Prince Yoshishige Otomo" as the trait adds the epithet "Otomo" to the name. However when I start the game the epithet doesn't show up; it remains "Prince Yoshishige". What's even stranger is that the same trait and epithet does work for the faction leader in-game:

    Code:
    character	Yoshiaki Otomo, named character, male, leader, age 46, x 93, y 98 
    traits Otomo 1 
    army
    In-game it correctly shows as "Lord Yoshiaki Otomo".

    When I use the give_trait command and give the Otomo 1 trait to Prince Yoshishige in-game using the console, the trait does get added and the name changes to "Prince Yoshishige Otomo".


    So, how come M2TW doesn't seem to register the trait for Yoshishige Otomo in descr_strat.txt, while it does register the same trait for Yoshiaki Otomo?
    Perhaps I'm missing something?
    Last edited by Razor; January 16, 2020 at 07:47 PM.

  2. #2
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    3,871

    Default Re: Trait not working for one specific family member in descr_strat.txt

    Ok, I have the same issue with another character. Both characters are heirs. I can bypass this issue either giving the trait by script after the first turn or let it trigger after the first turn and not adding the trait in descr_strat.txt. It would appear that some traits don't work well with heirs when they're added to them in descr_strat.txt? Can anyone confirm or replicate this?

  3. #3
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,181

    Default Re: Trait not working for one specific family member in descr_strat.txt

    Yes, I have seen that too. I can't recall if it was just heirs with the problem. Pretty sure he got the trait okay, just not the epithet.

    I gave the the trait via script instead. One monitor could be used for giving traits to multiple characters and can be terminated when done - better than triggers in those respects.
    Last edited by Withwnar; January 17, 2020 at 11:24 PM.

  4. #4
    bitterhowl's Avatar Biarchus
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    616

    Default Re: Trait not working for one specific family member in descr_strat.txt

    The issue is in the expanded.txt.

    If you're sure that all possible heirs of this faction will be "Otomo", go there and write

    Code:
    {EMT_XYZ_FACTION_HEIR_NAME}Prince %S Otomo
    Seems to work.

    My sister, do you still recall
    The blue Hasan and Khalkhin-Gol?

    Because AI is dumb and full of errors.

  5. #5
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    3,871

    Default Re: Trait not working for one specific family member in descr_strat.txt

    Quote Originally Posted by bitterhowl View Post
    The issue is in the expanded.txt.

    If you're sure that all possible heirs of this faction will be "Otomo", go there and write

    Code:
    {EMT_XYZ_FACTION_HEIR_NAME}Prince %S Otomo
    Seems to work.
    Yes, that does work, but if the epithet shows up you'd get Prince %S Otomo "Epithet". If I'd want Yoshishige Otomo to change his name to Yoshishige "Sorin" Otomo I can't use your solution. Same with Harunobu "Shingen" Takeda. The parts "Sorin" Otomo and "Shingen" Takeda are the epithets. I already use your solution for factions that don't have historical characters change their name.

  6. #6
    Gigantus's Avatar The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it
    Patrician Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    47,562
    Blog Entries
    24

    Default Re: Trait not working for one specific family member in descr_strat.txt

    Quote Originally Posted by Withwnar View Post
    Yes, I have seen that too. I can't recall if it was just heirs with the problem. Pretty sure he got the trait okay, just not the epithet.

    I gave the the trait via script instead. One monitor could be used for giving traits to multiple characters and can be terminated when done - better than triggers in those respects.
    Came across this issue while working on several mods. Having a single, terminating monitor (PreFactionturnStart FacitonIsLocal) giving all the required traits has always been my approach.
    Last edited by Gigantus; February 04, 2020 at 01:10 AM.



Posting Permissions

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