Page 4 of 4 FirstFirst 1234
Results 61 to 70 of 70

Thread: How to:Script spawn armies(make your own spartacus and hannibal!)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Keyser Soze's Avatar Domesticus
    Join Date
    Jul 2008
    Location
    Bratislava
    Posts
    2,437

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    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.

  2. #2
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    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

  3. #3
    Keyser Soze's Avatar Domesticus
    Join Date
    Jul 2008
    Location
    Bratislava
    Posts
    2,437

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    thanks.
    sorry my english.

  4. #4

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    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?

  5. #5
    chris10's Avatar Primicerius
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    3,239

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Quote Originally Posted by coit105 View Post
    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?
    yes but only with a workaround and depending on the situation it can require heavy modding of a lot of files and some scripting obvioulsy

  6. #6

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    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

  7. #7
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    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

  8. #8

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Quote Originally Posted by Squid View Post
    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.
    Thank you very much Mr. Squid
    Proudly under the patronage of Tone
    Roma Surrectum Local Moderator

  9. #9

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    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

  10. #10
    Badger-dude's Avatar Primicerius
    Join Date
    Sep 2005
    Location
    United Kingdom
    Posts
    3,033

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    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

Page 4 of 4 FirstFirst 1234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •