Page 2 of 4
Posted: Sat Jun 13, 2009 11:03 am
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.
Posted: Sat Jun 13, 2009 11:04 am
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.
Posted: Sat Jun 13, 2009 11:11 am
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
Posted: Sat Jun 13, 2009 11:21 am
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.
Posted: Sat Jun 13, 2009 12:07 pm
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?
Posted: Sat Jun 13, 2009 1:42 pm
by another_commander
@dalek501: You have PM.
Posted: Sat Jun 13, 2009 2:40 pm
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];
}
}
Posted: Sat Jun 13, 2009 4:12 pm
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.
Posted: Sat Jun 13, 2009 9:20 pm
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
Posted: Sat Jun 13, 2009 9:41 pm
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
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.
Posted: Sat Jun 13, 2009 9:59 pm
by dalek501
Thanks again.
I think I have it all tidy now.
And here are a couple of pics of it for you all.
The ship is called the 'Gallifreyan Supercobra'. Some of you (especially in Britain) may get the reference and the logos!
Posted: Sat Jun 13, 2009 10:37 pm
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!
Posted: Sun Jun 14, 2009 8:33 am
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?
Posted: Sun Jun 14, 2009 9:17 am
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.
Posted: Sun Jun 14, 2009 10:11 am
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.