You can also use a cargo pod, and they're much cheaper...Commander McLane wrote:EDIT: Hmmm, considering that a mining laser costs only 800 credits, perhaps I've gone a little overboard. On the other hand you can use the railgun as a weapon against big, slow-moving ships, and its firing rate is slightly better than a mining laser's. It's a difficult decision... Okay, I reduce the price to 7500, same as the heavy railgun, and adjust the firing rate to the same as the mining laser's.
Railgun.oxp v 1.3 now available
Moderators: winston, another_commander
Re: Railgun.oxp v 1.1 now available
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Commander McLane
- ---- 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 v 1.1 now available
... but they're more difficult to aim, and shooting them forward requires fuel, and carries the danger of accidentally crashing into your target yourself ...Thargoid wrote:You can also use a cargo pod, and they're much cheaper...Commander McLane wrote:EDIT: Hmmm, considering that a mining laser costs only 800 credits, perhaps I've gone a little overboard. On the other hand you can use the railgun as a weapon against big, slow-moving ships, and its firing rate is slightly better than a mining laser's. It's a difficult decision... Okay, I reduce the price to 7500, same as the heavy railgun, and adjust the firing rate to the same as the mining laser's.
- Cmdr Wyvern
- ---- E L I T E ----
- Posts: 1649
- Joined: Tue Apr 11, 2006 1:47 am
- Location: Somewhere in the great starry void
Re: Railgun.oxp v 1.1 now available
Our own rascally grey felinid is something of a legend for using a scoop-slingshotted cargo pod of food to splash a pirate Sidewinder. A feat that gives a new meaning to food fighting, that to my knowledge has never been repeated... But then, an unusual kind of luck navigates with good Captain Hesperus.Commander McLane wrote:... but they're more difficult to aim, and shooting them forward requires fuel, and carries the danger of accidentally crashing into your target yourself ...Thargoid wrote:You can also use a cargo pod, and they're much cheaper...
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
- Commander Wilmot
- Deadly
- Posts: 206
- Joined: Thu Mar 17, 2011 10:12 pm
- Location: Somewhere in galaxy 1, flying my Diamondback
Re: Railgun.oxp v 1.1 now available
My thought was that a hitscan script would reduce (or completely stop) the issues with the railgun overpenetrating the target without doing damage at low frame rates. As for the script projecting the target forward of the target ship, that would enable you to use a hitscan and still require the player to lead the target. Maybe there's a better way to do this, I assume the twin plasma cannon use a hitscan; maybe you could borrow programming from the source code.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Railgun.oxp v 1.1 now available
The plasma cannon uses its amazing power of being slow. Basic collision detection works fine in that case.
E-mail: [email protected]
- Commander McLane
- ---- 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 v 1.1 now available
No, they don't. The target has ample time to get out of the plasma balls' way. Which is why the twin plasma cannon sucks as a weapon.Commander Wilmot wrote:... I assume the twin plasma cannon use a hitscan ...
I assume that nothing in Oolite uses hitscan, not even the lasers. As far as I understand the laser beam is a very long and narrow entity that is added in its totality in one frame, and therefore intersects with other ships immediately. (I can be wrong, though; I don't actually know too much about the inner workings of Oolite.)
How would I do that? The source code is in objectiveC, scripts are in JavaScript. I don't know any objC, and I'm not into learning it. I'm happy that I have achieved enough superficial knowledge of JS to be able to write decent OXPs. I don't have more ambition for what at the end of the day is a pastime only.Commander Wilmot wrote:maybe you could borrow programming from the source code.
Also, for me part of the fun with the projectiles is that they do take some travel time, and you visually see the impact on your target. The annoying thing about hitscan, as far as I understand, is that the visual feedback you get has nothing to do with the actual hit score. For me this would be un-Oolitey.
For v 1.2 I have reduced the fly-through problem a little simply by making the projectiles longer. They are now 30m long instead of 7.68m. With the (admittedly ideal) 100-FPS setting on my computer I didn't have a fly-through event anymore even with a boulder. For me that's the point where my ambition ends.
Re: Railgun.oxp v 1.1 now available
Don't know if this is any use, but I've seen these in my log file:
13:48:22.561 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (railgun-projectile 1.1): Error: Ship.reactToAIMessage: Not valid for player ship.
13:48:22.561 [script.javaScript.exception.ooliteDefinedError]: /home/super/.Oolite/AddOns/railgun.oxp/Scripts/railgun-projectile.js, line 89.
13:48:23.003 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (railgun-projectile 1.1): Error: Ship.reactToAIMessage: Not valid for player ship.
13:48:23.003 [script.javaScript.exception.ooliteDefinedError]: /home/super/.Oolite/AddOns/railgun.oxp/Scripts/railgun-projectile.js, line 89.
No idea what caused them, but just passing on the info . . . HTH.
13:48:22.561 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (railgun-projectile 1.1): Error: Ship.reactToAIMessage: Not valid for player ship.
13:48:22.561 [script.javaScript.exception.ooliteDefinedError]: /home/super/.Oolite/AddOns/railgun.oxp/Scripts/railgun-projectile.js, line 89.
13:48:23.003 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (railgun-projectile 1.1): Error: Ship.reactToAIMessage: Not valid for player ship.
13:48:23.003 [script.javaScript.exception.ooliteDefinedError]: /home/super/.Oolite/AddOns/railgun.oxp/Scripts/railgun-projectile.js, line 89.
No idea what caused them, but just passing on the info . . . HTH.
OXPs: Furball 1.8, Factions 1.12
- Commander McLane
- ---- 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 v 1.1 now available
They are caused by your ship colliding with one of the projectiles. I'm curious how you managed to do that.
It probably happens because the projectile is spawned too close to your ship when it's launched. See this post for instructions how to fix it.
Which ship are you flying? I'm interested to know which ship types need an adjustment of the firing position.
It probably happens because the projectile is spawned too close to your ship when it's launched. See this post for instructions how to fix it.
Which ship are you flying? I'm interested to know which ship types need an adjustment of the firing position.
- Commander Wilmot
- Deadly
- Posts: 206
- Joined: Thu Mar 17, 2011 10:12 pm
- Location: Somewhere in galaxy 1, flying my Diamondback
Re: Railgun.oxp v 1.1 now available
I tried SHIFT-F and nothing happened. Also when will version 1.21 come out.
I don't think that having the rail gun being a near-instantaneous weapon would be bad, necessarily. But under current conditions, it would probably unbalance it as it is only meant to be back up weapon. Maybe the twin plasma cannon will get improved in Oolite version 2.0.
As for the projectile collision error, i.e. shooting yourself in the face, I have had that, possibly due to low frame rate (as I use an hp netbook, I usually have decent frame rate though, and am running in low detail mode.) It doesn't seem hard to achieve, I already mentioned that I have had this error; what I didn't mention was that I was only going half speed when it happened. I had launched and pulled up away from the planet (I didn't want to drop a ton of depleted uranium on some farmer living on the planet's surface). I start firing a lot of rounds off and see...nothing, I go to an external view and see sparks coming out of the nose of my ship.Commander McLane wrote:They are caused by your ship colliding with one of the projectiles. I'm curious how you managed to do that.
It probably happens because the projectile is spawned too close to your ship when it's launched. See this post for instructions how to fix it.
I don't think that having the rail gun being a near-instantaneous weapon would be bad, necessarily. But under current conditions, it would probably unbalance it as it is only meant to be back up weapon. Maybe the twin plasma cannon will get improved in Oolite version 2.0.
Last edited by Commander Wilmot on Fri Apr 29, 2011 9:34 pm, edited 1 time in total.
- Commander McLane
- ---- 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 v 1.1 now available
I don't quite follow you.Commander Wilmot wrote:I tried SHIFT-F and nothing happened. Also when will version 1.21 come out.As for the projectile collision error, i.e. shooting yourself in the face, I have had that, possibly due to low frame rate (as I use an hp netbook, I usually have decent frame rate though, and am running in low detail mode.) It doesn't seem hard to achieve, I already mentioned that I have had this error; what I didn't mention was that I was only going half speed when it happened. I had launched and pulled up away from the planet (I didn't want to drop a ton of depleted uranium on some farmer living on the planet's surface). I start firing a lot of rounds off and see...nothing, I go to an external view and see sparks coming out of the nose of my ship.Commander McLane wrote:They are caused by your ship colliding with one of the projectiles. I'm curious how you managed to do that.
It probably happens because the projectile is spawned too close to your ship when it's launched. See this post for instructions how to fix it.
- How do you know that you have a 'decent' frame rate, if not by checking it? The only way to check it is to read it from the upper right corner of your Oolite window after pressing SHIFT-F.
- I have already explained to you that I assume your problem stems from the projectile being created too close to your ship. I also gave you detailed instructions on how to increase this distance. Have you followed these instructions? If yes, I would really like to know whether this fixed your problem, and therefore my assumption was right, or not. If no, I don't think I can do anything else for you.
- As I've already pointed out a few posts above, version 1.2 of this OXP will only work in Oolite 1.75.2, which doesn't exist yet. I have no knowledge when Oolite 1.75.2 will be released.
Here's a screenshot of how the FPS-display toggled by SHIFT-F looks like, with explanations about what the numbers mean:
- Commander Wilmot
- Deadly
- Posts: 206
- Joined: Thu Mar 17, 2011 10:12 pm
- Location: Somewhere in galaxy 1, flying my Diamondback
Re: Railgun.oxp v 1.1 now available
I don't quite follow you.
- How do you know that you have a 'decent' frame rate, if not by checking it? The only way to check it is to read it from the upper right corner of your Oolite window after pressing SHIFT-F.
- I have already explained to you that I assume your problem stems from the projectile being created too close to your ship. I also gave you detailed instructions on how to increase this distance. Have you followed these instructions? If yes, I would really like to know whether this fixed your problem, and therefore my assumption was right, or not. If no, I don't think I can do anything else for you.
- As I've already pointed out a few posts above, version 1.2 of this OXP will only work in Oolite 1.75.2, which doesn't exist yet. I have no knowledge when Oolite 1.75.2 will be released.
- first of all I have played other games with higher system requirements and better graphics than Oolite on it, with a decent frame rate. It is not impossible that my frame rate is worse with Oolite, though. And I did press SHIFT-F; I didn't get Oolite to display anything.
- My netbook is having trouble charging, so I'm using my desktop, which doesn't have Oolite on it, once I get it working again I'll try it and tell you. Either way, I will be watching what comes of this oxp.
- I missed the comment that "Version 1.2 will only work with current trunk."
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Railgun.oxp v 1.1 now available
The only way to know whether you have a “decent” frame rate is to consider whether it feels annoyingly jerky or not. No magic number will make a subjective judgement for you.Commander McLane wrote:How do you know that you have a 'decent' frame rate, if not by checking it? The only way to check it is to read it from the upper right corner of your Oolite window after pressing SHIFT-F.
E-mail: [email protected]
- Commander McLane
- ---- 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 v 1.1 now available
While this is certainly true, I wonder why SHIFT-F doesn't bring up the display for Commander Wilmot. This used to be a vanilla Oolite key. Has that changed to be only available in connection with Debug.oxp recently?Ahruman wrote:The only way to know whether you have a “decent” frame rate is to consider whether it feels annoyingly jerky or not. No magic number will make a subjective judgement for you.Commander McLane wrote:How do you know that you have a 'decent' frame rate, if not by checking it? The only way to check it is to read it from the upper right corner of your Oolite window after pressing SHIFT-F.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Railgun.oxp v 1.1 now available
No, it should work in all configurations (although in custom “deployment” builds it will only show frame rate, not the other stuff).Commander McLane wrote:While this is certainly true, I wonder why SHIFT-F doesn't bring up the display for Commander Wilmot. This used to be a vanilla Oolite key. Has that changed to be only available in connection with Debug.oxp recently?
E-mail: [email protected]
- Commander McLane
- ---- 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 v 1.1 now available
Perhaps Commander Wilmot has a custom key configuration withAhruman wrote:No, it should work in all configurations (although in custom “deployment” builds it will only show frame rate, not the other stuff).Commander McLane wrote:While this is certainly true, I wonder why SHIFT-F doesn't bring up the display for Commander Wilmot. This used to be a vanilla Oolite key. Has that changed to be only available in connection with Debug.oxp recently?
key_show_fps
not defined?Anyway, the problem with launching the projectile inside the player ship is that the script has to make an educated guess how big the player ship actually is. For that I'm using
player.ship.collisionRadius
and add a couple of meters for safety. Obviously this gives only more-or-less-good results, depending on the player ship's geometry.For a better approach it would be helpful if I could access the actual ship size through JS. Therefore the request (post-1.76, I guess): is it even possible to expose things like length, width, and height of an entity to JS (they're not even in shipdata, only in the DAT-file)?
As a workaround, what about things like
weapon_position_foo
, view_position_foo
, missile_launch_position
and aft_eject_position
(and, while we're at it, scoop_position
)? Can they be exposed to JS (presumably read-only)? Then I could use for instance the missile launch position and add a couple of meters to the z-component.EDIT: I'm putting this in scripting requests as well.