Page 1 of 1

Stations based on there techlevel

Posted: Thu Apr 17, 2008 3:00 pm
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?

.

Posted: Thu Apr 17, 2008 3:59 pm
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

Posted: Thu Apr 17, 2008 4:14 pm
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.

use

Posted: Thu Apr 17, 2008 4:21 pm
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

Posted: Fri Apr 18, 2008 5:21 am
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?

Posted: Fri Apr 18, 2008 6:45 am
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".

Posted: Fri Apr 18, 2008 9:27 am
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.

Posted: Fri Apr 18, 2008 12:13 pm
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)

Posted: Fri Apr 18, 2008 2:14 pm
by CaptKev
Thanks Eric, I'll give that a try.