I've broken the 7 ly limit! (sort of...)
Posted: Thu Dec 30, 2010 10:18 am
From browsing the forums, there are a few things that keep on getting requested... Laser cooling boosters, a garage that enables you to own multiple ships, and a way to jump more than 7 light years...
I've often found in programming that I develop a greater understanding of how and why things work by making mistakes, and finding out why things don't work! Now, laser cooling boosters I don't see the need for, and have no interest in. I had a bash at writing a garage oxp, to see exactly why this idea wouldn't work, and in doing so, became more familiar and comfortable with shipdata.plists, began to get my head around what things were available in scripting, and even worked out how to make cloaking devices and naval energy units available for Jamesons!
Which led me to my next task - trying to circumvent the 7 ly rule.
It's a rule which is hard-coded into Oolite - no ship can jump more than 7 light-years at a stretch. But I then realized that you can make jumps without using any fuel, by following through a wormhole left by somebody else! So, what I've done is managed to make a piece of equipment (installed as a mine on an empty pylon) which, when fired, will trigger a chain of wormholes.
Your target destination is selected on the galactic map. You use the equipment. It follows the path to the targeted system using fewest jumps. A wormhole to the first system on that route is created. You then head through this wormhole, and arrive in the next system. There, you find a wormhole to the next system already created, and so forth...
This has primarily been an exercise in programming for me, and understanding the different classes, and getting to grips with the various events. But if there is interest around, I might have a bash at tidying it up, and releasing it as an oxp.
Things I would probably do:
I am also aware that this would affect various missions. "Long Way Around" would take far less time, the Nova mission could easily be missed, and in "Thargoid Plans", the skirmishes with the thargoids could be easily escaped. There might also be issues with "Trident Down", where events happen based upon the number of hyperspace jumps the player has made. These are a few examples, and there are probably others which I can't think of off the top of my head.
The obvious thing would be to say that it's the player's choice to use the equipment or not, or even to install it, but I find the missions to be a fun and enjoyable part of Oolite, and would not wish to affect them. Therefore, I might try and make it compatible with these things if possible, either by outright disabling it being bought, or causing it to constantly mis-jump/fail. I'd have to look into it and see what I could do...
Questions, comments, corrections?! Feedback is welcomed...
(There are still a few hiccups - every now and again, the "ship" doesn't seem to make it through its own wormhole and doesn't appear on the other side, which, while possibly a useful thing in itself, needs explaining. But apart from that it seems to be working pretty well.)
I've often found in programming that I develop a greater understanding of how and why things work by making mistakes, and finding out why things don't work! Now, laser cooling boosters I don't see the need for, and have no interest in. I had a bash at writing a garage oxp, to see exactly why this idea wouldn't work, and in doing so, became more familiar and comfortable with shipdata.plists, began to get my head around what things were available in scripting, and even worked out how to make cloaking devices and naval energy units available for Jamesons!
Which led me to my next task - trying to circumvent the 7 ly rule.
It's a rule which is hard-coded into Oolite - no ship can jump more than 7 light-years at a stretch. But I then realized that you can make jumps without using any fuel, by following through a wormhole left by somebody else! So, what I've done is managed to make a piece of equipment (installed as a mine on an empty pylon) which, when fired, will trigger a chain of wormholes.
Your target destination is selected on the galactic map. You use the equipment. It follows the path to the targeted system using fewest jumps. A wormhole to the first system on that route is created. You then head through this wormhole, and arrive in the next system. There, you find a wormhole to the next system already created, and so forth...
This has primarily been an exercise in programming for me, and understanding the different classes, and getting to grips with the various events. But if there is interest around, I might have a bash at tidying it up, and releasing it as an oxp.
Things I would probably do:
- Add another piece of equipment that works on the shortest time route. (Looks easy to do...)
Build in a failure rate and a chance of mis-jumping. (And possibly heading off course...)
Decide on a price, and where said equipment could be bought. Possibly only make it available to commanders of a certain rank, or maybe amount of credits/total worth, as I know that there are some commanders out there who play the game without killing people if they can help it!
Decide how long the wormhole should stay open for.
I am also aware that this would affect various missions. "Long Way Around" would take far less time, the Nova mission could easily be missed, and in "Thargoid Plans", the skirmishes with the thargoids could be easily escaped. There might also be issues with "Trident Down", where events happen based upon the number of hyperspace jumps the player has made. These are a few examples, and there are probably others which I can't think of off the top of my head.
The obvious thing would be to say that it's the player's choice to use the equipment or not, or even to install it, but I find the missions to be a fun and enjoyable part of Oolite, and would not wish to affect them. Therefore, I might try and make it compatible with these things if possible, either by outright disabling it being bought, or causing it to constantly mis-jump/fail. I'd have to look into it and see what I could do...
Questions, comments, corrections?! Feedback is welcomed...
(There are still a few hiccups - every now and again, the "ship" doesn't seem to make it through its own wormhole and doesn't appear on the other side, which, while possibly a useful thing in itself, needs explaining. But apart from that it seems to be working pretty well.)