Page 1 of 1
Custom Upgrades to Player Ships (changes made by Javascript)
Posted: Wed May 18, 2011 9:00 pm
by Commander Wilmot
I had an idea (it's probably CRAZY) for an oxp. What if you had a ship that you could modify? Example purchase a cargo upgrade from the equipment screen and upgrade from thirty tons to a hundred tons max cargo space, but you lose .10 ls from your max speed. The crazy part is that it would require separate ship data entries for each ship and a script to correctly switch the ship for another ship of the correct type.
Example:
The player's current version of the Modular Ship MK.I (MS from here on) is the MS s+ (speed upgrade) e+ (energy bank upgrade, adds an extra energy bank)
The player desires to add the cargo upgrade (c+), resulting in his ship being replaced by the MS sec+ variant.
this.playerboughtequipment or whatever the command is has to trigger a script that would replace the MS se+ variant with the MS sec+ variant and not the MS c+ variant.
Other complications: certain equipment should be restricted, such as a cargo upgraded variant probably shouldn't have mil shield boosters, but the speed upgraded variants with standard cargo capacity should. What should be done with mil shield boosters if player upgrades to a c+ variant? Should it be removed but some money refunded (both are rhetorical questions, though suggestions might be nice.)?
What do you think? If enough people like it, and I get around to learning blender over the summer, I might give it a go.
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Wed May 18, 2011 9:25 pm
by Gimi
Good idea. I assume you can both upgrade and downgrade in this setup, and thus totally change the role of your ship. You need to be careful though, as this may become a ship that sort of renders all other ships undesirable, at least to new players who, unlike me, don't have an affiliation for the Old Elite ship set. A ship "setup" like this would need careful balancing to fit neatly into the game.
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Wed May 18, 2011 10:39 pm
by Commander McLane
Methinks that it would be hugely simpler to make the respective player ship properties read/write than to have a
host of subtly different ships. The latter doesn't really seem practical.
Besides, it's impossible to switch ships via script anyway, and I guess the code-rewriting to make that possible would be much more extensive than for r/w properties.
I have no idea whether any of this is currently on the table for Oolite 2. You could
turn the basic idea into a suggestion, though.
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Thu May 19, 2011 4:19 am
by CommonSenseOTB
Hey there, just taking a break and came across this thread. You know Commander McLane is quite correct but if it wouldn't potentially destabilize the game by making the variables read/write there would definately have to be general agreement for all developers that upgrades could only improve ships by a set percentage MAX. Once you open pandora's box to this there's no going back.
You know a while back many moons ago I pondered this same idea and I decided that it WAS doable without much scripting but was still impractical due to the amount of work and the end result might not be useable by most of the community.
Here was my idea.
Build piece of equipment "upgrade ship" sell for no cost. It explains(and requires) that you go immediately to the ship screen after purchase. When you buy it a script takes an inventory of your ships' equipment and stores it on a set of mission variables and the equipment sets its' own missionvariables for some condition checks. You then go to the shipyard screen and now see a bunch of ships that look like yours except they are labelled, for example "add port turret" or "remove port turret" or "add engine booster" etc,etc. The player would have to just ignore the trade in price stuff as the price would be 0 and the listed price would be in the name. Now, the ships' shipyard files would have conditions met by the missionvariables set by the equipment"upgrade ship"allowing them to appear. When you buy the ship(actually the upgraded version of your ship) an event would trigger a script to reinstall all the equipment you had before and adjust the cash properly. Cool huh?!
I may have missed something obvious that might prevent this sequence from taking place but that is the idea/approach that I would try if I wanted to bypass the the ships properties being read only. I haven't tried it yet but if no one does I probably will and the cobra mk3 will become the most upgradable ship around(good reason to still own one, ehh?
)Now back to the huds...
You know I ALWAYS wanted a fully customizable Cobra Mk III so why don't we just make the ship properties read/write because someone will just find a way around anyway(if it is possible).
CommonSenseOTB(Always thinking Outside-The-Box)
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Thu May 19, 2011 7:02 am
by Commander McLane
CommonSenseOTB wrote:The player would have to just ignore the trade in price stuff as the price would be 0 and the listed price would be in the name.
You'd need to spend some more thoughts here.
If the price of your new ship is 0, its resell value—should you ever want to buy another ship—will be 0 as well. Players will complain about that.
And even if you give it a correct price, the player is always going to lose a lot of money for each upgrade, because each upgrade actually means selling your current ship and buying a new one. Of course the script can deal with that, but at least it's an issue that you have to keep in mind.
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Thu May 19, 2011 7:41 am
by Zireael
I love the idea, but from what I read above implementing it will be tricky.
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Thu May 19, 2011 10:46 am
by Lone_Wolf
1 problem is that it's impossible to guarantee that a specific ship will be available in shipyard.
The conditions in shipdata.plist only result in that ship being an option for that specific shipyard.
given it chance 1 only increases the change the probability it will be available for sale, nothing more.
(this could ofcourse be solved by a feature request to add a specific ship to a shipyard at run-time).
As for the general idea :
Currently oolite ships (vanilla and oxp) are designed by a developer who makes certain choices.
The business model is imo very similar to that of car design :
the manufacturer makes design choices, decides which options and versions will be available.
The buyer chooses from what's available.
Some buyers will have the skill to change the design dramatically (like putting a formula 1 motor on a city car chassis), but this effectively means they create a new car design.
Your approach seems more like :
A hull is chosen for the ship, then it's decided what is put into it. ( building blocks approach )
All ships would have the same base, it's specs would be determined by what you put into it.
(The invulnerable General Products hulls from Larry Niven's stories that are set in his 'Known Space' work like this).
While this is also a viable business model for ship development, it's very different from the way Oolite ship design works.
Bad idea imo.
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Thu May 19, 2011 10:53 am
by Commander Wilmot
Thanks for the feedback. I mis-read a proposal on a garage oxp, that gave me the impression that it would be possible to change ships by script. Also my thought was that the ship would have to be designed to be modular, in other words you couldn't, for example, just modify a python with a cargo bay upgrade. The modular ship would be designed in such a way that a work crew could cut apart the ship sections and weld a new piece in. The work crew removes the old 30 ton capacity cargo bay and welds a new 100 ton capacity cargo bay into the front cockpit\crew quarters section and the rear engine section.
Currently oolite ships (vanilla and oxp) are designed by a developer who makes certain choices.
The business model is imo very similar to that of car design :
the manufacturer makes design choices, decides which options and versions will be available.
The buyer chooses from what's available.
Some buyers will have the skill to change the design dramatically (like putting a formula 1 motor on a city car chassis), but this effectively means they create a new car design.
Your approach seems more like :
A hull is chosen for the ship, then it's decided what is put into it. ( building blocks approach )
All ships would have the same base, it's specs would be determined by what you put into it.
(The invulnerable General Products hulls from Larry Niven's stories that are set in his 'Known Space' work like this).
Exactly my idea
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Thu May 19, 2011 9:07 pm
by Commander Wilmot
However I realized I might have given the wrong impression. The modular upgrades won't just improve your ship. For example, if you add a cargo bay, it won't just improve your cargo capacity, it will also subtract from your ship's thrust (and possibly subtract from the ship's speed as well.) The modular ship will also probably not be quite as good as the equivalent vanilla oolite ship. A M.S. c+ will have the same cargo capacity and speed as a Python, but might only have the four energy banks of a standard enhanced M.S, which have stats equal to a Cobra III. Or an M.S. c- s+, a variant with no cargo bay and a speed enhancement, would be equivalent to an asp except it might only go to .38 ls. The ship would not be quite as good as a base ship, but it would be much cheaper. Of course for the moment this is a mute point, as there is no ability to change ships via script, unless Commander McLane has a solution (I thought I heard him say he has a script in Cataclysm which gives you the chance to buy a unique ship upon completing the mission.)
Also certain modules could exclude others, limiting the number of ships needing a entry in a .plist. An M.S. with c++ upgrade, a variant which is equivalent to a boa, could not accept a s+ (a speed upgrade).
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Thu May 19, 2011 11:38 pm
by DaddyHoggy
I've just realised where I've come across your idea of modular space ships before...
HERE
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Fri May 20, 2011 4:35 am
by CommonSenseOTB
Lego rocks! Now all we need is the Elite set of ship kits and I'll pick up a Cobra Mk III tomorrow!
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Fri May 20, 2011 6:00 am
by Commander McLane
Commander Wilmot wrote:Of course for the moment this is a mute point, as there is no ability to change ships via script, unless Commander McLane has a solution (I thought I heard him say he has a script in Cataclysm which gives you the chance to buy a unique ship upon completing the mission.)
Nope, no solution. Switching ships is not possible, because for the game the player
is his ship. The important word inside the parenthesis is "buy", which is not "award by script". And it requires the manipulation of a whole system in order to manipulate its shipyard. And there is no guarantee that this manipulation actually works (in my trials it worked with a rate of about 3 in 4).
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Fri May 20, 2011 7:49 pm
by Commander Wilmot
I can't claim credit for this idea. I got it from the Evochron series of games. The latest one is
Evochron Mercenary.
Re: Custom Upgrades to Player Ships (changes made by Javascr
Posted: Thu May 26, 2011 9:22 pm
by Commander Wilmot
I put a request in the Oolite 2.0 Looking Ahead Forum. My interest in using script ship changing as opposed to a read/write format (though I put in a request for both) is because then the ship model can visually change via the use of sub-ents in the plist.