PDA

View Full Version : Modding the turns/years



Barbarossa82
11-07-2006, 20:59
Someone over at TWCenter reports (http://www.twcenter.net/forums/showthread.php?p=1306830#post1306830) that M2TW's descr_strat.txt has an option to show dates as turns, that can presumably be turned off (a la RTW Alexander). Which makes me wonder, would it be possible through simple editing to remove the phenomenon of characters aging 1 year every 4 years?

Ideally, I'd imagine that the descr_strat file tells the game how many years the campaign spans, and how many turns that has to take, and then the game works out how many turns make up a year. So we could just mod descr_strat to bring characters' aging back into line with the actual progression of dates? I sure hope so, even if it means reducing the number of years spanned by 225 turns.

Polemists
11-07-2006, 21:39
I just prefer to see my turns as years for purely aesthic reasons. Still I'm sure if you give the modders some time they can keep the same number of turns and make generals aging more realistic.

econ21
11-07-2006, 21:46
Modding questions belong in the modding forum.

alpaca
11-07-2006, 23:00
Since the game wasn't released yet and I didn't get it yet I can't tell you that ;) But I guess so.

Barbarossa82
11-07-2006, 23:18
Modding questions belong in the modding forum.

Whoops, thanks econ21 :oops:

[DnC]
11-09-2006, 14:40
Alright I might not completely understand you, but there's an option called "timescale 2.00" (<- default). 2.00 means 1 turn equals 2 years and by putting it at 1.00 you'll get; 1 turn = 1 year. If you go any lower it might crash the game. But putting it at 0.50 or 0.25 might give you 2 turns a year or 4 respectively. However I fear this will not work. 1.00 definitely works!

By deleting the line "show_date_as_turns" it might revert back to showing years.

I'm going to check a couple of things out and report back later.

Note: Changing the descr_strat.txt means you'll have to restart your game. Just incase you weren't aware of that.

First edit: Deleting the line "show_date_as_turns" works! It shows the years!
Now I'm going to try out setting the "timescale 2.00" to "timescale 0.50".

Second edit: Setting timescale at 0.50 works to!!! 2 turns for 1 year.

Characters age properly. 2 turns are needed for the characters to age by 1 year.

Last edit: Setting timescale at 0.25 doesn't work properly. No crashes or anything, but characters age each 2 turns, but the years are 4 turns a year. Plus you'll get summer and winter twice. Inadvisable.

PROMETHEUS
11-09-2006, 15:19
have you tried may be 0.3 or 0.2? There was a script for four turns a year may be it could be tweaked for MTW2....

Epistolary Richard
11-11-2006, 09:15
']Second edit: Setting timescale at 0.50 works to!!! 2 turns for 1 year.

Characters age properly. 2 turns are needed for the characters to age by 1 year.

Last edit: Setting timescale at 0.25 doesn't work properly. No crashes or anything, but characters age each 2 turns, but the years are 4 turns a year. Plus you'll get summer and winter twice. Inadvisable.

Some good work there. What I think you'll probably find is that character aging & seasons and the number of years per turn are completely separate.

- Years per turn are softcoded and able to be set in the timescale line in descr_strat so we could have a 1/4, 1/2, 1, 2, 50 whatever years per turn.

- Character aging & seasons, however, are instead treated as they were in Rome - with a summer/winter/summer/winter/summer etc. order and the characters aging every winter (as they did in Rome).

This means that if you set timescale to 0.5 you have essentially restored it back to the way it was in Rome.

To change the order of the seasons (to something like summer/summer/summer/winter for a proper 4 turns per year- and therefore also the character aging - you're going to have to use Myrddraal's scripts in the campaign_script file. But before you do that, test to make sure the date and season console commands still work.

If they do, have a look at Myrddraal's releases and see if they still work, but place the script in the campaign_script file rather than in the advice folder:
https://forums.totalwar.org/vb/showthread.php?t=52168
https://forums.totalwar.org/vb/showthread.php?t=44648

[DnC]
11-11-2006, 10:43
I used 1.00 but I just found out on the TWC fora that 1.00 means two turns are needed for a character to age by one, which I hadn't checked out. I was under the impression characters aged every turn by two years at the default. But apparently I was wrong :laugh4: Should have put two and two together. Doh!

Now I'm going to use 0.50.

4 turns per year might be a bit too much. Myrddraal's scripts might be a really good thing if there were a high and late era alá MTW1. Which I don't think would be all too complicated to make. Just two new provincial campaigns are needed with updated territory holdings, characters, armies and such.

repman
11-11-2006, 11:50
the 4tpy script with 3/1 seasons works fine with MTW II
but 2000 turns ...

repman

shifty157
11-11-2006, 14:28
the 4tpy script with 3/1 seasons works fine with MTW II
but 2000 turns ...

repman

Really? You just used the exact copy from RTW and placed it in MTW2? I didnt think it would be so easy.

vaultdweller
11-11-2006, 21:43
- Character aging & seasons, however, are instead treated as they were in Rome - with a summer/winter/summer/winter/summer etc. order and the characters aging every winter (as they did in Rome).

That is correct. I have my timescale set to 1.0, and characters still age every two turns, thus, I am 10 years into the campaign, but my leader has aged only 5 years.

AlJabberwock
11-12-2006, 10:56
In relation to a question that was brought up at TWC and was brought to full fruition in my mind when someone here at the org asked an innocent question about merchants...

I find the ratio an interesting dimension for levelling, but it also has the power to be destabilizing if all aspects of it are not taken into account. Further, there are some most entertaining possibilities and also pitfalls if one is not wary of what can of wormholes they are opening... to wit:

1) The TWC thread discusses as this one does that tweaking the number of turns can correct the Lazarus-like aging quirk because aging is tied to TURNS, not DATE...however, you can also increase or invert the aging process by changing the ratio...
2) As it has been made quite clear, the game can be forshortened or telescoped in number of turns because the game end is determined by DATE not TURNS.
3) While events will still happen on the right DATE because they are DATE determined, not TURN determined, building rates are TURN determined, not DATE determined! This means that buildings are finished "faster" relative to the date they are begun and in relation to the end of the game where the new ratio is < vanilla. This could have a deep impact on the play balance of the game especially at .50

This is the tip of the iceberg.

4) I have been thinking about the manner in which other items are fixed by TURN instead of DATE. Not only would buildings need to be looked at for balance if there were a manipulation of the year/turn ratio, but so too would the impact of more unit production, and also money surpluses. Since a surplus is based on the end of a turn and unit production is also, increasing the number of turns significantly ups the quantity of these two resources in relation to the end of the game and given dates. While your merchantmen will now die more often, you will also be earning cash faster per year and build up experience more than once and rather quickly. While it will still be the same number of TURNS to get somewhere on foot or by boat, this will also happen faster in terms of historical dates and the end of the game...

A .50 game would mean 900 game turns compared to 225, and surely there are other things that fall in category 4 such as the impact of more crusades or jihads, more conversions and so forth I have not thought of...

Al Jabberwock

Turpitudo
11-12-2006, 15:14
This is the tip of the iceberg.

4) I have been thinking about the manner in which other items are fixed by TURN instead of DATE. Not only would buildings need to be looked at for balance if there were a manipulation of the year/turn ratio, but so too would the impact of more unit production, and also money surpluses. Since a surplus is based on the end of a turn and unit production is also, increasing the number of turns significantly ups the quantity of these two resources in relation to the end of the game and given dates. While your merchantmen will now die more often, you will also be earning cash faster per year and build up experience more than once and rather quickly. While it will still be the same number of TURNS to get somewhere on foot or by boat, this will also happen faster in terms of historical dates and the end of the game...

A .50 game would mean 900 game turns compared to 225, and surely there are other things that fall in category 4 such as the impact of more crusades or jihads, more conversions and so forth I have not thought of...

The biggest problem occuring here is, that you can have your best units at about 1140 (or even earlier, if you really want to) if you are using the .50 time scale, making it 120 played turns and still 780 left. As it is no problem to change the descr_events.txt in order to get the events earlier (e.g. black powder invention, I don't want to wait for the next 400 following turns while running around in full plated soldiers) by halfing the counters it would not make sense doing this, because than you could leave everything as it were before.
As M2TW does not have its descr_*.txt (beside the campaign files) in its data folder or elsewhere (like in RTW), I wanted to ask if anyone knows how to extract the .pack files in the packs folder as I guess these files are included there. Just renaming the extensions in order to extract them with a commen extractor does not work. So you could change the building times for buildings for having a more realistic and longer game experience.

ihategamespy
11-12-2006, 16:09
So far theres building times for:

units
buildings

that have to be changed. Im guesssing multiplying the building time by 4 in a .50 game would make the most sense. anything else?

Should the amount of money received per turn from buildings be reduced by x4 in a .50 game also? Is that possible to change? Is money received per turn or per year? Also, what other forms of income are there and can they also be reduced by x4 if they are received per turn. Im guessing there is a base tax rate
from each province. is there upkeep costs for units or buildings? those also will have to be reduced x4.

And lastly, could someone explain again the diff between a 1.00 game and a .50 game. thanx.

edit: just thought of another one: movement rates. although maybe that one could be modded to have a more historical feel rather than pure division by 4.

Im thinking of civ 4 and the options they have of making shorter or longer games with fewer or more corresponding turns, with discoveries , etc being balanced for each one. Too bad a similar system couldnt be worked out, although at least we can do it by hand here.

[DnC]
11-12-2006, 17:44
I wouldn't touch the finances as they are balanced as it is. Increasing the number of turns does not change how much money you receive, because you still get the same amount of money and have the same amount of costs each turn. If you reduce it by 4x as said above, you'd be deadbroke within a few turns unless you disband enough units that you get a positive cashflow and your armies will be even smaller then they already are. You'll get a very sluggish campaign. Lots of 'end turn' 'end turn' 'end turn' 'end turn' until you can do something.

Turpitudo
11-12-2006, 18:03
.50 : 2 turns = 1 year; characters age normaly
1 : 1 turn = 1 year; characters age 1 life year per two turns

I agree on not changing income, so can still have a lot of troops. I would not change movement rate too as this would slow the game to much down. Imagine that your troops need a full year just to get half way over the alps is too much. Increasing the building times of roads also to factor 4 would also seam a little to much. 2 times should be sufficent. Maybe a longer waiting time for jihads and crusades would make sense. There were 4 in the historical 13. century, it seems the possibility of 20 per century in the game is a little bit to high.

ihategamespy
11-12-2006, 18:23
for the 1.00 game, is there any way of making characters age 1 year for each turn/year (for a 450 turn game, 1 year summer, next year winter) or is that not possible.

Turpitudo
11-12-2006, 18:58
No, it is not possible to do this. The aging is hard coded and can not be changed.

big_boss120
11-14-2006, 01:20
SO which setting is the best??

0.5 year/turn or the default??

SirRethcir
11-14-2006, 12:31
Of course the default. ;)
Else you have to rework the hole campaign, thus making a complete mod.

troymclure
11-16-2006, 10:12
Just like to note that even though i prefer the actual aging achieved by changing to .5 the game plays better at 2.
Leave it on .5 and i doubt you'll see gunpowder before you take over the world. Still nice too have seasons though...

GeWee
11-16-2006, 14:03
I've never liked having cannons in these types of games which is why I restarded campaigns in both Shogun and Medieval once I got access to gunpowder.
I've changed to 2 turns per year and now I'm worried that gunpowder will come a lot sooner.. Or is the access to gunpowder based on an event a certain year?

Turpitudo
11-16-2006, 15:25
Blackpowder comes between 1240 and 1250, but you can change or delete it in the descr_events.txt. The numbers by date indicate not turn number but ingame date, e.g. for blackpowder invention "date 160 170" would mean 1080 +160 or 170 years making it 1240 to 1250. You can deactivate it by putting a ; in front of the three lines of this event.
As you can see the events are assigned to the actual game date, not the turn number.

GeWee
11-16-2006, 16:21
Great, thanks. I don't want to deactivate it completely, just be able to play without gunpowder for a long time. :)

Lord Condormanius
11-17-2006, 04:59
[QUOTE='[DnC]']
Deleting the line "[b]show_date_as_turns" works! It shows the years!
Now I'm going to try out setting the "timescale 2.00" to "timescale 0.50".

Second edit: Setting timescale at 0.50 works to!!! 2 turns for 1 year.

Characters age properly. 2 turns are needed for the characters to age by 1 year.
[QUOTE]
Yes. This is awesome. It works great.

GiantMonkeyMan
11-17-2006, 18:06
has anyone noticed any problems with events?


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...

Turpitudo
11-17-2006, 20:33
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

GiantMonkeyMan
11-17-2006, 20:50
yeh silly me.... i was looking at it again after i posted and realised my mistake :wall: i really should read all those disclaimers but i'm too lazy

thanks
GMM

zarkis
11-19-2006, 10:35
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).

AltarisGreyhawke
12-19-2006, 07:43
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.



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.

ihategamespy
12-19-2006, 15:17
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?

AltarisGreyhawke
12-19-2006, 23:50
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/downloads.php?do=file&id=960