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

  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

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

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

  4. #4

    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

  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

    Short addition: The values you mention above for the years are floats, too (00008744 is 1080., 00008E44 is 1136., 0040BF44 is 1530.). So it shouldn't be too hard to extend that further in a save game editor. Just write the number as float.

  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

    Thanks - makes sense that these are four byte floats. I seem to remember something similar in RTW.
    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 alpaca
    Short addition: The values you mention above for the years are floats, too (00008744 is 1080., 00008E44 is 1136., 0040BF44 is 1530.). So it shouldn't be too hard to extend that further in a save game editor. Just write the number as float.
    Thanks, alpaca. Make sense perfectly. I dindt investigated the meaning the hex fragments, my method was more empiric and observational. But this your explanation helps to use the arbitrary values for years flags also (i.e. also extension of campaign by redefining the last year flag value).

    As for faction changing via hexediting of savefile, it is too complicated. There are needed several changes in the front parts of the file (i.e. the parts of file like in the changes above), which are not however sufficient. There must be something else to change in sections responsible for buildings, characters, units or such a stuff in middle and further parts of the file probably. It is not worth of it to investigate and use in this form, because the same can be done nicely via Show me script (I assume it is identical with RTW scripting) - so we can only wait for unpacker to have access to export_descr_advice.txt file .... I will give (when I will be at home) the more detailed report for theoretical purposes, but it is not working solution, but wip - however the used structures are nicely logical .

    However, I will try find out still some other possiblities of chnging flags of descr_strat.txt file (spawn values of rebels and pirates, etc.)

    Bye Sinuhet

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

    Default Re: Changing turn/year in save file

    Quote Originally Posted by Sinuhet
    Thanks, alpaca. Make sense perfectly. I dindt investigated the meaning the hex fragments, my method was more empiric and observational. But this your explanation helps to use the arbitrary values for years flags also (i.e. also extension of campaign by redefining the last year flag value).

    As for faction changing via hexediting of savefile, it is too complicated. There are needed several changes in the front parts of the file (i.e. the parts of file like in the changes above), which are not however sufficient. There must be something else to change in sections responsible for buildings, characters, units or such a stuff in middle and further parts of the file probably. It is not worth of it to investigate and use in this form, because the same can be done nicely via Show me script (I assume it is identical with RTW scripting) - so we can only wait for unpacker to have access to export_descr_advice.txt file .... I will give (when I will be at home) the more detailed report for theoretical purposes, but it is not working solution, but wip - however the used structures are nicely logical .

    However, I will try find out still some other possiblities of chnging flags of descr_strat.txt file (spawn values of rebels and pirates, etc.)

    Bye Sinuhet
    Actually, no. The control console command doesn't work anymore, or at least not in the same way as it did in RTW and is mentioned in the help for it.
    I guess they removed it because it conflicted with the seemingly-planned hotseat mode. The problem is they didn't finish that, either.

  9. #9

    Default Re: Changing turn/year in save file

    Quote Originally Posted by alpaca
    Actually, no. The control console command doesn't work anymore, or at least not in the same way as it did in RTW and is mentioned in the help for it.
    I guess they removed it because it conflicted with the seemingly-planned hotseat mode. The problem is they didn't finish that, either.
    Ohh, do you mean that there are not console commands possible to use in Show me scripts anymore? I have not downloaded the new (MTW2) docudaemon yet, but I would assume that they would not do such a silly thing because it is very handful also for testing - so how they change the AI controlled faction in campaign during their testing then??? Or, alternatively, didnt I grasped your post in bad manner? And, eventually, do you assume that from reading the "available " commands in MTW2 documentation or have you done some test via campaign script??? (it should be possible to use any scripting commands in the new campaign script to, I suppose, with the condition only of restarting/starting new/ the campaign, but for testing purposes it doesnt matter ....)

    In every case, this your remark could shed a new light to further investments of time and effort in the direction of changing the faction in save file via hexediting.....

    Thanks and 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