"Personal Base" OXP Concept (Open to Ideas)

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

Moderators: winston, another_commander

User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Lone_Wolf »

Killer Wolf wrote:
could you not hold your other ships as "equipment" and when you cycle through and activate one (like you'd activate a pylon weapon, you change the player ship to that item and your current ship takes its place. the option to do this should only occur if you're docked at your home base of course.
The ship a player is flying is not changeable through JS.

While it is stored in the savefile, afaik all JS functions that deal with accessing files directly or executing an external program are not implemented in the JS library used by Firefox 4 and in oolite.

Currently there's NO WAY to change a player ship with ingame code.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2272
Joined: Tue Jan 02, 2007 12:38 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Killer Wolf »

how does the usual sell/buy procedure you use in the shipyard work, could you not spoof that to assign the ship change via a fake "buy" but store off the details of the "sold" ship?
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by CommonSenseOTB »

Staer9 wrote:
Mauiby de Fug wrote:
As far as the garage/multiple ships idea goes, Smivs is correct. That's essentially impossible.
Wheres CSOTB... He loves it when someone says something is impossible
:D :D :D

"Nothing's impossible 'til you're dead or stop trying." (or the money runs out!) :)
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Capt. Murphy »

Killer Wolf wrote:
how does the usual sell/buy procedure you use in the shipyard work, could you not spoof that to assign the ship change via a fake "buy" but store off the details of the "sold" ship?
That's basically what I wanted to do, but would still need some JS access to shipyard attributes (like the prices) and the ability to specify a specific ship to be available at a certain station's shipyard, again not currently accessible via JS. That last feature would be a good one to have in the game anyway - would open the door to have a rare/unique ship made available as certain stations as a mission reward.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Dragonfire »

I still say it is possible. Even though the shipyard module itself cannot be used, its very existence points to the ability to change ships with in-game code. Therefore, all one has to do is come up with a system whereby the ships saved, borrowing some methods from the shipyard (yet reinventing it...I'm pretty sure one can reassign the typical shipyard key to something else on a custom base.)
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Mauiby de Fug »

But it is not exposed to plists or javascript, meaning that it should not be possible in an oxp.
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Dragonfire »

I never said one had to modify or access the shipyard itself. It IS viewable, thus I can borrow code from it to simulate a similar method.

What can I say? I love a good challenge, and I take the phrase "Its impossible" as license to do it.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Switeck »

Unlike equipment, a ship cannot change its TL if set initially to TL99?
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Capt. Murphy »

@Switeck - Don't think so unless I've missed something in the JS documentation.

@Dragonfire - Good luck with the project, I'd be very happy to see if you work your away around the current limitations.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Dragonfire »

Limitations are meant to be blown past...
Killer Wolf wrote:
how does the usual sell/buy procedure you use in the shipyard work, could you not spoof that to assign the ship change via a fake "buy" but store off the details of the "sold" ship?
Exactly my line of thinking!
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Lone_Wolf »

Good Luck with it, Dragonfire but i'll think you will to have to hack the sourcecode to achieve what you want.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Switeck »

As long as the player re-buys the same shiptype, the game could re-add all the equipment to it that the player's previous ship had. It would be an ugly kludge though and would require also having nearly every ship-type available.
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Dragonfire »

Again, that would be achieved by pulling the ship data off of the savefile and writing it to another file. A boolean variable would be added to the savefile to indicate whether the current ship has been docked before. The advantage to that is that, the player would not have to manually restore the equipment - its already there.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Thargoid »

You can't read/write to files (other than the current save game file when you save), and also you can't guarantee given ships will (or won't) be available in the shipyard screen.

Both of those I think are going to give you practical headaches, unfortunately.
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

Re: "Personal Base" OXP Concept (Open to Ideas)

Post by Dragonfire »

You can read and write files in any programming language. Limitations can always be circumvented given enough code. Even if the OXP itself can't read and write the file, it can be made to access another class.

And, again, I'm not using the shipyard itself. I'm borrowing some code.

Sigh...I think I'm repeating myself now.
Post Reply