Changing the player ship

General discussion for players of Oolite.

Moderators: winston, another_commander

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

dalek501 wrote:
Just one further thing... I notice the trade in value of my supercobra is 163078254000661.0 Credits! Is that right?! Or have I accidentally changed something?
It makes sense to be insanely expensive. It is a one-of-its-kind ship after all, right?

Well, that's a bug actually, but I am not sure how it surfaced. This is a typical case of an unsigned integer going negative. I think that we fixed a couple of those for 1.73, but if you can send me your OXP, I could probably have a look and see if we have missed something.
User avatar
Nemoricus
---- E L I T E ----
---- E L I T E ----
Posts: 388
Joined: Mon May 18, 2009 8:51 pm

Post by Nemoricus »

Check the price for your Supercobra. It may be too high, or alternatively, 0. Depending on how Oolite handles resale value, either might be the problem.
Dream as if you'll live forever
Live as if you'll die tomorrow
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

dalek501 wrote:
Just one further thing... I notice the trade in value of my supercobra is 163078254000661.0 Credits! Is that right?! Or have I accidentally changed something?
Looks like an uninitialized value to me. Did you have to add a shipyard.plist with chance 0? If so...maybe you should search for a value like:
<key>price</key>
<integer>13190000</integer>
If it's not there, add it and select something reasonable (or maybe the value from the supercobra). The reason is that you will be asked for maintenance, and if your ship is too precious, you won't ever be able to afford it ;)

It's possible to fly without maintenance though...AFAIK it only raises the chance for fuel leaks.

Screet
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Screet wrote:
It's possible to fly without maintenance though...AFAIK it only raises the chance for fuel leaks
The Code wrote:

Code: Select all

if (ship_trade_in_factor < 80)
		malfunc_chance -= (1 + ranrot_rand() % (81-ship_trade_in_factor)) / 2;	// increase chance of misjump in worn-out craft
BOOL malfunc = ((ranrot_rand() & 0xff) > malfunc_chance);
.
.
.
BOOL misjump = ((flightPitch == max_flight_pitch) || (malfunc && (randf() > 0.75)));
In addition to what Screet mentioned, poor maintenance also increases the chance of a misjump.
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

It seems to work either with or without the shipyard.plist in place. When in place though the chance is set to 0, and the price is the same as the normal supercobra.

Another Commander - I'll send you on my oxp, thanks! :)

Do you want to pm me your email?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

@dalek501: You have PM.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Screet wrote:
It's possible to fly without maintenance though...AFAIK it only raises the chance for fuel leaks.
Poor maintainance not only gives fuel leaks (and misjumps). There is a just as large chance of taking internal damage after a jump as having a fuel leak. (Cargo destruction or equipment failure). But I agree, for some reason you only remember the fuel leaks.

Code: Select all

		if (malfunc)
		{
			if (randf() > 0.5)
			{
				[self setFuelLeak:[NSString stringWithFormat:@"%f", (randf() + randf()) * 5.0]];
			}
			else
			{
				.....
				[self takeInternalDamage];
			}
		}
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

@dalek501: The problem with the price being huge has been resolved. The shipyard entry for your Supercobra was "galsupercobra-player", while in the shipdata.plist the player ship appears as "gallifreyansupercobra-player". You will need to use the same entry for both plists. However, Oolite now reports cases like this in the Latest.log. When a ship for which we are trying to calculate a trade-in value does not have a corresponding shipyard dictionary (like in the case of hacked in ships like your personal Supercobra), it will set the ship price to 0 and notify you in the log so that you can correct your plists.

On a different note, in your shipdata.plist, galsupercobra-barrel2 is like-ship'ed to galsupercobra-barrel, but this entry does not exist. There is supercobra-barrel, though, and probably this is what barrel2 should be like-ship'ed to.
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

Thanks for the help! :)

I'm chuffed to bits with it. I'll post a few pics at some point. :)

I've also taken a few brief and small steps towards understanding oxp's a bit better. However, having said that, I don't really know what that bit about barrels was all about another_commander! I think I tidied it up ok, but I'm not sure what its for :oops:
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

dalek501 wrote:
However, having said that, I don't really know what that bit about barrels was all about another_commander! I think I tidied it up ok, but I'm not sure what its for :oops:
In your shipdata.plist, there is this entry:

Code: Select all

<key>galsupercobra-barrel2</key>
	<dict>
		<key>cargo_carried</key>
		<string>firearms</string>
		<key>like_ship</key>
		<string>galsupercobra-barrel</string>
		<key>roles</key>
		<string>narcotics_container</string>
	</dict>
You will need to change the string below the like_ship line from galsupercobra-barrel to supercobra-barrel. Alternatively you can find the part in shipdata where it says <key>supercobra-barrel</key> and change that to <key>galsupercobra-barrel</key>. Any of the two will do.
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

Thanks again. :D I think I have it all tidy now.

And here are a couple of pics of it for you all.

Image

Image

The ship is called the 'Gallifreyan Supercobra'. Some of you (especially in Britain) may get the reference and the logos!
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Nice paint job and texturing.

With a normal map that'll be top notch in 1.73.

So you're a footy fan then!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

Cheers! A mate of mine did the texturing and most of the paint work. I tweaked it a little after (once I'd seen how it was done) with the Liverpool badge on the underside. It was done in photoshop by just following the lines of the normal supercobra png.

This has made me more interested in the whole thing and if I may have a look at adding a couple of flashers. I'd need to read up on how to do it though. And normal mapping sounds great. But I expect that would be right over my head.

Another thing has come out of this concerning the rear of the ship. I have been having a crack myself at improving it and I think I have some thing better. But whenever it's applied it seems to be in much lower res. Than the rest of the ship. It's based on the normal supercobra model and looking at that, I think I'm right in saying, that it's all at 256x256? So why does the back look so poor compared to the rest? Is it an illusion?
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

dalek501 wrote:
Another thing has come out of this concerning the rear of the ship. I have been having a crack myself at improving it and I think I have some thing better. But whenever it's applied it seems to be in much lower res. Than the rest of the ship. It's based on the normal supercobra model and looking at that, I think I'm right in saying, that it's all at 256x256? So why does the back look so poor compared to the rest? Is it an illusion?
Whilst never having tried myself, from my reading here, I suspect I can point you in the right direction... most of the textures are created at higher resolutions such as 1024x1024, sometimes higher, and only resized to 256x256 as a final step. It's been said several times that this method gives a far better end result.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

I'm on my phone at the moment and I don't have access to them, but I think the top and bottom are 666x666 and the rear 600x600. Maybe that's not high enough then? But it's odd that the top and bottom look better. When I get the chance I'll post a picture of it to show what I mean. Just to describe it for now, the metal playing looks very soft in comparison to the rest.
Post Reply