OXP Changes not respected by Oolite
Moderators: winston, another_commander
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
OXP Changes not respected by Oolite
Once more I am trying to tweak an OXP's worldscript, and once more I get annoyed by Oolite not acting on my changes to the script. Yes, I read something about a cache. And so far I am never sure whether that one really prevents my changes from going live or the fact that my script might be simply wrong.
For the sake of my nerves, how can I reliably ensure Oolite reads the file from disk every time? I do not want to press keys during startup or else, and I am willing to spend more startup time if I then reliably see my changes getting active.
So where is that cache? I'm willing to delete these files on every startup....
For the sake of my nerves, how can I reliably ensure Oolite reads the file from disk every time? I do not want to press keys during startup or else, and I am willing to spend more startup time if I then reliably see my changes getting active.
So where is that cache? I'm willing to delete these files on every startup....
Sunshine - Moonlight - Good Times - Oolite
- Mauiby de Fug
- ---- E L I T E ----
- Posts: 847
- Joined: Tue Sep 07, 2010 2:23 pm
Re: OXP Changes not respected by Oolite
Hopefully this should help: Hidden_Settings_in_Oolite
Here's the How:
Here's the How:
And here's the What:How to Change Settings
Mac OS X
For Oolite under Mac OS X, there are several ways to modify these settings.
Most of them can be set with the Secrets preference pane for Mac OS X 10.5. (download the tool by selecting the "prefPane" option on the top right, click the downloaded prefPane to install it, choose Oolite in the list on the left)
If you have Xcode tools installed, they can be edited with Property List Editor. The preferences file can be found at ~/Library/Preferences/org.aegidian.oolite.plist. (This is human-readable in Mac OS X 10.3.9 and earlier, but binary in 10.4 and later.)
On all systems, the defaults command line tool can be used. To set a boolean value, use: defaults write org.aegidian.oolite key -bool YES (or NO). For numerical values, use defaults write org.aegidian.oolite key 42.
Windows, Linux and other platforms
For platforms other than Mac OS X, you must edit a text file called .GNUstepDefaults. This file is created when you change a preference in Oolite, then quit.
Under Windows, this file is found at <Oolite installation directory>\oolite.app\GNUstep\Defaults\.GNUstepDefaults.
Under Linux and other platforms, the file is at ~/GNUstep/Defaults/.GNUstepDefaults. Since its name starts with a full stop, it is hidden by default. If you’re using Gnome/Nautilus or KDE/Konqueror, you can show it by selecting Show Hidden Files from the View menu. In any event, it should be accessible from the command line.
The .GNUstepDefaults file is a kind of property list, but uses a slightly different syntax than usual; you may see values like <*I300>. However, when you edit it by hand it’s safe to write numbers in plain form, and booleans are written as YES or NO. All Oolite settings are in the dictionary named “oolite”.
Miscellaneous
Key: always-flush-cache
Type: boolean
Default: NO
Introduced: 1.73
If set to YES, the data cache will be rebuilt each time Oolite runs. This is roughly equivalent to placing a brick on your shift key.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: OXP Changes not respected by Oolite
Ninja'd! Damn squirrels!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: OXP Changes not respected by Oolite
The GNUstepDefaults doesn't always seem to work for me. What I usually do if I want to make 100% sure that my script is reloaded, I delete the folder "~/GNUstep/Library/Caches/org.aegidian.oolite". On Windows or Mac, this might be somewhere else, though I imagine that it also exists on these platforms.
If you're on Linux, you could make a simple script that deletes that folder automatically, each time you start Oolite. Not sure if that be done easily on the other platforms.
If you're on Linux, you could make a simple script that deletes that folder automatically, each time you start Oolite. Not sure if that be done easily on the other platforms.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: OXP Changes not respected by Oolite
Thank you for the suggestion. Does it work for you?Mauiby de Fug wrote: ↑Fri Dec 03, 2021 10:32 pmHopefully this should help: Hidden_Settings_in_Oolite
Here's the How:
[...]
And here's the What:
[...]
I had tried that already - to the best of my knowledge. I have not seen any effect on Oolite handling my script. And even more, when coming back to the file I noticed that it had been overwritten with my additions missing. That is why I no longer trust in modifying that file.
Last edited by hiran on Sat Dec 04, 2021 5:21 pm, edited 1 time in total.
Sunshine - Moonlight - Good Times - Oolite
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: OXP Changes not respected by Oolite
I found the folder and added a removal line to my startup script.tsoj wrote: ↑Fri Dec 03, 2021 11:38 pmThe GNUstepDefaults doesn't always seem to work for me. What I usually do if I want to make 100% sure that my script is reloaded, I delete the folder "~/GNUstep/Library/Caches/org.aegidian.oolite". On Windows or Mac, this might be somewhere else, though I imagine that it also exists on these platforms.
If you're on Linux, you could make a simple script that deletes that folder automatically, each time you start Oolite. Not sure if that be done easily on the other platforms.
And I can now see that latest when restarting Oolite my changes are effective.
Thank you!
Sunshine - Moonlight - Good Times - Oolite
Re: OXP Changes not respected by Oolite
Addhiran wrote: ↑Fri Dec 03, 2021 10:20 pmOnce more I am trying to tweak an OXP's worldscript, and once more I get annoyed by Oolite not acting on my changes to the script. Yes, I read something about a cache. And so far I am never sure whether that one really prevents my changes from going live or the fact that my script might be simply wrong.
For the sake of my nerves, how can I reliably ensure Oolite reads the file from disk every time? I do not want to press keys during startup or else, and I am willing to spend more startup time if I then reliably see my changes getting active.
So where is that cache? I'm willing to delete these files on every startup....
Code: Select all
"always-flush-cache" = YES;
.GNUstepDefaults
. This way all your settings are preserved."Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: OXP Changes not respected by Oolite
What's the syntax for that? My .GNUstepDefaults looks like this:
I tried adding:
after the <integer>1920</integer> but it just recreated the .GNUstepDefaults file.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN" "http://www.gnustep.org/plist-0_9.xml">
<plist version="0.9">
<dict>
<key>NSGlobalDomain</key>
<dict>
</dict>
<key>oolite</key>
<dict>
<key>SandJ 245 (autosave)-humbletrash</key>
<integer>-26248</integer>
<key>gamma-value</key>
<real>1</real>
<key>save-directory</key>
<string>/home/simon/Dropbox/Games/Oolite/oolite-saves</string>
<key>volume_control</key>
<real>0.5</real>
<key>window_height</key>
<integer>1021</integer>
<key>window_width</key>
<integer>1920</integer>
</dict>
</dict>
</plist>
Code: Select all
<key>always-flush-cache</key>
<boolean>YES</boolean>
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: OXP Changes not respected by Oolite
Mine looks like this:
That's a snippet on Windows, btw. Always back-up your
Code: Select all
"always-flush-cache" = YES;
fullscreen = YES;
"gamma-value" = 1;
"save-directory" = "E:\\Oolite-Trunk/oolite.app/oolite-saves";
"show-ship-model-in-status-screen" = YES;
.GNUstepDefaults
file before tinkering!I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: OXP Changes not respected by Oolite
Try
Code: Select all
<key>always-flush-cache</key>
<true/>
Code: Select all
<key>always-flush-cache</key>
<string>YES</string>
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: OXP Changes not respected by Oolite
That was the one that worked for me, thank you.cag wrote: ↑Sun Jan 02, 2022 9:57 pmLet us know which works. Bet you're on a Mac, right?Code: Select all
<key>always-flush-cache</key> <string>YES</string>
I am on Linux.
The page http://wiki.alioth.net/index.php/Hidden ... _in_Oolite gave me the impression I needed to use <boolean>. I've tried it both ways; using <boolean> makes it recreate the .GNUstepDefaults file.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: OXP Changes not respected by Oolite
Thank you for that information. I was fiddling around with the boolean stuff and failed miserably.SandJ wrote: ↑Sun Jan 02, 2022 10:19 pmThat was the one that worked for me, thank you.cag wrote: ↑Sun Jan 02, 2022 9:57 pmLet us know which works. Bet you're on a Mac, right?Code: Select all
<key>always-flush-cache</key> <string>YES</string>
I am on Linux.
The page http://wiki.alioth.net/index.php/Hidden ... _in_Oolite gave me the impression I needed to use <boolean>. I've tried it both ways; using <boolean> makes it recreate the .GNUstepDefaults file.
Now the wiki page is updated as well.
Sunshine - Moonlight - Good Times - Oolite