Remove unwanted OXP traces

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Remove unwanted OXP traces

Post by JeffBTX »

This could probably be done by "peekin' and pokin' and hackin'"... although I don't know how to safely do it..

... and I have to admit, it would be cumbersome if somehow implemented "in-game"...

... but maybe a small utility could be written and released with 1.74 (whenever it is released...)?

... and if compatible with 1.73.4, maybe it could be released before 1.74?

Lets say a n00b (like myself, but not as much of a n00b lately) tries a gazillion or so OXPs. Then he decides to keep ... maybe a dozen. then lets say for arguement's sake he decides " to heck with it, Vanilla Oolite was great for me, I don't need any OXPs".

EDIT: insert this situation. A version of Oolite is released that is incompatible with an old OXP, but the player wants to keep his old savegame... but wants to "clean it up".

His savegame is riddled with old, un-necessary references.

He manages to "downgrade" to a stock, standard Cobra Mk III, his addon folder is empty.

Could something be done to (FAIRLY easily) "clean up" a savegame?

Or... THIS might work...

There is STRICT mode, yes?

How about this menu item... hmmm... lets call it STRICT AND ANGRY mode. If you load a savegame, select STRICT AND ANGRY, then save, your savegame is cleaned up. THIS should be fairly easy! STRICT mode (as I understand it) automatically ignores "anything that isn't vanilla". So STRICT AND ANGRY should at first turn its back on anything that isn't vanilla (upon loading the save), but when you save under this mode, it bops non-vanilla things over the head with a broom.

EDIT: Regarding the above paragraph, OoopsIForgotOneThing; that being someone who had a million OXPs and downgraded to a dozen OXPs. So back to the utility. I envision something with checkboxes. It would have to be developed side-by-side with the game source (so that it "knew" what "vanilla" means):

Oolite OXP Cleaner has found the following nonstandard references:
[x] Station: Darth Vaders Death Star
[_] Ship: ObiWan Kanobi's Cruiser
[x] Planet: Planet Snickerdoodle
[x] Equipment: Toilet Paper Gun
[_] Ship: The Black Pearl
CAUTION! The players current ship is The Black Pearl. This is a nonstandard ship, if selected the player will be placed in a standard Cobra Mk III.
(or... the utility might refuse to remove anything currently linked to the player... a nonstandard ship, nonstandard equipment... so those will be left in... with a warning notice, maybe grey-ed out checkboxes)

... in the above example, the utility will REMOVE references to Darth Vaders Death Star, Planet Snickerdoodle, and the Toilet Paper Gun.

... but also in-game I am still proposing STRICT AND ANGRY MODE
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

You can’t open a non-strict saved game in strict mode.

Besides, I don’t see any particular advantage to stripping out “traces” of OXPs. Unused mission variables don’t do any harm and are never, as far as I’m aware, particularly big. If you remove and OXP, then reinstall it, it is reasonable that your status from the OXP’s perspective is maintained.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

I dont think this is likely to be an easy job, and I dont see the advantage. Except maybe 2 OXPs that use properties with the same name.

One problem is that I dont think there is an easy way to determine which properties an OXP uses, so it would be difficult to remove orphans.

I think what you are talking about is akin to the windows registry tool cleaners. Where it would check for references, and remove anything that isnt referenced anywhere
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

Ahruman wrote:
You can’t open a non-strict saved game in strict mode.

Besides, I don’t see any particular advantage to stripping out “traces” of OXPs. Unused mission variables don’t do any harm and are never, as far as I’m aware, particularly big. If you remove and OXP, then reinstall it, it is reasonable that your status from the OXP’s perspective is maintained.
Ah... I didn't know that. I somehow had the impression that STRICT mode meant PLAY IN STRICT MODE (irregardless of OXPs). Yoda would say "Readme file peruse too fast you do!"
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

Cmdr James wrote:
I dont think this is likely to be an easy job, and I dont see the advantage. Except maybe 2 OXPs that use properties with the same name.

One problem is that I dont think there is an easy way to determine which properties an OXP uses, so it would be difficult to remove orphans.

I think what you are talking about is akin to the windows registry tool cleaners. Where it would check for references, and remove anything that isnt referenced anywhere
Yes... and re: what Ahruman said. I had the impression that Strict Mode acted as a kind of "Filter". Apparantly it's more like a "Lock".

No biggie.
Sword, thy name is Cobra. And Cobra has fangs!
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Ahruman wrote:
Besides, I don’t see any particular advantage to stripping out “traces” of OXPs.
Yes...however I do wonder why all the trumbles have to be kept in the savegame after the infestion has been dealt with - those really do blow up the size. Can I sell that portion as furs? ;)

Screet
Post Reply