2 Ships
Moderators: winston, another_commander
Well, another work around would be to have a variable that stores the number amount of cargo in each ship and have any that will not fit in a given model of ship stored in another variable.
A mission script could be used to manage the player's ship and inventory.
However, unless there's a way to determine how much of each type of cargo is stored in the player's ship, this is all moot.
A mission script could be used to manage the player's ship and inventory.
However, unless there's a way to determine how much of each type of cargo is stored in the player's ship, this is all moot.
- ClymAngus
- ---- E L I T E ----
- Posts: 2514
- Joined: Tue Jul 08, 2008 12:31 am
- Location: London England
- Contact:
Ok there is a flaw here but couldn't we just hijack the station coding?
It's got a commodity list so you could store materials there, OK so it would be locked round one system not moble like GTA but that's reality for you (I never liked that anyway).
It's got a ship list that instead of being world perameter generated could be read into.
The only problem is keeping ongoing missions as you change ships.
It's got a commodity list so you could store materials there, OK so it would be locked round one system not moble like GTA but that's reality for you (I never liked that anyway).
It's got a ship list that instead of being world perameter generated could be read into.
The only problem is keeping ongoing missions as you change ships.
I've been poking around the documentation, and cannot find any way to go around the fact that you can't determine how much of each type of cargo is in the player's ship. If we could do that, work-arounds for other problems could probably be made.
Not even storing it in the station's commodities list would work as we still can't determine how much of each cargo type is in the ship.
Unfortunate.
Not even storing it in the station's commodities list would work as we still can't determine how much of each cargo type is in the ship.
Unfortunate.
Dream as if you'll live forever
Live as if you'll die tomorrow
Live as if you'll die tomorrow
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Could back-story it to say inter-ship transfers are not allowed due to Galcop cracking down on dodgy paperwork and smuggling...
If you change ships the hold must be empty and the ship has a clean manifest.
"It's the rules guv..."
If you change ships the hold must be empty and the ship has a clean manifest.
"It's the rules guv..."
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- ClymAngus
- ---- E L I T E ----
- Posts: 2514
- Joined: Tue Jul 08, 2008 12:31 am
- Location: London England
- Contact:
So we can't interrogate a text file, run it through some if statements checking for existing commodity values and if value > 0 add the new value to the existing one? So you dock, it auto dumps your cargo then you resupply from there with a new ship.Nemoricus wrote:I've been poking around the documentation, and cannot find any way to go around the fact that you can't determine how much of each type of cargo is in the player's ship. If we could do that, work-arounds for other problems could probably be made.
Not even storing it in the station's commodities list would work as we still can't determine how much of each cargo type is in the ship.
Unfortunate.
OK next question, which programming language? Are we talking pure c++ here? Is anything else compatable?
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
Oolite is objective C, not C++. Objective C is similar enough to C++, but not the same. It is easy to do what you are talking about in objective C, in fact that is more or less how save-games work.ClymAngus wrote:OK next question, which programming language? Are we talking pure c++ here? Is anything else compatable?
But what I think is needed is for this to be available in javascript which is the OXP language, and I am pretty sure this isnt available. Not because it is impossbile, but rather because actually we want the OXP to be reasonably sandboxed, and dont want them to have access to large parts of the OS or filesystem.
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
If you buy a new ship then the contents of the hold are currently transfered to your new ship, I believe.DaddyHoggy wrote:Could back-story it to say inter-ship transfers are not allowed due to Galcop cracking down on dodgy paperwork and smuggling...
If you change ships the hold must be empty and the ship has a clean manifest.
"It's the rules guv..."
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
I've sorted out most of the problems that I can see at the moment.
However, I've hit a bit of a snag. I need to design a special station's shipyard so that ships that the player has purchased can be stored there.
Is it possible to change the tech level listed in a ship's entry via script? If so, how?
If that's possible, I think I have all of the obvious problems sorted out. Though, to be honest my plan is a bit of a trickery. There doesn't appear to be a way to do what I want in JavaScript directly, so I have to construct workarounds. Still, the net result should be that the player can change ships.
One last thing. Which ships are TL 1 in Oolite or in any OXP?
However, I've hit a bit of a snag. I need to design a special station's shipyard so that ships that the player has purchased can be stored there.
Is it possible to change the tech level listed in a ship's entry via script? If so, how?
If that's possible, I think I have all of the obvious problems sorted out. Though, to be honest my plan is a bit of a trickery. There doesn't appear to be a way to do what I want in JavaScript directly, so I have to construct workarounds. Still, the net result should be that the player can change ships.
One last thing. Which ships are TL 1 in Oolite or in any OXP?
Dream as if you'll live forever
Live as if you'll die tomorrow
Live as if you'll die tomorrow
Maybe it would be best to determine which functionality Oolite would need to provide to JS in order to make switching ships (probably in flight, thinking about the Nostromo and similar setups here) possible and then see if how tough it is to implement that functionality.Nemoricus wrote:There doesn't appear to be a way to do what I want in JavaScript directly, so I have to construct workarounds.
For example, the trunk version now supports fireECM. Previously, noone did think of player-autoECM although the NPCs does have it. It turned out to be no more difficult than bridging an oolite internal feature to JS.
Screet
Okay. The functionalities I need are:
1. The ability to change the player's ship via script.
Actually, that's about it. Everything else I have in mind is to deal with the fact that there's no way to switch a player's ship directly. Being able to get the cargo stored would be nice, though.
A quick note, though. My idea won't change a player's ship in flight. It's more of a garage that the player can store their ships in.
Changing it in flight is different and I haven't fully thought through what would be needed for that.
1. The ability to change the player's ship via script.
Actually, that's about it. Everything else I have in mind is to deal with the fact that there's no way to switch a player's ship directly. Being able to get the cargo stored would be nice, though.
A quick note, though. My idea won't change a player's ship in flight. It's more of a garage that the player can store their ships in.
Changing it in flight is different and I haven't fully thought through what would be needed for that.
Dream as if you'll live forever
Live as if you'll die tomorrow
Live as if you'll die tomorrow