Personal settings OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Personal settings OXP

Post 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...
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Personal settings OXP

Post 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.
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!
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Personal settings OXP

Post 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.
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Personal settings OXP

Post 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.
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Personal settings OXP

Post 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.
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1246
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Personal settings OXP

Post 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!
Post Reply