Railgun.oxp v 1.3 now available

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

Moderators: winston, another_commander

Post Reply
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:

Railgun.oxp v 1.3 now available

Post by Commander McLane »

Following a discussion on lasers and alternative weapons, Fauchon-Oliphant Inc. proudly present a completely new and revolutionary take on destruction: the Fauchon-Oliphant X-series of precision railguns.

Unlike your ships primary (lasers) and secondary (missiles and mines) armory, the X-series offers three different types of weapons mounted as primeable equipment. In other words, you select the gun with 'SHIFT-N' and fire with 'N'. Please refer to the [EliteWiki] Wiki or the readMe for technical details.

One word of warning, though: railguns are pretty useless against small, moving targets, so don't expect to kill your next pirate with them. But they can pack a punch against a big, stationary (or very slowly moving) target.

Try it out and give your feedback here.

The whole thing is more a proof-of-concept than a real addition to the Ooniverse. Oolite 1 isn't really designed for accommodating radically different weapons concepts. On the other hand it's astonishing what can be already achieved in Oolite beta 1.75. Perhaps Oolite 2 will see some new concepts in weapons implementation, who knows?

The main limitation at the current state is that the railgun is a player-only weapon. Therefore it breaks the general rule that player and NPCs should be as equal as possible. The OXP uses a couple of workarounds to make it even work for the player. More—and more complex—workarounds would be needed to make it also work for NPCs. At the moment I don't know whether it would even be worth trying to do that, but I'm open to suggestions.

I'd like to get feedback from users and scripters alike. What can be improved? What have I overlooked?

But first and foremost: enjoy! :D

The OXP is available from its [EliteWiki] Wiki-page. Please take also the time to read that page first. This should answer at least the first questions.


EDIT: Changes in v 1.1:
- small scripting clean-ups
- inactive Thargons now count as kills
- new method of spawning the projectiles; they no longer create witchspace exit rings
- projectiles are now buyable immediately after the last one was fired
- reaction to attack while cloaked now also simulated
- made the railguns more expensive


EDIT 2: version 1.2 contains a mining variant other smaller or bigger changes. Currently it needs the Oolite trunk to work. It will also work with Oolite 1.75.2 once this gets released. If you're on Oolite 1.75.1, stick with Railgun 1.1 for the time being. Changes since v 1.1:
- all railguns now use the same firing script; differences are handled via scriptInfo
- projectiles are made longer through subentries, hopefully minimizing the fly-through problems
- new mining version with heavier, slower projectiles
- correct bounties awarded for boulders
- bounty message now localized
- police only react to an attack if they're close enough to the player
- projectile spawning position is now calculated from both the player ship's and the projectile's collision radius, making it more unlikely for the projectile to be spawned too close to the ship
- a meaningful error message is created if a projectile accidentally collides with the player ship; please report if you see this message
- lowered the required techlevel
- requires Oolite 1.75.2

EDIT 3: version 1.3 adds a sound effect for firing your railgun
- it also slightly adjusts firing ranges and intervals of the different
- projectiles can now be bought any time, but not more than one bundle in total
- the number of remaining projectiles is now displayed on the manifest screen
- railgun.oxp now ships with a tweaked interceptAI, in order to make police ships react correctly on railgun attacks
- requires Oolite 1.75.2
Last edited by Commander McLane on Fri May 13, 2011 11:14 am, edited 3 times in total.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Railgun.oxp now available

Post by Switeck »

For a little less hand-waving, by the time the projectiles have traveled ~20 km, they've supercompressed the thin solar winds material at relativistic speeds, causing in essence an inertial-contained nuclear reaction that destroys the material. It's the same effect as dumping lots of hydrogen gas on a white dwarf or neutron star.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Railgun.oxp now available

Post by Cody »

Interesting... I'll try this as a close-quarters dogfighting weapon. I need more buttons on my 'stick.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Railgun.oxp now available

Post by Thargoid »

In the script.js, I would wonder a little about:

Code: Select all

this.startUp = function()
{
    this.railgunProjectiles = missionVariables.railgun_projectiles;
    delete missionVariables.railgun_projectiles;
}
Until you actually buy one, the mission variable won't exist but the function will be run and so this.railgunProjectiles will be set equal to something that doesn't exist? It may be better to check if the variable exists before doing the assignment?

Aside from that it's very much along the lines I was considering myself (having played with the velocity parameter with Cargo Shepherd and of course seen the obvious usage, as mentioned with my playaround homing asteroids). Saves me some coding time, nice one ;)

The other problem will be bounties of alien ships won't be awarded correctly iirc, but that's an old chestnut that I also know no better way to solve.[/color]
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Re: Railgun.oxp now available

Post by Ganelon »

Ok, I downloaded it and tried it. I ran into a slight delay, since apparently I was running 1.75 instead of 1.75.1, but that wasn't tough to remedy. It has been player tested.

Nice! Very nice. With the small railgun you can fire quite fast, but the heavy one is more worth the CR, in my opinion. A matter of taste, there.

I wouldn't agree on it not being useful against small moving targets. I got plenty of hits on small moving targets. You have to lead them a bit to get a hit, and it takes some trial and error on that, but that's exactly what one should expect from a projectile weapon as opposed to a laser. (And no, it doesn't need any candy-butt "pipper" to aid in aiming it to get a hit on a moving target, just use it a bit and you'll get the hang of leading the target pretty fast.)

I set the '"n" as one of the thumb-switches on my joystick, so I could use a keyboard to arm (shift n) the railgun, but fire it from the joystick. Worked like a charm. And I definitely did bag some pirates.

If you're looking for something to do a huge amount of damage with every hit, a new uber-gun, this isn't it. But it's a good reasonable weapon, and having tried it, I'd say it certainly has it's place in the iron-arse kit. I don't plan on leaving the station without it.

Kudos to Commander McLane and Fauchon-Oliphaunt Inc. I think it's a def winner.

Suggestions, well, it could do with a firing sound. But this was the proof-of-concept test. Maybe an extended magazine that would allow more shots than 100 but would take at least a ton off the cargo bay. Railgun rounds aren't light, and say 500 rounds would usually weigh a total of more than a ton, even for ammo for the light one. Then there's going to need to be the weight and space for the magazine itself, so this wouldn't ever be an "unlimited shot" weapon like the laser is. But it doesn't need to be, either. You have lasers for a weapon where you don't need to worry about how many rounds you have left.

Even just as it is, though, it's a nice weapon and doesn't take the place of laser or missiles. It more defines a whole new weapons niche.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Railgun.oxp now available

Post by Cody »

Agree with Ganelon... a very interesting and useful weapon... thanks McLane.

I tried the medium version, and took a Python out with it... as Ganelon says, you have to get the knack of it.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Staer9
---- E L I T E ----
---- E L I T E ----
Posts: 570
Joined: Fri Feb 18, 2011 4:53 pm
Location: Hatfield, Hertfordshire (poor industrial)

Re: Railgun.oxp now available

Post by Staer9 »

thank you very much Commander Mclane, at least someone noticed our conversation :lol:
Image
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Railgun.oxp now available

Post by JensAyton »

Thargoid wrote:
Until you actually buy one, the mission variable won't exist but the function will be run and so this.railgunProjectiles will be set equal to something that doesn't exist?
Mission variables default to null.
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:

Re: Railgun.oxp now available

Post by Commander McLane »

Ahruman wrote:
Thargoid wrote:
Until you actually buy one, the mission variable won't exist but the function will be run and so this.railgunProjectiles will be set equal to something that doesn't exist?
Mission variables default to null.
In other words, I don't need an enclosing if-statement (if(missionVariables.railgun_projectiles)).

Or let me ask like this: what has less overhead, evaluating an if-statement, or setting a variable to null and deleting a non-existent missionVariable?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Railgun.oxp now available

Post by JensAyton »

I don’t know, but the difference is far too small to matter in startUp(). Do whichever you think is clearer.
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:

Re: Railgun.oxp now available

Post by Commander McLane »

Thargoid wrote:
The other problem will be bounties of alien ships won't be awarded correctly iirc, but that's an old chestnut that I also know no better way to solve.
I didn't think about that and haven't tested it. You're right, it's an old chestnut, and the problem is of course that the engine doesn't award the bounties correctly. Don't know if we can award them correctly by script. For asteroids it's easy, because you just have to divide by 10, but IIRC the calculation for Thargoids is more screwed up, and the bounties on display tend to have to obvious relation to the bounties rewarded.

I haven't tested on Thargoids yet, though. Clearly an oversight on my part. I also wanted to check about the kill award for inactive Thargons. I don't think my current code covers that.

Speaking of asteroids, I discovered that the railgun is a powerful tool for asteroid mining. Not only do asteroids tend to be big and non-moving :wink: , but—more important—apparently death by collision causes them to always spawn boulders and splinters. One projectile-filling for a medium railgun allowed me to fill my hold with more than 60 t of asteroid chunks. Add Ore-processor to that, and it almost amounts to a get-rich-quick scheme. In light of this I am considering to make either the guns or the ammunition more expensive. Any thoughts on that?
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Re: Railgun.oxp now available

Post by Ganelon »

Ok, some folks may figure these should go on the screenshots thread. But my logic in putting them here is they show the effects of the weapon in the OXP. For the most part it's pretty typical dogfight pics anyway, other than the railgun, nothing exciting.

First shot with the heavy railgun, and first hit, at pretty much point blank range. Gotta love when the very first shot you fire with a new weapon is a good one.

Image

Now in this pic, you can see one of the projectiles leaving my ship. It's almost too fast to see anything but a streak in actual play. This shot will be a definite miss, but you can tell that Krait isn't feeling too hot. I've tagged him pretty solid with the heavy railgun a few times, and he's leaking plasma.

Image

Now this one isn't so much about the gun as the Krait. He's damaged and he's fired up his injectors to try and haul butt out of there. But I don't know as I've ever seen injectors only working on one side before. So it was a neat visual moment. The other side caught on in a few seconds and he was gone.

Image

Here's one of his friends I ran into a little later. This shows "moment of impact" when a railgun round hits him. If you look real close near the bottom arrow of the reticle, you can see another round on it's way as the first hits him. By then I was getting the hang of firing in two or three round "bursts" when I figured I was on the money with the shot. You can't just hold down the trigger or button or key for that, you have to tap it after waiting some fraction of a second with the heavy railgun. The light railgun, you can fire about as fast as you can press, but I felt that two hits or so from the big gun did better damage than several hits with the littler one. Your mileage may vary on that, though, it would depend a lot on fighting style, and they all do some damage when you score hits.

Image

Here's another "moment of impact" pic while taking a shot with the railgun during a very close pursuit moment. At less than 200 meters, we could put on sneakers and *run* to the other ship and hit it with a hammer. LOL But if you sometimes find yourself right on an opponent's tail, you have a good shot lined up but your lasers are cooling down at the moment.. The railgun would be just your ticket.

Image

Not a great run or anything, just six ships downed as I made my way from the witchspace beacon to the main station. I won't make any great claims to fame as an ace shot, either, since I only connected maybe one time out of four and I ran my gun dry on ammo before making the station. To be honest, I was more playing with it and goofing off than doing a "serious" hunting run. I shot up some asteroids and took a few shots at empty space while doing dives and etc to try and get a sense of the trajectory vs my ship's turn rate. But like any weapon (other than guided missiles) it will take some practice to really get decent. That's to be expected.

After a bit, I also went to using the laser as well, taking shots with it or the railgun depending on what I felt was the best choice. But the first two Kraits were taken down with just the railgun. Mind you, it took I think something over thirty shots to finish both of them off. I probably would have done better if I wasn't running the NPC-shield.OXP, but I didn't think to disable it and it probably made for a more realistic trial anyway. Didn't use any missiles on this run, but then I didn't run into any real tough ships either. The worst I ran into this trip was a pair of Cobra MKIIIs. I was low on ammo by then, so that was mostly lasers. The Starboat and a Cobra MKI I ran into didn't have anything worth taking a pic of.

Pointers: Don't expect to get many hits if you're in the middle of dynamic manoeuvres like rolls or loops, that's the time to be using your lasers. I think the easiest range is about two to seven km, unless you get an easy shot at point blank range and you happen to be flying straight at the moment. The trajectory won't "follow" as you move, like a laser does, so expect to take some time to get used to it.

As an additional weapon for intermediate or better players, you really should try this railgun. For beginners, the laser will be a whole heck of a lot easier to get good with, so learn that first before trying this. Well, unless it just looks like fun and you're trying it for a hoot. :wink: I mean, the worst that can happen is "press space, Commander", and you go back to your saved game.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Railgun.oxp now available

Post by Cody »

From my experience of using it so far, it takes a fair few slugs to take out a ship.
I'd make the gun itself more expensive, as that's where the tech is... DU slugs (or whatever) would be cheap, I reckon.

Here's a thumbnail of the railgun slugs lighting-up the NPC Shields of a Python:

Image
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Re: Railgun.oxp now available

Post by Ganelon »

Agreed. The heavy should be at the very least as much as military lasers. Probably more, since the market for this sort of thing would likely be the seasoned bounty hunters or folks on missions likely to involve difficult targets or big furballs.

Vary rare for me to argue that something in the game should cost more, but in this case, I have to agree.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Railgun.oxp now available

Post by JensAyton »

Commander McLane wrote:
Speaking of asteroids, I discovered that the railgun is a powerful tool for asteroid mining. Not only do asteroids tend to be big and non-moving :wink: , but—more important—apparently death by collision causes them to always spawn boulders and splinters.
Yep. The -takeScrapeDamage:from: method deliberately sets the being_mined flag when it results in a kill, which raises the chance of fragments from 20 % to 100 %.

This is the Right Thing in terms of normal scrape damage, which tends to be relatively low-energy. I can see various ways to fix this, but it would require fine-tuning, so I don’t want to change it for 1.76. For now, your weapon is defined as a hack with unfortunate consequences.

Tracking as Feature request #5337.
Post Reply