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

Thread: How to add mercenaries.

Hybrid View

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

    Default Re: How to add mercenaries.

    Thanks Ishan. Yes, in theory it should. I have seen "religions" used with "start_year" (another optional condition) which suggests that combinations are possible. Maybe only "events" is not. I have not tried combining "events" with anything else.

    Good point about moving the other conditions into CS. That should work with "religions" but not "crusading", at least not for the player.

    I have since abandoned the idea anyway, due to other issues, but am still interested. It's bound to come up again.

  2. #2
    Lord Cunami's Avatar Tiro
    Join Date
    Sep 2005
    Location
    Pennsylavania, USA
    Posts
    223

    Default Re: How to add mercenaries.

    Can another pool with one province be created?

  3. #3
    AWRA's Avatar Libertus
    Join Date
    Nov 2011
    Location
    Southern PA, USA
    Posts
    97

    Default Re: How to add mercenaries.

    Have read above that anything to with merc changes is non-save gameable, but what if all you are doing is adding one more culture to who can hire - would that change also be non-savegameable?

  4. #4
    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: How to add mercenaries.

    Quote Originally Posted by AWRA View Post
    Have read above that anything to with merc changes is non-save gameable, but what if all you are doing is adding one more culture to who can hire - would that change also be non-savegameable?










  5. #5
    AWRA's Avatar Libertus
    Join Date
    Nov 2011
    Location
    Southern PA, USA
    Posts
    97

    Default Re: How to add mercenaries.

    Got it.

    Thanks.

    Just read today on another thread that anything in the world folder changed would not be save gameable - correct?

  6. #6
    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: How to add mercenaries.

    All of those files in the world folder(s) are only read at the beginning of the game (descr_strat, script, map) and most of them are not referred to later on. Either your changes will not effect your current game (text files) or have some drug inspired effects (map files).










  7. #7
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician Moderator Emeritus

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: How to add mercenaries.

    Hi all, I want to change the mercenaries recruitable in Scotland for SSMAP submod. I want to make a difference between the units recruitable in Iverness (Highlands) and in Edinburgh (Lowlands).
    Basically, during the Early Era, I want to add some Norse mercenaries recruitable in Iverness plus some Scots units like Scots Pike Militia while in Edinburgh, I will add some mercenary frankish knights (low replenish rate), mercenary knights and sergeants swordsmen, may be a few crossbowmen.

    1st: can I create a pool called Scotland_Highlands with Iverness province only and another pool named Scotland_Lowlands with Edinburgh province?

    2nd: if I add a Scot unit as mercenary unit as well, do I just need to modify the EDU accordingly (I mean without considering the points mentioned in this thread)?

    I thank you in advance.
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

  8. #8

  9. #9
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician Moderator Emeritus

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: How to add mercenaries.

    I've found the answer regarding my 2nd question but I'm still not sure regarding the pool. If I understood it correctly, there's nothing special and I can create and rename pools depending on my needs as long the province name is correct.
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

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

    Default Re: How to add mercenaries.

    Yep, you can define your own pools.

  11. #11
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician Moderator Emeritus

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: How to add mercenaries.

    Many thanks, guys. That's great and gives me a lot of opportunities
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

  12. #12
    Hellvard's Avatar Senator
    Join Date
    Dec 2012
    Location
    Poland
    Posts
    1,145

    Default Re: How to add mercenaries.

    Can i give mercenary unit non-merc texture? I created a italian cavalry militia mercenary unit, and give it textures for both model and attachmentsets from venice unit, as well as sprite. But at the battlefield, soldiers are still silver.

  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: How to add mercenaries.

    It appears that merc recruiting has the same restrictions here as EDU recruiting: recruiting based on event counters that 'reset' every round will reset the recruit pool every time to zero, hence a unit will get stuck in the recruitment slot.

    I was under the impression that events in descr_mercenaries cannot be reset...










  14. #14
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: How to add mercenaries.

    getting more confused now - have just tried;

    Code:
    	set_event_counter egypt_merc_turn 0
    
    monitor_event PreFactionTurnStart FactionType egypt
            and I_EventCounter   egypt_merc_turn == 0
    	and I_TurnNumber = 2
    	set_event_counter egypt_merc_turn 1
    	console_command create_unit Salient "citlev_naugir" 1 0 0 0
    end_monitor
    
    monitor_event PreFactionTurnStart FactionType egypt
            and I_EventCounter   egypt_merc_turn == 1
    	and I_TurnNumber = 5
    	console_command create_unit Salient "citlev_ashapr" 1 0 0 0
    	set_event_counter egypt_merc_turn 0
    end_monitor
    
    monitor_event PreFactionTurnStart FactionType egypt
            and I_EventCounter   egypt_merc_turn == 0
    	and I_TurnNumber = 8
    	console_command create_unit Salient "ferakine" 1 0 0 0
    	set_event_counter egypt_merc_turn 1
    end_monitor
    with
    Code:
    	unit ferakine	exp 0 cost 830 replenish 1.0 - 1.01  max 4 initial 0 events { egypt_merc_turn }
    I didn't buy the mercs that turned up and total pool gave me;
    1 @ turn 3 (so 1 turn after the event was switched on)
    2 @ turn 4
    0 (the unbought one's disappeared at turn 5)
    3 @ turn 8 when it triggered again - and yup the event definitely reset/reactivated the merc's

  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: How to add mercenaries.

    Thanks for confirming that.

    Your intial pool was zero and it replenished at one per turn, your findings are correct. I am surprised that the recruit pool wasn't reset, though.










  16. #16
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: How to add mercenaries.

    haha

    problem (obviously now) is that the replenish pool is set at some stage not within Egypt's turn, I tried slave turn and that didn't help anyway
    reverse psychology and turning it off for other factions looks like it works;


    Code:
    	set_event_counter egypt_merc_turn 1
    
    monitor_event PreFactionTurnStart FactionType egypt
    	set_event_counter egypt_merc_turn 1
    end_monitor
    
    monitor_event PreFactionTurnStart not FactionType egypt
    	set_event_counter egypt_merc_turn 0
    end_monitor
    
    monitor_event FactionTurnEnd TrueCondition
    	set_event_counter egypt_merc_turn 1
    end_monitor
    and pool does clock up with fractions of a unit

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

    Default Re: How to add mercenaries.

    Good one makanyane. . It seems to me that the first monitor isn't needed though.

  18. #18
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: How to add mercenaries.

    Thanks Withwnar, haven't tested but am sure you're right.

    am wondering now if similar thing would be the answer to the EDU recruitment sticking that Gigantus mentioned, but can't think of an example at the moment that would use that...

  19. #19
    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: How to add mercenaries.

    Recruiting based on the presence of governor comes to mind. Works for buildings as they don't have a pool. Doesn't work if the governor leaves or the monitor resets every round to test for the presence. Underneath the script we used in PDeR:

    Code:
    monitor_event FactionTurnEnd FactionIsLocal
       set_event_counter governor_present 1
    end_monitor
    
    monitor_event SettlementSelected GovernorInResidence
       and FactionIsLocal
       set_event_counter governor_present 1
    end_monitor
    
    monitor_event SettlementSelected not GovernorInResidence
       and FactionIsLocal
       set_event_counter governor_present 0
    end_monitor










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

    Default Re: How to add mercenaries.

    I did some experimenting. Apparently the pool replenishing is done at the end of the slave turn so the event counter needs to be 1 at that time, i.e. set to 1 in a [FactionTurnEnd FactionType slave] monitor.

    That is what yours is doing, makanyane, because it is set to 1 at the end of every faction's turn, including slave. So a slightly different way to write it could be...

    Code:
    monitor_event PreFactionTurnStart FactionType egypt
      set_event_counter egypt_merc_turn 1
    end_monitor
    
    monitor_event PreFactionTurnStart not FactionType egypt
      set_event_counter egypt_merc_turn 0
    end_monitor
    
    monitor_event FactionTurnEnd FactionType slave
      set_event_counter egypt_merc_turn 1
    end_monitor
    It amounts to exactly the same thing of course. The [set_event_counter egypt_merc_turn 1] initialisation line isn't needed so has been dropped here.

    I tested it to confirm that the merc line ONLY works for egypt: all good.

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
  •