Jump to content

Ability to turn off specific Engines


ADCOne

Recommended Posts

Simply put I would like the ability to turn off specific engines to save fuel either by specific engines only working at specific heights or allowing engines to be controlled by manual buttons (I have tried this with atmospheric engines and they do not turn the engines off and on).

 

To explain what I want this for please read the below:

I realise that the atmospheric flight in this game uses gliding/aerodynamics for lift so the downward atmospheric engines is probably not a thing for most players. However, I would like to use atmospheric engines to aid lift off and landings especially with heavy loads allowing for slower landing speeds.

 

This could be done by setting downward atmospheric engines as active only between something like 90 (start when the hover engines turn off) to 500 meters from the ground or with manual buttons to control the engines.

 

Currently downwards atmospheric engines are always on and burn through fuel really quickly, hence why I want the off most the time.

Link to comment
Share on other sites

I did give this a try based on the video but the scripts seem to have changed a bit since that was posted. I did get it kind of working to start with in that I could start piloting the ship and the engines were off then I pressed the option 1 key and they would go on but I could not get these to go off again unless I stopped flying the ship and then started flying again (the engines would start on their own) and then I could use the option 1 key to turn them off.

I am sure it will be something I have done incorrectly due to the changes made since the video especially since I tried some other places for the code and it stopped working altogether (the engines were on all the time).
I will have to revisit this again when I have had some time to learn more about the LUA code.

Link to comment
Share on other sites

It works for engines (that video).

It doesn't work for hover engines / vertical boosters - which is potentially the same problem you are encountering expanded to other engines. I'd urge you to submit a bug report as it is clearly not working as intended - but like a lot of these little pesky issues, they get ignored because most people just grumble and don't let the devs know there is an issue (or there is a small group of people who do, so the issue seems to be much "lesser" on the receiving end).

For the engines to turn off - I found that all you have to do is go in the direction those engines are working (eg. I have Auxiliary thrusters which I would like to keep turned off in space, toggling the ALT key to turn them off will keep them on until I manually push "down" on my keyboard which cycles them to off) - Again, I'm quite sure this is now how the script was intended to operate and it's glitchy, but it's workable for engines at least in my experience :)

Do you have them turned "off" by default and do they stay off until you turn them on?

  

On 1/6/2021 at 7:29 AM, NQ-Naunet said:

Hey @ADCOne! If you try what @fiddlybits suggested, I'd love to hear how it turns out. :) 


Thought I'll add to this - yeah it works but hover engines / vertical boosters are not working 90% of the time and behave oddly when assigned to the script. I've submitted a bug report a while back on this, but this has been the case for months now since I've added the script following that video.

EDIT: Also also - would it not be a very simple fix to have engines be able to be toggled by a manual switch / button for those who would prefer to not use LUA for whatever reason - like lights or any other element that switches control? Too much lua does seem to lead to frame drop at the moment after all...

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for the reply and sorry I have not tried the scripting again yet.

 

 I am actually trying to turn on an off atmospheric engines and to give you an idea of the ship design I have short video of the ship (Unlisted link) and this shows the engines located at the sides of the ship pointing downwards in an always on state. This is a recording I did of my first 1G transition from space to Atmosphere and its a good build for a ship, it needs two more engines at the back and two more hover engines to cope with the full load (over 2,200 tones total weight).

 

I have found a work around by giving these engines a fuel container per side (two engines per one of the second smallest fuel containers and there are four engines), and all I do is put fuel into these containers when I want them active. You can see that the fuel consumption is really quick since it shows about 7 minutes for 2240 tones of fuel to be used up (4480 tones total of fuel when considering the other side of the ship too) and it gets over halfway through the tank in the video.

 

 

Link to comment
Share on other sites

  • 2 months later...

So I have tried again today with this and the best I can manage is to have the engines I want to control turned off when I start the ship and then I can turn them on any time I want but what I cannot do is turn them off again. Also weirdly the engines seem to turn on when my engine group is set to false (super weird).

 

Anyway the details of what I have added to the LUA is below and I called my engine group DTHE (The custom engine tag). If anyone has any ideas why this is not quite working and turning on when it is false that would be helpful. (Obviously I have no idea what I am doing in LUA)

 

I did these lines of LUA based on the YouTube video supplied:

 

Slots -> Unit & Filters -> Start()

DTHE = True

 

Slots -> System & Filters -> ActionStart(Option1)

DTHE = not DTHE

 

Slots -> System & Filters -> Flush()

if not DTHE then Nav:setEngineCommand('DTHE', vec3.zero, vec3.zero) end

 

Thanks in Advance

Link to comment
Share on other sites

  • 5 months later...
On 1/5/2021 at 6:29 PM, NQ-Naunet said:

Hey @ADCOne! If you try what @fiddlybits suggested, I'd love to hear how it turns out. :) 

@NQ-Naunet

So I have not figured out how to turn the engines off but I can turn them on and today was the first time I needed to use them.

 

I overloaded my ship in 1G when stationary while carrying one of the NPC Hauling mission packages (from Madis). It took me a minute to realise once I touched down that my Hover engines could not produce the lift needed to lift the 2.47 KT of ship and cargo so Turned on the engines with the key and the worked perfectly to get me the rest of the way to the destination. Which is almost exactly what I planned to use them for :)

 

(I probably should give the turning off another go)

 

Anyway below is an image of them working and the weight load being carried by my small ship.

dualuniverse_2021-09-18_19h59m04s.png

Link to comment
Share on other sites

  • 4 months later...

@NQ-Naunet LOL, took so long to figure it out but putting a post here to explain what I was missing and how it works:

(The video explains all the Lua code you need so you can watch that and just read the bit that took me a while to figure out, to save you some scratching head time).

 

If anyone was wondering the LUA code does work, but (The dreaded but) to turn off the engine you have to press the down button 'c' by default before you toggle off the engines otherwise the engines just stay at max power because the code seems to keep them at the last thrust value they were using.

 

I have no idea what this is since I  just turn them on an off rather than freeze the 'change in thrust value' to what that is when the engine tag is set to false but it works so I cannot complain. Thanks for the help with this and the code used was as follows I called my engine tag DTHE (Stands for something like Down Tag Heave Engine - I forgotten what it was ?
 

Slots -> Unit & Filters -> Start()

DTHE = False

 

Slots -> System & Filters -> ActionStart(Option1)

DTHE = not DTHE

 

Slots -> System & Filters -> Flush()

if not DTHE then Nav:setEngineCommand('DTHE', vec3.zero, vec3.zero) end

 

So all I have to do is press C when I want to turn them off and then press the option 1 button (I have set to keypad + button).

 

It makes a big difference when overloaded in a 1G environment but with the fuel tanks I am using the four engines only last about 2 to 3 minutes of flight time so you have to be quick!

 

Thanks for all the help with this one :D

Link to comment
Share on other sites

Maybe an idea to look into is to toggle your engines based on the weight you are carrying. I have a ship which has 8 advanced Military Atmosphere L engines and 6 rare Military Atoms engines. 

The rare engines are in 3 pairs of 2 engines tagged which I toggle in a LUA script. The LUA script reads the total weight of my ship + cargo. When passing certain thresholds I fire up a pair of engines. I never use to much engine power and fuel :)

 

ps: another advantage is that with full power, on an empty ship, I tend to reach max speed too fast, that (if I do not pay enough attention) I completely burn in the atmosphere :). With the engine toggled automatically on the ships weight, I no longer have this 'problem'.

Link to comment
Share on other sites

I am joining this thead because I fully supportthe idea of the starter.

I once tried as seen in that Youtube video, but it did not work for me, I believe somewhere was an error in my script. My fault. But I could never find that error.

Now, with the global shortage of processors, I cannot et the defunct game graphic card of my game computer being replaced, and ended up using a basic p and Nvidia Geforce Now streaming graphic client. That client does not allow copying/pasting between game and outside game, so I can forget to copy any script and paste it inside the game. Thatnks to those greedy crypto currency miners. They get rich and we normal people suffer.

I would want such a button to switch off entire groups of engines, because if making only atmospheric flights I do not wish my space engines to start. Or even to reduce the max speed of my ship with atmo engines.

Link to comment
Share on other sites

On 1/29/2022 at 4:15 AM, Hirnsausen said:

I am joining this thead because I fully supportthe idea of the starter.

I once tried as seen in that Youtube video, but it did not work for me, I believe somewhere was an error in my script. My fault. But I could never find that error.

Now, with the global shortage of processors, I cannot et the defunct game graphic card of my game computer being replaced, and ended up using a basic p and Nvidia Geforce Now streaming graphic client. That client does not allow copying/pasting between game and outside game, so I can forget to copy any script and paste it inside the game. Thatnks to those greedy crypto currency miners. They get rich and we normal people suffer.

I would want such a button to switch off entire groups of engines, because if making only atmospheric flights I do not wish my space engines to start. Or even to reduce the max speed of my ship with atmo engines.

I don't understand, you ask NQ for this button?

I rather see NQ spend their time on things that would make something new in the game or work on bugs/improvements.

 

What you want is already possible in the game. Did you ask the community for help? I am sure there are may people that are willing to help ?

 

ps: pm me in discord and I can send you my script, I can even explain how I did it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...