Members | Sign In
All Forums > Mission Scripting
avatar

Snippet for fuel collection system for use on long range operations and patrols

posted Apr 09, 2013 15:00:54 by xavierwise.tsn
As part of the TSN RP group, I have been developing a mission script in a newly explored sector. The mission I have written requires the crew to follow a patrol route set up around the sector. Due to it being newly explored, only one outpost is in the sector for resupply and refuelling. The other evening we tried the mission and I was annoyed by the range of our ship. We continually had to leave the patrol route to return to the starbase and refuel as our energy was low.

I have therefore created a code snippet that can be used to equip player ships with a system of refuelling when conducting long range patrols like the one I have designed, whether in a sector with no starbases, or with limited bases for refuelling. The code in on the wiki here, and instructions on the system's operation are included.

The idea was inspired by the "Ramscoop" from the Havok in the Hamak sector mission. The actual method of refuelling does differ however; the Engineer must activate and deactivate the system, you are not restricted to using it in a particular area and the recharge rate is lower (20 units every 3 seconds). The fuel system is not without its limits either, and there are restrictions to using the system and penalties for using the system incorrectly.

Please feel free to use the code in your own missions.
[Last edited Apr 09, 2013 15:54:34]
page   1 2 next last
27 replies
avatar
michaelhermanns said Apr 09, 2013 15:36:44
wow, great idea! I like that. Thank you for sharing!

Right now, i have the idea of letting communications "call for help" if they are in need of technical assistance (DamCon down oder no fuel). A TSN Transport would be spawned from the nearest station and fly to the player's vessel. Once it reached them there, it would trigger the refueling/repair-script. Then the Transport returns to the station and would be deleted.

Hmmm, have to think about that.
avatar
TreChipman said Apr 09, 2013 17:36:52
Nice! Do you mind if I post it here?
I'm not a mad scientist. I'm an angry one. You'd be wise to fear the latter.

Visit Artemis Command!
avatar
xavierwise.tsn said Apr 12, 2013 15:37:20
Michael, I scripted a mission where a supply vessel accompanied you on a long range exploration in to a new sector. It entered the sector and then held position. The indicator on the science console changed to a base indicator (round circle). The ship then acted as a base, however it remained looking like the ship that had followed you in to the sector.

In the script, I actually destroyed the original vessel and created a base in the same position. By selecting the "TSN Transport" Hull ID rather than the base, I was able to keep the same ship, so when you docked it looked like you were linking up with the ship, not with a base.

You could do something similar, where the ship travels out to you. When it gets within 400m it switches to being a base and you simply initiate the dock. When you undock, the ship can then switch back to being a normal ship and head back to the original station. On the science console, the indicator would change, and if you watch it, the angle that the ship is facing will switch, but other than that, the ship would look the same. I think some embarrasing comms messages would be fun to add as well; something that highlights the fact that the most advanced ship with the "best" crew now needs rescuing!

Tre, feel free to repost the code. I have put the code on to the Wiki for people to access already though, and have included instruction on how it operates, as well as how to add it in to a mission.
avatar
michaelhermanns said Apr 14, 2013 07:34:14
OH, i forgot about the docking part.... thank you captain, i will try this.
avatar
TaigiaReilly said Apr 18, 2013 23:23:06
So I need to know, can this be used in invasion? My crew loves do use jump drives but the energy cost makes it next to impossible at higher levels.
avatar
Captain said Apr 19, 2013 00:05:10
No. It requires you to insert it into the mission script. So you have to make the mission with it. Unless of course you have a lot of experience coding. Then I suppose you might be able to add this in as a mod to the code. But it would likely require a lot of reworking.
To Mankind
And the hope that the war against folly may someday be won, after all

Isaac Asimov
avatar
TaigiaReilly said Apr 19, 2013 00:11:13
Crap. Thankfully I know nerds with lots of experience coding.
avatar
TaigiaReilly said Apr 19, 2013 01:02:51
I hope in a future build of the game that we don't have to trick the game so much to do all these amazing things.
avatar
Captain said Apr 19, 2013 01:10:48
Yeah It would be nice to insert things directly into invasion mode to try out this stuff. I also want to try the DamCon deaths posted on the wiki but I have the same problem.
To Mankind
And the hope that the war against folly may someday be won, after all

Isaac Asimov
avatar
TaigiaReilly said Apr 19, 2013 01:29:35
I just want to be able to use a jump drive at level seven or higher without a)waiting for them to be almost on top of me. Or b)Use all my torpedoes for energy after the jump then impulse my way back.
avatar
TaigiaReilly said Apr 21, 2013 01:51:15
For idiots how do you get this to work? We tried to run it as instructed but none of us are really coders. Please help. We'll need this so we'll try some of the longer mission mods.
[Last edited Apr 21, 2013 02:02:12]
avatar
lucas99801 said Apr 22, 2013 08:18:17
Okay Taigia. I haven't actually used this before but I know the concept of putting it into a mission.

What you need to do:
1) Get a mission to add it to, example HamakSector
2) Open HamakSector.xml in notepad
3) In a browser, navigate to the wiki linked above
4) Copy everything in the first block of code on the wiki.
5) Switch to notepad and locate the string "</folder>" or "</event>" (there will be many, just pick one)
6) Paste the code on the next line (create a line break if you have to)
7) Repeat for System damage block (if you need to)
8) PROFIT???

Hope that helps!

</extremely tired boredom reply>
Hosting a Mumble (Murmur) server @ tsnfenrir.no-ip.org
Having trouble connecting to the TeamSpeak channel: http://tsnfenrir.no-ip.org/ts3
Helm Script for Numerical heading input: https://dl.dropbox.com/u/10193809/ArtemisHelmFSW.zip
Twitter: @lucas99801
Facebook: /lucastarnold
avatar
lucas99801 said Apr 22, 2013 08:21:40
P.S.

Those codeblocks don't include the "get client key presses". I'm unsure of e XML to add, but if you're using the mission editor simply create an action in the start block and have it as "Start getting client key presses from Engineering"

And you should be good after that
Hosting a Mumble (Murmur) server @ tsnfenrir.no-ip.org
Having trouble connecting to the TeamSpeak channel: http://tsnfenrir.no-ip.org/ts3
Helm Script for Numerical heading input: https://dl.dropbox.com/u/10193809/ArtemisHelmFSW.zip
Twitter: @lucas99801
Facebook: /lucastarnold
avatar
xavierwise.tsn said Apr 22, 2013 19:37:46
Hey, if you want it on a particular mission, I can go in and add it easily enough for you. Just tell me what mission you want (and if you can provide the XML file that would be even better). It shouldn't take me too long to do (although I would have to find a little spare time to do it). Using the mission editor, it is really quite a simple process however.

It cannot be used in invasion mode (as mentioned above) and remember, missions currently don't support the use of jump drives.

The code has been tried and tested now and works nicely. I think using it in a mission where there are no star bases would make it very interesting, for example an intelligence gathering mission where you can hide in nebulas and such. You'd then have to seriously consider how you approach engagements and use your missile reserves. Not having to continually return to base just to refuel is a great advantage, although the restrictions and recharge rate make refueling more of an event. You need to be at the right speed, and with shields down, with the collection system activated. If you forget to deactivate, you soon know about it if you hit warp 1 or even just 100% impulse!
avatar
TaigiaReilly said Apr 22, 2013 21:56:58
Really we want it and as many missions as we can get. But the one we wanted to try it on the most was Wayward Son.
Login below to reply: