Page 1 of 1

[Request] OXP to Send Money Back Home

Posted: Fri Feb 23, 2018 6:29 pm
by DataPacRat
... Okay, I've just had a thought for a new OXP. Call it "Send Money Back Home", or something similar; all it would do is let you reduce your pilot's bank account at will, and keep a running total of how much you've spent on this.

This seems like it could be the sort of thing that could be accomplished with roughly two lines of code, by people who've written OXPs before.

Further refinements could offer more than that - eg, offering notices at various thresholds that your family/hometown/clan/nest/warren/whatever is finally able to purchase various things - but for now, might someone be able to whip up a quickie version to playtest with?

Re: [Request] OXP to Send Money Back Home

Posted: Sat Feb 24, 2018 12:11 am
by UK_Eliter
It seems to me that the 'quickie' version of the OXP would indeed be easy to do, though I'm not going to volunteer, I am afraid, since I don't have experience dealing with the station interface screens. The more elaborate version that you suggest would require some effort, in the form of generating sentences of some format or formats (e.g. 'The people at <x> are pleased to have received the <y> credits, with which they have <completed task T in neighbourhood N>').

EDIT. The person who would most like this OXP is likely to be you, DataPacRat. So: since the simple version of the OXP is indeed simple, and since the less simple version would not be that hard (so long as it was a bit formulaic, and once one has typed out various screens), this might be a reason to learn how to write an OXP oneself. I'd be happy to offer advice here and there (so far as within my competence; f.y.i., I've written OXPs that include InterstellarTweaks).

Re: [Request] OXP to Send Money Back Home

Posted: Sat Feb 24, 2018 4:35 am
by phkb
Not sure if this is what you had in mind, but the just-released Home System has a concept of sending investment funds back to one of your designated home systems, which increases your status with the system. Benefits apply the higher your status climbs.

Re: [Request] OXP to Send Money Back Home

Posted: Sat Feb 24, 2018 6:19 am
by DataPacRat
phkb wrote: Sat Feb 24, 2018 4:35 am
Not sure if this is what you had in mind, but the just-released Home System has a concept of sending investment funds back to one of your designated home systems, which increases your status with the system. Benefits apply the higher your status climbs.
I've skimmed over the Wiki page, and the OXZ's files, and it looks like that could be entirely congruent with what I had in mind, and then some. :)

Unfortunately, after downloading the OXZ to the same directory as all my other OXZs, I wasn't able to find anything new in the F3 menu, and then found the addon isn't even showing up in my v1.86's Expansions Manager. I'm not sure what other debugging feedback I can currently offer other than "it's not there", but I'm open to testing out any fixes you come up with.

Re: [Request] OXP to Send Money Back Home

Posted: Sat Feb 24, 2018 7:28 am
by phkb
I haven’t put it into the expansions manager yet. I was going to wait a few days to see if any bugs show up. You just need to put it in your AddOns folder

Re: [Request] OXP to Send Money Back Home

Posted: Sat Feb 24, 2018 7:39 am
by DataPacRat
phkb wrote: Sat Feb 24, 2018 7:28 am
I haven’t put it into the expansions manager yet. I was going to wait a few days to see if any bugs show up. You just need to put it in your AddOns folder
I have placed HomeSystem.oxz in the directory /home/dan/.Oolite/Add-ons/ . I have a pile of other addons in that directory, such as the Hyperradio musicpacks, which show up just fine in my Extensions manager; HomeSystem doesn't show up there.

Digging into the OXZ's files, and comparing it to, say, Headlights, one thing I notice is that in the manifest.plist, HomeSystem only puts the values of the variables in "quotation marks", not the variable-names themselves; while Headlights put both in quotes. Maybe that's what's keeping my copy of Oolite from parsing it out?

Edit: I've edited the manifest.plist to have those quotes, saved a new version of the OXZ, copied it over, and fired up Oolite... no dice, still not showing up.

Re: [Request] OXP to Send Money Back Home

Posted: Sat Feb 24, 2018 7:46 am
by phkb
If your add ons folder has a "-" in the name (ie "Add-ons") then it won't work. It has to be "AddOns" (no spaces, dashes, periods or commas).

The variable names don't need to be in quote marks. Only the values need to be.

Can you post a copy of your latest.log file? That might help track down the problem.

Re: [Request] OXP to Send Money Back Home

Posted: Sat Feb 24, 2018 9:05 am
by DataPacRat
phkb wrote: Sat Feb 24, 2018 7:46 am
If your add ons folder has a "-" in the name (ie "Add-ons") then it won't work. It has to be "AddOns" (no spaces, dashes, periods or commas).

The variable names don't need to be in quote marks. Only the values need to be.

Can you post a copy of your latest.log file? That might help track down the problem.
... Okay, so it seems some previous version of Oolite created the "Add-ons" directory, which is where I'd been stuffing all my addons. And now, after renaming it to "AddOns", getting a pile of warnings about duplicate OXPs, cleaning the whole thing out of extras, double-checking versions, and suchlike... there, in the F3 menu, is the 'Home System Privileges' option. (And a few other things that I'd installed but had never noticed had never shown up in-game.)

... And it looks like I was completely wrong about downloaded OXPs showing up in the Expansions menu.

So, uh... thanks. :oops: :)

(In case anyone's curious - I now have 5 OXZs and 177 OXPs left in that folder, though right now I couldn't say how many of them actually contain things I want to keep playing with...)

Re: [Request] OXP to Send Money Back Home

Posted: Sat Feb 24, 2018 9:23 am
by phkb
Glad you got it sorted. Enjoy!