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:
I tested what he wrote and it works!Originally Posted by Epistolary Richard
In export_descr_buildings.txt only condition used is
This line is added to units which need gunpowder. Gunpowder event is in descr_events.txt. Event is:Code: [View]and event_counter gunpowder_discovered 1
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!!!Code: [View]event historic gunpowder_discovered date 160 170 movie event/gunpowder_invented.bik
All what you need is to add line after unit in export_descr_buildings.txt:
? can be first_windmill, earthquake_in_aleppo, science_alchemy_book, and etc (look in descr_events.txt).Code: [View]and event_counter ? x
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
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…Code: [View]recruit_pool "Janissary Archers" 1 0.34 3 1 requires factions { turks, } and event_counter football_banned 1
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”:
You want even more? You can combine even furtherCode: [View]recruit_pool "Janissary Archers" 1 0.34 3 1 requires factions { turks, } and not event_counter football_banned 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.Code: [View]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
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.
I added following event:counter - just increase a counter
After one year this counter event will happen.Code: [View]event counter zivela_srbija date 1
Now open export_descr_buildings.txt and add it to unit(s) which you want:
After one year Hobilars will appear.Code: [View]recruit_pool "Hobilars" 1 0.5 4 0 requires factions { england, } and event_counter zivela_srbija 1
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.![]()