PDA

View Full Version : Work-around for the Loadgame Bug: Hibernate



Browning
04-04-2005, 11:03
As we know, the only solution to the loadgame bug is not to load at all. Certainly, not many people can afford running the computer 24/24, but Windows does provide a way to "freeze" the state of the computer upon turn-off only to restore it completely on power on. In this way, the game will not know it has been switched off!

I had read about it in the twcenter forums and posted it here, but it went under in the thread "Have you been recently to .com". I have performed some tests over weekend and want to share the results with you.

1. How to hibernate.
a. Go to "Control Panel" -> "Energy Options" and turn the hibernation possibility on. (Note: this requires the amount of free space on your system partition equal to your RAM size). (Note2: this option is IIRC on by default, but many gamers turn it off for performance).
b. Play your game. When you want to finish, dont exit it, just go to Windows (you may use the ALT-TAB-DELETE to switch the focus from the game). Go to "Start"->"Shutdown", you should then see three options: "Standby", "Shutdown", and "Restart". Press and hold your SHIFT key, the "Standby" option changes to "Hibernate", click on it, voila.
c. When you restart Windows, you get an option to either load the hibernated state or start afresh - in this case the hibernated state is permanently lost.
WARNING: if your firewall was shutdown when you hibernated your computer (as is mine for offline playing), make sure you are physically disconnected from the internet on restart.

I want to mention that the tests were successful: upon restart, the game goes on as usual, without AI lifting its sieges unless forced to.

2. Problems with this approach.
a. In order to avoid loading a savegame, this approach requires that R:TW is running in background all the time you work on your comp. You "waste" like 256 MB of your RAM this way. The load on processor is not discernible for the minimised R:TW. (Good design, CA!).
b. While the abovementioned waste of resources is insignificant for the normal computer usage (home banking, writing letters, ...), I guess it rules some resource-heavy applications out, such as CAD or Il-2: Forgotten Battles.
c. Your R:TW gameplay is limited to a single campaign at a time. If you have two users playing different campaigns on the same computer (like I have, with my son), this is not a solution for you.

3. Workaround for these problems.
a. If I was able to catch the files (hyperfil.sys and the swap file) on my drive in a point between hibernating and de-hibernating, that would be a solution. I would copy them somewhere else, naming them appropriately as my "savegames-in-lieu". When needed, I would copy them onto my system partition(s) and de-hibernate the computer.
b. Of course, this way is not possible when Windows is normally running: the hiberfil.sys file gets emptied upon de-hibernation, ready for the next hibernation process.
4. Linux
a. I can catch those files, however, in their "hibernated" state, if I start Linux on my machine after I have hibernated the game. I can copy them onto my Linux partition (where I created a separate directory for the "savegames", huh) or burn them on a DVD (not tested - hardware lacking).
b. The final step would be to overwrite the current hiberfil.sys and the swapfile with the content of the apropriate "savegame" directory. Unfortunately, my version of Linux (Suse 9.1 standard) cannot write to the Windows partitions. Linux complains the filesystem mounted as read-only no matter how I umount and "mount -w" it... In fact, the documentation says it is not possible to write to NTFS partitions from outside of Windows...
c. A workaround to this would be to reinstall Windows on FAT32 filesystems. This would be a desperate measure since it deteriorates the performance and safety, and also it requires a complete re-installation of all my settings and programs. Linux would have to be re-installed as well, since the Windows setup does not support dual boots.
d. There is a less dramatic workaround to this. A new, non-standart ntfs driver for Linux exists on the internet, one which would allow to overwrite files without changing their size nor attributes. This would perfectly fit the situation. Unfortunately, I could not verify this, because there is no C compiler on my Linux (grrrr! I didn't know that it was possible to get Linux w/o a C compiler).

So that's it for now. If someone has any idea how to get further from this point please comment here.

Turbo
04-04-2005, 14:12
Not a workable solution for me. The sound gets distorted.

Browning
04-04-2005, 14:27
I haven't encountered the sound distortion yet, my total game time between the hibernations was something like 6 hours.

I've heard however that you may overcome the sound distortion by fiddling with sound settings in-game.

tai4ji2x
04-04-2005, 16:35
well, turns out my hibernate is screwy. most of the time it locks up when trying to resume.

imdWALRU5
04-04-2005, 16:40
Can somebody please explain to me what exactly is the loadgame bug?

~:confused:

Oaty
04-04-2005, 17:48
The loadgame bug is where when you save the game and leave and exit. Then when you go to reload it the next time you play, the A.I. lifts all of it's sieges and walks away. The only sieges that stay in tact is if they were planning on starving you out.

imdWALRU5
04-04-2005, 18:08
Thanks for the info!
~:cheers:

ShellShock
04-04-2005, 18:18
If you create a bootable Windows CD this would allow you to boot to the CD and not the hard disk; in theory you would then be able to monkey around (technical term) with the system files on the hard disk partition, e.g., hiberfil.sys. Because it is a Windows bootable CD, it should be able to write to the hard disk.

starkhorn
04-04-2005, 18:42
Wow. You know things are bad when we start looking to Bill Gates for help. ~:) ~:) ~:)

Good work though Browning....I would never have thought of that in a million years.

Cheers
Starkhorn

Browning
04-04-2005, 21:24
TY Shellshock, will try this out... over weekend probably :embarassed:

Starkhorn, I took the idea from the twcenter, will look who posted it to give hime the full credit here (in case it - the workaround - works).

Browning
04-05-2005, 12:55
the person who mentioned the idea of hibernation first (on the .com) was... Shellshock :bow:

Beefy
04-05-2005, 13:00
alternatly you could just play a few more extra minutes before you turn off, and acutally fight that certain seige etc. helps a little bit

Browning
04-05-2005, 13:28
Could someone test if a hibernate feature functions on Windows XP installed on a FAT32 filesystem?

Is a FAT32 system much slower than an NTFS?

Linux - normally - cannot write to a NTFS partition, but it can write to FAT32, so this would be one possibility for the work-around.

Browning
04-05-2005, 13:31
alternatly you could just play a few more extra minutes before you turn off, and acutally fight that certain seige etc. helps a little bit
Yes Beefy, I know. But sometimes I am too tired to wait for the 10+ sieges AI is just conducting to resolve.

Besides, I aim at removing the necessity for loading a savegame at all, because loading is, eh, "featured" too much. I wander what "features" remain yet to be discovered.

SpencerH
04-05-2005, 13:57
I've been trying to maintain a campaign by just minimizing the game and leaving it running in the background (my pc is always on anyway and I havent been doing any work at home). This morning I noticed some strange AI behaviour as the game resumed (it actually appears to load but maybe its just the graphics drivers). One of my cities was under threat from 3 German armies but as I ended the turn (directly after entering the game from desktop) all three left my territory and returned about 2 or 3 turns later! Just like the loadgame 'feature'! Maybe it was coincidence, but it's something to keep an eye on. Maybe I'll have to turn off FOW.

ShellShock
04-05-2005, 19:35
the person who mentioned the idea of hibernation first (on the .com) was... Shellshock :bow:

Thanks for the credit ~:cheers:

One thing - in your first post you say to hold down the CONTROL key on the Shutdown dialog, to change the Standby button into a Hibernate button. On my install (Windows XP Professional Service Pack 2), I have to hold down the SHIFT key. Is this the same for you? (Just worried in case people can't get into Hibernate mode).

The Stranger
04-05-2005, 20:03
yeah on mine pc too shift. but it still works good.

katank
04-06-2005, 00:30
FAT 32 is really not so bad. Consider having a small partition that is just FAT 32.

I dual boot. I have Windows on NTFS partition and Linux on ext2. I also have a chunk of fspace that is FAT-32 that both can write to so I can adjust for storage need changes easier.

Just install RTW to that FAT-32 partition and problem solved. A simple linux shell script would be sufficient for backing up and restoring the hibernation file.

Nice idea BTW.

demon rob
04-06-2005, 03:30
Hibernate theory - not sure about some of the bits so tell me if its workable,
Presume many of us have Win-XP systems on ntsc and lots would have old Win-98 or ME leftover.

Add a second harddisk, put Win-98/ME on it in fat32 , and just use that partition for Rome. Use dual-boot to select either win-XP or 98 to load.

Normal use - just do the XP.
To play Rome use the 98/ME.

Never exit from Rome but use the Alt-tab, and hibernate.
To next play Rome, on PC booting select the 98/ME and let it restore from hibernation.

Is this feasable?

Is this believable that we'd ever have to consider such options? I think it might be time for a signature line: "Believe evidence. The world is not flat. Rome reload is bugged. Are you a flat-earther?"

tai4ji2x
04-06-2005, 03:36
demon rob: heh, i like it.

anyway, hibernate for some reason just isn't working for me. i've updated windows regularly, keep my drivers updated, etc. dunno what the deal is.

Kull
04-06-2005, 06:07
There's a similar discussion underway in the RTW Modification - General forum:

https://forums.totalwar.org/vb/showthread.php?t=45725

(Note: A lot of testing has already been performed on a variety of different Hibernate strategies)

Browning
04-06-2005, 08:53
I am sure there is the hibernate option on Windows 2000.

@ShellShock, thank you for the correction.

@katank, thank you for the idea of the additional FAT32 partition.

But...

In order for my idea of using Linux to store the "savegames" to work, you must have FAT32 on your system partition, where the hiberfil.sys and the swapfile is stored. If Windows is currently running, you cannot write to this file - or is there a way to do this?

@demon Your idea could work, but it still does not solve the problem of "only-one-campaign-at-a-time".

Still have to check the idea with a bootable Windows CD - this would be the simplest way IMHO.

Browning
04-08-2005, 07:59
An update on my testing:
I tried to boot Windows of a CD yesterday. I was using the Installation CD for my Windows XP Home Edition. Unfortunatelly, it does not boot the system, it wants to start a windows installation instead...

What should I do?

Shambles
04-08-2005, 08:43
There's a similar discussion underway in the RTW Modification - General forum:

https://forums.totalwar.org/vb/showthread.php?t=45725

(Note: A lot of testing has already been performed on a variety of different Hibernate strategies)


Thats where i reply to a thread like this,
Not repeating my self here as well :)

ShellShock
04-12-2005, 09:39
This is purely anecdotal evidence: I've been using hibernate on my latest, short campaign as the Scipii, and I have had about 3 messages so far about defeat being imminent - twice because Gaul was about to win, and once because of Egypt winning. In other short campaigns (I've played Brutii and Egypt) I've never had any such messages. This suggests to me that using hibernation to avoid reloads has resulted in a more expansive and aggressive AI.

Browning
04-12-2005, 10:47
Sadly, I made no progress in testing the idea of using the hibernation files as savegame files.

I have one more idea: use Acronis Partition Wizard (or a similar tool) to change the filesystem of your system partition to FAT32. Then you can play R:TW, hibernate, boot linux, copy the hiberfile to the location of your choice, restart, use Partition Wizard to change the filesystem back to NTFS, use computer for sth different.

When you are about to play R:TW again, change the filesystem to FAT32, start windows, hibernate, boot linux, copy the saved hiberfile of your choice back to c: (overwritting your "stub" hiberfile), restart your computer, play R:TW.

Sadly, I am unable to test this, since my trial version of Acronis Partition Wizard expired.

ShellShock
04-12-2005, 13:09
One other little tip: on Windows XP, in the "Turn off computer" dialog, when you see the three buttons, "Standby", "Turn off", and "Restart", just hitting the H key on your keyboard will invoke hibernation (assuming it is enabled in Control Panel, Power Options). No need to use SHIFT+H.