PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Savegamesäuberer



Oliver Guinnes
07.08.04, 14:01
Ein Regent in den Paradoxhallen hat ein auch hier schon gefordertes Programm zur Bereinigung der Savegames geschrieben:

Thread (http://www.europa-universalis.com/forum/showthread.php?t=160571)
Zur Downloadseite (http://www.lysator.liu.se/~klas/CK/)


I finally finished a program (called ck-clean) that cleans out some unnecessary people from a CK save file. Since CK holds all characters in memory the game may run slowly on computers without lots of memory late in the game. This program can hopefully help to solve that problem.

The program works by removing characters that fulfills all of the following conditions:
- The character is dead
- The character doesn't have a living parent
- The character was never married or was married only to characters who will also be deleted
- The character doesn't have any living children
- The character doesn't have any living siblings
- The character doesn't hold a title (yes, dead people can hold titles savegame-wise)

The current version of ck-clean can't check if a character is the ruler of a country. I hope that there are no dead characters that are rulers and holds no titles.

The marriage structures that includes deleted people are also deleted from the save file. There are some marriages where one or both of the married people doesn't exist. Marriages like that are also removed by ck-clean. Claims held by a deleted character are also deleted.

It may be a good idea to run the program directly after scenario start because the buggy marriages in the scenario setup may stop some characters from getting married.

The program has an option to exclude one dynasty from deletion, so you can keep your own family tree intact on the male side.

Some results from running ck-clean on a 17.4 Mb save file from 1139 (started 1066 of course):
- 2275 of 19845 characters removed
- 565 of 4413 marriages removed (of which 7 are buggy)
- 97 of 4742 claims removed
- 4.1 Mb saved by removing whitespace
- 1.2 Mb saved by removing characters, marriages and claims
- Running time was 35 seconds on a 166 MHz Pentium

The program was written in C under Linux, but it should be easy to compile it under UNIX and BSDs (including MacOS X) too. There is probably more work involved if you want to compile it under Windows. My best bet is that you can use Cygwin. You need the gcc, make, flex and bison tools or non-GNU equivalents. I will not port the program to Windows but I would be happy if someone else tried to. I will not provide binaries of the program, only source code.

Just to be 100% clear: This program does not work under any version of Microsoft Windows.

It would be really neat if someone with a lot of bandwidth to spare could set up some sort of web script (CGI/PHP/whatever) so that people could upload their save file and get a cleaned file back. I belive that would be easier to do than creating a GUI and port the program to Windows.

The program is distributed under the GPL license. That roughly means that you can use it, modify it and distribute it freely. If you distribute modified versions you MUST however also distribute the modified source code and you must distribute it under GPL.

I intended the program to be easy to modify, so other projects that deals with reading (parsing) and writing CK savegame files can be based upon it. Please feel free to create your own bride finder, EU2 exporter or whatever you like based on this program. I suggest you announce your work in this thread (and possibly elsewhere) so that everyone can find it.

I will not do much support for the program. If you can't make it work don't expect me to answer your questions (feel free to ask though). If I find any good bug reports or patches in this thread I may perhaps fix them. Don't expect me to. If you want to actively maintain, support or host the program, instead of me, please do that. You don't need to ask me for permission before you do, it's free software.

Since I haven't done a lot of testing and only used a very limited set of save files there is a big chance that things won't work properly for you. Don't throw away your original file before you have seen that the cleaned file loads (and then saves!) properly and doesn't cause any crashes for a in-game human lifetime or something.

The betas may be intrested in the ck-errors program that is included in the same package. It looks for errors origin from scenario startup files.

Coming later: A program that looks for inheritance opportunities.

You can download the package from http://www.lysator.liu.se/~klas/CK/


:gluck:

p.s.: Scheint nur unter Linux zu laufen.

Junker
09.08.04, 18:03
Tolle Idee, muss sich nur noch jemand bereit erklaeren, entweder einen Windows-Port anzufertigen oder das bereits erwaehnte Web-Skript zu bauen und Bandbreite zu opfern. Leider hab ich dafuer definitiv keine Zeit. :(

Oliver Guinnes
09.08.04, 18:25
Und ich keine Ahnung. Wobei, wie schon in einem Dialog mit dem edlen Oldi, angedeutet, wäre dieses Vorgehen zu radikal. Ich liebe die Charaktäre. Jeden einzelnen. :D

:gluck:

Elvis
09.08.04, 20:37
So so. Ein Savegamesäuberer. Ruft mich wenn ein Wohnungssäuberer zum download angeboten wird. Habe zwar schon sowas, aber sie ist gerade im Urlaub. :teufel: *gucktsichschaudernddiemüllhaldeanindererlebt* :uhoh:

Oliver Guinnes
09.08.04, 21:38
In dem Paradoxthread meine ich kürzlich etwas von einer Windowsversion gelesen zu haben. Nicht weit davon sah ich einen Download-Link ...


:gluck:

Werter Elvis, wollt Ihr die Grenzen der Gutmütigkeit der Mods testen? :) aber vorsicht ...

Arminus
09.08.04, 22:12
Man sollte das Dinge vielleicht "Grabräuber" nennen...

Umgssda
09.08.04, 23:49
Das koennte in der englischen Version dann zu Problemen wegen des Namensrechtes fuehren.

Ruprecht I.
10.08.04, 00:54
Ach was, wenn man ein Bild mit der bezopften Dame einfügt, könnte man sich das als Werbung ja noch versilbern lassen :D

Werter Landschaftsbegrüner, Ihr meintet sicherlich das von diesem verrückten Korrupten mit bayerischer Flagge. Habt Ihr es mal der Erprobung anheimfallen lassen?

Oliver Guinnes
10.08.04, 09:32
Nein. Wie gesagt ich halte nicht so viel davon Personen aus dem Spiel zu schmeißen. Da aber der ein oder andere Regent in diesen Hallen danach zu lechzen schien, dachte ich, dass es sinnvoll wäre, diese Information auch hier zu verbreiten.

:gluck:

Ruprecht I.
10.08.04, 14:52
Wir sind auch nicht fürchterlich versessen drauf, aber neugierig, ob es funktioniert.