Seems the witch, heretic and inquisitor (?) cannot be recruited through the agent ability in the EDB.Unknown agent type specified: witch
They can be spawned through the script.
Is there any way to make a building that only a player, not computer, can build?
• Son of MasterBigAb; • Father of St. Polycarpe • Kahvipannu • Radboud • Mhaedros • GeMiNi][SaNDy •
• Flinn • UndyingNephalim • KAM 2150 • Charerg•
Yes there is i think.
Put it in the Campaign_script.txt
And put this in the EDB for a particular building:-Code:monitor_event PreFactionTurnStart FactionIsLocal set_event_counter X_Y 1 end_monitor monitor_event FactionTurnEnd FactionIsLocal set_event_counter X_Y 0 end_monitor
So this will do the job i think coz when u click next end it will be disabled for a time being so that no AI faction gets the hold of it.Code:and event_counter X_Y 1
But i'm not confident about it.
Many thanks! I will try it. +rep
Oh, since I have also one another question about buildings, may I ask it here?
so, is there a way to destroy the building after a one turn I've built it? (means that the building stay only a one turn.) I tried to search it but I did not find.
• Son of MasterBigAb; • Father of St. Polycarpe • Kahvipannu • Radboud • Mhaedros • GeMiNi][SaNDy •
• Flinn • UndyingNephalim • KAM 2150 • Charerg•
I think we can do it.
The script is Faction dependent coz the destroy command can be applied only on a faction not globally.
So with this script if u construct a brothel in game and it will be destroyed on the next turn that is the player or the AI has the access of it for 1 turn.Code:declare_counter X_Y monitor_event FactionTurnStart FactionType england and FactionBuildingExists >= brothel set_counter X_Y 1 end_monitor monitor_event FactionTurnEnd FactionType england and I_CompareCounter X_Y > 0 inc_counter X_Y 1 end_monitor monitor_event FactionTurnEnd FactionType england and I_CompareCounter X_Y = 2 destroy_buildings england taverns true set_counter X_Y 0 end_monitor
I have checked it and it works.
I'm not a good scripter so i'm sure someone else can refine it or simplify it further.
Last edited by Ishan; September 20, 2010 at 08:43 AM.
If you declare a counter, then it is automatically set on zero. So you basically only need the first (slightly modified) and the last monitor:
declare_counter X_Y
monitor_event FactionTurnStart FactionType england
and FactionBuildingExists >= brothel
inc_counter X_Y 1
end_monitor
monitor_event FactionTurnEnd FactionType england
and I_CompareCounter X_Y = 2
destroy_buildings england taverns true
set_counter X_Y 0
end_monitor
Yes more elegant.
My scripting skills are rusty.
Thank you Ishan and Gigantus!
I am just making my first steps into a world of coding so...
+rep.
• Son of MasterBigAb; • Father of St. Polycarpe • Kahvipannu • Radboud • Mhaedros • GeMiNi][SaNDy •
• Flinn • UndyingNephalim • KAM 2150 • Charerg•
wow really thank you!
But is it necessary to have 'FactionType england'? Would just 'FactionIsLocal' work?
• Son of MasterBigAb; • Father of St. Polycarpe • Kahvipannu • Radboud • Mhaedros • GeMiNi][SaNDy •
• Flinn • UndyingNephalim • KAM 2150 • Charerg•
This is faction specific: if England has that building, then after two turns that building will be destroyed in English towns. I don't think "all" will work with destroy_buildings. Otherwise that idea would be fine.
To be on the safe side (just in case a second brothel got build) the condition should be
if I_CompareCounter X_Y >= 2
Hey Gigantus, why is it that certain parameters work together, whereas some others don't?
For example, this
recruit_pool "Lithuanian Cavalry" 1 0.3 1 0 requires factions { poland, } and region_religion catholic 70 and building_present_min_level poland_enclave
does not cause a crash upon starting up a campaign, but this
recruit_pool "Akinjis" 1 0.34 3 0 requires factions { turks, } and region_religion islam 70 and building_present_min_level turks_enclave
does, even though they are supposedly the same things with different faction/religion labels is all?
Because you can't use parameters that don't work. Check out what the log says. It might help determine what you did wrong.
Last edited by Taiji; September 29, 2010 at 08:08 AM.
It gives me a loop of entries similar to this
02:12:11.968 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
02:12:11.968 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
02:12:11.969 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
02:12:11.969 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
02:12:11.969 [game.script.trigger] [trace] Trigger <Usurper1> fired
02:12:11.969 [game.script.trigger] [trace] Trigger <factionleader> fired
02:12:11.971 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
02:12:11.971 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
02:12:11.972 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
02:12:11.972 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/000.tga, using the default culture path if it exists
02:12:11.972 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/001.tga, using the default culture path if it exists
02:12:11.972 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/001.tga, using the default culture path if it exists
02:12:11.973 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/001.tga, using the default culture path if it exists
02:12:11.973 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/001.tga, using the default culture path if it exists
02:12:11.973 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/036.tga, using the default culture path if it exists
02:12:11.973 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/036.tga, using the default culture path if it exists
02:12:11.974 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/036.tga, using the default culture path if it exists
02:12:11.974 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/generals/036.tga, using the default culture path if it exists
02:12:11.975 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/merchants/000.tga, using the default culture path if it exists
02:12:11.975 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/merchants/000.tga, using the default culture path if it exists
02:12:11.975 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/merchants/000.tga, using the default culture path if it exists
02:12:11.975 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/merchants/000.tga, using the default culture path if it exists
02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/civilians/000.tga, using the default culture path if it exists
02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/civilians/000.tga, using the default culture path if it exists
02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/civilians/000.tga, using the default culture path if it exists
02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/civilians/000.tga, using the default culture path if it exists
02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/priests/000.tga, using the default culture path if it exists
02:12:11.976 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/priests/000.tga, using the default culture path if it exists
02:12:11.977 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/priests/000.tga, using the default culture path if it exists
02:12:11.977 [data.missing] [warning] Cannot find the portrait path: data/ui/northern_european/portraits/portraits/young/priests/000.tga, using the default culture path if it exists
ending in
02:12:12.078 [game.script.trigger] [trace] Trigger <Usurper1> fired
02:12:12.078 [game.script.trigger] [trace] Trigger <factionleader> fired
02:12:12.081 [game.script.trigger] [trace] Trigger <Usurper1> fired
02:12:12.081 [game.script.trigger] [trace] Trigger <factionleader> fired
02:12:12.084 [game.script.trigger] [trace] Trigger <Usurper1> fired
02:12:12.084 [game.script.trigger] [trace] Trigger <factionleader> fired
02:12:12.445 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.
....But the only thing modified was export_descr_unit
Does it happen when you put back in your backed up EDU?
Were you playing with the bodyguard units?
No, if I use my backup EDU, it works perfectly. However using the line recruit_pool "Lithuanian Cavalry" 1 0.3 1 0 requires factions { poland, } and region_religion catholic 70 and building_present_min_level poland_enclave does not cause it to crash in any way, but using the same sort of line on the Turkish Akinji causes a crash.
And no, I wasn't trying to fiddle around with the bodyguard units....I was...Err...Trying to do something a little more ambitious, by adding a whole lot of faction-specific buildings to simulate colonization, along with the region_religion parameter.
You checked the log for the word 'error' and found nothing? ... Checked twice???
My guess is that it says 'Akinji does not match the ownership for turkey...', or something like that.
Last edited by Taiji; September 29, 2010 at 11:42 AM.
Is it possible to make several construction queue or build several buildings in the construction queue simultaneously?
Not without scripts.
Under the patronage of Roman_Man#3, Patron of Ishan
Click for my tools and tutorials
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein