Results 1 to 9 of 9

Thread: I cracked Era System for Units!!!

  1. #1
    It was a trap, after all. Member DukeofSerbia's Avatar
    Join Date
    Feb 2005
    Location
    Sombor, Serbia (one day again Kingdom)
    Posts
    1,001

    Thumbs up I cracked Era System for Units!!!

    Hello ladies and gentlemen in ORG.

    I successfully found way for implementing eras in Medieval II Total War! And it works much better than in first Medieval.

    I again red Epistolary Richard “Final Report from Brisbane” https://forums.totalwar.org/vb/showp...79&postcount=1 and found something interesting what he mentioned:

    Quote Originally Posted by Epistolary Richard
    export_descr_buildings.txt
    edb now controls the initial number of units available to be recruited from different buildings, the refresh rate and the unit max in a similar manner to mercenaries. You can also control what buildings do when the settlement is converted from city to castle and vice versa. Some hidden resources are now used in descr_missions.txt, to prefer guild and crusade/jihad targets _and_ - which I know some people will find most exciting – allow brigands and pirates to be completely switched off in certain provinces via a script command!

    Perhaps most interestingly, there’s a new event_counter condition that can be used – referencing events in descr_events and in the campaign script. This should allow complete control over when and how certain troops become available to be recruited.

    In terms of hardcoded limits – 64 for hidden resources as before, now up to 10 buildings in a chain (consecutively, without needing to branch) and I’m told that there doesn’t appear to be any limit on the number of complexes – however I’m taking this with a pinch of salt personally. We better test it first.
    I tested what he wrote and it works!

    In export_descr_buildings.txt only condition used is

    Code:
    and event_counter gunpowder_discovered 1
    This line is added to units which need gunpowder. Gunpowder event is in descr_events.txt. Event is:

    Code:
    event	historic	gunpowder_discovered
    date	160 170
    movie	event/gunpowder_invented.bik
    Because game starts in 1080 that means that event will occur somewhere between 1240 and 1250 (date is in years after starting year: 1080+160 or 1080+170). In original MTW it was in 1270 (now can be set manually :)). There are 27 (if I counted well :)) historical events in descr_events.txt. This means 27 various conditions for units. And you can set even manually dates! Comparing to three eras in original this is El Dorado!!!

    All what you need is to add line after unit in export_descr_buildings.txt:

    Code:
    and event_counter ? x
    ? can be first_windmill, earthquake_in_aleppo, science_alchemy_book, and etc (look in descr_events.txt).
    x is number and from what I found it must be 1!

    Example

    If you are annoyed like me that Janissary troops are available before 1300, then add line in export_descr_buildings.txt

    Code:
    recruit_pool "Janissary Archers"  1   0.34   3  1  requires factions { turks, } and event_counter football_banned 1
    When event hits in 1314 (if is starting year 1080) you’ll got Janissary troops. What can I add? This is great possibility for implementation of various dynasties and units in factions. I already started that and will be introduced in my new mod but next month about it…

    I tested even more. I tried earthquake and plague events and it works! This means 4 earthquakes and 5 plague events. Total 36 events. Basically, you can add more events but I don’t know hard core limits.

    Now, somebody ask how to send units in pension like was in original MTW. I mean I want to pension later Viking and some other units. Peace of cake! Just use conditional “and not”:

    Code:
    recruit_pool "Janissary Archers"  1   0.34   3  1  requires factions { turks, } and not event_counter football_banned 1
    You want even more? You can combine even further :

    Code:
    recruit_pool "Hobilars"  1   0.5   4  0  requires factions { england, } and event_counter first_european_paper 1 and not event_counter science_maths_zero_europe 1
    This means that Hobilars will be available between 1150 and 1202 if starting year is 1080. Historical fanatics and realistic mods now can add more events and control units years of appearing. Not simply like mercenaries (where you put exact dates), but with additional (simple) coding this is obviously possible.

    My two cents :).


    UPDATE

    I played with files even further (I forgot to write it in forum). Ha ha ha.

    In descr_events.txt can be add your event. Peace of cakes! But it has to be counter type of event.

    counter - just increase a counter
    I added following event:

    Code:
    event	counter  	zivela_srbija
    date	1
    After one year this counter event will happen.
    Now open export_descr_buildings.txt and add it to unit(s) which you want:

    Code:
    recruit_pool "Hobilars"  1   0.5   4  0  requires factions { england, } and event_counter zivela_srbija 1
    After one year Hobilars will appear.

    This is open wide possibilities. For historical mods that mean you can control appearance of units to be historical as much as possible.
    And remember – you won’t be informed that event happened but in tech tree you’ll see change.
    Last edited by DukeofSerbia; 01-17-2007 at 12:25.
    Watching
    EURO 2008 & Mobile Suit Gundam 00

    Waiting for: Wimbledon 2008.

  2. #2
    Confiscator of Swords Member dopp's Avatar
    Join Date
    Jun 2005
    Posts
    702

    Default Re: I cracked Era System for Units!!!

    Would you be able to add your own custom events? Kind of funny how football being banned affects the appearance of Janissaries... I see potential for confusion right there.

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

    Default Re: I cracked Era System for Units!!!

    That should be possible, iirc you could add historic events in RTW (or at least in BI). However I'm not sure how I did it back then. I'm not sure how it works with the event counters though.

  4. #4
    Member Member Csatadi's Avatar
    Join Date
    Aug 2005
    Location
    Budapest, Hungary
    Posts
    161

    Default Re: I cracked Era System for Units!!!

    Great!

  5. #5

    Default Re: I cracked Era System for Units!!!

    Really great!

  6. #6

    Default Re: I cracked Era System for Units!!!

    Another guy has done this before, you know.

  7. #7
    It was a trap, after all. Member DukeofSerbia's Avatar
    Join Date
    Feb 2005
    Location
    Sombor, Serbia (one day again Kingdom)
    Posts
    1,001

    Thumbs up Counter Events

    UPDATE

    I played with files even further (I forgot to write it in forum). Ha ha ha.

    In descr_events.txt can be add your event. Peace of cakes! But it has to be counter type of event.

    counter - just increase a counter
    I added following event:

    Code:
    event	counter  	zivela_srbija
    date	1
    After one year this counter event will happen.
    Now open export_descr_buildings.txt and add it to unit(s) which you want:

    Code:
    recruit_pool "Hobilars"  1   0.5   4  0  requires factions { england, } and event_counter zivela_srbija 1
    After one year Hobilars will appear.

    This is open wide possibilities. For historical mods that mean you can control appearance of units to be historical as much as possible.
    And remember – you won’t be informed that event happened but in tech tree you’ll see change.
    Watching
    EURO 2008 & Mobile Suit Gundam 00

    Waiting for: Wimbledon 2008.

  8. #8
    Orthodox Christian forever! Member phoenix[illusion]'s Avatar
    Join Date
    Jan 2007
    Location
    Subotica, Serbia
    Posts
    263

    Default Re: I cracked Era System for Units!!!

    [QUOTE=DukeofSerbia]
    Code:
    recruit_pool "Hobilars"  1   0.5   4  0  requires factions { england, } and event_counter zivela_srbija 1
    [QUOTE]
    This is the best part of message

    PROUD LEADER OF TSARDOMS: TOTAL WAR

  9. #9

    Default Re: I cracked Era System for Units!!!

    Can someone tell me how to change population limit from 255000 to,I don't know,few millions?

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