The 4tpy script that is in vanilla TATW and most (all?) submods uses a counter that advances at the start of each human player's turn, when it reaches 4, winter happens, the counter resets, and the following season characters age. It works fine in single player games, but in a hotseat game, adding a second human player doubles the ageing, three triples it, etc etc.*
(*except sometimes it doesn't, because if you're playing a hotseat on one computer rather than saving and passing the file, a battle in one factions turn prevents the game from recognizing the next faction as a new turn, so the actual time acceleration is reduced, but still faster than it should be)
I decided to solve this problem yesterday, since I was finally fed up with it. Over a year of periodically searching the forums never yielded a solution that anyone else had done so I decided it was time I do it myself.Unlike all the other modding I've done over the years for my own enjoyment, I'm making this revised script available to everyone instead of just explaining how to do it.
This script also uses a counter to advance the seasons, but the counter only advances at the end of slave turn. It doesn't matter how many human players there are, or how many factions are destroyed. The counter only cares about the slave faction, and the slave faction can't be destroyed.
I'm currently using this in my own hotseat game and everything seems to work perfectly, but it hasn't been extensively tested. There's no logical reason I can think of for there to be any problems, but more people using it in more games just to be sure would be a good thing!
Installation
1. Make a backup of ...\Medieval II\mods\Third_Age_3\data\world\maps\campaign\imperial_campaign\campaign_script.txt
2. Open ...\Medieval II\mods\Third_Age_3\data\world\maps\campaign\imperial_campaign\campaign_script.txt
3. Replace (or comment out, like I've done)withCode:;console_command toggle_perfect_spy ;console_command toggle_fow ;declare_counter quarter ;set_counter quarter 1 ; ;monitor_event PreFactionTurnStart FactionIsLocal ; if I_CompareCounter quarter == 1 ; console_command season summer ; end_if ; ; if I_CompareCounter quarter == 2 ; console_command season summer ; end_if ; ; if I_CompareCounter quarter == 3 ; console_command season summer ; end_if ; ; if I_CompareCounter quarter == 4 ; console_command season winter ; end_if ; ; inc_counter quarter 1 ; if I_CompareCounter quarter == 5 ; set_counter quarter 1 ; end_if ;end_monitor ; ;monitor_event FactionTurnEnd FactionType slave ; and I_CompareCounter quarter > 1 ; console_command season summer ;end_monitor
4. Delete the map.rwm (just to be safe)Code:declare_counter season_counter set_counter season_counter 1 monitor_event FactionTurnEnd FactionType slave inc_counter season_counter 1 if I_CompareCounter season_counter == 4 set_counter season_counter 0 end_if end_monitor monitor_event PreFactionTurnStart FactionIsLocal if I_CompareCounter season_counter == 0 console_command season winter end_if if I_CompareCounter season_counter > 0 console_command season summer end_if end_monitor
5. Start a new campaign (changes to campaign script are not save game compatible)
6. Enjoy!
Everyone is free to use this script. I do request credit if it's used in any public mods, but there's no need to ask permission.Oh, but I would like to be notified if it will be used in a mod, simply for the warm, fuzzy, useful feelings inside!
AND, to give credit were credit is due, the idea occurred to me while reading this thread. Alpaca's example 4tpy script is much simpler than the one in TATW, but just as functional, and while studying the differences I realised there was no good reason I could think of why the counter had to be pegged to the LocalFaction. I only take credit for the idea of using the slave faction to advance the counter.![]()




Reply With Quote







