Results 1 to 18 of 18

Thread: Changing turn/year in save file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Changing turn/year in save file

    I have decided to write this tutorial here in org, because I am not sure if it will not be destructed in TWC during its period of instability. It is a bit difficult to start in some other "English" speaking place for me with some tutorial, because my English is bad and in TWC it took me some time than readers my posts concetrated what I am saying and not how I am saying it. So dont be afraid that you dont understand nothing after the first reading this my post. Its normal. But after several readings you will be able to grasp what I have meant and trust me, I write only things which are worth of it ....

    So, to the problem.

    Definition of problem:
    I am in permanent lack of free time. Nebvertheless I am eager to paly MTW2 also from time to time. So my style of playing is slow pace of one concrete campaign, which I interrupt several times during day and I dont care about starting some new campaign till the time I have "mined" the original one. I was curious what is the feeling of the MTW2 vanilla, so I ahve started as HRE with original imperial campaign, without any modification already available in the start and with origianl 2years/turn pace. I like the campaign, but I dont like the incoherence of age in my family with aears in camapigns and I also have so complicated situations in game that I prefer now to have more time for solving them in the particular era. From this I ahve implyid today morning that I will mod the turns and years in the save file firstly and then will play my campaign again after a 1 week pause. I do it for myself, so there is no problem as for explanations how and with what hexedit tha save file. Please if you are not gramot in this, wait to the time when ShellShock will incorpaote this my approach to his MedSelector mod.

    Which places must be changed?
    Well, I will not send some pictures, it is so simple that anybody will see it after short viewing the file.
    Open the file in hexeditor and almost in the start of the file, after a short section with "4", you will see the section with text, which is strating with D.
    Exactly this part of file is this:

    Code:
    .........D......P...POSITION.....WORLD_MAP.....AI_GLOBAL_STRATEGY_DIRECTOR.....DIPLOMATIC_ATTITUDE.....JOURNAL_EVENT.....GROUND_TILE.....MERCENARY_DESCRIPTION.....ECONOMICS_DATA.....LOG_EVENT.....AI_GLOBAL_PRODUCTION_CONTROLLER.....FACTION.....WORLD_MAP_PARAMETERS.....SIEGE_ENGINE_QUEUE_ITEM.....MAP_REGIONS.....LEGION_DESCRIPTION.....HOLD_REGIONS.....SOLDIER_PERSISTENT.....ANCILLARY_UNIT.....FORT_MANAGER.....EVENT_DETAILS.....BUILDING.....GARRISON_RESIDENCE.....CHARACTER_DB.....WATCHTOWER_MANAGER.....SETTLEMENT_MECHANICS.....HORDE.....FORT_SHROUD.....PORT_MANAGER.....FOG_OF_WAR_TABLE.....WATCHTOWER_SHROUD.....SETTLEMENT_MANAGER.....PORT_SHROUD.....DENOUNCEMENT_MISSION.....UNIT_SHIP.....WIN_CONDITION.....AI_FACTION_BASE.....BUILDING_CONSTRUCTION_ITEM.....RESOURCE_MANAGER.....SETTLEMENT_SHROUD.....OFFICER.....STRATEGY_DATE.....ROAD_MANAGER.....SETTLEMENT_HEADER.....EVENT_MANAGER.....FAMOUS_BATTLE_DETAIL.....FORT.....AI_CHEAT_MANAGER.....WATCHTOWER.....DIPLOMATIC_PROPOSITION.....CHARACTER_RECORD.....RESOURCE_HEADER.....ACQUISITION_MISSION.....PORT.....CALENDER.....SETTLEMENT_MECHANICS_STATS.....SETTLEMENT.....MARRIAGE_MISSION.....STRATEGY_MAP_POSITION.....RESOURCE.....RECRUITMENT_ITEM.....UNIT.....ROAD.....WORLD.....ARMY.....SETTLEMENT_BUILDINGS.....MISSION.....FAMOUS_BATTLE_SITE_MANAGER.....FACTION_ECONOMICS.....RESOURCE_ID.....OUTLIVE_FACTIONS.....UNIT_ARTILLERY.....CHARACTER.....ASSASSINATION_MISSION.....SIEGE.....UNIT_DB.....CHARACTER_PATHS.....STRATEGY_MAP.....SETTLEMENT_BUILDING_DAMAGE.....MISSION_FACTORY.....CHARACTER_ACTION_DETAILS.......!...9.....c.a.m.p.a.i.g.n./.i.m.p.e.r.i.a.l._.c.a.m.p.a.i.g.n...i.m.p.e.r.i.a.l._.c.a.m.p.a.i.g.n.........................$..........#................................................................................................................................................................................................................................................................................U)..:.d.a.t.a./.w.o.r.l.d./.m.a.p.s./.c.a.m.p.a.i.g.n./.i.m.p.e.r.i.a.l._.c.a.m.p.a.i.g.n./.d.e.s.c.r._.s.t.r.a.t...t.x.t......6...N......D.......D.....@.D........
    In hex it is more visible:
    Code:
    0000 0002 0000 0000 8E44 FCBB 1F00 0000 5000 0000 504F 5349 5449 4F4E 
    0001 0000 0057 4F52 4C44 5F4D 4150 0001 0000 0041 495F 474C 4F42 414C 
    5F53 5452 4154 4547 595F 4449 5245 4354 4F52 0001 0000 0044 4950 4C4F 
    4D41 5449 435F 4154 5449 5455 4445 0003 0000 004A 4F55 524E 414C 5F45 
    5645 4E54 0001 0000 0047 524F 554E 445F 5449 4C45 0001 0000 004D 4552 
    4345 4E41 5259 5F44 4553 4352 4950 5449 4F4E 0001 0000 0045 434F 4E4F 
    4D49 4353 5F44 4154 4100 0100 0000 4C4F 475F 4556 454E 5400 0100 0000 
    4149 5F47 4C4F 4241 4C5F 5052 4F44 5543 5449 4F4E 5F43 4F4E 5452 4F4C 
    4C45 5200 0100 0000 4641 4354 494F 4E00 0600 0000 574F 524C 445F 4D41 
    505F 5041 5241 4D45 5445 5253 0001 0000 0053 4945 4745 5F45 4E47 494E 
    455F 5155 4555 455F 4954 454D 0001 0000 004D 4150 5F52 4547 494F 4E53 
    0001 0000 004C 4547 494F 4E5F 4445 5343 5249 5054 494F 4E00 0100 0000 
    484F 4C44 5F52 4547 494F 4E53 0001 0000 0053 4F4C 4449 4552 5F50 4552 
    5349 5354 454E 5400 0100 0000 414E 4349 4C4C 4152 595F 554E 4954 0001 
    0000 0046 4F52 545F 4D41 4E41 4745 5200 0100 0000 4556 454E 545F 4445 
    5441 494C 5300 0200 0000 4255 494C 4449 4E47 0001 0000 0047 4152 5249 
    534F 4E5F 5245 5349 4445 4E43 4500 0100 0000 4348 4152 4143 5445 525F 
    4442 0001 0000 0057 4154 4348 544F 5745 525F 4D41 4E41 4745 5200 0100 
    0000 5345 5454 4C45 4D45 4E54 5F4D 4543 4841 4E49 4353 0001 0000 0048 
    4F52 4445 0001 0000 0046 4F52 545F 5348 524F 5544 0001 0000 0050 4F52 
    545F 4D41 4E41 4745 5200 0100 0000 464F 475F 4F46 5F57 4152 5F54 4142 
    4C45 0003 0000 0057 4154 4348 544F 5745 525F 5348 524F 5544 0001 0000 
    0053 4554 544C 454D 454E 545F 4D41 4E41 4745 5200 0100 0000 504F 5254 
    5F53 4852 4F55 4400 0100 0000 4445 4E4F 554E 4345 4D45 4E54 5F4D 4953 
    5349 4F4E 0001 0000 0055 4E49 545F 5348 4950 0001 0000 0057 494E 5F43 
    4F4E 4449 5449 4F4E 0001 0000 0041 495F 4641 4354 494F 4E5F 4241 5345 
    0001 0000 0042 5549 4C44 494E 475F 434F 4E53 5452 5543 5449 4F4E 5F49 
    5445 4D00 0100 0000 5245 534F 5552 4345 5F4D 414E 4147 4552 0001 0000 
    0053 4554 544C 454D 454E 545F 5348 524F 5544 0001 0000 004F 4646 4943 
    4552 0001 0000 0053 5452 4154 4547 595F 4441 5445 0001 0000 0052 4F41 
    445F 4D41 4E41 4745 5200 0100 0000 5345 5454 4C45 4D45 4E54 5F48 4541 
    4445 5200 0100 0000 4556 454E 545F 4D41 4E41 4745 5200 0100 0000 4641 
    4D4F 5553 5F42 4154 544C 455F 4445 5441 494C 0001 0000 0046 4F52 5400 
    0100 0000 4149 5F43 4845 4154 5F4D 414E 4147 4552 0001 0000 0057 4154 
    4348 544F 5745 5200 0100 0000 4449 504C 4F4D 4154 4943 5F50 524F 504F 
    5349 5449 4F4E 0001 0000 0043 4841 5241 4354 4552 5F52 4543 4F52 4400 
    0300 0000 5245 534F 5552 4345 5F48 4541 4445 5200 0100 0000 4143 5155 
    4953 4954 494F 4E5F 4D49 5353 494F 4E00 0100 0000 504F 5254 0001 0000 
    0043 414C 454E 4445 5200 0200 0000 5345 5454 4C45 4D45 4E54 5F4D 4543 
    4841 4E49 4353 5F53 5441 5453 0002 0000 0053 4554 544C 454D 454E 5400 
    0100 0000 4D41 5252 4941 4745 5F4D 4953 5349 4F4E 0001 0000 0053 5452 
    4154 4547 595F 4D41 505F 504F 5349 5449 4F4E 0001 0000 0052 4553 4F55 
    5243 4500 0100 0000 5245 4352 5549 544D 454E 545F 4954 454D 0001 0000 
    0055 4E49 5400 0100 0000 524F 4144 0001 0000 0057 4F52 4C44 0004 0000 
    0041 524D 5900 0100 0000 5345 5454 4C45 4D45 4E54 5F42 5549 4C44 494E 
    4753 0001 0000 004D 4953 5349 4F4E 0003 0000 0046 414D 4F55 535F 4241 
    5454 4C45 5F53 4954 455F 4D41 4E41 4745 5200 0100 0000 4641 4354 494F 
    4E5F 4543 4F4E 4F4D 4943 5300 0100 0000 5245 534F 5552 4345 5F49 4400 
    0100 0000 4F55 544C 4956 455F 4641 4354 494F 4E53 0001 0000 0055 4E49 
    545F 4152 5449 4C4C 4552 5900 0100 0000 4348 4152 4143 5445 5200 0300 
    0000 4153 5341 5353 494E 4154 494F 4E5F 4D49 5353 494F 4E00 0100 0000 
    5349 4547 4500 0100 0000 554E 4954 5F44 4200 0100 0000 4348 4152 4143 
    5445 525F 5041 5448 5300 0100 0000 5354 5241 5445 4759 5F4D 4150 0001 
    0000 0053 4554 544C 454D 454E 545F 4255 494C 4449 4E47 5F44 414D 4147 
    4500 0100 0000 4D49 5353 494F 4E5F 4641 4354 4F52 5900 0100 0000 4348 
    4152 4143 5445 525F 4143 5449 4F4E 5F44 4554 4149 4C53 0001 0000 0004 
    0021 0D00 0039 971A 001A 0063 0061 006D 0070 0061 0069 0067 006E 002F 
    0069 006D 0070 0065 0072 0069 0061 006C 005F 0063 0061 006D 0070 0061 
    0069 0067 006E 0011 0069 006D 0070 0065 0072 0069 0061 006C 005F 0063 
    0061 006D 0070 0061 0069 0067 006E 0083 0D00 0014 0000 0001 0000 0000 
    0000 0002 0000 0097 0D00 0024 0100 0004 0000 0008 80F1 2300 0000 0000 
    0000 0000 0101 0000 0101 001F 0000 00FF FF9F 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 0000 0001 
    0000 0001 0000 0001 0000 0001 0000 0055 290A 003A 0064 0061 0074 0061 
    002F 0077 006F 0072 006C 0064 002F 006D 0061 0070 0073 002F 0063 0061 
    006D 0070 0061 0069 0067 006E 002F 0069 006D 0070 0065 0072 0069 0061 
    006C 005F 0063 0061 006D 0070 0061 0069 0067 006E 002F 0064 0065 0073 
    0063 0072 005F 0073 0074 0072 0061 0074 002E 0074 0078 0074 0001 1C00 
    0000 360F 0000 4E00 0000 0000 8E44 0000 0000 0000 8744 0000 0000 0040 
    BF44 0100 0000 0000 0000
    The first "02" is with high probability for changing the faction, but dont care about this, it is more complicated.

    What is however very simple is the manipulation with the next section, i.e. in this concrete example:
    Code:
    0000 0000 8B
    Whan you change it for example on this:
    Code:
    0100 0040 89
    You get the changed date and season in the loding sreen of your campaign.

    The 01 is for winter, the 40 is repalceble with 00 or 80 or c0 in my concrete example with 2years per turn (maybe it is also universal incremetation, so also for othe Time_pace values). The starting year 1080 in summer of campaign is then:

    Code:
    0000 0000 87
    You get in load screen summer 1080 .....

    But this is not solution for changing the turn and year in campaign.

    You must now go to the bottom of the cut-offed section in hex represntaion of the info. Do you see anything? Yes, you are right. This part in the end of the section:

    Code:
    0000 8E44 0000 0000 0000 8744 0000 0000 0040 BF44 0100
    has very similar structure like the part for changing the year and seson in loading screen.
    In fact it is talking to us that we are in this campaign in year 1136, summer. That the campaign has started in 1080, summer. and that it will end in 1530, winter. Simple like that.

    As for changing the vaues quite arbitrarily I advise you to prefer to open some previous save file from time to which you want to change the save file and use the concrete values - this is particularly important for holding the right ratio with number of turns otherwise the game crash.
    So, I have decided that for me will be sufficient for solving my problem with to much rapid pace of campaign to change it to 00008B440000.

    The last step was the most difficult for me personally to locate. You nedd to change apprpriatelly the turn also....
    But it is very simple in the end, one must be able to be patient only ...

    The whole section after the path for descr_strat.txt file is this:

    Code:
    0001 1C00 0000 360F 0000 4E00 0000 0000 8E44 0000 0000 0000 8744 0000 0000 0040 BF44 0100 0000 0000 0000
    And all what is changing when you change the turns is this xxxx 1Cxx xxxx.
    So for the 008B year is the right value xxxx 10xx xxxx.

    i.e.
    Code:
    0001 1000 0000 360F 0000 4E00 0000 0000 8B44 0000 0000 0000 8744 0000 0000 0040 BF44 0100 0000 0000 0000
    And it is all. I have tested it and it appaers to be fully functional. You must be wise only as for reasonable small change, which you can do repeatedly anyway. So by this solution you can be able to play the early era indefinitely.

    Bye Sinuhet

  2. #2
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Changing turn/year in save file

    Very nice. So, did you also find out how to change the time scale (i.e. speed)?

  3. #3

    Default Re: Changing turn/year in save file

    Not yet.

    I had to prefer yesterday and today to back up my previous work on TWC. It is not so simple to backup some 100MB of info sufficiently selectively. However now I am in a point that all things which are the highest value for me are now independent on the TWC/ON medium/servers and I am only expanding the mirrored material about other for me important things. It is also worth of noticing that if somebody colud start to think that will use my work in DL section of TWC for commercial purposes without my written permission, that I can use his network scripts and layout and other graphical stuff for my purposes without permissions.

    I would suggest to do the same to all people who are in crisis of trust in TWC. Such parallel mirroring would create: 1. the independnence aon the bad-will of administrators, which can in any time erase all your previous posts/work. 2. the eventual bandwith problems to TWC and this can show where is the real power (I assume that in the mambers of TWC, not in its servers ...). All is perfeectly legal. It is the same like "run on the bank" when all people stop to trust in it and wants parallel pay-offs. We have "our money" inTWC servers and we caould want to them back and go to another "bank" with them. If the original "bank" will have diffficulties with cash-flow is its problem ....

    It is only for expalnation why I have stopped my work on th topic of this thread. So, I assume that I will work again on MTW2 save files research today evening.

    Bye Sinuhet
    Last edited by Sinuhet; 12-03-2006 at 12:44.

  4. #4

    Default Re: Changing turn/year in save file

    I have found out the code for changing the "speed" also (i.e. exactly speaking changing the value of timescale flag in descr_strat.txt file).

    It was still more complicated for research then the chnging the turns/years, it took me almost 4 hours . However for implementation by users it is on the other hand more simple.

    You need chnge the code in two different parts in save file.

    The first part is starting in offset: 00 00 00 30 and is longer,
    the second part is starting in offset: 00 00 0F 70.

    Dont ask me why are the respective values such, but they appear fully functional and is faction independent (tested for england, france, hre):

    A. timescale 0.50

    1. offset: 00 00 00 30, value: 92 CA 3A 82
    2. offset: 00 00 0F 70, value: 00 3F

    A. timescale 1.00

    1. offset: 00 00 00 30, value: 42 2F A6 EC
    2. offset: 00 00 0F 70, value: 80 3F

    A. timescale 2.00

    1. offset: 00 00 00 30, value: 68 F4 63 D3
    2. offset: 00 00 0F 70, value: 00 40

    It is all. We can now only ask ShellShock to incorporate this changes options to some .NET program for more convenient handling.

    I have changed by this way the above described save file of mine to be in summer 1112, 17 turns, 836 turns to play in timescale 0.50 from standard timescale 2.00 with summer 1136, 29 turns, 197 turns to play. And the game is acting without crashes. The AI is deciding to act differently, however, in AI diplomacy - these things must be dependent on the count of turns left, otherwise everything seems to be same like before change .....

    Bye Sinuhet

  5. #5
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Changing turn/year in save file

    The stuff at the second offset are the actual floating point numbers. No idea about the first offset.

  6. #6
    Spindly Killer Fish Member ShellShock's Avatar
    Join Date
    Aug 2004
    Location
    UK
    Posts
    189

    Default Re: Changing turn/year in save file

    Nice work Sinuhet!

    I will look into putting this into MedManager.
    He does sit in gold, his eye red as 'twould burn Rome.

  7. #7

    Default Re: Changing turn/year in save file

    Quote Originally Posted by ShellShock
    Nice work Sinuhet!

    I will look into putting this into MedManager.
    Thanks, friend. I have asked you about this in TWC before a while, then it has been again down .... I have metioned there (I dont know if you had read it there) that I have maybe a clue how to change the faction also. But it is so simple that I have a suscpicion that it will be in the end more complicated - so I will test it thoroughly at first and let you know after I will be sure.

    There will be maybe a problem how to count exactly the values for years if the user would like to input quite arbitrary values, the simplest for the start solution would be to collect some "real" combinations of values for turn, season, and year respectively from actual save files by users and let change them via your programm only to these "tested" preset values ....

    Bye Sinuhet

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