Results 1 to 10 of 10

Thread: Help Lusted stop being a scripting/trait editing noob!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,184

    Default Help Lusted stop being a scripting/trait editing noob!

    Right my free time has dropped to the point where I can't really progress on TE Gold, but I have enough to do something and so I'm experimenting with scripting and trait editing in Medieval II Kingdoms. But, I'm a bit of a noob when it comes to both, so I would appreciate any and all advice on certain ideas I have. Tell me whether they're feasible, or whether the basic scripts for them I've got are good or not.

    And I've got no idea whether any of the stuff I'll do will be released to the public or not.

    Claim to the Throne

    I've had the idea of when there is a marriage between 2 factions and the faction leader of one faction dies, that the other faction can 'lay claim to the throne'(both get set to really low standings with each other so might lead to war or might not just like in history). It would use the accept/decline historic event that was added in Kingdoms to give the faction a choice of whether to make the claim or not. If the faction is AI controlled, random chance of making the claim.

    Here is the early code I've worked out for it after chatting to alpaca on msn, but it's probably got loads of problems with it.

    Spoiler Alert, click show to read: 
    Code:
            ;-- marriage england > france counter --
    
    		declare_counter england_france_marriage
    
            ;-- check for marriage england > france --
    
    	monitor_event UpdateAttitude FactionType england france
    		and NumFactionMarriages > 0
    			set_counter england_france_marriage 1
    	end_monitor
    
            ;-- england claiming french throne --
    		add_events
    			event	england_claim_france_choice 
    	 		date	0
    	 	end_add_events
    
    		set_event_ecounter england_claim_france_choice 0
    
    		generate_random_counter england_claim_throne 0 10
    
    	monitor_event BecomesFactionLeader FactionType france
    			and counter england_france_marriage 1
    			historic_event england_claim_france_choice true england
    				if I_IsFactionAIControlled england
    				and england_claim_throne 5
    					set_event_counter england_claim_france_choice 1
    				end_if		
    
    				terminate_monitor			
    	end_monitor
    
    	monitor_conditions I_EventCounter england_claim_france = 1		
    	
    		historic_event england_claim_france
    		set_faction_standing england france -1.0
    		set_faction_standing france england -1.0
    
    		terminate_monitor
    	
    	end_monitor


    Lands passing to another faction

    I've also had the idea of using the give_everything_to_faction command added in Kingdoms for a situation where there is a marriage between 2 factions, and the faction leader of one dies without a heir and so give everything of that faction to the other one. Would use the destroy_unit command to remove units the other faction cannot recruit.

    Haven't got code for this yet, would like to hear people's thoughts on feasability and I'll post my ideas for the code up later.

    Inquisition


    Also want to have an event to notify factions of an inquisition starting in their land, but not quite sure how to do this without having a script for each and every province.

    Ideas?

    Papal Elections

    I was thinking of scripting changes in faction relations based on who voted for/against the new Pope in elections so as to make them a key part of the game. But I think this might be something that would be a lot of work for not much reward.

    Titles

    I know there are lots of mods with titles out there, but I want to learn how to do this for myself instead of copying other peoples code. I'm guessing it would be based on EndedInSettlement or GovernorInResidence and making them unique ancilliaires.

    Houses

    I've also had the idea of having houses within factions that family members/generals are more loyal to than the King. If the king is weak, and from another house then members of the other houses are more likely to revolt. Is this kind of thing feasible? Could also allow for some nice mixing of houses between factions.

    Traits Generally

    I've been thinking of reducing the number of traits characters get by either increasing the requirements or reducing the chances of getting them. Which way do people think is best? Also thinking of increasing the effect of buildings so players have more control over how their characters develop.

    Middle Eastern and Orthodox factions

    I'm interested in hearing about similar things that could be done for Russia/Byzantium/Moors/Egypt and turks as all the things I've thought of so far are very Catholic faction centered.

    Any and all criticism/suggestions welcomed, help me improve as a sccripter and trait/ancilliary editor.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  2. #2

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    What I've done in my modding is I've combined a lot of very similar traits (for instance, rolling captor chivalry/dread into battle strategy/dread, rolling cheapskate and miserly into one trait, etc. - basically if any two traits conceptually seem to duplicate the same basic idea, roll them together), and it works out great. You get less traits overall, but they seem more meaningful. Highly recommended.

  3. #3
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,184

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    Good to point, hadn't thought about the duplicate traits.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  4. #4
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    I personally think you're a hopeless case







    Now I had better lay low for some time

    No thing is everything. Every thing is nothing.

  5. #5
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,184

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    Quote Originally Posted by alpaca View Post
    I personally think you're a hopeless case
    Tell me something i don't know
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  6. #6

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    Quote Originally Posted by Lusted View Post
    Houses

    I've also had the idea of having houses within factions that family members/generals are more loyal to than the King. If the king is weak, and from another house then members of the other houses are more likely to revolt. Is this kind of thing feasible? Could also allow for some nice mixing of houses between factions.
    I believe thats possible, you can use the FactionLeaderTrait command and FactionLeaderAttribute command for determining what house the faction leader is in and how much authority he has.


    Quote Originally Posted by Lusted View Post
    Traits Generally

    I've been thinking of reducing the number of traits characters get by either increasing the requirements or reducing the chances of getting them. Which way do people think is best?
    Probably a combination of both.

    "It's best to shut your mouth and let everyone think you're ignorant, then to open your mouth and prove it."

  7. #7
    Ramah's Avatar Libertus
    Join Date
    Mar 2008
    Location
    Sweden
    Posts
    77

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    I am interested in some of the things you mentioned. Especially the part with Titles

    Regarding the aqucition of traits; Can't you just remove some traits from the file they should be in? I have no idea as I haven't really got into traiting jet.

  8. #8
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,184

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    Right, think i've got the various House traits sorted and the disloyal trait for when a King of a different House has low authority(complete with variations in chance based on difficulty level, and a 2nd version of the disloyal trait for very hard with a bigger hit to a charachters loyalty).

    Now all I need to know in relation to that, is how do I remove a trait from a character, I want to give the player a chance to deal with disloyalty if they quickly manage to increase the authority of their King. Do the disloyal traits need to have an antitrait in order to do this?
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  9. #9

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    You can simply have a trigger give a trait negative points. It's exactly the same as giving trait points, just put a "-" in front of the number.

  10. #10
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,184

    Default Re: Help Lusted stop being a scripting/trait editing noob!

    Thought it was something like that, thanks for the info.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

Posting Permissions

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