Stations based on there techlevel

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Stations based on there techlevel

Post by CaptKev »

I've slightly tweaked the Oolite source code to evenly spread the station types like so;

Code: Select all

if (techlevel < 6) {
	defaultStationDesc = @"coriolis";
} else if (techlevel > 10) {
	defaultStationDesc = @"icosahedron";
} else {
	defaultStationDesc = @"dodecahedron";
}


Then assigned roles in the shipdata.plist like this;

Code: Select all

coriolis(0.5) rotating-station station
dodecahedron(0.5) rotating-station station
icosahedron(0.5) rotating-station station
Where the coriolis relates to the two versions of the Gritty coriolis, the dodecahedron relates to the Griff coriolis and the Griff shady coriolis and the icosahedron relates to the two versions of the Globe station.

Everything works great except that the basic dodecahedron is show instead of the Griff stations, anyone got any idea what I'm doing wrong?
Download Fighter HUD, Stingray and System Redux from the EliteWiki
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

.

Post by Lestradae »

Is your tweaking going to go into the next version of Oolite? I would like to have that function in!

In my game, the shuffling around of the station types is not very exciting or fitting ...

Keep up the good work! :)

L
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

No, sorry Lestradae it's just for my own use. But I could show you where you'll need to change the source code, it's quite simple.
Download Fighter HUD, Stingray and System Redux from the EliteWiki
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

use

Post by Lestradae »

But I could show you where you'll need to change the source code, it's quite simple.
Yeah, please do! :)

I still haven`t changed to the 1.71 thingy :oops:

How is the System Redux 2.0 oncoming? I read it was nearly done, and that there was a tweak to play it under 1.70 ... true?

Cheers 8)

L
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Two possible issues spring to my mind:

(1) I take it that you have assigned the roles in the shipdata.plist of your OXP, not Oolite's internal one. That means that each of the alternative dodecahedrons gets chosen half as much as the original one. So 25% for the Griff Coriolis, 25% for the Griff shady Coriolis and 50% for the ordinary Dodecahedron. Could it be that you just haven't jumped around enough to see one of the Griff versions? You are expected to get the original Dodecahedron in half of all the cases.

(2) As I myself never have looked into the code itself, I am by no means sure about this: Could it be that the game doesn't use the role "dodecahedron", but "dodec" in order to call the station?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Commander McLane wrote:
Could it be that the game doesn't use the role "dodecahedron", but "dodec" in order to call the station?
It looks like Oolite is internally using the role "dodecahedron" when creating the station. From the shipdata.plist though, it is evident that you can generate a Dodecahedron using also the roles "dodo", "dodec" and "oolite-dodecahedron-station".
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

No luck guys, but thanks for your help.

Interestingly if I don't follow the role with 'rotating-station station', none of them seem to work.

Right, no more quick fixes (at least that's what I thought!), I'm going to attempt to add a JavaScript function system.mainStation.StationDesc('name'). This will only be for my own version of Oolite, but I'll gladly share it, if anybody wants it (if I can get it to work).
How is the System Redux 2.0 oncoming? I read it was nearly done, and that there was a tweak to play it under 1.70 ... true?
Yes, you can play it on 1.70, but only 1.71 works without any glitches.
Download Fighter HUD, Stingray and System Redux from the EliteWiki
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 »

Interestingly if I don't follow the role with 'rotating-station station', none of them seem to work.


This is the old way. Use rotating = yes, isCarrier = yes, has_npc_traffic = yes etc.

Look into the wiki for more details (Shipdata.plist)
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

Thanks Eric, I'll give that a try.
Download Fighter HUD, Stingray and System Redux from the EliteWiki
Post Reply