great, thanks.
just one more question: the spawn army is only from faction which are in game from start, yes? it is not possible to spawn faction?
great, thanks.
just one more question: the spawn army is only from faction which are in game from start, yes? it is not possible to spawn faction?
sorry my english.
You can have emergent factions, like in BI, but no you can't spawn a faction through scripts. You can spawn an army for any faction on the map.
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
thanks.
sorry my english.
Dear Squid,
you seem to have been quite a good guide for me so far, on that one post, and you have quite a reputation it would seem. Could you tell me, is it possible to script the handing over of certain settlements from the players faction to emergent factions like a Roman rebel faction for instance?
How can you see the X and Y coordinates of the map? I want to be able to place my spawn armies in proper areas of course.
Proudly under the patronage of Tone
Roma Surrectum Local Moderator
When in the campaign open the console, put the mouse over the desired positions and type show_cursorstat and hit enter it will give you the coordinates.
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
Hello. Goodness help me but even after reading this VERY informative thread, i still can't get my army to spawn. clearly im pretty new to scripting. So i stuck this at the bottom of my EBBS_SCRIPT.TXT, and cant get it to work. Am i putting it in the wrong place? do i need triggers? any help would be most appreciated. I'm not too good with this sort of stuff and ive been knocking my head against the wall trying to figure it out.
monitor_event FactionTurnStart FactionIsLocal
and FactionType seleucid
and I_TurnNumber = 2
console_command kill_character "CaivsB Romanvs"
spawn_army
faction seleucid
character CaivsB Romanvs, named character, command 0, influence 0, management 0, subterfuge 0, age 20, x 96, y 129
unit roman cavalry eqvites consvlares,
end
terminate_monitor
end_monitor
while I_TurnNumber < 9999
suspend_unscripted_advice true
end_while
I am trying to write a script which essentially randomises the distribution of settlements and armies between two factions at the beginning of the game.
It should fire as soon as the first player's turn begins, and should generate a counter. From that, it either spawns the character for 'byzantium' or 'france'.
However, in game there is no indication of anything happening what-so-ever. The script syntax is likely as not correct, as other campaign_script functions work well.
In descr_strat, the settlement begins ungarrisoned and in 'French' hands.
Code:monitor_event FactionTurnStart FactionIsLocal and I_EventCounter Mooton_Declare_Targ = 0 and I_EventCounter Mooton_Declare_Bara = 0 generate_random_counter Mooton_Declare 1 10 if I_EventCounter Mooton_Declare >= 2 set_event_counter Mooton_Declare_Targ 1 historic_event Mooton_Declare_Targ spawn_army faction byzantium character William Mooton, named character, male, age 44, x 91, y 110 traits GoodFighter 1 , LoyaltyStarter 1 unit SE Bodyguard, exp 0 armour 0 weapon_lvl 0 unit Spear Militia, exp 0 armour 1 weapon_lvl 0 unit Spear Militia, exp 0 armour 1 weapon_lvl 0 unit Spear Militia, exp 0 armour 1 weapon_lvl 0 unit Peasant Archers, exp 0 armour 0 weapon_lvl 0 end console_command give_ancillary "William Mooton" maidenpool end_if if I_EventCounter Mooton_Declare <= 1 set_event_counter Mooton_Declare_Bara 1 spawn_army faction france character William Mooton, named character, male, age 44, x 91, y 110 traits GoodFighter 1 , LoyaltyStarter 1 unit NE Bodyguard, exp 0 armour 0 weapon_lvl 0 unit Spear Militia, exp 0 armour 1 weapon_lvl 0 unit Spear Militia, exp 0 armour 1 weapon_lvl 0 unit Spear Militia, exp 0 armour 1 weapon_lvl 0 unit Peasant Archers, exp 0 armour 0 weapon_lvl 0 end console_command give_ancillary "William Mooton" maidenpool end_if terminate_monitor end_monitor