Page 6 of 6 FirstFirst 123456
Results 101 to 112 of 112

Thread: How to add mercenaries.

  1. #101
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: How to add mercenaries.

    Welcome.

    This might work...

    Add the unit to a merc pool with an "xxx" event. Give the character(s) in question the "yyy" trait.

    Code:
    monitor_event CharacterSelected Trait yyy > 0
      set_event_counter xxx 1
    end_monitor
    
    monitor_event CharacterSelected Trait yyy = 0
      set_event_counter xxx 0
    end_monitor
    
    monitor_event PreFactionTurnStart IsFactionAIControlled
      set_event_counter xxx 0
    end_monitor
    
    monitor_event FactionTurnEnd FactionType slave
      set_event_counter xxx 1
    end_monitor
    Anyone with that trait should see the unit. Anyone without it should not.

    It would only work for the player because CharacterSelected only fires on player characters.

    I haven't tested this. It is theory. e.g. Does selecting a character without the trait hide the unit for everybody for the rest of the turn? I hope not but it's possible.

  2. #102

    Default Re: How to add mercenaries.

    I am having trouble with an adaption. In Stainless Steel, Jerusalem gets Syrian Auxilliaries, now I wanted to add them as a recruitable AOR mercenary. I followed these instructions, and copied and relevant details from a similar AOR unit (Desert Archers), and it works with the exception of they are all silver surfers in battle, except for Jerusalem. I don't really know what to do. Do I just make a faction entry in battle_models at this point if it can't read the merc entry?

  3. #103
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,434

    Default Re: How to add mercenaries.

    EDIT: disregard this post, sorry, I've found my error.
    Last edited by Jurand of Cracow; February 22, 2020 at 05:32 AM.

  4. #104
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,434

    Default Re: How to add mercenaries.

    Guys,
    I've got an issue with the mercenaries, nevertheless.

    Have a look at this code:
    Code:
    pool Eastern_Poland    regions Krakow_Province Halych_Province Plock_Province Hrodna_Province Volodymyr_Province    
        unit Hunters                    exp 2 cost 620 replenish 0.06 - 0.09 max 2 initial 1
        unit Mercenary Crossbowmen        exp 0 cost 360 replenish 0.02 - 0.06 max 1 initial 1 events { mounted_crossbows } end_year 1299
        unit Mercenary Crossbowmen        exp 1 cost 360 replenish 0.03 - 0.09 max 2 initial 1 start_year 1300 end_year 1399
        unit Mercenary Crossbowmen        exp 3 cost 360 replenish 0.05 - 0.13 max 3 initial 2 start_year 1400    
        unit Lithuanian Skirmishers        exp 1 cost 200 replenish 0.03 - 0.09 max 2 initial 0
        unit Woodsmen                    exp 1 cost 388 replenish 0.03 - 0.09 max 2 initial 1 end_year 1300
        unit Macemen                    exp 0 cost 388 replenish 0.03 - 0.09 max 1 initial 0 end_year 1350
        unit Axemen                        exp 1 cost 370 replenish 0.03 - 0.09 max 1 initial 0 end_year 1400
        unit Dismounted Mercenary German Knights    exp 1 cost 680 replenish 0.02 - 0.06 max 1 initial 1 start_year 1350
        unit Free Company Men at Arms        exp 1 cost 615 replenish 0.03 - 0.09 max 1 initial 1 start_year 1400
        unit Mercenary Spearmen            exp 0 cost 501 replenish 0.04 - 0.13 max 2 initial 1 end_year 1229
        unit Prussian Spearmen            exp 1 cost 538 replenish 0.06 - 0.13 max 2 initial 1 start_year 1230 end_year 1350
    and this one from EDU:
    Code:
    type             Woodsmen
    dictionary       Woodsmen      ; Woodsmen, militia
    category         infantry                         
    class            light
    voice_type       Light
    banner faction   main_infantry
    banner holy      crusade
    soldier          Woodsmen, 48, 0, 0.95
    officer          northern_captain
    mount_effect     horse +1, camel +1
    attributes       sea_faring, hide_forest, hardy, can_withdraw, mercenary_unit
    move_speed_mod     1.02
    formation        1.4, 1.4, 2.4, 2.4, 5, square
    stat_health      1, 1
    stat_pri         4, 4, no, 0, 0, melee, melee_blade, slashing, axe, 75, 1
    stat_pri_attr    ap
    stat_sec         0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr    no
    stat_pri_armour  1, 4, 0, flesh
    stat_sec_armour  0, 0, flesh
    stat_heat        3
    stat_ground      1, -1, 3, 1 
    stat_mental      7, low, untrained
    stat_charge_dist 6
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 448, 212, 65, 212, 212, 2, 50
    armour_ug_levels 0, 1
    armour_ug_models Woodsmen, Woodsmen
    ownership        all ; poland, russia, slave
    era 0            poland, russia
    era 1            poland, russia
    era 2            poland, russia
    recruit_priority_offset    -10
    In the intiial few turns only Hunters and Mercernary Spearmen appear as mercenaries.
    What's the explanation why there's no supply of Woodsmen?
    Last edited by Jurand of Cracow; March 07, 2020 at 05:52 AM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,068
    Blog Entries
    35

    Default Re: How to add mercenaries.

    The unit does not need the mercenary_unit attribute in the EDU as such - it is there to enable the use of one skin for all factions.

    Hunters have no 'period' restriction so they should show up in the rooster at all time.
    The mercenary spearmen 'period' restriction ends before the woodsmen so if the spearmen are available then the woodsmen should show up in the rooster as well. That said: I am not a great fan of non-faction ownership entries in the EDU. You do not need to use 'all' for mercenary units, simply use any faction. If the unit is not recruitable through settlements then it doesn't matter at all which faction you choose***, otherwise simply leave the faction entries of those that can recruit the through a settlement.

    *** it only makes them available in custom battle unless 'era' entries are used.

    In short: get rid of the 'all' entry in the ownership line.










  6. #106
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,434

    Default Re: How to add mercenaries.

    Thanks, Gigantus, it worked indeed. Your advice is very good.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,068
    Blog Entries
    35

    Default Re: How to add mercenaries.











  8. #108
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: How to add mercenaries.

    Wow, this file is pretty buggy

    Couldnt get one merc pool working yesterday... assuming the entry in descr_mercenaries is correct, what are the possible reasons why a pool doesnt work? (Cant recruit the mercs) Kinda missing such a list here...

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,068
    Blog Entries
    35

    Default Re: How to add mercenaries.

    Assumption is the mother of all FUBAR - why not post the entry here? Are we talking of multiple recruit entries , eg a complete pool?
    Afaik slave ownership is mandatory, all other ownership is not required if the unit has the requisite attribute entry. Can't confirm if 'all' will do the deed.
    Invalid region entries or typos will be a reason.
    Or looking in the wrong region when trying to recruit
    Last edited by Gigantus; March 27, 2021 at 12:54 AM.










  10. #110
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: How to add mercenaries.

    Or when testing recruitment of a mercenary pool with a character, that you moved via a command into the region

    Thanks for tips though!

    Interesting about slaves ownership... you mean that for a merc pool to work correctly, the unit should always have slave ownership?

    And the rumours I read in this thread, that using the same region in different pools can cause issues, are real?

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,068
    Blog Entries
    35

    Default Re: How to add mercenaries.

    Multiple pools per region certainly has the potential to cause an issue. Not sure if it would be fatal though.

    Slave ownership - it's an assumption that I made from the default mercenary unit entries (EDU and modelDB), afaik slave ownership is required anyhow if you want a regular unit to be kept if an army deserts. No slave = no rebel.










  12. #112
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: How to add mercenaries.

    Quote Originally Posted by Gigantus View Post
    Multiple pools per region certainly has the potential to cause an issue. Not sure if it would be fatal though.
    Yea
    Quote Originally Posted by Jadli View Post
    BTW, careful when working with descr_mercenaries, I believe it works properly only when the same region is not referenced in different pools. If the same region is in multiple pools, it seems that only one of them work (prob the later one). But thats not really an issue, as you are using the "events" parameter for units, not the pools.

    So assuming you want to have fort recruitment in every/most province, and also keep the normal mercenaries working, you probably have to regional pools, ie one pool for every region, consisting of all the mercs.

Page 6 of 6 FirstFirst 123456

Posting Permissions

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