N00B Topic; flushing the cache (and related)

General discussion for players of 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

N00B Topic; flushing the cache (and related)

Post by JeffBTX »

Okay... pressing SHIFT as Oolite starts. I have a vague notion in principle as to what this does. Apparantly you are supposed to do this whenever you put in a new OXP... and I guess when making certain changes.

Does restarting Oolite TWICE do just about the same thing? (I was studying the log, and a certain error message that appears whenever putting in any new OXP).

I've noticed that (at least some) OXPs SEEM to work OK even if you don't flush the cache (HUD OXPs for example; apparantly).

What are the implications of NOT flushing the cache under various conditions? Maybe a fairly brief but comprehensive explanation (yes I know that sounds funny).

If there are effects of NOT flushing, does / would it / ONLY effect the system that *you are currently in* (for an applicable change or OXP); or would other systems be effected... like the last two systems you visited or something? (IE "old system data" still in the cache... )

=====

Somewhat related. OXP variables.

What would happen, to, say my savegame; if I was running RandomHits OXP, and to my "Criminal Hatred Score" (a variable for that OXP), then removed the OXP, played and saved at least once, then re-installed the OXP? Seems to me that the Criminal Hatred score would disappear (in effect)... it would apparantly be "reset" upon re-installing the OXP.

What about playing in Strict Mode for a couple of sessions... does that "destroy" OXP variables?

Are OXP variables stored in the cache... or in the savegame... or both... or (I can't think of any other places they would be).

There is NOT a burning need for this info - I'm just curious. (But maybe this should be documented better in the readme... I don't think its even mentioned).

Thanks.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Adding a completely new OXP means Oolkite will automatically see the new OXP and reload the cache (you can see it doing so in the log file) - flushing the cache is required when you change something INSIDE an oxp that's already in the AddOns folder - and therefore, because the name is the same, Oolite must be forced to empty the cache and reload it in its entirety.

You could equally, but not more easily, take out one OXP from the AddOns folder, start Oolite, quit, put the OXP back, and restart Oolite again - it will find this "new" OXP and do the same.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: N00B Topic; flushing the cache (and related)

Post by Screet »

JeffBTX wrote:
Okay... pressing SHIFT as Oolite starts. I have a vague notion in principle as to what this does. Apparantly you are supposed to do this whenever you put in a new OXP... and I guess when making certain changes.
It's not required to use shift when you add oxps - if the paths change, oolite will rebuild the cache on it's own. You only need to manually force flush the cache when you change the contents of a file from an oxp.
JeffBTX wrote:
Does restarting Oolite TWICE do just about the same thing?
No. Indeed, if you add an oxp and launch oolite twice, the cache will be rebuilt on the first load while the second one will then use the cache from the first launch after the change ;)
JeffBTX wrote:
What are the implications of NOT flushing the cache under various conditions?
If you change a files content and do not flush the cache, you won't have those changes to become active.
JeffBTX wrote:
If there are effects of NOT flushing, does / would it / ONLY effect the system that *you are currently in* (for an applicable change or OXP); or would other systems be effected... like the last two systems you visited or something? (IE "old system data" still in the cache... )
It's not dependent on where you are. Oolite simply won't KNOW about your modifications and still run with the old version of your files if you do not flush the cache.
JeffBTX wrote:
What would happen, to, say my savegame; if I was running RandomHits OXP, and to my "Criminal Hatred Score" (a variable for that OXP), then removed the OXP, played and saved at least once, then re-installed the OXP? Seems to me that the Criminal Hatred score would disappear (in effect)... it would apparantly be "reset" upon re-installing the OXP.
That sounds strange. The oxps do write variables to the save file. If you save after removing the oxp, these variables are not cleared, they do stay with your file and thus everything should show up properly if you then add the oxp again...
JeffBTX wrote:
Are OXP variables stored in the cache... or in the savegame... or both... or (I can't think of any other places they would be).
In your commanders save file. You can open it with a good text editor like notepad++ and have a look yourself. http://notepad-plus.sourceforge.net/uk/site.htm

Screet
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Also, data unless scripted to do so, is not explicitly removed from the Save file even if the OXP is removed - this is actually quite beneficial, when two OXPs conflict sometimes it is necessary to pick one to remove, say, two conflicting missions, you remove one, complete the second and then re-add the first, and the data was always in your savefile so the mission would continue where you left off (note: useful if you're doing a mission that is galaxy specific and then leave that galaxy - you could remove the OXP, go right round again, and when you're back in the right galactic chart - re-add the oxp...)

HTH?

EDIT: Screet slipped in there before me! :roll: :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
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 »

DaddyHoggy, Screet;

Thanks for answers. I understand a little better now. And I'm kind of suprised that "old OXPs" would leave a "footprint" in the save file; but that DOES make overall operation simpler.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

New OXPs too!

What gets written to the save file: all mission variables (if you delete a mission variable, it won't be saved...) and all changes to solar systems properties (suns gone nova, renamed planets, changes in technology level, etc...)

The idea behind it is that if there's something that changes the Ooniverse, and it's potentially affected by the player's actions, the only sensible place to keep the info is the savegame file.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply