Results 1 to 30 of 33

Thread: Modding the turns/years

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assistant Mod Mod Member GiantMonkeyMan's Avatar
    Join Date
    May 2005
    Location
    plymouth - scrubbing Beirut's toilet with a cat...
    Posts
    886

    Default Re: Modding the turns/years

    has anyone noticed any problems with events?

    Code:
    event	historic 	first_windmill
    date	50
    
    event	historic	earthquake_in_aleppo
    date	58
    position	257, 73
    
    event	historic	science_alchemy_book
    date	64
    when checking out the event files i noticed that the 'date' is set to turns rather than an actual date... with the 'two turns per year' thing going on, i was wondering if anyone got the events earlier than they should be... and if that is so then the scripts might also have to be changed or we'll be getting early mongol invasions/eras...

  2. #2

    Default Re: Modding the turns/years

    Well, you get the events always at the same date, but on different turn numbers if you change the turn-date relation. E.g. First Windmill always happens on 1130, so with 2 ypt you get it after 25 turns and with 0,5 ypt you get it after 100 turns and so on.

    The code makes it clear with a disclaimer in the beginning:
    event descriptions are followed by a date (year as offset from starting date) or a date range and either a list of positions, or list of regions

  3. #3
    Assistant Mod Mod Member GiantMonkeyMan's Avatar
    Join Date
    May 2005
    Location
    plymouth - scrubbing Beirut's toilet with a cat...
    Posts
    886

    Default Re: Modding the turns/years

    yeh silly me.... i was looking at it again after i posted and realised my mistake i really should read all those disclaimers but i'm too lazy

    thanks
    GMM

  4. #4

    Default Re: Modding the turns/years

    The problem with changing turns is that you will reach the end of the tech tree much earlier (with the exception of gunpowder units, which are tied to an historic event), because population growth is based on turns, not years. So you will have a metropolis after 100 years (just an estimation) if you go with the 1 turn/one year approach instead of having one after 200 years. Doubling build times will not help that much; you will face overpopulated cities with no way to control unrest/squalor. You will have to lower population growth for each region, which may lead to other problems (draining your population when recruiting huge units, if unit strength still gets deducted from your population count in MTW2).

  5. #5

    Default Re: Modding the turns/years

    OOOOH, OOOH, OOOH!!!!

    I've managed to make characters age properly at 1 year/turn!!!!!!!

    It's a variation/reverse on Myrrdaal's old 4tpy script from the RTW days. If these lines are inserted at the end of the campaign_script.txt file, it will work to make characters age 1 year / turn. Unfortunately, I can't make it work for aging 2 years a turn to keep the default timescale (it seems aging has to occur with a turn ending at winter and turning to summer... and no way to replicate this twice on one turn), but this is definitely in the vein of what I was looking for.

    I've tested it using a full 450 turn schedule (the entire campaign at 1 year/turn) and all appears to be working as planned.

    Since I can't post attachments here, I'll put a snippet of the first ten turns of code. It should give a good idea of what's going on. Some of you enterprising code writers should be able to pick up the gist from here and generate a full script.

    Code:
    	monitor_event FactionTurnEnd FactionType slave
    		if I_TurnNumber = 0
    			console_command season winter
    		end_if
    		terminate_monitor
    	end_monitor
    
    	while I_TurnNumber = 0
    	end_while
    
    	console_command season winter
    
    	while I_TurnNumber = 1
    	end_while
    
    	monitor_event FactionTurnEnd FactionType slave
    		if I_TurnNumber = 2
    			console_command season winter
    		end_if
    		terminate_monitor
    	end_monitor
    
    	while I_TurnNumber = 2
    	end_while
    
    	console_command season winter
    
    	while I_TurnNumber = 3
    	end_while
    
    	monitor_event FactionTurnEnd FactionType slave
    		if I_TurnNumber = 4
    			console_command season winter
    		end_if
    		terminate_monitor
    	end_monitor
    
    	while I_TurnNumber = 4
    	end_while
    
    	console_command season winter
    
    	while I_TurnNumber = 5
    	end_while
    
    	monitor_event FactionTurnEnd FactionType slave
    		if I_TurnNumber = 6
    			console_command season winter
    		end_if
    		terminate_monitor
    	end_monitor
    
    	while I_TurnNumber = 6
    	end_while
    
    	console_command season winter
    
    	while I_TurnNumber = 7
    	end_while
    
    	monitor_event FactionTurnEnd FactionType slave
    		if I_TurnNumber = 8
    			console_command season winter
    		end_if
    		terminate_monitor
    	end_monitor
    
    	while I_TurnNumber = 8
    	end_while
    
    	console_command season winter
    
    	while I_TurnNumber = 9
    	end_while
    
    	monitor_event FactionTurnEnd FactionType slave
    		if I_TurnNumber = 10
    			console_command season winter
    		end_if
    		terminate_monitor
    	end_monitor
    
    	while I_TurnNumber = 10
    	end_while
    It's late here, and I'm off to bed, but wanted to share this before I hit the sack. A lot of opportunity here for those interested in realistic aging without making a ridiculously long campaign.

  6. #6

    Default Re: Modding the turns/years

    Is there a mod out there using this yet? Is there a way i can stick this somewhere in the game to give me 1 year turns with proper aging?

    On a side note, is there a faq out there that explains how to mod building and unit times and costs?

  7. #7

    Default Re: Modding the turns/years

    I have added a downloadable file for my "Aging 1 Year Per Turn Mod" to www.twcenter.net that can be found here:

    http://www.twcenter.net/forums/downl...do=file&id=960

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