Results 1 to 11 of 11

Thread: Idea: Scripted limits to unit recruitment?

  1. #1
    A pipe smoker Member MiniMe's Avatar
    Join Date
    Dec 2006
    Location
    Moscow, Russia
    Posts
    453

    Default Idea: Scripted limits to unit recruitment?

    Dear EB developers!

    Kingdom Crusades script has a very interesting thing - unit counters.
    You can recruit only one very special unit, after that counter is set to 0, and is set back to 1 only after you lose this unit.
    My idea is: evolve it. This could be a perfect solution to limit all unit recruitment and link it to amount and size of faction provinces.

    Example: KH

    SCRIPT:
    counter "of KH heavy infantry":
    if monitor_event "huge city captured" then set counter "of KH heavy infantry" +4
    if monitor_event "large city captured" then set counter "of KH heavy infantry" +2
    if monitor_event "huge city lost" then set counter "of KH heavy infantry" -4
    if monitor_event "huge city lost" then set counter "of KH heavy infantry" -2
    if Thorakitai recruited then set counter "of KH heavy infantry" -1

    EDB:
    recruit Thorakitai requires (...resources...) and counter "of KH heavy infantry" >0

    (of course, my example is not exactly how it should look like, I'm ain't a scripter, but I hope you've got the idea despite my poor scripting skills and pidgin english)

    Yes, this means we need several very complicated counters for every faction, but in the end it will be possible to achieve historically correct numbers and composition of armies for every faction, like Rome'd be able to field 10 Post Marian Legionary cohorts per huge city or Pahlavans'd be able to field 2 Parthian Cataphracts and 6 Persian Archer-spearmen per large city.

    Hope my idea could be of any use to you,
    Best regards,
    MiniMe
    Last edited by MiniMe; 11-11-2007 at 20:19.


  2. #2
    EB annoying hornet Member bovi's Avatar
    Join Date
    Jan 2007
    Location
    Norway
    Posts
    11,796

    Default Re: Idea: Scripted limits to unit recruitment?

    I thought that only worked for agents. Sounds interesting.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  3. #3

    Default Re: Idea: Scripted limits to unit recruitment?

    If this could be implemented we would feel the diference between grand and small factions arise even more... how would the AI react to that limitation to all units?
    From the markets of Lilibeo to the Sacred Band in the halls of Astarte, from those halls to the Senate of Safot Softin BiKarthadast as Lilibeo representative

  4. #4
    Member Charge's Avatar
    Join Date
    Jul 2007
    Location
    Russia
    Posts
    1,324

    Default Re: Idea: Scripted limits to unit recruitment?

    Doesn't you not need script at all to emulate this? EDB and limited numbers of unit per building (= per city size), and very low or off spawning frequency (not like vanilla's 0.5-2 units per turn) can do it too.

  5. #5
    Villiage Idiot Member antisocialmunky's Avatar
    Join Date
    Feb 2005
    Location
    ゞ( ゚Д゚)ゞ
    Posts
    5,974

    Default Re: Idea: Scripted limits to unit recruitment?

    Quote Originally Posted by Charge
    Doesn't you not need script at all to emulate this? EDB and limited numbers of unit per building (= per city size), and very low or off spawning frequency (not like vanilla's 0.5-2 units per turn) can do it too.
    This is different, its like agents. It makes it so you can't build units after you have a certain amount of them.
    Fighting isn't about winning, it's about depriving your enemy of all options except to lose.



    "Hi, Billy Mays Here!" 1958-2009

  6. #6
    A pipe smoker Member MiniMe's Avatar
    Join Date
    Dec 2006
    Location
    Moscow, Russia
    Posts
    453

    Default Re: Idea: Scripted limits to unit recruitment?

    Quote Originally Posted by Leão magno
    If this could be implemented...
    "if" is the key word here. I'm not sure whether my idea could be implemented at all. Only serious modders and scripters, not one of my kind (able only to mess with descr_mount, descr_model_battle, EDB, EDU) could answer this question.
    ...we would feel the diference between grand and small factions arise even more...
    quite the opposite. Currently AI priority is unit recruitment. If AI has 15 provinces and enough money (and through script he has), he will recruit 15 units. And next turn he will recruit another 15. And next turn he'll do the same. Heard of Grey Death Ultrastacks, did ye?
    ...how would the AI react to that limitation to all units?
    Just the way he reacts now in Crusades, when he's done recruiting Templar uniqe unit - he'll stop recruit them since there's no more such a possibility for him
    Quote Originally Posted by antisocialmunky
    It makes it so you can't build units after you have a certain amount of them.
    Yep, that's exactly what I was trying to say.
    Last edited by MiniMe; 11-10-2007 at 21:41.


  7. #7
    Member Charge's Avatar
    Join Date
    Jul 2007
    Location
    Russia
    Posts
    1,324

    Default Re: Idea: Scripted limits to unit recruitment?

    It makes it so you can't build units after you have a certain amount of them.
    Disable respawn (2nd i think number)

  8. #8
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Idea: Scripted limits to unit recruitment?

    Unfortunately you don't have a unit number condition, all you got is a unit exists condition. What you can do is to limit the pool to one unit max with some tricks but it's not really possible to limit it to, say, three units or four units (at least unless somebody proves me wrong).

  9. #9
    Member Charge's Avatar
    Join Date
    Jul 2007
    Location
    Russia
    Posts
    1,324

    Default Re: Idea: Scripted limits to unit recruitment?

    @alpaca


    I believe that if you limit number of units per building (=per city),
    recruit_pool "Demi Lancers" 2 0.5 2 0

    and set reappearance to 0 (or very low)
    recruit_pool "Demi Lancers" 2 0 2 0

    you will have limited amount of them which faction can train and have,
    but yet I haven't much testing with it. I suppose you can train new units when some have died, until you fullfill max unit numbers..

    This doesn't appear to mercenaries, etc..

    Explain please if I wrong

  10. #10
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Idea: Scripted limits to unit recruitment?

    Quote Originally Posted by Charge
    @alpaca


    I believe that if you limit number of units per building (=per city),
    recruit_pool "Demi Lancers" 2 0.5 2 0

    and set reappearance to 0 (or very low)
    recruit_pool "Demi Lancers" 2 0 2 0

    you will have limited amount of them which faction can train and have,
    but yet I haven't much testing with it. I suppose you can train new units when some have died, until you fullfill max unit numbers..

    This doesn't appear to mercenaries, etc..

    Explain please if I wrong
    Yeah thing is if you do this, you will get two units of these in every settlement, and then none again until infinity.

  11. #11
    A pipe smoker Member MiniMe's Avatar
    Join Date
    Dec 2006
    Location
    Moscow, Russia
    Posts
    453

    Default Re: Idea: Scripted limits to unit recruitment?

    Charge, I'm afraid Alpaca's right.
    Take a look at Crusades campaign script (I suppose, you have it),
    part "RECRUITMENT - UNIQUE UNITS"
    If they could have limit unique units recruitment your way, they wouldn't bother to write all that staff.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO