Results 1 to 5 of 5

Thread: Anyone know any good trait and script editing tutorials Or be able to lend some assistance? Please

  1. #1
    Sir Alucard's Avatar Laetus
    Join Date
    Jun 2009
    Location
    Durham, England, UK
    Posts
    14

    Icon3 Anyone know any good trait and script editing tutorials Or be able to lend some assistance? Please

    First post ever, woot

    But seriously, I have plaing a mixture of mods StainlessSteel, Broken Cresent ect and in not oone have i found a way that you could choose a faction heir. Then after reading a post by Conny about how he managed to find a way around the heir problem http://www.twcenter.net/forums/showt...=257175&page=1 , I decided to try it out myself and I can confirm that what he says seem to be correct.

    My problem is I dont realy know how to script or know my way around the traits file. I am currently try to adapt DLV 6.1 mod (great mod by the way) by doing more work than I probably need to do.

    First step
    *Remove Authority from traits that are not faction leader and hier specific.
    *Add a royal family trait for all decendants that gives them 1 authority
    *Add another Prince trait for the sons of a king that give them 2 authority
    *Add one more RoyalHighness trait that gives 1 more authority making a son of your choosing become the next faction heir by some scripting or something. Something similar to Das Heilige Römische Reich when you make archbishops and clicking show me how ect.

    Second Step
    *Add Factionleader specific traits that take effect when a genral becomes faction leader. I'll try explain - take the fatherslegacy trait for example, i have removed the authority bonus from it, but characters can still gain the trait, but when they become faction leader the lose this trait and gain the faction leader version which has the authority bonus, so it wont affect the heirs selection.
    *Similary i hope that when the hier becomes a faction leader i can remove the Prince and royal highness trait from him.

    Third step
    *Make faction type differences. Emirs and Sultans instead of prince traits.
    *Factions such as the holy roman empire and venice for example dont use traditional monachy, HRE is electoral and Venice a republic. I want to make them different. I dont know how to make them work. I think the royal family trait should stay with them but not the prince or royalhighness trait. They will also use the normal trait system in which they can still gain or lose authority from some traits. Because of this I think it could simulate a voting system with the main family getting more of a chance of getting elected for the next faction heir.

    The problem is that my knowledge of editing Medeival 2 ends there, I WOULD BE VERY GRATEFUL for any help with this or just tutorial threads
    Last edited by Sir Alucard; June 18, 2009 at 05:31 PM.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Anyone know any good trait and script editing tutorials Or be able to lend some assistance? Please

    Go through this index, might find something.










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

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

    Default Re: Anyone know any good trait and script editing tutorials Or be able to lend some assistance? Please

    I suggest taking a look at GED's thread about Hiring Ancillaries. Post #10 in the thread, bottom spoiler, shows the script he used to achieve that effect. What you can do is use a similar script so when you click on a character which has one of the royal traits, it will prompt you if you want to make them the next heir, and instead of giving them an ancillary give them the royal heir trait.

    This obviously will only work second removed, but that should not be a problem since you can determine the initial leader and heir through the descr_strat. So you'd be deciding who replaces the heir once the heir is made leader, and need to make a new decision each time a new heir is made leader. It could be made increasingly complex or informative by prompting you to appoint a new leader on an event when the king dies or similar, possibly reminding you every so often if no character has the royal heir trait, and naturally removing the trait when a character becomes heir or leader.

    Also, download the Docudemons if you have yet to. You can also get the Ultimate DocuDemons as a supplementary(since it includes more about things like console commands and building effects), but I recommend getting the former also because I personally like viewing it in notepad format.
    Last edited by Augustus Lucifer; June 19, 2009 at 03:35 AM.

  4. #4
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: Anyone know any good trait and script editing tutorials Or be able to lend some assistance? Please


    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  5. #5
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Anyone know any good trait and script editing tutorials Or be able to lend some assistance? Please

    Quote Originally Posted by Sir Alucard - GhostKnight 17 View Post
    Then after reading a post by Conny about how he managed to find a way around the heir problem http://www.twcenter.net/forums/showt...=257175&page=1 , I decided to try it out myself and I can confirm that what he says seem to be correct.
    It is konny. ;-)

    *Remove Authority from traits that are not faction leader and hier specific.
    For the start you should comment out (with a: ";") all instances of Authority effects. You can later decide which to return.

    *Add a royal family trait for all decendants that gives them 1 authority
    *Add another Prince trait for the sons of a king that give them 2 authority
    *Add one more RoyalHighness trait that gives 1 more authority making a son of your choosing become the next faction heir by some scripting or something.
    Use the Trait-Editor from my sig, it makes trating rather uncomplicated; but you need to have an idea of how the trait file works in general. Your friend in this task is the condition FatherTrait

    Code:
    Condition FatherTrait Royal_Family > 0
    Affects Royal_Family 1 Chance 100
    
    Condition FatherTrait factionleader > 0
    Affects Royal_Family 1 Chance 100
    
    Condition FatherTrait factionleader > 0
     Affects Prince 1 Chance 100
    Something similar to Das Heilige Römische Reich when you make archbishops and clicking show me how ect.
    When this is only for your own use, you don't need to write something so elaborate like a show_me script. Simply add trait Next_Heir to EDCT and give it via console to your chosen character:



    *Add Factionleader specific traits that take effect when a genral becomes faction leader. I'll try explain - take the fatherslegacy trait for example, i have removed the authority bonus from it, but characters can still gain the trait, but when they become faction leader the lose this trait and gain the faction leader version which has the authority bonus, so it wont affect the heirs selection.
    I would use something more simpler: Check for the attributes (Command, Piety, Chivalry, Dread, Loyalty) of the character because these would be the result of the sum of his traits.

    Let's say that 4, 5, and 6 in an attribute would be normal, 0, 1, 2, and 3 would be low, and 7, 8, 9, and 10 would be high.

    Now you can make traits for these instances, for example the trait LowPiety_FL, what gives -2 Authority and would be acquired by the FL when he has less than 4 Piety. A trait HighPiety_FL would be fired when he has more than 6 Piety and would give +2 Authority. For the negative effect of low Chivaly and Dread you need to always check for both otherwise they would always fire:

    Code:
    Condition Attribute Chivalry < 4
                    and Attribute Dread < 4
    
    Affects LowChivalry_FL 1 Chance 100
    You can also merge that into two GoodLeader / BadLeader (anti-)traits.

    *Similary i hope that when the hier becomes a faction leader i can remove the Prince and royal highness trait from him.
    Code:
    	WhenToTest BecomesFactionLeader		
    	      Condition Trait Royal_Family > 0	
    
            Affects Royal_Family -1 Chance 100
    His sons would get this trait nevertheless because he is the factionleader.

    *Make faction type differences. Emirs and Sultans instead of prince traits.
    The default titles for leader and heir are to be found (and can be changed) in expanded.txt (folder text). When you want to make faction specific traits you can use the condition CharFactionType. For example, CharFactionType england

    *Factions such as the holy roman empire and venice for example dont use traditional monachy, HRE is electoral and Venice a republic. I want to make them different. I dont know how to make them work. I think the royal family trait should stay with them but not the prince or royalhighness trait. They will also use the normal trait system in which they can still gain or lose authority from some traits. Because of this I think it could simulate a voting system with the main family getting more of a chance of getting elected for the next faction heir.
    For the HRE, when it is displayed by a single faction, you can stick to the normal Royal_Family stuff. Dynasties played a vital role in the election, and in many occasions the son of the emperor was elected heir during the lifetime of his father. So, playing that as a true monarchy as long as the emperor has a natural heir, would not be incorrect.

    For Venice I would recommend for the start to use the LowPiety etc. for all family members plus the Royal_Family traits. That way family members in Venice can become leaders by a combination of abilities and family connections.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

Tags for this Thread

Posting Permissions

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