Page 3 of 6 FirstFirst 123456 LastLast
Results 41 to 60 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

    Default Re: The placement of units, Coded and Scripted. ## Using commands 'garrisoned_army / spawn_army' with siege_equipment! ## How to spawn a navy through scripts! ## How to spawn an agent through scripts

    thx a good pun always lightens my mood.

    Also when i look and can see noone else found out how to use the sieging in CS that is all me baby! a bit of a fluke though, the 'end' was missed the first time i saw the 'sieging' work, luck i guess..

  2. #2

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

    In descr_names.txt, these names are used when you choose random_name.
    Also when a character is born, offer for adoption, man of the hour, captain of an army (unit acting as a general on battlefield). the names are from descr_names.txt.

    Slave faction needs at least one name in descr_names.txt. but from the descr_strat and CS we can make slave characters have any other factions name, but the entire name must belong to the single faction (sub_faction).
    When using sub_faction, the slave army will assume the ‘look’ and AI processes of the sub faction. Basically, this is the sub_faction itself just belonging to the slave faction rather than the sub_faction..

    When it comes to names, I am not aware of any ‘tricks’ to use a mixed factions names in one character, or mixed gender. And don’t see the point to it.. it wouldn’t effect the ‘look’ or the AI like using sub_factions.. so if you simply wanted to use different name combinations I suggest you add the new names to the desired faction and reference this new name in your desc_strat or CS.

  3. #3
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

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

    Quote Originally Posted by Archaon View Post
    In descr_names.txt, these names are used when you choose random_name.
    Also when a character is born, offer for adoption, man of the hour, captain of an army (unit acting as a general on battlefield). the names are from descr_names.txt.

    Slave faction needs at least one name in descr_names.txt. but from the descr_strat and CS we can make slave characters have any other factions name, but the entire name must belong to the single faction (sub_faction).
    When using sub_faction, the slave army will assume the ‘look’ and AI processes of the sub faction. Basically, this is the sub_faction itself just belonging to the slave faction rather than the sub_faction..

    When it comes to names, I am not aware of any ‘tricks’ to use a mixed factions names in one character, or mixed gender. And don’t see the point to it.. it wouldn’t effect the ‘look’ or the AI like using sub_factions.. so if you simply wanted to use different name combinations I suggest you add the new names to the desired faction and reference this new name in your desc_strat or CS.
    I'm aware of all that, and adding them to the names entries wouldn't work. For instance, say I want to name a guy '0101 2222'. If I just put that in the england files, other people could come up like '0101 Bennett' or 'William 2222' throughout the course of the campaign. There's times when you need a name in the campaign script which cannot be used when a character is generated throughout the course of a campaign. This is what I'm looking for, and that's what alpaca's suggested 'trick' seems to suggest.

    For generals you can use 'label', but I don't see 'label' next to the agent spawns. So if I spawn agents to check something, how can I possibly reference them if it's possible another agent of the same name exists?

  4. #4

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

    Quote Originally Posted by Augustus Lucifer View Post
    For generals you can use 'label', but I don't see 'label' next to the agent spawns. So if I spawn agents to check something, how can I possibly reference them if it's possible another agent of the same name exists?
    Again, Alpaca will really need to explain if this 'trick' exists as you imagine it because i really cannot tell how what you talk about is possible.

    and on the label issue with spawn_character.. it is not built to host all the options that spawn_army allows for, like battle_model, portrait, label, ect...

  5. #5
    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

    Archaon - thanks for bringing this to us who've wanted proper garrison armies.

    couple of questions - garrison army will be in the descr_strat. which is great for starting armies.

    In campaigns: can we include the replenish_units command in campaign script to replenish garrison armies?
    (AI often does this automatically if the unit can be recruited in the settlement and it has the money to spare.
    We can achieve this by making sure the units for garrisons are the same for castles and towns and recruitable from low level barracks.)

    Having a govenor who stays put will be a great help for keeping public order under control.

    Oh what happens if the AI sends a new general into a settlement (perhaps as a result of a defeat?), does he get stuck as well if he becomes the govenor?

    Can we spawn in campaign_script a new govenor every time one dies? (or maybe have govenors who never age?)

    however is there any way to spawn a new garrison army and govenor if the original faction loses the city/castle and another one takes over?

    (apologies if these are too obvious, but this has great potential for stainless steel, among others.)

  6. #6

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

    Archaon - thanks for bringing this to us who've wanted proper garrison armies. Thank you

    couple of questions - garrison army will be in the descr_strat. which is great for starting armies. Perfect for when a new map is created and adding in factions! You can quickly populate the entire map without loading the game to get x,y locations (or looking at tga’s if that is your preference).

    In campaigns: can we include the replenish_units command in campaign script to replenish garrison armies?
    (AI often does this automatically if the unit can be recruited in the settlement and it has the money to spare.
    We can achieve this by making sure the units for garrisons are the same for castles and towns and recruitable from low level barracks.) replenish_units only works if you know the character name or label – so limited and wont work the entire campaign due to births, adoptions, ect

    Having a govenor who stays put will be a great help for keeping public order under control. Modifying MP is easy enough, make a trait which decreases the mp to 0 if a general becomes governor (first general in settlement). There are tutorials for traits.

    Oh what happens if the AI sends a new general into a settlement (perhaps as a result of a defeat?), does he get stuck as well if he becomes the governor? One governor at a time, and yes, the general who stops in a settlement will become governor if there is not already one present.

    Can we spawn in campaign_script a new govenor every time one dies? (or maybe have govenors who never age?) spawn_army has issues spawning into a settlement, I do no promote use of this. Use the consol command ‘create_unit’ but sadly it does not create a general…

    however is there any way to spawn a new garrison army and govenor if the original faction loses the city/castle and another one takes over? Simple answer, yes, that is exactly what the tutorial explains.

    (apologies if these are too obvious, but this has great potential for stainless steel, among others.)

  7. #7
    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

    Archaon

    many thanks for the replies.

    I've tested the garrisoned_army in the new stainless steel rc/rr compilation.
    (I moved the previous descr_strat armies and generals outside the settlements to avoid confusion.)
    No problem with the garrison units starting in the right place.
    Only they don't stay put.

    In fact many walked out on turn 1.
    (AI kept a minimum of 2 units in each settlement.)

    Anyway I can see that when doing a descr_strat from scratch it will save a lot of time.

    (From memory people have reported that MP=0 doesn't work, units etc can still move 1 square apparently.)

    One could make a whole new set of garrison units with 0 movement points in the hope they'd not stray too far from settlements.
    (But that might cause issues as well.)

  8. #8
    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

    monitor_event SettlementTurnStart SettlementName Palermo
    and SettlementIsLocal
    and GarrisonToPopulationRatio < 0.4
    and I_FactionLeaderTrait sicily Offensive_To_Nobles > 0
    and RandomPercent < 50
    and not I_CharacterExists Invade_Palermo
    and I_TurnNumber > 0
    spawn_army
    faction slave, sub_faction sicily
    character random_name, named character, age 30, x 188, y 104, label Invade_Palermo
    traits LoyaltyStarter 1 , NaturalMilitarySkill 2 , GoodCommander 1
    unit NE Bodyguard exp 5 armour 2 weapon_lvl 0
    unit Mailed Knights exp 3 armour 0 weapon_lvl 0
    unit Italian Spear Militia exp 1 armour 0 weapon_lvl 0
    unit Italian Spear Militia exp 1 armour 0 weapon_lvl 0
    unit Crossbowmen exp 0 armour 0 weapon_lvl 0
    unit Crossbowmen exp 0 armour 0 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sicilian Muslim Archers exp 1 armour 0 weapon_lvl 0
    unit Sicilian Muslim Archers exp 1 armour 0 weapon_lvl 0
    unit Mercenary Crossbowmen exp 3 armour 2 weapon_lvl 0
    sieging
    siege_settlement Invade_Palermo, Palermo, maintain
    end_monitor
    Using said script, my rebels spawn as "Moses", the Slave Faction Leader.

    1) Why are the rebels not spawning with a Sicilian name, given that they are sub faction sicily?
    2) Why are they spawning (at least the first one) as Slave Faction Leaders?
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

  9. #9
    Agis Tournas's Avatar ★ Modder-at-Arms ★
    Join Date
    May 2008
    Location
    Athens, Hellas
    Posts
    1,714

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

    Quote Originally Posted by Pnutmaster View Post
    monitor_event SettlementTurnStart SettlementName Palermo
    and SettlementIsLocal
    and GarrisonToPopulationRatio < 0.4
    and I_FactionLeaderTrait sicily Offensive_To_Nobles > 0
    and RandomPercent < 50
    and not I_CharacterExists Invade_Palermo
    and I_TurnNumber > 0
    spawn_army
    faction slave
    character sub_faction sicily, random_name, named character, age 30, x 188, y 104, label Invade_Palermo
    traits LoyaltyStarter 1 , NaturalMilitarySkill 2 , GoodCommander 1
    unit NE Bodyguard exp 5 armour 2 weapon_lvl 0
    unit Mailed Knights exp 3 armour 0 weapon_lvl 0
    unit Italian Spear Militia exp 1 armour 0 weapon_lvl 0
    unit Italian Spear Militia exp 1 armour 0 weapon_lvl 0
    unit Crossbowmen exp 0 armour 0 weapon_lvl 0
    unit Crossbowmen exp 0 armour 0 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sicilian Muslim Archers exp 1 armour 0 weapon_lvl 0
    unit Sicilian Muslim Archers exp 1 armour 0 weapon_lvl 0
    unit Mercenary Crossbowmen exp 3 armour 2 weapon_lvl 0
    sieging
    siege_settlement Invade_Palermo, Palermo, maintain
    end_monitor
    Using said script, my rebels spawn as "Moses", the Slave Faction Leader.
    1) Why are the rebels not spawning with a Sicilian name, given that they are sub faction sicily?
    2) Why are they spawning (at least the first one) as Slave Faction Leaders?
    My 2 cents
    A mini-mod is never late! Nor is it ever early. It arrives precisely when I mean it to do!


    Son of Agisilaos / Grandson of jimkatalanos / Great-grandson of Garbarsardar





  10. #10
    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

    (deleted)
    Last edited by Gorrrrrn; December 02, 2009 at 02:41 PM.

  11. #11
    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

    It would seem "character sub_faction sicily" is incorrect syntax. My campaign_script is ignored when such code is used.

    Still not sure why these rebels are spawning as the Slave Faction Leader...Does the phrase "named character" cause me trouble here?
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

  12. #12
    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

    According to O/P:

    [QUOTE, sub_faction faction_name is necessary for a slave faction army to spawn.][/QUOTE]

    yet one can have in the campaign script slave faction armies spawn without any sub_faction in the spawn army line.

    any hints on what it does and what it should be set to?

  13. #13
    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

    any hints on what it does and what it should be set to?
    In my experience it gives the accent and the models of the faction. If the name of the character is set to random_name in a script it will use a name from that faction.
    If you don't have a sub_faction it will default to the grey southern_european models.










  14. #14
    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

    thanks for the info gigantus

  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

    One is glad to be of service










  16. #16
    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

    Still no luck. I have been completely unable to spawn a slave army with a subfaction.

    When writing "faction slave, sub_faction sicily", as Archaon's post dictates, my campaign script fires, but spawns a generic slave character with a slave faction name. Conversely, If "character sub_faction sicily" is used, my campaign script does not fire (as evident in the New World mini map).

    Frustration is mounting as my trials prove fruitless. Truly, has anyone successfully spawned a slave army with a sub faction through the campaign script?
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

  17. #17
    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

    Q: sub_faction armies : do units need to be owned by both slave and the named faction?

    Pnutmaster: what exactly is the error report on the campaign_script that causes the fail?

  18. #18
    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

    No errors reported in the log.

    This is my current script, original problem persisting (character spawned does not have a subfaction, uses a name from the slave faction, and, astoundingly, is the Slave Faction Leader). Could this be specific to PDER, somehow?

    monitor_event SettlementTurnStart SettlementName Palermo
    and SettlementIsLocal
    and GarrisonToPopulationRatio < 0.4
    and I_FactionLeaderTrait sicily Offensive_To_Nobles > 0
    and RandomPercent < 50
    and not I_CharacterExists Invade_Palermo
    and I_TurnNumber > 1
    spawn_army
    faction slave, sub_faction sicily
    character random_name, named character, age 30, x 188, y 104, label Invade_Palermo

    traits NaturalMilitarySkill 2 , GoodCommander 1
    unit SE Bodyguard exp 5 armour 2 weapon_lvl 0
    unit Mailed Knights exp 3 armour 0 weapon_lvl 0
    unit Italian Spear Militia exp 1 armour 0 weapon_lvl 0
    unit Italian Spear Militia exp 1 armour 0 weapon_lvl 0
    unit Pavise Crossbow Militia exp 0 armour 0 weapon_lvl 0
    unit Pavise Crossbow Militia exp 0 armour 0 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sergeant Spearmen exp 3 armour 2 weapon_lvl 0
    unit Sicilian Muslim Archers exp 1 armour 0 weapon_lvl 0
    unit Sicilian Muslim Archers exp 1 armour 0 weapon_lvl 0
    unit Mercenary Crossbowmen exp 3 armour 2 weapon_lvl 0
    sieging
    siege_settlement Invade_Palermo, Palermo, maintain
    end_monitor
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

  19. #19
    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

    Only reason I can think that the named_character is the Slave Faction leader is that at time of spawning he is the only named General in that faction.

    (In SS when we spawn a slave army with named_character Peter_of_Bulgaria he is referred to as the King in the battle. So problem not purely PDER.)

  20. #20
    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

    Quote Originally Posted by Rozanov View Post
    (In SS when we spawn a slave army with named_character Peter_of_Bulgaria he is referred to as the King in the battle. So problem not purely PDER.)
    Conspicuously, this SS script does not mention sub_factions. Peter_of_Bulgaria is spawned as a default slave...

    "Sub_faction" then, to me, is effectively useless.

    What would happen if an English army was spawned after the demise of the English faction? Would the spawned army instantly rebel, creating a slave army within the English subfaction?
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

Page 3 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
  •