Page 1 of 2

[Release] TAU Rockhopper

Posted: Fri Mar 10, 2017 4:23 pm
by Theta Seven
A short introduction first as this is my first post: Hi, I'm Theta Seven, you can call me Theta, and I started playing Oolite a few months ago, and having primitive coding and modelling skills, I obviously wanted to try my hands at an OXZ. :D So, here it is, the TAU Rockhopper.

Image

This is the first ship of Tiared Aerodynamics Unit: The Rockhopper. Having 80 TC, it can be considered a small cargo freighter, which makes up for its tiny storage with better speed, maneuverability, and recharge rate than the rather commonly used Python.

Stats:
  • Size: 56x40x130m
  • Speed: 0.28 LM
  • Cargo capacity: 80 TC (+15)
  • Roll: 2.5, Pitch: 1
  • Energy banks: 6 (400)
  • Energy recharge rate: 3.4
  • Missile slots: 1
  • Price: 340,000@ 260,000@

I tried to balance it as much as I could, however, being my first addition to the game, I am still not sure about the price - if anyone suggests it's too cheap/expensive, and gives a reason to it, I'll change it.

Download from the Oolite Wiki as well as from in-game.
Any feedback is warmly welcome! :)

(Edits: New download link, corrected stats, now cheaper)

Re: [Release] TAU Rockhopper

Posted: Fri Mar 10, 2017 4:27 pm
by another_commander
Welcome Theta Seven, to both the game and the Dark Side! Great to have you with us.

Re: [Release] TAU Rockhopper

Posted: Fri Mar 10, 2017 4:33 pm
by Cody
Looks pretty good in-game, does the Rockhopper - welcome aboard!

Re: [Release] TAU Rockhopper

Posted: Fri Mar 10, 2017 5:34 pm
by Disembodied
Nice - there's a fair bit of room in the smaller-than-a-Python freighter class, and it's always good to see another ship!

Re: [Release] TAU Rockhopper

Posted: Fri Mar 10, 2017 6:57 pm
by Norby
Welcome Theta!

Nice first ship, I think it could be cheaper due to need much time while the player can gather this much money.

Alternatively you can offer cheaper variants with weaker stats, for example MkI even for 100.000cr (which is reachable right after start in exchange of the stock Cobra), a MkII for 200.000 and MkIII with the above stats for 300.000cr.

In this case some script work using SSH even could allow an unique modular feature, where possible to upgrade your ship from MkI to MkII, then later to MkIII without selling it, just pay for the better engine, thrusters and generators.

Re: [Release] TAU Rockhopper

Posted: Fri Mar 10, 2017 7:23 pm
by Theta Seven
Thank you all!
Norby wrote: Fri Mar 10, 2017 6:57 pm
Alternatively you can offer cheaper variants with weaker stats, for example MkI even for 100.000cr, a MkII for 200.000 and MkIII with the above stats for 300.000cr.
Well, the idea behind this ship was that a new player probably buys a Python first, and while it's great for hauling, fighting in it is almost impossible, as most ships can easily escape that 0.2 LM. So I wanted a ship that comes as a relief after the sluggish Python, a hauler that can be used as a fighter properly. But in order to be a relief, it needs to be more expensive than the Python - and the stats support this.

I like the variants idea - but then again, the ship's value is in the above stats, it offers a type which would be unique in the core game (other than the Boa Cruiser)...
After bit of recovering from the making of this first pack, I might do multiple variants.

Re: [Release] TAU Rockhopper

Posted: Fri Mar 10, 2017 9:31 pm
by Norby
Theta Seven wrote: Fri Mar 10, 2017 7:23 pm
can be used as a fighter
If the ship is designed for combat then some more bonus in this area would be good. For example I can imagine two more forward laser mounts on the wings using weapon_mount_mode="multiply".

Re: [Release] TAU Rockhopper

Posted: Fri Mar 10, 2017 10:36 pm
by Redspear
Theta Seven wrote: Fri Mar 10, 2017 4:23 pm
having primitive coding and modelling skills, I obviously wanted to try my hands at an OXZ. :D
:lol: It doesn't stop me either :P

Nice first ship and welcome. I look forward to seeing how your ships develop.

Re: [Release] TAU Rockhopper

Posted: Mon Mar 13, 2017 5:51 am
by Theta Seven
Norby wrote: Fri Mar 10, 2017 9:31 pm
For example I can imagine two more forward laser mounts on the wings using weapon_mount_mode="multiply".
I like the idea, I'll do it as soon as I have the time...

One question to it though: Since I set v1.79 as the minimum version, can I set a condition for the lasers? (If version < 1.83 then one pos for one laser, else multiple)

I know the basics of coding, but know nothing about Oolite's codes... Is the above condition possible to do?

Re: [Release] TAU Rockhopper

Posted: Mon Mar 13, 2017 7:42 am
by another_commander
Theta Seven wrote: Mon Mar 13, 2017 5:51 am
One question to it though: Since I set v1.79 as the minimum version, can I set a condition for the lasers? (If version < 1.83 then one pos for one laser, else multiple)

I know the basics of coding, but know nothing about Oolite's codes... Is the above condition possible to do?
Yes it is. You can examine the "oolite" JS object, which contains version information, amongst others. The version is represented in that object in various ways, one of which is as an array with contents [majorVer, minorVer]. You an do something like

Code: Select all

if (oolite.version[0] > 1 || (oolite.version[0] == 1 && oolite.version[1] >= 83)) 
{
  player.consoleMessage("We're cool");
}
else
{
 player.consoleMessage("Not so much");
}

Re: [Release] TAU Rockhopper

Posted: Mon Mar 13, 2017 3:35 pm
by Theta Seven
another_commander wrote: Mon Mar 13, 2017 7:42 am
You can examine the "oolite" JS object, which contains version information, amongst others.
Hmm... However this is javascript, not openstep which I use in my shipdata.plist, right?... Is there no way to do this condition inside my plist? Do I have to call a script and set the weapon port there / set the weapon port in the plist according to what the script returns?

Re: [Release] TAU Rockhopper

Posted: Mon Mar 13, 2017 4:06 pm
by another_commander
I don't think you can do that within a plist and, on top of that, weponPositionForward and family are read-only in JS.

Without having tested anything, I am thinking that you could maybe create two versions of the ship in question in shipdata, one with multiple laser mounts and one with single ones. Then, you could maybe use a script that tests the game version to selectively spawn the one you want whenever that ship has to be spawned in-game. It's probably a bit messy but right now that's all I can think of. Maybe someone else who has done more JS may be able to provide a better plan.

Edit: Not sure that would work either. Old versions of the game not supporting multiple mounts would probably fail to read a plist containing mount definitions in the new array format.

Re: [Release] TAU Rockhopper

Posted: Mon Mar 13, 2017 5:08 pm
by another_commander
Well, turns out that not only it works, but it is also very easy to do. No scripting required at all. I played a bit using the stock Krait as an example and the only thing I had to do was to go to shipdata.plist and add the lines:

Code: Select all

weapon_mount_mode = "split";
weapon_position_forward = (
	"45 -1.5 7",
	"-45 -1.5 7"
);
to the standard Krait entry in the plist. What happened next is that I tested the exact same plist once with 1.85 and once with 1.82. 1.85 can of course load it fine and the few Kraits I spawned had dual lasers as expected.

When I tested with 1.82, I was expecting a failure because of the above code. Well, the plist loaded successfully. The trick which I had missed earlier is that when it tries to set weapon_position_forward, it sees an array and fails silently. But because the Krait is like_shippped to the template Krait defiinition and because that definition has a standard declaration for weapon_position_forward, it loads the weapon position from the template and the Kraits spawned in 1.82 thus have one laser originating from the nose, just like it's always been.

Theta Seven, give it a try with your ship and see how it works for you.

Re: [Release] TAU Rockhopper

Posted: Mon Mar 13, 2017 5:18 pm
by Theta Seven
another_commander wrote: Mon Mar 13, 2017 5:08 pm
When I tested with 1.82, I was expecting a failure because of the above code. Well, the plist loaded successfully. The trick which I had missed earlier is that when it tries to set weapon_position_forward, it sees an array and fails silently. But because the Krait is like_shippped to the template Krait definition and because that definition has a standard declaration for weapon_position_forward, it loads the weapon position from the template and the Kraits spawned in 1.82 thus have one laser originating from the nose, just like it's always been.
Oh, I get it. So I should create a template ship (as I remember, one can set so that the populator doesn't spawn it, right?), like_ship the basic taurockhopper, and set a new weapon port there... So it will override in 1.83+, but fail and keep the template one in <1.83... If I understand it correctly, this is amazing!

Though I only have 1.84 installed, can I have multiple versions installed at the same time?

Edit: Yeah, I have linux... And I think the thing I'm looking for is is_template=yes...

Re: [Release] TAU Rockhopper

Posted: Mon Mar 13, 2017 5:20 pm
by another_commander
Theta Seven wrote: Mon Mar 13, 2017 5:18 pm
Though I only have 1.84 installed, can I have multiple versions installed at the same time?
In Windows the answer is a definitive yes. Not entirely sure about Linux, although my guess would be that it should be possible there too, maybe a bit trickier though.