Results 1 to 16 of 16

Thread: Trait bug

  1. #1

    Default Trait bug

    Starting with base BI 1.6,
    I added to following lines to export_descr_character_traits:


    Trait ExperiencedBodyguards
    Characters family
    NoGoingBackLevel 3

    Level Superior_Bodyguards
    Description Superior_Bodyguards_desc
    EffectsDescription Superior_Bodyguards_effects_desc
    Threshold 1

    Effect BodyguardValour 2

    Level Elite_Bodyguards
    Description Elite_Bodyguards_desc
    EffectsDescription Elite_Bodyguards_effects_desc
    Threshold 2

    Effect BodyguardValour 3

    Level Royal_Guard
    Description Royal_Guard_desc
    EffectsDescription Royal_Guard_effects_desc
    Threshold 3

    Effect BodyguardValour 4

    I created a single trigger in random_birth2 in the same file like so:

    Trigger random_birth2
    WhenToTest CharacterComesOfAge


    Affects Anger 1 Chance 2
    Affects Hypochondriac 1 Chance 5
    Affects GoodSiegeDefender 1 Chance 5
    Affects ExperiencedBodyguards 1 Chance 100

    I then added these lines to the bottom of the
    export_descr_VnVs_enums:

    Superior_Bodyguards
    Superior_Bodyguards_desc
    Superior_Bodyguards_effects_desc
    Elite_Bodyguards
    Elite_Bodyguards_desc
    Elite_Bodyguards_effects_desc
    Royal_Guard
    Royal_Guard_desc
    Royal_Guard_effects_desc

    Finally, I added these lines to the bottom of export_VnVs.txt

    ¬****************************************************************************************
    ¬****************************************************************************************
    ¬*
    ¬***** Changes made after 02/24/2007 18:00:00
    ¬*
    ¬****************************************************************************************
    ¬****************************************************************************************
    {Superior_Bodyguards} Superior Bodyguards

    {Superior_Bodyguards_desc}
    Being a member of the royal family grants this man a group of superior bodyguards to protect him from harm both on and off the battlefield.

    {Superior_Bodyguards_effects_desc}
    +4 to bodyguard experience level

    {Elite_Bodyguards} Superior Bodyguards

    {Elite_Bodyguards_desc}
    Being the heir to the throne grants this man a group of elite bodyguards to protect him from harm both on and off the battlefield.

    {Elite_Bodyguards_effects_desc}
    +6 to bodyguard experience level

    {Royal_Guard} King's Bodyguards

    {Royal_Guard_desc}
    The King's bodyguards are the most experienced warriors in the kingdom. The protect their King from harm both on and off the battlefield.

    {Royal_Guard_effects_desc}
    +8 to bodyguard experience level


    Symptoms of wrongdoing are that I crash to desktop when I attempt to look at any general's traits.

    If I play enough turns without looking at a general's trait, I see a general get born and his unit card has the appropriate amount of xp on his unit card, but i still CTD if I look at the general's traits. ATV-TW finds no errors and the lordz trait editor read them fine. I am stumped. Any of you experienced modders seen this before?

  2. #2
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Default Re: Trait bug

    You no longer have to make changes to export_descr_VnVs_enums.txt file when you add traits. It won't cause problems if you do, it's just not necessary.

    It's hard to tell: do you have a tab between {Superior_Bodyguards} and Superior Bodyguards? You might have trouble if you don't.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  3. #3

    Default Re: Trait bug

    Yes, I have a tab between the name tags and their text and a carriage return between the description tags and their descriptions.

    I edited the file in notepad on a windows machine. Do I need a special editor to stick in the correct characters for the parser?

    I will try undoing the changes to the enums file. I doubt it will help, but I am desperate.


  4. #4
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Trait bug

    Did you really mean
    any general's traits.
    ? or just the ones with the trait you added. If you really meant any then you may have done something nasty to the file format, probably to the file in data/text, notepad should be OK but you can select 'save as' options for file types that don't work.
    Not used mods before? Looking for something small and fun?!
    Download the:

  5. #5

    Default Re: Trait bug

    I don't know if this will help or not, but I had issues with EDB.txt where I got CTD's with no errors. I use Notepad in Windows also, and have found that the game is VERY sensitive to what 'hidden characters' are present in text files. So I downloaded 'Cpad v.026a' from here:

    http://www.nonags.com/nonags/texted32.html

    It's a very nice text editor, and allows you to turn on hidden characters.
    I found such a mess in EDB I couldn't believe it, and after checking the hidden characters in the original RTW EDB, and then duplicating them in my file, all of a sudden the CTD was gone.

    The thing is, to LOOK at my file beforehand, you could not see why it would do that. It looked perfect in Notepad. I'd recommend use this editor, or at least using it to check critical RTW txt files.
    "...then came the ensigns encompassing the Eagle, which is at the head of every Roman Legion; the King, and the strongest of all birds, which seems to them a signal of dominion, and an omen that they shall conquer all against whom they march....." Flavius Josephus

  6. #6
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Trait bug

    Sorry off topic but possibly interesting,
    DVK901, I just downloaded that and it looks useful, one thing I did notice though is it thinks, the campaign_regions_and_settlements_names.txt files in data/text are meant to be hex files!

    I've always had problems if I try and make a completely new file for one of those rather than overwriting / adding to old one. Does that give any clue as to why, or do you have any idea why it does that.

    p.s. the problems I've had with that file that also uses {} was my reason for suggesting xerex's problems may be related to export_VnVs.txt
    Not used mods before? Looking for something small and fun?!
    Download the:

  7. #7
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Default Re: Trait bug

    Most, if not all, of the files in \text use wide characters to support internationalization. Different text editors treat these differently. My editor of choice likes to interpret the second byte of the wide character as a carriage return-line feed, so I only get one character per line.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  8. #8
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Trait bug

    @Atilius, you're going slightly over my head explaining that one!

    Is there an editor / method of dealing with those files that is fool proof to avoid file format / save problems?
    Not used mods before? Looking for something small and fun?!
    Download the:

  9. #9
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: Trait bug

    I've never been able to get new script files to work (mo_money.txt etc) - the other day I took a vanilla script file and deleted the contents and put my own little script in it - it worked! I wonder if that is related to this matter?

    But then again it may be that all the scripting tutorials don't really tak einto account working in BI.
    "One of the most sophisticated Total War mods ever developed..."

  10. #10
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Trait bug

    @ Dol Guldur, that certainly sounds like same issue of not getting completely new files to work, I did separate one for perfect_spy but i think by then I was used to idea of overwriting vanilla files, rather than starting anew, so would have done it that way automatically. Determining exactly how this works /not would definitely be useful thing to pin down!
    Not used mods before? Looking for something small and fun?!
    Download the:

  11. #11
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: Trait bug

    If it is related to that, I am not too concerned as it only has been a problem with script files and I have always wanted to keep Fourth Age custom-script-free. I, too, added perfect_spy simply for testing purposes.

    I hope there is a category in the next mod awards for 'Modder who took the longest to get a script working' as I think I must win
    "One of the most sophisticated Total War mods ever developed..."

  12. #12

    Default Re: Trait bug

    Quote Originally Posted by Makanyane
    Did you really mean ? or just the ones with the trait you added. If you really meant any then you may have done something nasty to the file format, probably to the file in data/text, notepad should be OK but you can select 'save as' options for file types that don't work.
    Well, I can't be 100% sure they don't have the trait because I can't see their traits, but the only trigger I made was the coming of age trigger. So characters that are already come of age at the start of the campaign should not have the trait. They do not have the xp on their unit picture either, so I can say with fair certainty that the sarmation faction leader and heir do not have the trait, but when palacus comes of age, he gets the chevrons on his picture and I believe he has the trait, but again, I can't actually look at it.

    Yes, I meant any. I played sarmations. I tried look at my faction leaders traits (he shouldn't have it and doesn't have any chevrons) and I did a hard CTD.

  13. #13
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Trait bug

    that is sounding like you have generally b'd up files, try commenting out all recent changes you made since it last worked (including if necessary removing new traits from desc-strat, if you'e still not working after that you have, I think, unresolved file structure probem.

    revert back to vanilla / last working version and re-code traits (its probably not any consolation) but I also had problem in trait file I could never find which meant I had to re-code from vanilla from scratch!.
    Not used mods before? Looking for something small and fun?!
    Download the:

  14. #14

    Default Re: Trait bug

    haha...I figured it out. Thanx for the help guys. My baby hit the space bar while the file was open and I didn't notice.

    You can add a CTD reason to the list. White space at the begining of export_VnVs causes a hard CTD when viewing any character with a trait.
    If your file looks like this, your game will CTD

    ¬ Lines that begin with the ¬ character are comments
    ¬ and should not be translated
    ¬ Items with curly brackets are tags and should not be translated
    ¬ The text following tags either on the same line, or the next line
    ¬ should be translated

    if it looks like this, you are in business

    ¬ Lines that begin with the ¬ character are comments
    ¬ and should not be translated
    ¬ Items with curly brackets are tags and should not be translated
    ¬ The text following tags either on the same line, or the next line
    ¬ should be translated

  15. #15

    Default Re: Trait bug

    sorry, the space didnt show up. Pretend underscore is a space. My first line looked like this when it CTDs

    _¬ Lines that begin with the ¬ character are comments
    ¬ and should not be translated


    P.S. How do you edit a post?

  16. #16
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Default Re: Trait bug

    When you become a full member, an edit button will show up under all your posts. Until then you're out of luck.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



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