I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

Legacy:Punk129/Savegames 2k4

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Just wrote down the most important aspects of the new savegame function. (original is available here)

Preparation / Paths[edit]

Add the following to YourMod.ini:

[Core.System]
SavePath=..\YourMod\Save

Make sure it's "\" and not "/" !!

Run UT2004 with "-makenames" using a batch-file or something similar.

El Muerte: Why does it have to be "\" ? Using a "\" isn't system safe.

Foxpaw: I could be wrong, but I think that's the convention that the Unreal Engine uses.

El Muerte: yes you're wrong, "/" is used all over the engine because it's system safe. That's why it puzzles me why the SavePath has to have "\"

punk129: It has to be "\" or the game crashs while saving.

SirRobin: I tried this stuff on Linux with the Alien Swarm mod. Using "\" for the path makes the game crash when loading. With either "/" or "\" the game doesn't save properly, giving this message in the log:

Warning: Can't save ..\AlienSwarm\Save\Save9.usa: Graph is linked to external private object Package Package.

Any ideas of what might be wrong?

Foxpaw: Savegames don't appear to play nice with the mod directory structure. At least, that's been my experience. It's possible that the original author just modified Ut2004.ini and then wrote it up here assuming it would work for mods as well.

punk129: Did you start the game with "-makenames" parameter? Works all for me (even with my tc using mod struct / windows)

Foxpaw: Alien Swarm actually has -makenames on it's command line already. If it works for your TC it's possible that there may be a specific setting somewhere that influences the saving behaviour. It does not work on my TC. (Same behaviour as SirRobin gets.)

Saving[edit]

There are 2 ways to save a game:

1. You bind QuickSave() (Playercontroller.uc) to a key. This will save the game to slot 9.

2. You use the savegame console-command:

//where i is the slot number:
ConsoleCommand("SaveGame i");

Loading[edit]

There are also 2 ways to load a game:

1. You bind QuickLoad() (PlayerController.uc) to a key for load the savegame from slot 9.

2. You use PlayerController's ClientTravel():

//where i is the slot number:
ClientTravel( "?load=i", TRAVEL_Absolute, false);

Related Topics[edit]

Tarquin: please use list markup! :)