Page 4 of 6 FirstFirst 123456 LastLast
Results 61 to 80 of 112

Thread: The placement of units, Coded and Scripted - using various commands

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: The placement of units, Coded and Scripted - using various commands

    Re English army spawning one could check to see how many settlements the English have before spawning an army.
    if they have 0 (or whatever number) settlements then don't spawn?

  2. #2
    Pnutmaster's Avatar Dominus Qualitatium
    Join Date
    Jan 2006
    Location
    Brooklyn, NY
    Posts
    1,572

    Default Re: The placement of units, Coded and Scripted - using various commands

    Oh, but I do want them to spawn an English army if England is no more. Unless the game refuses such requests by CTDs.

    (Hypothesis: If a factional army spawns when its faction is deceased, the army will automatically rebel)
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: The placement of units, Coded and Scripted - using various commands

    Sorry, wrong thread.
    Last edited by Gigantus; December 02, 2009 at 09:59 PM.










  4. #4

    Default Re: The placement of units, Coded and Scripted - using various commands

    Archaon is it possible to spawn an enemy army if one faction destroys a building in their settlement?

    I've made the following script but I'm unsure if it's correct (especially the settlement checking part). Can you seen any obvious errors?

    Code:
    declare_counter Merv_oghuz
    
    declare_counter sieged_Merv_oghuz
    set_counter sieged_Merv_oghuz 0
    
    monitor_event PreFactionTurnStart SettlementName Merv
    
        if SettlementBuildingExists = oghuz
            and I_CompareCounter sieged_Merv_oghuz = 0
            set_counter Merv_oghuz 0
        end_if
    
        if not SettlementBuildingExists = oghuz
            and I_CompareCounter sieged_Merv_oghuz = 0
            set_counter Merv_oghuz 1
        end_if
    
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType slave
            and I_CompareCounter Merv_oghuz = 1
    
                spawn_army 
                faction slave, sub_faction russia
                    character random_name, named character, family, age 32, x 249, y 227, label Invade_Merv, direction N
                    unit bodyguard seljuks               exp 0 armour 1 weapon_lvl 0
                    unit turkoman light maceman            exp 0 armour 1 weapon_lvl 0
                    unit turkoman light maceman           exp 0 armour 1 weapon_lvl 0
                    unit turkoman light maceman           exp 0 armour 1 weapon_lvl 0
                    unit turkoman medium swordsmen        exp 0 armour 1 weapon_lvl 0
                    unit turkoman medium swordsmen        exp 0 armour 1 weapon_lvl 0
                    unit turkoman heavy macemen           exp 0 armour 1 weapon_lvl 0
                    unit turkoman light bowman        exp 0 armour 1 weapon_lvl 0
                    unit turkoman light bowman            exp 0 armour 1 weapon_lvl 0
                    unit turkoman medium bowman           exp 0 armour 1 weapon_lvl 0
                    unit turkoman medium bowman        exp 0 armour 1 weapon_lvl 0
                    unit turkoman heavy bowman            exp 0 armour 1 weapon_lvl 0
                    unit turkoman light swordsmen cavalry           exp 0 armour 1 weapon_lvl 0
                    unit turkoman light swordsmen cavalry        exp 0 armour 1 weapon_lvl 0
                    unit turkoman light archer cavalry close bow            exp 0 armour 1 weapon_lvl 0
                    unit turkoman light archer cavalry close bow           exp 0 armour 1 weapon_lvl 0
                    unit turkoman medium archer cavalry close bow            exp 0 armour 1 weapon_lvl 0
                    unit turkoman medium archer cavalry close bow           exp 0 armour 1 weapon_lvl 0
                    sieging
            siege_settlement Invade_Merv, Merv, maintain
        set_counter sieged_Merv_oghuz 1
    end_monitor
    Last edited by uanime5; January 18, 2010 at 10:05 AM. Reason: Script attempt
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: The placement of units, Coded and Scripted - using various commands

    I don't see a condition/monitor for the counter sieged_Merv_oghuz, so far is is a simple building check without a tie up to a successful siege.










  6. #6

    Default Re: The placement of units, Coded and Scripted - using various commands

    The sieged_Merv_oghuz is just there so that this event will only occur once after this building has been destroyed. Without it the slave faction would continue to get sieging armies until this building was rebuilt.

    Just realised I need to reset the Merv_oghuz counter.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: The placement of units, Coded and Scripted - using various commands

    There is always the "terminate_monitor" for that.

    .........
    siege_settlement Invade_Merv, Merv, maintain
    set_counter sieged_Merv_oghuz 1
    terminate_monitor
    end_monitor










  8. #8

    Default Re: The placement of units, Coded and Scripted - using various commands

    gigantus I keep getting an error message for the 'monitor_event PreFactionTurnStart SettlementName' PreFactionTurnStart and FactionTurnStart cannot be applied to settlements. Is there a SettlementTurnStart or another command I can use instead.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: The placement of units, Coded and Scripted - using various commands

    monitor_event SettlementTurnStart SettlementName Merv










  10. #10

    Default Re: The placement of units, Coded and Scripted - using various commands

    Thanks for your help gigantus.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: The placement of units, Coded and Scripted - using various commands

    One is glad to be of service










  12. #12
    wudang_clown's Avatar Fire Is Inspirational
    Join Date
    Jan 2009
    Location
    Poland
    Posts
    7,357

    Default Re: The placement of units, Coded and Scripted - using various commands

    Could someone explain what that line actually do and confirm does this actually work:

    spawn_army
    faction faction_name, sub_faction faction_name
    It was said that it's necessary to spawn a slave army, but it's not quite true. It's enough to put there "faction slave" and it will also spawn an army.

    What I'm trying to do is to set crusader model for spawned army:

    Code:
    spawn_army
    		faction slave,	sub_faction france
    			character	Doge, named character, age 42, x 91, y 265
    			traits GoodCommander 3 , PublicFaith 1 , Loyal 4
    			unit		leopold		exp 9 armour 0 weapon_lvl 0
    All I get is proper crusader banner, but model is just the same as in case of other slave generals... Is it possible to have Latin slave general model appear on the map?

    Under the patronage of m_1512

  13. #13

    Default Re: The placement of units, Coded and Scripted - using various commands

    Quote Originally Posted by wudang_clown View Post
    Is it possible to have Latin slave general model appear on the map?
    Assign the battle model via command in ur script like:-
    Code:
    faction teutonic_order
    character	Charles, named character, x 57, y 53, battle_model Adv_Northern_General_Eng

  14. #14
    wudang_clown's Avatar Fire Is Inspirational
    Join Date
    Jan 2009
    Location
    Poland
    Posts
    7,357

    Default Re: The placement of units, Coded and Scripted - using various commands

    I did it and nothing changed - models are the same.

    At the same time I realized that banner type is determined by the region in whic spawned army appears.

    So, I bogged down.

    Under the patronage of m_1512

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: The placement of units, Coded and Scripted - using various commands

    The banners for the spawned slave armies are determined by the culture of the region.

    I believe the banners of the slave armies in descr_strat are determined by the culture of their sub_faction.










  16. #16
    wudang_clown's Avatar Fire Is Inspirational
    Join Date
    Jan 2009
    Location
    Poland
    Posts
    7,357

    Default Re: The placement of units, Coded and Scripted - using various commands

    Yes, that is correct.

    But I'm trying to script models in campaign_script.txt, not in descr_strat.txt...

    Is there any way to assign specific models to invasion army spawned in campaign_script.txt? Because now I'm getting just a slave general model and can't get any other... It's rather weird to see Middle Eastern general model representing leaders of the 4th crusade...

    Under the patronage of m_1512

  17. #17
    wudang_clown's Avatar Fire Is Inspirational
    Join Date
    Jan 2009
    Location
    Poland
    Posts
    7,357

    Default Re: The placement of units, Coded and Scripted - using various commands

    Quote Originally Posted by irishron View Post
    Why can't the same thing be done that is done for the Mongols and Timurids? They are all listed as spawn armies.
    I'm not sure if I get you correctly, but it can't be done as it is for those two factions, because then it would be Kingdom of Jerusalem's armies besieging Constantinople - and that would be incorrect.

    That's why I'm asking: is it possible to assign a specific general's model to a slave army. It seems to me that "faction slave, sub_faction france" doesn't result in having france slave model of a general on the map, though each rebellious KoJ (france) general is getting that specific rebel model. So, is it possible to get such feature via campaing_script.txt?
    Last edited by wudang_clown; August 28, 2010 at 04:51 PM.

    Under the patronage of m_1512

  18. #18
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: The placement of units, Coded and Scripted - using various commands

    Why can't the same thing be done that is done for the Mongols and Timurids? They are all listed as spawn armies.

  19. #19
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: The placement of units, Coded and Scripted - using various commands

    Then the problem would be converting a Middle Eastern convert to Catholicism, or have a Middle Eastern faction emerge as Catholic as I see it. Is this what you are trying to accomplish?

  20. #20
    wudang_clown's Avatar Fire Is Inspirational
    Join Date
    Jan 2009
    Location
    Poland
    Posts
    7,357

    Default Re: The placement of units, Coded and Scripted - using various commands

    What I'm trying to accomplish is, one more time, having a Latin general's model on the head of Latin crusader army besieging Constantinople in 1204. No less, no more.

    Now scripting of 4th crusade results in having ME general (faction slave) as the model of Latin crusader army.

    Accordingly to Archaon's finding, "sub_faction france" added to the faction line should result in having specific model appear, but it seems not to work.

    I'm asking if it works really, because it's very possible than I'm scripting it incorrectly. But I need to know if it works before I can conclude that I'm doing something wrongly.

    Under the patronage of m_1512

Page 4 of 6 FirstFirst 123456 LastLast

Posting Permissions

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