Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Help with character trait

Hybrid View

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

    Default Help with character trait

    So i've made a new trait for my sub-mod...In my testing I gave a character what he needs to acquire the trait using the console_command to add other traits thus giving the proper requirements for the trait to fire...My script logs tell me that the trait has in fact fired but in game I did not see anything that would indicate it did (no message and no effects on character)....anyone know what could cause this?????????? And I followed Alpaca's Traits and Triggers guide to the letter....Also if I give the trait to someone with the console command then everything works normally......

  2. #2
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Help with character trait

    Post the code, might make it easier to judge.

  3. #3

    Default Re: Help with character trait

    here's the trait...
    Spoiler Alert, click show to read: 


    ;------------------------------------------
    Trait PatronSaint
    Characters family
    NoGoingBackLevel 1
    ExcludeCultures mesoamerican, middle_eastern

    Level Patron_Saint
    Description Patron_Saint_desc
    EffectsDescription Patron_Saint_effects_desc
    GainMessage Patron_Saint_gain_desc
    LoseMessage Patron_Saint_lose_desc
    Epithet Patron_Saint_epithet_desc
    Threshold 1

    Effect HitPoints 2
    Effect Law 6
    Effect TaxCollection 10
    Effect LocalPopularity 6
    Effect BribeResistance 4
    Effect PublicSecurity 2
    Effect PersonalSecurity 2
    Effect TroopMorale 4
    Effect Purity 8
    Effect HeresyImmunity 8
    Effect Influence 8
    Effect Command 2

    And the Trigger....
    Spoiler Alert, click show to read: 


    ;-------------------------------------------
    Trigger Patron_Saint
    WhenToTest CharacterTurnStart

    Condition IsGeneral
    and Attribute Chivalry >= 10
    and Attribute Loyalty >= 10
    and Attribute Piety >= 10

    Affects PublicFaith 4 Chance 100
    Affects AdoredByPope 3 Chance 100
    Affects TouchedByTheGods 3 Chance 100
    Affects ChristianHero 1 Chance 100
    Affects ReligiousActivity 4 Chance 100


    Almost forgot about the Script Log entries...

    19:04:44.126 [game.script.trigger] [trace] Trigger <Patron_Saint> fired

    19:06:30.781 [game.script.trigger] [trace] Trigger <Patron_Saint> fired




    Also I would like to make this available to Priests when they've reached specific levels on some trait but wanted to get this working first....
    Last edited by valvegas1; January 24, 2012 at 08:58 AM.

  4. #4
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Help with character trait

    I think you forgot to use the trigger to affect the trait

    ;-------------------------------------------
    Trigger Patron_Saint_Trigger
    WhenToTest CharacterTurnStart

    Condition Attribute Chivalry > 9
    and Attribute Loyalty > 9
    and Attribute Piety > 9

    Affects Patron_Saint 1 Chance 100

    Plus you didn't need IsGeneral because nothing but a general will have loyalty and chivalry.

    When you want it working for priests you can just make the trigger look for a trait only priests will have - Sounds like that's what you intend anyway.
    Last edited by Taiji; January 24, 2012 at 09:30 AM.

  5. #5
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: Help with character trait

    EDIT ninjaed

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  6. #6

    Default Re: Help with character trait

    Rock on....Thank you so much....I was scratching my head all night trying to figure this out with no luck (thought I had it all right)...your a GOD...

  7. #7
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Help with character trait

    You're welcome Val

  8. #8

    Default Re: Help with character trait

    Ok still having issues with this....Now when I test it in game, I give someone the right attributes, and end the turn...When it's time for the trigger to fire I get a CTD...And I know it's the trait cause when I don't make it fire the game doesn't CTD...

    EDIT: Here's the last few lines of the log...No other errors exist in any log...

    Spoiler Alert, click show to read: 
    03:20:23.035 [game.script.trigger] [trace] Trigger <Worthy_Of_Adoption_1_VnV_Trigger> fired
    03:20:23.035 [game.script.trigger] [trace] Trigger <Worthy_Of_Adoption_2_VnV_Trigger> fired
    03:20:23.035 [game.script.trigger] [trace] Trigger <Worthy_Of_Adoption_3_VnV_Trigger> fired
    03:20:23.035 [game.script.trigger] [trace] Trigger <Worthy_Of_Adoption_4_VnV_Trigger> fired
    03:20:23.035 [game.script.trigger] [trace] Trigger <Worth_of_Adoption_loyalty_1> fired
    03:20:23.035 [game.script.trigger] [trace] Trigger <Worth_of_Adoption_loyalty_2> fired
    03:20:23.035 [game.script.trigger] [trace] Trigger <Worth_of_Adoption_piety_1> fired
    03:20:23.036 [game.script.trigger] [trace] Trigger <Worth_of_Adoption_piety_2> fired
    03:20:23.036 [game.script.trigger] [trace] Trigger <Worth_of_Adoption_piety_3> fired
    03:20:23.036 [game.script.trigger] [trace] Trigger <Worth_of_Adoption_chiv_2> fired
    03:20:23.036 [game.script.exec] [trace] exec <set_event_counter> at line 1681 in mods/kingdoms_grand_campaign_mod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    03:20:23.036 [game.script.exec] [trace] exec <set_event_counter> at line 2106 in mods/kingdoms_grand_campaign_mod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    03:20:23.036 [game.script.exec] [trace] exec <set_event_counter> at line 2107 in mods/kingdoms_grand_campaign_mod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    03:20:23.037 [game.script.exec] [trace] exec <set_event_counter> at line 2108 in mods/kingdoms_grand_campaign_mod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    03:20:23.037 [game.script.trigger] [trace] Trigger <Patron_Saint_Trigger> fired
    03:20:23.060 [bink] [debug] [mods/kingdoms_grand_campaign_mod/data/fmv/faction/minor_win.bik]Pause on
    03:20:23.060 [bink] [debug] [mods/kingdoms_grand_campaign_mod/data/fmv/faction/minor_win.bik]Pause on
    03:20:23.298 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.
    Last edited by valvegas1; January 26, 2012 at 02:23 AM.

  9. #9
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Help with character trait

    export_VnVs.txt done yet?

  10. #10

    Default Re: Help with character trait

    Quote Originally Posted by Taiji View Post
    export_VnVs.txt done yet?
    yeah that was my first thought...I had the lose_desc line in the trait but not there so I put it in and still the same...here's everything from the trait and the logs...
    Spoiler Alert, click show to read: 

    ;;;;;;;;;;;;New Trait (Patron Saint);;;;;;;
    ;------------------------------------------
    Trait PatronSaint
    Characters family
    ExcludeCultures mesoamerican, middle_eastern

    Level Patron_Saint
    Description Patron_Saint_desc
    EffectsDescription Patron_Saint_effects_desc
    GainMessage Patron_Saint_gain_desc
    LoseMessage Patron_Saint_lose_desc
    Epithet Patron_Saint_epithet_desc
    Threshold 1

    Effect HitPoints 6
    Effect Law 8
    Effect TaxCollection 10
    Effect LocalPopularity 8
    Effect BribeResistance 8
    Effect PublicSecurity 2
    Effect PersonalSecurity 2
    Effect TroopMorale 4
    Effect Purity 8
    Effect HeresyImmunity 8
    Effect Influence 8
    Effect Command 2

    ;;;;;;;;;;;;;;;;;;Trigger;;;;;;;;;;;;;;;;;

    ;-------------------------------------------
    Trigger Patron_Saint_Trigger
    WhenToTest CharacterTurnStart

    Condition Attribute Chivalry > 9
    and Attribute Loyalty > 9
    and Attribute Piety > 9

    Affects Patron_Saint 1 Chance 100



    ;;;;;;;;;;;;;;;VNVS file;;;;;;;;;;;;;;;;;;;;;;;

    {Patron_Saint}Patron Saint
    {Patron_Saint_desc}Patron saints are chosen as special protectors or guardians over areas of life. These areas can include occupations, illnesses, churches, countries, causes -- anything that is important to us. A patron saint can help us when we follow the example of that saint's life and when we ask for that saint's intercessory prayers to God.
    {Patron_Saint_effects_desc}Effects HitPoints +6, Law +8, TaxCollection +10%, LocalPopularity +8, BribeResistance +8, PublicSecurity +2, PersonalSecurity +2, TroopMorale +4, Purity +8, HeresyImmunity +8, Influence +8, Command +2
    {Patron_Saint_gain_desc}Your martyrdom, and popularity has quickly given rise to a cult-like following and reputation of superhuman goodness, resulting in your status being elevated to Sainthood, from this day forward you will be known as a patron saint throughout the world.
    {Patron_Saint_lose_desc}You have committed far too many unholy acts for the Pope and your followers to continue looking upon you as a Saint. No longer shall you be known as such.
    {Patron_Saint_epithet_desc}the Saint


    04:10:41.570 [game.script.trigger] [trace] Trigger <devastation> fired
    04:10:41.571 [game.script.trigger] [trace] Trigger <0772_Specific_Settlement_Devastation_Trigger> fired
    04:10:41.598 [game.script.trigger] [trace] Trigger <devastation> fired
    04:10:41.599 [game.script.trigger] [trace] Trigger <0772_Specific_Settlement_Devastation_Trigger> fired
    04:10:41.603 [system.io] [info] exists: missing mods/kingdoms_grand_campaign_mod/data/ui/generic/eventpics/end_of_turn.tga
    04:10:41.604 [system.io] [info] exists: missing mods/kingdoms_grand_campaign_mod/data/ui/northern_european/eventpics/end_of_turn.tga
    04:10:41.604 [system.io] [info] exists: missing data/ui/northern_european/eventpics/end_of_turn.tga.dds
    04:10:41.604 [system.io] [info] exists: found data/ui/northern_european/eventpics/end_of_turn.tga (from: C:\Program Files (x86)\SEGA\Medieval II Total War)
    04:10:41.605 [system.io] [trace] file open,,1A9C2F38,217308
    04:10:41.605 [system.io] [info] open: found data/ui/northern_european/eventpics/end_of_turn.tga (from: C:\Program Files (x86)\SEGA\Medieval II Total War)
    04:10:41.654 [game.script.exec] [trace] exec <set_event_counter> at line 1681 in mods/kingdoms_grand_campaign_mod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    04:10:41.655 [game.script.exec] [trace] exec <set_event_counter> at line 2106 in mods/kingdoms_grand_campaign_mod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    04:10:41.656 [game.script.exec] [trace] exec <set_event_counter> at line 2107 in mods/kingdoms_grand_campaign_mod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    04:10:41.656 [game.script.exec] [trace] exec <set_event_counter> at line 2108 in mods/kingdoms_grand_campaign_mod/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    04:10:41.658 [game.script.trigger] [trace] Trigger <Patron_Saint_Trigger> fired
    04:10:41.702 [bink] [debug] [mods/kingdoms_grand_campaign_mod/data/fmv/faction/minor_lose.bik]Pause on
    04:10:41.702 [bink] [debug] [mods/kingdoms_grand_campaign_mod/data/fmv/faction/minor_lose.bik]Pause on
    04:10:41.986 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.
    Last edited by valvegas1; January 26, 2012 at 12:38 PM.

  11. #11
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Help with character trait

    Maybe try '= 10' instead of '> 9', and try checking just one attribute instead of all three. Can't see anything wrong really.

  12. #12

    Default Re: Help with character trait

    I tried what you suggested... = 10 was no help Same result...Checking only one attribute gives the same result...I'm thinking I'm gonna put it on the back burner for now and maybe try it again later....Thanks for all your help though

  13. #13
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: Help with character trait

    quick question, are you doing it with notepad++?
    if yes, try to delete it and re-write manually - don't ask me why, this program sometimes gets some pointless errors when copy\pasting and when using the "Search\replace" tool

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  14. #14

    Default Re: Help with character trait

    why yes i am using ++, I had no idea that could happen...thanks i'll try using regular notepad and see what happens...

  15. #15
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Help with character trait

    Only other thing I can think of shouldn't happen - Has the export_VnVs.strings.bin not updated(rebuilt)?

  16. #16

    Default Re: Help with character trait

    Quote Originally Posted by Taiji View Post
    Only other thing I can think of shouldn't happen - Has the export_VnVs.strings.bin not updated(rebuilt)?
    It has rebuilt itself every time...I've made sure to check...Also tried rewriting it all using regular notepad and that didn't help either...Are there any limits to traits that might be causing this????

    EDIT: Just a thought...But should I try making it an orphan trait and have it added via Script...How would I go about this?
    Last edited by valvegas1; January 27, 2012 at 02:08 PM.

  17. #17
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: Help with character trait

    AFAIK there are no limits in trait\ancs, at least nobody has still reachet it if exists.
    can you post here both vnvs and EDCT?

    EDIT if you want to give it via script, make a proper one in campaign_script and remove the trigger
    Last edited by Kiliç Alì; January 27, 2012 at 02:26 PM.

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  18. #18

    Default Re: Help with character trait

    yup sure can...here's both files in full...

    EDIT: I should also note that while attempting to use squid's trait verifier all it does is say all the files are missing when I know for a fact they are where they need to be...
    Last edited by valvegas1; January 27, 2012 at 02:24 PM.

  19. #19
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: Help with character trait

    a stupid thing indeed, it must be
    "Affect PatronSaint", without the "_". It took me almost an hour! Grr!

    For the future, I suggest you to use this tool. It made the day this time

    http://www.twcenter.net/forums/showthread.php?t=307657

    Trait\Ancillary validator, by Squid.

    Remember to rep him!

    EDIT Strange it just worked fine with me. Howewer it said: trait Patron_Saint is not defined - in fact the trait is PatronSaint, the other is just a level.
    Last edited by Kiliç Alì; January 27, 2012 at 03:01 PM.

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  20. #20

    Default Re: Help with character trait

    Quote Originally Posted by Kiliç Alì View Post
    a stupid thing indeed, it must be
    "Affect PatronSaint", without the "_". It took me almost an hour! Grr!

    For the future, I suggest you to use this tool. It made the day this time

    http://www.twcenter.net/forums/showthread.php?t=307657

    Trait\Ancillary validator, by Squid.

    Remember to rep him!

    EDIT Strange it just worked fine with me. Howewer it said: trait Patron_Saint is not defined - in fact the trait is PatronSaint, the other is just a level.
    Awesome find...Thanks so much I totally missed that and I suspect Taiji did as well...as far as the Validator, I tried using it but right after setting the data folder to look in it just says all the files don't exist...I know they do as I checked to verify they are all there...any ideas???

Page 1 of 2 12 LastLast

Posting Permissions

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