The event from campaign_script.txt, "historic_event player_first_huge_cathedral", how does that work, and can I change it to make it work for Orthodox huge cathedrals?
The event from campaign_script.txt, "historic_event player_first_huge_cathedral", how does that work, and can I change it to make it work for Orthodox huge cathedrals?
Great Jama, Huge cathedral all are scripted events:-
So for Orthodox it will be:-Code:monitor_event EventCounter EventCounterType building_completed_player_huge_cathedral and EventCounter = 1 historic_event player_first_huge_cathedral event/huge_cathedral_built.bik terminate_monitor end_monitor monitor_event EventCounter EventCounterType building_completed_player_great_jama and EventCounter = 1 historic_event player_first_great_jama event/great_mosque_created.bik terminate_monitor end_monitor
Code:monitor_event EventCounter EventCounterType building_completed_player_huge_cathedral_o and EventCounter = 1 historic_event player_first_huge_cathedral event/huge_cathedral_built.bik terminate_monitor end_monitor![]()
That is very helpful. Thank you.
Glad to help bro.![]()
I just had a thought. Theoretically, if I had videos for the building in question, I could set up scripts for all of my constructable buildings like this:
monitor_event EventCounter EventCounterType building_completed_player_[building_name]
and EventCounter = 1
historic_event player_first_[building_name] event/[building_name].bik
terminate_monitor
end_monitor
assuming I have appropriate .bik videos, and substituting in the name for the buildings in question, I could script the eventcounter of the construction of (for example) the first alchemist_lab, and use that eventcounter in the EDB in lieu of a building_present_min_level requirement. Is this correct?
EDIT:
And if I already have a huge_cathedral present in one settlement in the descr_strat.txt, if I build one in a different settlement will that cause the event to occur, despite the presence of a pre-existing huge_cathedral?
Last edited by rebelyell2006; March 07, 2011 at 12:42 AM.
You don't actually have to go through adding videos, that is a personal choice and not a requirement.
You can use the "and event player_first_[building_name] 1" entry as a valid requirement in the EDB
As the monitor will fire once the first building of that name has been completed, you might want to think of it as "player_first_new_building" - meaning it will trigger even if you had preplaced that building in the descr_strat.
I believe you can achieve a similar result by the use of "NumBuildingsCompleted"
Don't blame me for the code, did it just on the fly.monitor_event GovernorBuildingCompleted NumBuildingsCompleted [building_name] > 0
add_events
event counter First_[building_name]
date 0
end_add_events
terminate_monitor
end_monitor
Sorry for bumping an old thread, but if I use that script, would it trigger when (for example) a huge_cathedral is built? Does it matter if I use GovernorBuildingCompleted or BuildingCompleted?
EDIT:
Because this would be an awesome way of restricting units based upon existing and foreign buildings, since building_present_min_level only works for other buildings.
EDIT2:
I just experimented, and it turns out that BuildingCompleted works:
monitor_event BuildingCompleted NumBuildingsCompleted shipwright > 0
add_events
event counter First_Shipwright
date 0
end_add_events
terminate_monitor
end_monitor
works when Theigns are given "and event_counter First_Shipwright 1"
EDIT3:
Why is this broken? What did I do wrong?
monitor_event BuildingCompleted NumBuildingsCompleted great_jama > 0
historic_event first_campaign_great_jama event/great_mosque_created.bik
terminate_monitor
end_monitor
Last edited by rebelyell2006; March 26, 2011 at 08:17 PM.
EDIT3:
What did go wrong? Does the movie exist?Why is this broken? What did I do wrong?
monitor_event BuildingCompleted NumBuildingsCompleted great_jama > 0
historic_event first_campaign_great_jama event/great_mosque_created.bik
terminate_monitor
end_monitor
No, but that isn't the issue apparently. What it should do is show the video (now changed to an existing video), but instead I get a CTD with this message:
23:52:18.571 [system.rpt] [error] Uh oh. This isn't good. No idea why, but exiting now. Sorry pal.
Without any explanation as to why it breaks, it just does that. Do I need to add anything to the /text/ folder, since it is supposed to be a historic event? How would I go about making it just an event counter with a movie?
Last edited by rebelyell2006; March 26, 2011 at 11:26 PM.
You obviously need to have the text entries in the text\historic_events file. Without them you get a crash.
{FIRST_CAMPAIGN_GREAT_JAMA_TITLE}Here goes the title of the event
{FIRST_CAMPAIGN_GREAT_JAMA_BODY}Here goes some filler\details of the event
Huh, they needed to be in all-caps. That is what caused the problem.
Yes they need to be in Capital letters inside the curly brackets.![]()