Page 1 of 1

Tool to edit faction relationships in saved games

Posted: Sat May 17, 2008 11:16 am
by pht
This little hack allows you to edit your messed up relations with other factions (or generally any to any faction). The basic modus operandi is:

Code: Select all

vega-relations.pl [-s num|-d] [-f fac] [-u] savegame
Basically it displays a faction's relationship (default: privateer) towards all others (symetrically) or sets it to a given value (-s) or to defaults (-d). These defaults are hard coded for now and only for the privateer faction - i.e. no factions.xml parsing. The -u option restores a "1" on diagonal i.e. the relationship of each faction towards itself (seems to help sometimes). Original savegame file is backed up as "savegame~".

Usually if you're attacked the moment you leave dock in an otherwise friendly sector, -d -u should fix it.

I guess this script could be useful for developers too.

Feel free to improve and share at will. And remember to back up your savegames before messing with them.

Posted: Sat May 17, 2008 1:08 pm
by loki1950
Welcome pht hope the save game format doesn't change to much also is it useful to windows types as i see it's written in Perl which most windows users have no clue about :wink:

Enjoy the Choice :)

Posted: Sat May 17, 2008 2:12 pm
by bgaskey
Thanks. People have had to restart because they messed up faction relations and had the confed navy chasing after them. :wink:

Posted: Sat May 17, 2008 7:28 pm
by pht
loki1950 wrote:Welcome pht hope the save game format doesn't change to much also is it useful to windows types as i see it's written in Perl which most windows users have no clue about :wink:
As I said, it's a hack ... and you can hack it more.

In Windows, you can install activeperl (google it) and run the script from cmd.exe with

Code: Select all

perl vega-relations.pl params

Posted: Sun May 18, 2008 7:13 am
by pht
Seems a typo got into the program, rendering the -d mode useless.

As for the savegame versions - this program works for 0.5.0 savegames and probably will be updated on request.

Posted: Sun May 18, 2008 10:34 am
by ace123
You'll still need this for 0.5.0 but I'm working on fixing up the way in which faction relationships work in the code...

It will store a delta from the original relations in your savegame file--and that delta applies only to your relation with another faction, not between factions... also it will remove that ugly-looking and easily corrupted table at the end of the savegame file.

Posted: Sun May 18, 2008 10:38 am
by pht
ace123 wrote: It will store a delta from the original relations in your savegame file--and that delta applies only to your relation with another faction, not between factions... also it will remove that ugly-looking and easily corrupted table at the end of the savegame file.
That would imply that either other factions will have constant relations to each other or that the changes would be lost on reload ...

Posted: Sun May 18, 2008 11:39 am
by ace123
That's true--I'm still thinking about the specifics.

I think there are only a few cases where global relationships will change--that is, inside of campaigns and major news events.

So maybe it needs a global delta in the savegame for each pair of factions.

Posted: Sun May 18, 2008 1:29 pm
by pht
Hmm, I was giving it some thought and here goes:

Maybe the relations could change on more than a few ocassions - adding more dynamics to the play. I agree that the matrix representation is crappy and can easily become unbalanced. I am thinking of an alternative way to represent the relations:

1. for each faction, store a vector of 'attitudes' towards different problems
2. compute relations dynamically as a dot product (or similar function) of their 'attitude' vectors

If, for example, we have the 'additude' vector consisting of only one element - the great war, we could give the areans an attitude of -1 and the confed +1, making them -1 . +1 = -1 enemies. On the other hand, if we give a negative attitude to any other faction, we make them allies with areans and enemies of the confed, and vice versa. Factions with an attitude of 0 would instantly become neutral towards all other factions.

We can extend this vector with attitudes towards piracy, politics, etc. We could even give rise to multiple local-scale wars between a small number of factions that would be ignored by the rest of the galaxy.

The current matrix system can probably support all that, but my guess is that it has to be maintained more or less manually. By using something like the proposed idea, the relations can be automatically computed on the fly given various (perhaps even dynamic) galactic problems, similarly to how it works in the real world.

Also this system would give rise to something that was discussed in other threads - if I attack a vessel due to mission, it might shift my military alignment but not political, if I kill someone who tries to steal my cargo, it might not necessarily kill my relations with that faction, etc.

Last and not least, it would be possible to display the ongoing galactic problems and the aligment of different factions to the player, which would instantly give him the clues of who, why and what.