Results 1 to 15 of 15

Thread: I Cracked Era System for Units!!!

  1. #1
    DukeofSerbia's Avatar Decanus
    Join Date
    Sep 2006
    Location
    Сомбор, Serbien, Europe
    Posts
    583

    Icon1 I Cracked Era System for Units!!!

    Hello ladies and gentlemen in TWC.

    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” http://forums.totalwar.org/vb/showpo...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; January 17, 2007 at 05:44 AM.
    United Soviet States of America
    form of government - financial dictatorship

    Liberalism is a mental illness!

  2. #2
    Zephrelial's Avatar Eternal Sorrow
    Join Date
    Dec 2006
    Location
    An ancient castle on a steep windy mountain peak.. away from all mortal eyes...
    Posts
    4,681

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

    I wouldn't like to sound too arrogant but what you had sorted out,I had already found out and created a mod that seperates units according to the Eras and posted it 2 days ago.

    Here is the link:http://www.twcenter.net/forums/downl...do=file&id=995

  3. #3
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

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

    Quote Originally Posted by Zephrelial View Post
    I wouldn't like to sound too arrogant but what you had sorted out,I had already found out and created a mod that seperates units according to the Eras and posted it 2 days ago.

    Here is the link:http://www.twcenter.net/forums/downl...do=file&id=995
    You didn't write a tutorial about it though
    It's pretty obvious, but still nice for newbies to have a tutorial.

  4. #4
    Zephrelial's Avatar Eternal Sorrow
    Join Date
    Dec 2006
    Location
    An ancient castle on a steep windy mountain peak.. away from all mortal eyes...
    Posts
    4,681

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

    I agree that's where Duke of Serbia came in.And a right thing to do as well.
    Only thing I am criticising here is it's not nice to make it seem like He had found the gravity or something and try to take full credit for it,completely ignoring someone(which is me) who had done it before and worked hard for it.

    Besides messing with the export_descr buildings txt. is not simple as it seems believe me.

    For instance,you want to relate the unit "dismounted chivalric knights "
    with the event gunpowder_discovered as long as you don't add it to every single line with the related right versions of the chivalric knights (chivalric e knights for hungary etc.) chances are that they won't appear at all.

  5. #5
    DukeofSerbia's Avatar Decanus
    Join Date
    Sep 2006
    Location
    Сомбор, Serbien, Europe
    Posts
    583

    Default Don't take to the hart

    Quote Originally Posted by Zephrelial
    I wouldn't like to sound too arrogant but what you had sorted out,I had already found out and created a mod that separates units according to the Eras and posted it 2 days ago.
    Quote Originally Posted by Zephrelial
    I agree that's where Duke of Serbia came in.And a right thing to do as well.
    Only thing I am criticising here is it's not nice to make it seem like He had found the gravity or something and try to take full credit for it,completely ignoring someone(which is me) who had done it before and worked hard for it.
    Hey, I found it completely independent/separate from you. I came in TWC only to post and see mods. My base is in totalwar.org. Just look my messages: 90% are about mods (mostly MTR and IBFD). And I clearly pointed that I got idea from Epistolary Richard “Final Report from Brisbane”. Everybody knows who Epistolary Richard is.
    Sorry, I didn’t have any attention to ignore anybody.

    We all mod for nothing. Neither you, I or anybody will become rich because of that.

    Quote Originally Posted by Zephrelial
    Besides messing with the export_descr buildings txt. is not simple as it seems believe me.
    Yes it is (for me at least) .
    United Soviet States of America
    form of government - financial dictatorship

    Liberalism is a mental illness!

  6. #6
    CtrlAltDe1337's Avatar Praepositus
    Join Date
    Dec 2006
    Location
    Tennessee
    Posts
    5,424

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

    This sounds interesting, I'll give it a try.

  7. #7

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

    Hay! I also suggested something like this in the MTR FAQ post!

    But it was just taking advantage of the Aztec event, not every single one. I am being silly anyway, it's a very nice found you two came across, and will allow us to do something far better than previous attempts at eras (Being in different campaigns or different mods).

    Duke, do you know if it's possible to also 'wipe' a family of it's current generals and introduce new ones on an event like this? It would make more sense for an event transforming the Fatimids to the Ayyubids if all their generals were replaced with new ones, instead of just keeping them the same.

    Hell, if you really wanted to be historically accurate, perhaps if that holds true you could effectively 'create' a new faction by replacing all their generals, relocating their holdings, and giving a different unit roster?
    Last edited by Ahiga; December 31, 2006 at 12:37 AM.

  8. #8

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

    Excellent find Duke...

    Linking events and units will bring about great new possibilities.

    This is the greatest discovery since someone saw the AI invading the Americas...

  9. #9
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

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

    Quote Originally Posted by Jace11 View Post
    Excellent find Duke...

    Linking events and units will bring about great new possibilities.

    This is the greatest discovery since someone saw the AI invading the Americas...
    Could you link me to the post where somebody saw the AI invading America?

  10. #10

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

    Quote Originally Posted by alpaca View Post
    Could you link me to the post where somebody saw the AI invading America?
    >> this one?

  11. #11
    selenius4tsd's Avatar Happiness Is A Warm Gun
    Join Date
    Sep 2006
    Location
    CT, South Africa.
    Posts
    1,707

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

    ^ I would hardly call that invading.
    Under the patronage of vikrant
    Patron of Ramtha, Alletun, finneys13, SirPaladin and GrnEyedDvl

  12. #12
    DukeofSerbia's Avatar Decanus
    Join Date
    Sep 2006
    Location
    Сомбор, Serbien, Europe
    Posts
    583

    Icon3 Update

    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.
    United Soviet States of America
    form of government - financial dictatorship

    Liberalism is a mental illness!

  13. #13

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

    Thanks very much to your thread I have now completely redone the era system. For example, i have all plate units in the game available from 1330 onwards (not available before this period) and have now taken some of the early units out of the game as of the above date - making the game more historically accurate.
    If deception is an art, then the world is full of artists!
    Trust No One!

  14. #14
    Laetus
    Join Date
    Feb 2007
    Location
    Omaha, NE
    Posts
    2

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

    My question is how to change the event for discovery of the new world so I can go fight the Aztecs. I have already tried changing the dates but I am probably doing it wrong.

  15. #15

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

    Personally, I don't like to download mods if I can edit the files myself.

    Duke of Serbia, thank you for your help.

Posting Permissions

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