Results 1 to 7 of 7

Thread: Trait problem in UEM

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hunter Makoy's Avatar We got 2 words for ya..
    Join Date
    Apr 2007
    Location
    Dont mess with Texas
    Posts
    5,202

    Default Trait problem in UEM

    Could anyone in here please check over my Ultimate Education mod (download link)http://www.twcenter.net/forums/showthread.php?t=201856
    and see if they can figure out why noone will get a doctorates degree? I have tried everything I can think of and I can't get anything to work.

    It is supposed to take 4 turns for bachelors, then another 2 for masters, then another 2 for doctorate. The timer starts at coming of age and they only have about 10 turns to go as far as they can.

    thanx.
    Under the patronage of Lord Condormanius (12.29.08)
    "Yes, I know why the leaf is turning yellow. Its a lack of chloroform."

  2. #2
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Trait problem in UEM

    Okay I found why this wasn't working. This trigger:

    Code:
    ;--------------------------------------------
    Trigger Get_castle_edu_doctorate
    	WhenToTest CharacterTurnEnd
    
    	Condition IsGeneral
    	and EndedInSettlement
    	and Trait Wantschool > 0
    	and SettlementBuildingExists = castle_large_university
    	and Trait Castle_Edu_B >= 5
    	and Trait Castle_Edu_M >= 3
    	and Trait Cap_Edu_B = 0
    
    	Affects Castle_Edu_D 1 Chance 100
    Needs to be:

    Code:
    ;--------------------------------------------
    Trigger Get_castle_edu_doctorate
    	WhenToTest CharacterTurnEnd
    
    	Condition IsGeneral
    	and EndedInSettlement
    	and Trait Wantschool > 0
    	and SettlementBuildingExists = castle_large_university
    	and Trait Castle_Edu_B >= 5
    	and Trait Castle_Edu_M >= 2
    	and Trait Cap_Edu_B = 0
    
    	Affects Castle_Edu_D 1 Chance 100
    Same for the Cap version. The "Trait Castle_Edu_M >= X" condition is checking for trait levels, not threshold levels. Since the Masters Degree only has two trait levels, it's impossible to get level 3, and therefore the Doctorate will never fire. Another thing of note, is that in agistournas' version of the code, he has this:

    Code:
    ;----------------------------------------------
    Trait Cap_Edu_M
             Characters family
    
            Level 6civ
            Description 6civ_desc
            EffectsDescription 6civ_effects_desc
            Threshold 2
    
            Effect Command -1
            Effect TroopMorale -1
            Effect HitPoints -1
            Effect Authority 1
            Effect TaxCollection 5
            Effect Law 
            Effect Squalor -1
    
            Level 7civ
            Description 7civ_desc
            EffectsDescription 7civ_effects_desc
            Threshold 2
    
            Effect Command -1
            Effect TroopMorale -1
            Effect HitPoints -1
            Effect Authority 1
            Effect TaxCollection 5
            Effect Law 
            Effect Squalor -1
    Both levels have Threshold 2. I don't know if this was causing my CTD(doubt it, I believe it was strings.bin issues), or if it will just make it jump 2 levels, but it should be Threshold 2 and Threshold 3.

    And lastly, I commented on using 12. From what I can tell the 12 seems to be working fine when I sped up the process by giving my general directly "Wantschool 9" in the descr_strat so I wouldn't have to wait for a Coming of age. It stays on the lvl 8 for what seems like the right amount of turns, after un-hiding the Wantschool trait to monitor this. It should be well within possibility to get Doctorate in the time given. The important thing to take from this.

    Threshold only applies internally to the Affects portion of the EDCT. The Trait condition, even though it can be used in the EDCT Triggers, is a DocuDemon scripting function and is referring to the level and not the threshold.

    Cheers
    Last edited by Augustus Lucifer; March 01, 2009 at 02:15 AM.

  3. #3
    Hunter Makoy's Avatar We got 2 words for ya..
    Join Date
    Apr 2007
    Location
    Dont mess with Texas
    Posts
    5,202

    Default Re: Trait problem in UEM

    Ok thanx alot AL. Does everything happen at the right time? 4 years for 1st degree, then 2 years for 2nd, and 2 years for third?

    Also when you unhid the Wantschool trait did it show up properly in game?
    Under the patronage of Lord Condormanius (12.29.08)
    "Yes, I know why the leaf is turning yellow. Its a lack of chloroform."

  4. #4
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Trait problem in UEM

    Quote Originally Posted by Hunter Makoy View Post
    Ok thanx alot AL. Does everything happen at the right time? 4 years for 1st degree, then 2 years for 2nd, and 2 years for third?

    Also when you unhid the Wantschool trait did it show up properly in game?
    I wasn't really counting turns in that regard, but it shouldn't be hard to figure out. Set your .cfg to log script notifications like this:

    Code:
    [log]
    to=logs/education.system.log.txt
    level=*script* trace
    And then look in your log file after you end each turn. The triggers are as follows(just CTRL+F for them):

    Code:
    [game.script.trigger] [trace] Trigger <Edu_timer> fired
    [game.script.trigger] [trace] Trigger <Get_castle_edu_Bachelors> fired
    [game.script.trigger] [trace] Trigger <Get_castle_edu_Masters> fired
    [game.script.trigger] [trace] Trigger <Get_castle_edu_doctorate> fired
    Every time it says the trigger fires you can assume it is incrementing it by whatever you listed. That should help you catch overlaps, since it did sort of seem like it was counting towards masters while it counted towards bachelor's or something like that. I also think there's a mistake on the export_vnvs description. Here it is:

    Code:
    {4civ}	Bachelor's of Civil Science
    {4civ_desc}	This man's study of how to run a settlement has paid off with his first degree.
    {4civ_effects_desc}	+5% Tax, +1 Law, +1 Order, -1 Squalor
    
    {5civ}	Bachelor's of Civil Science
    {5civ_desc}	This man's study of how to run a settlement has paid off with his first degree.
    {5civ_effects_desc}	+5% Tax, +1 Law, +1 Order, -1 Squalor
    
    {6civ}	Master's of Civil Science
    {6civ_desc}	This man has completed postgraduate work and recieved a prestigious degree.
    {6civ_effects_desc}	+5% Tax, +1 Law,-1 Squalor, +1 Authority, BUT -1 Command, -1 Morale, -1 Hitpoints
    
    {7civ}	Master's of Civil Science
    {7civ_desc}	This man has completed postgraduate work and recieved a prestigious degree.
    {7civ_effects_desc}	+5% Tax, +1 Law,-1 Squalor, +1 Authority, BUT -1 Command, -1 Morale, -1 Hitpoints
    Only 5 and 7 should have the effects listed and the name of the degree. 4 and 6 should be like 4th Year Civil Science and 6th Year Civil Science or something.

  5. #5
    Hunter Makoy's Avatar We got 2 words for ya..
    Join Date
    Apr 2007
    Location
    Dont mess with Texas
    Posts
    5,202

    Default Re: Trait problem in UEM

    I put it in that regard because of how they're listed in the mod. That way it just shows up as still only having a certain degree until you have the next one. I did that so that if someone got to lvl 5 lets say, and stopped it wouldn't say that they were working on their masters for the rest of the game, it would only say they had a Bachelors.
    Under the patronage of Lord Condormanius (12.29.08)
    "Yes, I know why the leaf is turning yellow. Its a lack of chloroform."

  6. #6
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Trait problem in UEM

    Quote Originally Posted by Hunter Makoy View Post
    I put it in that regard because of how they're listed in the mod. That way it just shows up as still only having a certain degree until you have the next one. I did that so that if someone got to lvl 5 lets say, and stopped it wouldn't say that they were working on their masters for the rest of the game, it would only say they had a Bachelors.
    Nevermind, I see now that you have the effects in the EDCT running a level below the max as well.

  7. #7
    Hunter Makoy's Avatar We got 2 words for ya..
    Join Date
    Apr 2007
    Location
    Dont mess with Texas
    Posts
    5,202

    Default Re: Trait problem in UEM

    I will change the trigger to have masters >= 2 and change the thresholds back to 2 and 3 and hopefully that will work. Thanx again.
    Under the patronage of Lord Condormanius (12.29.08)
    "Yes, I know why the leaf is turning yellow. Its a lack of chloroform."

Posting Permissions

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