Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
weretygr

Registered:
Posts: 18
Reply with quote  #1 
Maybe I have missed this somewhere but as our crew moves around the universe, energy becomes a problem.

Is there a way to code gaining/depleting energy from being within a nebula with the nebula type affecting the amount of energy gained/depleted? Can the new "silent running" feature affect this?

We have a scenario that requires the crew to cross multiple sectors to deal with an emergency and this would help to keep the crew immersed and let science shine by plotting the best course to gain energy while in transit.

Thanks!
ryleyra

Registered:
Posts: 2,910
Reply with quote  #2 
Gaining energy from a "ram scoop" is a scripting technique used primarily by the TSN Sandbox. The mission "Havoc in the Hamak Sector" also has a ram scoop which works to gain energy in nebulas. Unfortunately, there is no way to do that in the standard game modes. It's only available in scripts.

There are several "standard" ways to gain energy in the game:

1) Docking with a base, of course.
2) Most friendly ships in a sector will have spare energy that you can use. Get Comms to hail them.
3) Side missions reported by Comms can give energy as a reward.
4) Certain anomalies, the ones identified as "HiDens Power Cells", give 500 energy when picked up.
5) Some enemies, when killed, will leave behind a Wreck. Destroy the wreck and it will drop anomalies.
6) Most monsters will drop anomalies when killed.
7) Pirates can ask for surrender and then "loot" energy from the surrendered ship.

So you can survive on long trips between bases by hunting monsters, or getting allies to position themselves as refueling points along the way. You'll have to set Monsters and Friendly Ships to "Lots" in the configuration settings to make the most use of this feature. Of course, in normal game modes you will not have that far to go, and you're intended to stay near the bases where you can protect them.

If you are working on a script, there is a lot more you can do to extend the range of your ship. Travelling between sectors depends a lot on how you implement that travel. If you're doing edge-to-edge transitions, you'll need refueling stops, or to use one of the techniques below. If you're using "jump gates", which is a point on the map which jumps you to another map, you don't need as much energy.

1) Add 500 energy at every map transition. This will extend range, and you can say the energy regenerates over long distances.
2) Use the topSpeed property to raise the ship's Warp speed on empty maps. Warp 1 costs the same amount of energy whether it moves at 1x or 10x speed, so you'll go farther on the same energy.
3) Implement a ram scoop. This used to be hard to do, but with Comms buttons you can implement it easily. Just put the button on a timer so it can't be used all the time.
4) Speed up the ship or add energy when the ship is in a given location. This can be a sort of "space lane", where as long as you follow the lane, you gain energy. For instance, a lane across the sector would be between z=49000 and z=51000.
5) You can gain energy from nebulas by testing if you are in the nebula (and which type you're in) and adding energy. Otherwise, it is as the "space lane" idea. You could also gain energy near black holes, or create a new type of object with a generic mesh.
6) Add refueling stations along the way. Obviously, you can just add a base but a transport ship would work just as well, with code to have the transport add 500 or 1000 fuel when the ship gets in range. (I don't think friendly ships automatically give you energy as in the standard game, you have to script it)
7) Drop HiDens Fuel Cell anomalies along the path.
weretygr

Registered:
Posts: 18
Reply with quote  #3 
Thanks for the deep dive.  I'll see what I can do to add it to the base sandbox script.
ryleyra

Registered:
Posts: 2,910
Reply with quote  #4 
The Sandbox script (Xavier's TSN Sandbox, not my Simple Sandbox) should have a ramscoop function. I know Xavier was tweaking it, but I think it's still a feature of the Sandbox. If not, the 500 energy at map transition idea or implementing your own ramscoop should work fine.

Another idea I've had is configuring the engines for "long range mode". This would take considerable time, and disable beams and shields, but energy cost for warp would go way down. Implementing this in a script would be complex, but could be as simple as adding energy while the ship is at warp, but damaging beams and shields. I think with the new engineering setting properties, you could even read if the engineer has cut power to beams and rear shields (assuming forward shields are needed for warp, maybe at 50% power) and switch back to "combat warp" if either is powered back up.

If you're running low on energy in MY Simple Sandbox script, let me know. I could add more energy at the end of each mission.
weretygr

Registered:
Posts: 18
Reply with quote  #5 
Love the community and how we support ideas. I love the "long range engine" idea and would love to see it implemented in a similar manner to the "silent running" i.e. messages and DMX cues on activation and deactivation.

Time to dust of the editor and see what carnage I can create.
davidtrinh

Registered:
Posts: 59
Reply with quote  #6 
I would love to figure out how to write in map transition and ram scoop into my scripting engine. Any logic or tech notes available for me to read to get my head around before I start looking at code?
ryleyra

Registered:
Posts: 2,910
Reply with quote  #7 
Well, first of all I would say you need to think about code to clear the sector. Terrain can be cleared with the "remove" command for unnamed objects, including "remove all". Then you will have to either save the name of all named objects, or use a pattern that you can use to delete them. Xavier has some great code he uses to delete all ships with the name pattern <letter><digit><digit>.

Remember that Black Holes and anomalies need to be deleted by name too. The names of Black Holes don't show up on the map, so what I do (I only ever create one Black Hole) is just name it "Black Hole". Anomalies also show up as "ANOM" even if you name them something else. I like to use "ANOM<number>".

There are still some objects that can't be deleted and will be left behind when you "exit" a sector. I think that drones can be deleted, but I don't think torpedoes are. You'll have to just ignore them as unimportant.

You then need routines to create each of the sectors you can enter. Xavier's code just includes each as a separate event. I use randomized variables to generate my sectors, so I can just reuse the same code, as long as it's okay that you never enter the same sector twice. I'm currently working on code that will save the locations of terrain in at least two sectors, allowing you to swap back and forth between them, but with both being random. But that's a ways in the future.

Map transitions are easy enough, you just switch when x or z is close to 0 or 100000. But for robustness you probably want to pause to ask the crew if they want to proceed, or have Comms initiate the "jump" to the next sector. Of course, if the crew isn't asked to confirm the switch, they can just switch back by turning around and exiting the map the other way, as long as your sectors are static.

As I said, a ram scoop can just be initiated with a Comms button. You probably want code to make sure that energy is only gained as long as the ship is in motion, possibly at Impulse only. (Going to warp will shut it off) You could also make the ram scoop only work in nebulas or certain parts of the sector.
LawsonThompson

Registered:
Posts: 587
Reply with quote  #8 
Random idea while I'm skimming through: Elite Dangerous uses the concept of a fuel scoop, but only when you're flying very close to a star. It can be a risky procedure for unskilled pilots, and heat management can be an issue if you get greedy.

The Artemis equivalent--namely, gaining power through a somewhat risky maneuver--would be to create a bit of lore through which the extreme radiation near a black hole can be used to refuel.

If I were crafting such a thing, I'd first determine what distance from a black hole is the edge of the escape horizon at warp 1 + 150%, then have the script add energy while Artemis is at that distance.

And make sure every engineering system takes on heat while this method of refueling is going on, because... um... tension!

I once wrote a script where a jump drive equipped player ship had to rescue a stranded NPC ship. The NPC was position in JUST the right spot that the gravity well of the black hole would pull in the NPC ship in about 5 minutes unless Artemis intervened. Oh, and did I forget there's an enemy fleet closing on the NPC ship too? Heh...

__________________
----
Visit us at http://www.ltebridge.com
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,265
Reply with quote  #9 
Quote:
Originally Posted by LawsonThompson
Random idea while I'm skimming through: Elite Dangerous uses the concept of a fuel scoop, but only when you're flying very close to a star. It can be a risky procedure for unskilled pilots, and heat management can be an issue if you get greedy.

The Artemis equivalent--namely, gaining power through a somewhat risky maneuver--would be to create a bit of lore through which the extreme radiation near a black hole can be used to refuel.


This is a pretty cool idea! I hope you can make it work.

Like many features of the Artemis software, I believe the "energy scarcity" problem is built in because of the behavior of newbie players. In the original Artemis software from 2010 the player ship didn't need to refuel as often and was a lot more autonomous. But at conventions Thom observed that a favorite activity of first time players is to immediately blow up all TSN bases. He wanted players to quickly learn that the TSN bases are important.

In my experience the behavior of first time players still hasn't changed. They love to rampage around the galaxy blowing up everything in sight, especially things that don't shoot back.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
ryleyra

Registered:
Posts: 2,910
Reply with quote  #10 
Quote:
Originally Posted by LawsonThompson

I once wrote a script where a jump drive equipped player ship had to rescue a stranded NPC ship. The NPC was position in JUST the right spot that the gravity well of the black hole would pull in the NPC ship in about 5 minutes unless Artemis intervened. Oh, and did I forget there's an enemy fleet closing on the NPC ship too? Heh...


The Research mission in my Simple Sandbox has you sit on the event horizon of a black hole while the scientist gathers data. If you get too close you'll be drawn in, but if you get too far away you have to start over. Helm basically has to sit on the controls keeping you in the "sweet spot". It can actually be pretty difficult, but it's the only part of the Research mission where you don't have to face an enemy - the black hole itself is the danger.

Also, in response to Mike's post, it seems like experts should be able to REDUCE energy use, not reduce it as with a difficulty increase. Maybe you could have a "Newbie/Normal/Advanced/Expert" toggle that changes the energy profile of the ship. (At Expert setting, for instance, you use less energy at warp, but combat tactics take a lot more strategy and energy handling tactics)

If Thom had a selectable sector size, that could also influence the combat to travel ratio of energy use. A 10,000,000 by 10,000,000 sector would not be traversable under current energy requirements, as I found out with my Sector Size Mod.

Xavier Wise

Registered:
Posts: 1,058
Reply with quote  #11 
Hello! I have been following along in this thread but don't have much chance to post. I am happy to share some of the code from my sandbox if you want to use it. We have a 'fuel collection system' inspired by Mike S' original ramscoop in Havok in the Hamak sector. Interestingly, our most recent of the TSN Mod we've made our ships really energy efficient in warp, but not so in combat. It really works too as we're experienced and have a lot of RP reasons for not wanting allied stations to die.

We're still fine tuning bits, but I'll post up links to both in the next few weeks or so if you want. Quite happy for you to take a look, borrow bits etc. I think somewhere around these forums or the wiki are code snippets that I have posted too - things that can potenially just be copied and pasted into missions if needed. If you want, I can post bits here when I have the chance too.

__________________
Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
davidtrinh

Registered:
Posts: 59
Reply with quote  #12 
Quote:
Originally Posted by Xavier Wise
Hello! I have been following along in this thread but don't have much chance to post. I am happy to share some of the code from my sandbox if you want to use it. We have a 'fuel collection system' inspired by Mike S' original ramscoop in Havok in the Hamak sector. Interestingly, our most recent of the TSN Mod we've made our ships really energy efficient in warp, but not so in combat. It really works too as we're experienced and have a lot of RP reasons for not wanting allied stations to die.

We're still fine tuning bits, but I'll post up links to both in the next few weeks or so if you want. Quite happy for you to take a look, borrow bits etc. I think somewhere around these forums or the wiki are code snippets that I have posted too - things that can potenially just be copied and pasted into missions if needed. If you want, I can post bits here when I have the chance too.


That'd be great Xavier! So far ryleyra has noted how to clear objects off the map via named and unnamed. I believe I know how to make the vessel appear as though it is transition by moving it when it hits the border. The next question is how does one keep track of where you are? Is there a logic pattern you are using to indicate where in the universe you are. For instance, if I wanted to have a a 10 by 10 system and I start at 1x1, how do you keep track each time a transition occurs? This of course can scale based on the scripted engine where it can create what ever the largest size system memory can hold. Can the Artemis engine hold a 100 by 100 system map in memory for example? I know that is a long way to fly from one corner to the other. Thank you for offering to share you knowledge and experience.
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,265
Reply with quote  #13 
You could build your 10x10 campaign grid by tracking X and Y coordinates if you like, but that would make this conversation confusing. Let's call your variables J, K, and NewSector.

Suppose the player ship reaches the left edge of the map (99999). You change the X coordinate to the right edge of the map (000001), increment the J variable, then set a NewSector=1.

In another part of the code, if NewSector=1 erase all objects in the sector.

Then make 100 blocks of code to draw new sectors, like so:
If NewSector=1
If J=1
If K=1
Draw sector 1,1
Set NewSector=0

If NewSector=1
If J=2
If K=1
Draw sector 2,1
Set NewSector=0

etc.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Fish Evans

Registered:
Posts: 360
Reply with quote  #14 
Depends what you mean by "hold in memory" if you mean sectors with pre layed out stations, nebular etc then the answer is quite a lot! if you mean a sector that you have just moved out of and the player has made some dynamic changes, and are going to move back into later on and expect ships and so on inside that sector to remain consistant then the answer is none unless you start doing a looot of extra code to check for every posible entertity.

the TSN Sandbox has a lot of sectors in it, althogh they are not aranged in a single grid but multiple systems with jumpgates between each system have a look at the below link for the sandbox map.

http://www.1sws.com/Intel/Nav/index.php?sector=Atlantis&entType=gates


There is I believe head way on a community made Artemis "headless" server that has the potential to simulate multiple sectors simultaneously and allow multiple player ships to move freely around the sectors, but I havnet touched base with the developers in a while.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.