Page 1 of 1

Personal settings OXP

Posted: Sun Dec 06, 2015 11:02 pm
by Fritz
I'm trying to concentrate all the little changes I have made to Oolite config files into a little "personal settings" OXP. If I haven't forgotten anything I've made changes to descriptions.plist, equipment.plist, hud.plist, planetinfo.plist and role-categories.plist.

planetinfo.plist is easy, you just can override the entries. For the HUD, it seems that a copy of hud.plist can be moved into the OXP Config folder - or is there a way for adding entries (e.g. for Norby's hull integrity bar) without having to copy the whole file? Working on a copy would be a (little) problem if a new Oolite version changes the standard HUD.

But I'm stuck with the three remaining files: descriptions.plist, equipment.plist, and role-categories.plist. The first isn't really important (but could be important if somebody wishes to translate parts or all of it into another language). In equipment.plist I've changed some of the damage_probability entries, and in role-categories.plist I made a change that results in a more sensible behaviour of NPC traders (I've explained the reason in Testing and bug reports). My problem here is that I didn't add entries (that is possible) but I removed entries.

I also have changed two event handlers in oolite-populator.js concerning interstellar space. This is much more than a "personal setting", but I can put the question more common: How can a core event handler function like oolite-populator.js-interstellarSpaceWillRepopulate be completely replaced (and not only extended!) by an OXP?

Probably the answers are simple, and I'm not seeing the wood for the trees...

Re: Personal settings OXP

Posted: Sun Dec 06, 2015 11:10 pm
by Cody
Fritz wrote:
For the HUD, it seems that a copy of hud.plist can be moved into the OXP Config folder...
I've probably misunderstood, but do you have a personal Config folder in your AddOns folder? That's where I/we drop tweaked plists.

Re: Personal settings OXP

Posted: Sun Dec 06, 2015 11:20 pm
by Fritz
I know that I could make a folder like this, but then I would have to redo the changes with every new Oolite version that comes with new plist files. With an OXP I could just change some details without having to drag the complete files around. And I wouldn't have to look for my changes (for changing them again!) in several big files, if they were concentrated in a few much smaller files in my OXP Config folder.

Re: Personal settings OXP

Posted: Tue Dec 08, 2015 7:13 am
by cim
Fritz wrote:
I also have changed two event handlers in oolite-populator.js concerning interstellar space. This is much more than a "personal setting", but I can put the question more common: How can a core event handler function like oolite-populator.js-interstellarSpaceWillRepopulate be completely replaced (and not only extended!) by an OXP?
Have in one of your scripts startUp function

Code: Select all

delete worldScripts["oolite-populator"].interstellarSpaceWillRepopulate;
Note that while in this case this is safe to do, doing the same to replace other core worldscript handlers may break things - either because it leaves the internal state of that worldscript in a mess, or because another OXP expects that code to be run.

Re: Personal settings OXP

Posted: Tue Dec 08, 2015 10:42 am
by Fritz
Ok, I'll try it! It's only for me, so I don't have to consider other OXPs. The modifications are minor anyhow, I just changed some of the probabilities because I wanted an "old Elite" scenario to be possible, that is to win against all the Thargoids without new ones appearing continuously.

Re: Personal settings OXP

Posted: Wed Dec 30, 2015 2:23 am
by UK_Eliter
Fritz wrote:
I wanted an "old Elite" scenario to be possible, that is to win against all the Thargoids without new ones appearing continuously.
My InterstellarTweaks OXP (available via the in-game manager) often creates interstellar scenarios where after the initial load of thargoids either no more thargoids appear or only a few do (or there are some quite a way off from the player). And it does more besides!