Player big ships - possible workaround
Moderators: winston, another_commander
- Cmdr. Maegil
- Sword-toting nut-job
- Posts: 1294
- Joined: Tue Feb 27, 2007 10:28 pm
- Location: On the mend in Western Africa
Player big ships - possible workaround
DISCLAIMER: this is NOT a standalone OXP, but a set of ideas for a workaround that if developed can be then added to individual big ship OXPs. The much desired garage OXP may or may not become a spinoff, but let's first see if this can work -at all-. I was reticent about bringing up this theme, as the idea goes against the "player=ship" dogma - its variations have been discussed to death, and buried, in several threads. Still, after some PMing I decided to beat up this dead cat just to see if it meows...
With the latest changes to the core and the advent of some new ingenious techniques in OXPing, I think that it may now be possible to succeed in swapping ships.
Make a carrier OXP and include:
- the same carrier model with a dormant AI;
- a small player shuttle with the same cargo capacity and price (an avatar to the carrier);
- a custom shipyard for the carrier with only either the carrier or the shuttle for sale;
- a piece of primeable equipment to activate the swap.
On activating the swap, it'd:
- spawn the carrier model on the player's location (remembering the coordinates) and instantly dock with it (as in the Save Anywhere OXP);
- offer only the avatar for sale (for 0Cr) on the customized shipyard;
- record all the equipment and cargo as mission data (somewhat as in the Feudal Systems OXP), and award it to the newly "bought" avatar.
The avatar could then be flown into any station (core or OXP) for whatever business the player has there, and then return to the carrier for the reverse operation (even if the game is saved at this point).
Should the player sell the avatar, the carrier outside would disappear (or not); what would happen if the player left the system or if the carrier is destroyed while the player is away shouldn't pose any problems...
Please dissect this proposal, and give feedback on why won't it work
With the latest changes to the core and the advent of some new ingenious techniques in OXPing, I think that it may now be possible to succeed in swapping ships.
Make a carrier OXP and include:
- the same carrier model with a dormant AI;
- a small player shuttle with the same cargo capacity and price (an avatar to the carrier);
- a custom shipyard for the carrier with only either the carrier or the shuttle for sale;
- a piece of primeable equipment to activate the swap.
On activating the swap, it'd:
- spawn the carrier model on the player's location (remembering the coordinates) and instantly dock with it (as in the Save Anywhere OXP);
- offer only the avatar for sale (for 0Cr) on the customized shipyard;
- record all the equipment and cargo as mission data (somewhat as in the Feudal Systems OXP), and award it to the newly "bought" avatar.
The avatar could then be flown into any station (core or OXP) for whatever business the player has there, and then return to the carrier for the reverse operation (even if the game is saved at this point).
Should the player sell the avatar, the carrier outside would disappear (or not); what would happen if the player left the system or if the carrier is destroyed while the player is away shouldn't pose any problems...
Please dissect this proposal, and give feedback on why won't it work
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
I'm obviously not one of them.
- Mauiby de Fug
- ---- E L I T E ----
- Posts: 847
- Joined: Tue Sep 07, 2010 2:23 pm
Re: Player big ships - possible workaround
There is, unless things have changed, no way to choose what ships will appear in a shipyard. All you can do is change the probability of how many times a ship will appear in the list of ships to choose from. The game then randomly chooses from that list.
Re: Player big ships - possible workaround
The problem is you cannot guarantee what ships are available in the shipyard, other than by limitation of tech level. And even then you may just end up with an empty shipyard.
Similarly when you try and give the player their old ship back, whilst you have a note of what equipment it had, you can't guarantee that the ship itself will be presented as available for re-purchase.
The spawning and docking of the carrier is do-able though, that's in essence how Planetfall works.
Editted to add - Ninja'd by the squirrel, or possibly vice-versa.
Similarly when you try and give the player their old ship back, whilst you have a note of what equipment it had, you can't guarantee that the ship itself will be presented as available for re-purchase.
The spawning and docking of the carrier is do-able though, that's in essence how Planetfall works.
Editted to add - Ninja'd by the squirrel, or possibly vice-versa.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- JazHaz
- ---- E L I T E ----
- Posts: 2991
- Joined: Tue Sep 22, 2009 11:07 am
- Location: Enfield, Middlesex
- Contact:
Re: Player big ships - possible workaround
I didn't think it was possible for a script to change the player's ship?
- Cmdr. Maegil
- Sword-toting nut-job
- Posts: 1294
- Joined: Tue Feb 27, 2007 10:28 pm
- Location: On the mend in Western Africa
Re: Player big ships - possible workaround
I'm posting precisely because I think things might have changed enough... In any case,just over a year ago, Cmdr. McLane said he had created a TL 0 shipyard for his Cataclysm.oxp to grant the player a new ship.Mauiby de Fug wrote:There is, unless things have changed, no way to choose what ships will appear in a shipyard. All you can do is change the probability of how many times a ship will appear in the list of ships to choose from. The game then randomly chooses from that list.
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
I'm obviously not one of them.
- Cmdr. Maegil
- Sword-toting nut-job
- Posts: 1294
- Joined: Tue Feb 27, 2007 10:28 pm
- Location: On the mend in Western Africa
Re: Player big ships - possible workaround
In the same thread, Kaks made things even simpler:
Something that just occurred to me is that if you fly a carrier and have the Save Anywhere OXP, you can effectively save... anywhere!Kaks wrote:You can select which ships are for sale at specific shipyards using conditions.
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
I'm obviously not one of them.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Player big ships - possible workaround
That is a bit outdated method. Since 1.73 we have the dockPlayer method. Much more reliable that how Save anywhere used to do it. And I often use it in to immediately dock at the main station when entering a new system when testing stuff .Cmdr. Maegil wrote:- spawn the carrier model on the player's location (remembering the coordinates) and instantly dock with it (as in the Save Anywhere OXP);
(I have a nice console macro: ":dock")
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Player big ships - possible workaround
Eric Walch wrote:That is a bit outdated method. Since 1.73 we have the dockPlayer method. Much more reliable that how Save anywhere used to do it. And I often use it in to immediately dock at the main station when entering a new system when testing stuff .Cmdr. Maegil wrote:- spawn the carrier model on the player's location (remembering the coordinates) and instantly dock with it (as in the Save Anywhere OXP);
(I have a nice console macro: ":dock")
Code: Select all
dockPlayer
dockPlayer() : Boolean
This method docks the player at the specified station. Returns false if docking fails, otherwise true.
- maik
- Wiki Wizard
- Posts: 2028
- Joined: Wed Mar 10, 2010 12:30 pm
- Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)
Re: Player big ships - possible workaround
Code: Select all
system.mainStation.dockPlayer()
Re: Player big ships - possible workaround
You could also use something like this:
or
About selecting ships for sale at a particular station, you can always set a specific ship as having 100% likelihood of being for sale, (in that case all equipment defined as optional will always appear - a long-standing quirk of the ship market that might be de-quirked in the future) and set conditions just so to stop all other ships from appearing.
Code: Select all
if (player.ship.target && player.ship.target.isStation) player.ship.target.dockPlayer();
Code: Select all
// list all local stations, dock with the last one added to the system.
this.localStations = system.filteredEntities(this,function(e){return e.isStation;});
if (this.localStations) this.localStations[this.localStations.length-1].dockPlayer();
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Re: Player big ships - possible workaround
The SuperHub station OXP contains another possible workaround -- it is so huge that pretty much every ship short of the Thargoid saucer can dock at it. It's possible to replace main stations with that, although that certainly changes the feel of the universe to do so.
- Cmdr. Maegil
- Sword-toting nut-job
- Posts: 1294
- Joined: Tue Feb 27, 2007 10:28 pm
- Location: On the mend in Western Africa
Re: Player big ships - possible workaround
It'd seem I was right, and there are people already working on this - knowing you guys, probably someone is going to come up with a functional prototype before the weekend's over...
I've gotta love this board!
I can't help with the coding itself, but I can throw some ideas into the grinder:
- I don't think it's possible to buy in-game other player ships to the carrier, they must be manually added to the shipyard to allow leaving the carrier in an iron ass - the readme should have instructions on on how to do so;
- when boarding the iron ass, the carrier's cargo and equipment shouldn't be awarded to the new ship, but stored;
- If the carrier is able to refuel other ships, should it be able to refuel itself? I think so, as if it's paid you could say it came from the storage tanks and the money is to refill them;
- there's already an OXP to hire escorts, so I guess it is possible to give the carrier a defence wing - the launching and retrieval might pose some difficulty, though;
- should the carrier follow the player around or stay put? I think it should try to follow if the player is at more than 10Km away. In any case, a compass beacon would be a good thing to have;
- maybe the Lifter or something similar could be put to use with NPC versions, coming to and fro the main station;
- more to come.
I've gotta love this board!
I can't help with the coding itself, but I can throw some ideas into the grinder:
- I don't think it's possible to buy in-game other player ships to the carrier, they must be manually added to the shipyard to allow leaving the carrier in an iron ass - the readme should have instructions on on how to do so;
- when boarding the iron ass, the carrier's cargo and equipment shouldn't be awarded to the new ship, but stored;
- If the carrier is able to refuel other ships, should it be able to refuel itself? I think so, as if it's paid you could say it came from the storage tanks and the money is to refill them;
- there's already an OXP to hire escorts, so I guess it is possible to give the carrier a defence wing - the launching and retrieval might pose some difficulty, though;
- should the carrier follow the player around or stay put? I think it should try to follow if the player is at more than 10Km away. In any case, a compass beacon would be a good thing to have;
- maybe the Lifter or something similar could be put to use with NPC versions, coming to and fro the main station;
- more to come.
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
I'm obviously not one of them.