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

Thread: Is there a way to get a message when another King is crowned?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Is there a way to get a message when another King is crowned?

    Hi all,

    Is it possible to make it so a message appears when another faction gets a new faction leader (like the message that appears when the player faction gets a new leader)?

    Also, is it possible to make a 'Princess comes of age' message?

    If so, how?
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  2. #2
    Bela's Avatar Ducenarius
    Join Date
    May 2009
    Location
    The land of the crazy folk
    Posts
    947

    Default Re: Is there a way to get a message when another King is crowned?

    Sure it is. Use campaign_script + historic_events.txt.

    Script:

    Spoiler Alert, click show to read: 

    ;faction leader: (just replace the bold ones with faction names like england, etc. and duplicate for every factions you want to use)

    monitor_event BecomesFactionLeader FactionType enter_faction_name_to_monitor_here ; for example england
    historic_event newleader_factiontype ;same faction to be entered as above, so for example england here also!
    end_monitor;

    princess:

    monitor_event CharacterComesOfAge FactionIsLocal ;your princess
    and AgentType = princess
    historic_event princess_local
    end_monitor

    monitor_event CharacterComesOfAge not FactionIsLocal ; any other princesses
    and AgentType = princess
    historic_event princess_foregin
    end_monitor


    Beware, you have to add all the factions you want to monitor for the leaders!

    Also, you must enter some event texts in historic events:

    historic_event.txt:

    Spoiler Alert, click show to read: 


    Faction Leaders (for each and every factions, just duplicate):

    {NEWLEADER_FACTIONTYPE_BODY} here comes the text! Change "factiontype" to the name of the factions you entered in campaign_script, one-by-one
    {NEWLEADER_FACTIONTYPE_TITLE}enter title here (for example New English King is crowned or something)

    Princesses:

    {PRINCESS_LOCAL_BODY} here comes the text!
    {PRINCESS_LOCAL_TITLE}and the title for your princesses

    {PRINCESS_FOREIGN_BODY} here comes the text!
    {PRINCESS_FOREIGN_TITLE}and the title for foreign princesses




    I hope that helps.
    "No Rest until the Blood of Greenskins flows like Dark Ale upon the Earth!"

    +++ Josef Bugman +++




  3. #3
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: Is there a way to get a message when another King is crowned?

    I think I understand. So where do I decide which picture goes with the event?
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  4. #4
    Bela's Avatar Ducenarius
    Join Date
    May 2009
    Location
    The land of the crazy folk
    Posts
    947

    Default Re: Is there a way to get a message when another King is crowned?

    Ah, sorry, forgot the pictures!

    Go to your data\ui, select the relevant folders (changes from mod to mod based upon factions, culture, etc. like eastern_europeans, etc.), open eventpics folder, and add pictures with the same name as the historic event in tga (in this case newleader_england and princes_local for example). (you can simply clone existing pictures, too. I don't know the exact names (no med II in the office ) but there's something like action_princess or similar there. Check the tgas)


    Also, check this tutorial, it will also give you some help:
    http://www.twcenter.net/forums/showt...ighlight=event
    (although this works with descr_events, not with campaign_script)
    Last edited by Bela; October 21, 2010 at 05:40 AM.
    "No Rest until the Blood of Greenskins flows like Dark Ale upon the Earth!"

    +++ Josef Bugman +++




  5. #5
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: Is there a way to get a message when another King is crowned?

    I have added them all (both in campaign_script and historic_events) but nothing is happening in game. I waited for the Sultan of the Moors to die (he starts at the age of 60), but no message appears when he dies and the new guy is crowned Sultan.
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  6. #6
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: Is there a way to get a message when another King is crowned?

    Forgot to delete map.rwm... I'll just give it another go...
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  7. #7
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: Is there a way to get a message when another King is crowned?

    Nope still not working... I did everything you wrote in your first post and added a pic in ui/middle_eastern/eventpics called newleader_moors, but he still just dies without a message showing up (I play the campaign as Spain so that I can keep an eye on things with my spy).

    I have deleted map.rwm and started a new campaign, but it just ignores the new stuff I've added.
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  8. #8
    Bela's Avatar Ducenarius
    Join Date
    May 2009
    Location
    The land of the crazy folk
    Posts
    947

    Default Re: Is there a way to get a message when another King is crowned?

    did you delete the map.rwm? and of course, start a new campaign
    "No Rest until the Blood of Greenskins flows like Dark Ale upon the Earth!"

    +++ Josef Bugman +++




  9. #9
    Bela's Avatar Ducenarius
    Join Date
    May 2009
    Location
    The land of the crazy folk
    Posts
    947

    Default Re: Is there a way to get a message when another King is crowned?

    Hmm... cut your historic_events.strings.bin file, place that anywhere on your computer (for example desktop), then delete map.rwm and try a new game again. Otherwise, I don't know what the problem can be.

    Anyway, do you have your other scripts running? Is it a mod that you play or the vanilla game? You do not receive a CTD, but can you post your log to see if there's something went wrong?
    "No Rest until the Blood of Greenskins flows like Dark Ale upon the Earth!"

    +++ Josef Bugman +++




  10. #10
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: Is there a way to get a message when another King is crowned?

    It's my own mod based on Vanilla using Bare_Kingdoms mod template. Nothing is showing up and there are no error messages in the log.
    It's just as if I hadn't edited anything.
    I tried deleting historic_events.txt.bin and restarting the game. It created the new txt.bin file without problems, so the problem must be what I've done in campaign_script.

    Here's the entry: I've put it somewhere in the middle of the file (I assume it isn't important where I put it?).

    monitor_event BecomesFactionLeader FactionType moors
    historic_event newleader_moors
    end_monitor
    Is this right?
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  11. #11

    Default Re: Is there a way to get a message when another King is crowned?

    And then what is your enrty in the historic_events.txt?
    You should add
    Code:
    monitor_conditions I_TurnNumber = 0        
        restrict_strat_radar false
        terminate_monitor
    end_monitor
    to your script, this removes the small bar on the left side of the minimap. When the bar does not disappear the error must be in the script

    Skinner&Modeller of Shizoku no Sensō and East of Rome | My Workshop |

  12. #12
    Bela's Avatar Ducenarius
    Join Date
    May 2009
    Location
    The land of the crazy folk
    Posts
    947

    Default Re: Is there a way to get a message when another King is crowned?

    Post your campaign_script. please.

    If you add anything into the campaign_script, that should be either:

    1. at the very end, just above the:

    ; keep script unfinished until last monitor termination
    wait_monitors
    end_script

    lines or either anywhere, between any "terminate monitor" and the next: "monitorevent" or anything. If you have added these into the middle of a longer script, then it may cause the troubles.
    Try adding it to the end of the scripts, just like in point 1.
    "No Rest until the Blood of Greenskins flows like Dark Ale upon the Earth!"

    +++ Josef Bugman +++




  13. #13
    Bela's Avatar Ducenarius
    Join Date
    May 2009
    Location
    The land of the crazy folk
    Posts
    947

    Default Re: Is there a way to get a message when another King is crowned?

    Mate, I made a typo! Please correct it to:

    monitor_event CharacterComesOfAge not FactionIsLocal ; any other princesses
    and AgentType = princess
    historic_event princess_foreign
    end_monitor


    That will cause the problem for the princesses, sorry for the mistyping! Sorry once again! (and thanks Ishan for letting me know )
    "No Rest until the Blood of Greenskins flows like Dark Ale upon the Earth!"

    +++ Josef Bugman +++




  14. #14
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: Is there a way to get a message when another King is crowned?

    Here is the end of my campaign/imperial_campaign/campaign_script.txt

    Spoiler Alert, click show to read: 
    ;-- Princess of age
    monitor_event CharacterComesOfAge FactionIsLocal
    and AgentType = princess
    historic_event princess_local
    end_monitor

    ;-- Foreign Faction Leader --
    monitor_event BecomesFactionLeader FactionType england
    historic_event newleader_england
    end_monitor

    monitor_event BecomesFactionLeader FactionType france
    historic_event newleader_france
    end_monitor

    monitor_event BecomesFactionLeader FactionType flanders
    historic_event newleader_flanders
    end_monitor

    monitor_event BecomesFactionLeader FactionType hre
    historic_event newleader_hre
    end_monitor

    monitor_event BecomesFactionLeader FactionType spain
    historic_event newleader_spain
    end_monitor

    monitor_event BecomesFactionLeader FactionType venice
    historic_event newleader_venice
    end_monitor

    monitor_event BecomesFactionLeader FactionType sicily
    historic_event newleader_sicily
    end_monitor

    monitor_event BecomesFactionLeader FactionType milan
    historic_event newleader_milan
    end_monitor

    monitor_event BecomesFactionLeader FactionType scotland
    historic_event newleader_scotland
    end_monitor

    monitor_event BecomesFactionLeader FactionType ireland
    historic_event newleader_ireland
    end_monitor

    monitor_event BecomesFactionLeader FactionType byzantium
    historic_event newleader_byzantium
    end_monitor

    monitor_event BecomesFactionLeader FactionType russia
    historic_event newleader_russia
    end_monitor

    monitor_event BecomesFactionLeader FactionType lithuania
    historic_event newleader_lithuania
    end_monitor

    monitor_event BecomesFactionLeader FactionType moors
    historic_event newleader_moors
    end_monitor

    monitor_event BecomesFactionLeader FactionType turks
    historic_event newleader_turks
    end_monitor

    monitor_event BecomesFactionLeader FactionType egypt
    historic_event newleader_egypt
    end_monitor

    monitor_event BecomesFactionLeader FactionType denmark
    historic_event newleader_denmark
    end_monitor

    monitor_event BecomesFactionLeader FactionType norway
    historic_event newleader_norway
    end_monitor

    monitor_event BecomesFactionLeader FactionType portugal
    historic_event newleader_portugal
    end_monitor

    monitor_event BecomesFactionLeader FactionType jerusalem
    historic_event newleader_jerusalem
    end_monitor

    monitor_event BecomesFactionLeader FactionType antioch
    historic_event newleader_antioch
    end_monitor

    monitor_event BecomesFactionLeader FactionType poland
    historic_event newleader_poland
    end_monitor

    monitor_event BecomesFactionLeader FactionType hungary
    historic_event newleader_hungary
    end_monitor

    monitor_event BecomesFactionLeader FactionType normans
    historic_event newleader_normans
    end_monitor

    ; keep script unfinised until last monitor termination
    wait_monitors

    end_script


    and here is what I've added to the bottom of data/text/historic_events.txt

    Spoiler Alert, click show to read: 
    {NEWLEADER_ENGLAND_BODY} The King of England is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_ENGLAND_TITLE} A new King of England has been named
    {NEWLEADER_FRANCE_BODY} The King of France is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_FRANCE_TITLE} A new King of France has been named
    {NEWLEADER_FLANDERS_BODY} The Count of Flanders is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_FLANDERS_TITLE} A new Count of Flanders has been named
    {NEWLEADER_HRE_BODY} The Emperor of the Holy Roman Empire is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_HRE_TITLE} A new Emperor of the Holy Roman Empire has been named
    {NEWLEADER_SPAIN_BODY} The King of León is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_SPAIN_TITLE} A new King of León has been named
    {NEWLEADER_VENICE_BODY} The Doge of Venice is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_VENICE_TITLE} A new Doge of Venice has been elected
    {NEWLEADER_SICILY_BODY} The King of Sicily is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_SICILY_TITLE} A new King of Sicily has been named
    {NEWLEADER_MILAN_BODY} The Doge of Genoa is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_MILAN_TITLE} A new Doge of Genoa has been elected
    {NEWLEADER_SCOTLAND_BODY} The King of Scotland is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_SCOTLAND_TITLE} A new King of Scotland has been named
    {NEWLEADER_IRELAND_BODY} The High King of Ireland is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_IRELAND_TITLE} A new High King of Ireland has been named
    {NEWLEADER_BYZANTIUM_BODY} The Emperor of the Byzantine Empire is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_BYZANTIUM_TITLE} A new Emperor of the Byzantine Empire has been named
    {NEWLEADER_RUSSIA_BODY} The Grand Duke of Novgorod is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_RUSSIA_TITLE} A new Grand Duke of Novgorod has been named
    {NEWLEADER_LITHUANIA_BODY} The Grand Duke of Lithuania is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_LITHUANIA_TITLE} A new Grand Duke of Lithuania has been named
    {NEWLEADER_MOORS_BODY} The Sultan of the Moors is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_MOORS_TITLE} A new Moorish Sultan has been named
    {NEWLEADER_TURKS_BODY} The Seljuk Sultan is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_TURKS_TITLE} A new Seljuk Sultan has been named
    {NEWLEADER_EGYPT_BODY} The Sultan of Egypt is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_EGYPT_TITLE} A new Sultan of Egypt has been named
    {NEWLEADER_DENMARK_BODY} The King of Denmark is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_DENMARK_TITLE} A new King of Denmark has been named
    {NEWLEADER_NORWAY_BODY} The King of Norway is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_NORWAY_TITLE} A new King of Norway has been named
    {NEWLEADER_PORTUGAL_BODY} The King of Portugal is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_PORTUGAL_TITLE} A new King of Portugal has been named
    {NEWLEADER_JERUSALEM_BODY} The King of Jerusalem is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_JERUSALEM_TITLE} A new King of Jerusalem has been named
    {NEWLEADER_ANTIOCH_BODY} The Prince of Antioch is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_ANTIOCH_TITLE} A new Prince of Antioch has been named
    {NEWLEADER_POLAND_BODY} The King of Poland is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_POLAND_TITLE} A new King of Poland has been named
    {NEWLEADER_HUNGARY_BODY} The King of Hungary is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_HUNGARY_TITLE} A new King of Hungary has been named
    {NEWLEADER_NORMANS_BODY} The King of Aragon is dead and his successor has been named. His people are cheering their new ruler and believe that a new age of prosperity is on the horizon.
    {NEWLEADER_NORMANS_TITLE} A new King of Aragon has been named
    {PRINCESS_LOCAL_BODY} A daughter of the royal court has turned sixteen and is ready to venture into the world on behalf of her family and country.
    {PRINCESS_LOCAL_TITLE} A Princess Comes of Age


    Is this wrong or right? If it is right, what can the problem be? Because when I play a game I don't get any message at all when a foreign faction leader dies. He just dies in secret like usual.
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  15. #15
    Bela's Avatar Ducenarius
    Join Date
    May 2009
    Location
    The land of the crazy folk
    Posts
    947

    Default Re: Is there a way to get a message when another King is crowned?

    Hmmm... try this:

    monitor_event BecomesFactionLeader not FactionIsLocal
    and FactionType england
    historic_event newleader_england
    end_monitor

    And so on for all factions. As you will receive a message when your new leader is crowned, it's enough for inserting this for other factions. Maybe the "not FactionIsLocal" add was needed. And delete map.rwm.
    "No Rest until the Blood of Greenskins flows like Dark Ale upon the Earth!"

    +++ Josef Bugman +++




  16. #16

    Default Re: Is there a way to get a message when another King is crowned?

    Bela has already told you and he is right and there is no need to delete map.rwm that's something different.

    For king use this:-
    Code:
    monitor_event BecomesFactionLeader not FactionIsLocal
    	and FactionType england
    	historic_event newleader_england
    	end_monitor
    Event entry:-
    Code:
    {NEWLEADER_ENGLAND_BODY}blah blah blah
    {NEWLEADER_ENGLAND_TITLE}English Coronation. Sounds better lol
    For Princess:-
    Code:
    	monitor_event CharacterComesOfAge FactionIsLocal
    		and AgentType = princess
    		add_events
    			event historic princess_local
    		date 0
    	end_add_events
    	end_monitor
    Event entry:-
    Code:
    {PRINCESS_LOCAL_BODY}A daughter of the royal court has turned sixteen and is ready to venture into the world on behalf of her family and country.
    {PRINCESS_LOCAL_TITLE}A Princess Comes of Age
    Try this it works 100% and you guys always should use code tag in your posts sometimes a space etc gets mixed up and that's why it doesn't works in game.

    Good Luck Boba!

  17. #17
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: Is there a way to get a message when another King is crowned?

    I really do not understand it. I've done exactly what you said but the Moorish sultan still dies with no message. Is the file supposed to be read only or something?
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  18. #18

    Default Re: Is there a way to get a message when another King is crowned?

    What mod are u using? Is it mod foldered? Does it have it's own .cfg file?
    And upload your CS and historic events.txt file.

  19. #19
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: Is there a way to get a message when another King is crowned?

    I am using Bare_Kingdoms (was it Gigantus that made it? I can't remember - sorry)
    Yes it has a cfg file and I have modded thousands of things in the mod with no problems.

    Here are the two files.
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  20. #20

    Default Re: Is there a way to get a message when another King is crowned?

    I don't know it looks ok to me, try to delete the default .cfg file in the main directory may be then it works but it's a wild guess.
    And make sure that your historic events.txt file is not corrupt by deleting it's relevant .bin file.

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
  •