As in topic. I want to make a script spawning heretics piriests if the level ov heretics in province will be bigger then 20%. I made this script, but i cannot handle with spawning heretic priests.
As in topic. I want to make a script spawning heretics piriests if the level ov heretics in province will be bigger then 20%. I made this script, but i cannot handle with spawning heretic priests.
a heretic is any priest owned by the rebel faction.
so i must to spawn heretic priests as rebel?
May be accetable something like this:?
spawn_character rebel, random_name , priest, age 16, x...., y......
pretty much.
rebel actually goes as 'slave' inside game files.
One more question:
how to check the heretic level in specific settlement? I can check characters religion or characters religion level but i cannot find the condition checking religion level in settlement.
OK i can use PopulationHeretic and TimeSinceHeresy in my script. Unfortanately if i'm right, this conditions checking the current region only. So the question is how to relate this conditions to all of regions? Is there any tip to select each of regions one by one?
may i use point_at_settlement or select_settlement command for my purposes?
Last edited by attyla; May 22, 2011 at 03:28 PM.
OK i wrote this script:
Unfortunately, the game don't wont to recognise faction named slave. Log says: faction type not recognised.monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber = 2
select_settlement Gniezno
if PopulationHeretic >= 10
spawn_character slave, random_name, priest, age 18, x 289, y 264
spawn_character slave, random_name, priest, age 17, x 288, y 262
spawn_character slave, random_name, priest, age 16, x 292, y 258
end_if
terminate_monitor
end_monitor
So i suppose i cannot spawn priests using slave faction.
Another idea?
attyla, for the script to work you need to change the event you're using to something that works with the ‘PopulationHeretic’ condition, something like ‘CharacterTurnStart’ or any event that exports a ‘character_record’.
Spoiler Alert, click show to read:
Now in that ‘spawn_character’ command, try removing the comma after the faction's name. It's not needed there, and may be causing a problem. Also, I seem to remember that priests and heretics are not the same agent type.
Spoiler Alert, click show to read:
i've changed command to point_at_settlement. I hope it's enough. I've also erased word slave from lines spawning priests. exept good looking effect of pointing the settlement nothing new...
This is info from log:
21:12:28.890 [system.io] [info] open: found mods/Deus_Vult/data/world/maps/campaign/imperial_campaign/campaign_script.txt (from: E:\Gry\MTW2)
21:12:29.062 [game.script] [error] Script parsing error at line 11, column 59 in mods/Deus_Vult/data/world/maps/campaign/imperial_campaign/campaign_script.txt
Character 'priest' is too young to be a character at age 0.