Jump to content
itsmeB3AR

vertical atmospherics

Recommended Posts

okay , so im trying to make a cargo hauler with vertical atmospheric engines. 

They turn on. Ship lifts up. But only way i can make it come down is to cut power to them with " c" 

 

How can i make them act like hovers ? 

 

And how can i make them turn off once im at altitude and moving ? 

Share this post


Link to post
Share on other sites

Don't know how to make them work like hovers but you can manage them like regular engines.  Reducing throttle till you land gently.  I am sure you can write a Lua script for them to work like hovers.

Share this post


Link to post
Share on other sites
5 hours ago, LouHodo said:

Don't know how to make them work like hovers but you can manage them like regular engines.  Reducing throttle till you land gently.  I am sure you can write a Lua script for them to work like hovers.

How do you make them work with throttle. ? Mine wont turn off at 0 throttle. 

I could manage if i could get them down. But i only way i can go down is to press c and cut the engines. Lol. Its quite scary 😅

Share this post


Link to post
Share on other sites
4 hours ago, Fendalton said:

Would be great if you could bind them to like spacebar lol

mine do work with space. And cut off with c. But i cant decrease altitude once im up. Which is essentially what im after. 

Share this post


Link to post
Share on other sites
3 hours ago, CptLoRes said:

They automatically stop once you get past the maximum vertical lift altitude.

whats the max vert lift altitude ? I easily had them still kicking 1500 metres up which isnt what i want. I need them just to get me up off the ground. Then disable. 

Share this post


Link to post
Share on other sites
9 minutes ago, itsmeB3AR said:

How do you make them work with throttle. ? Mine wont turn off at 0 throttle. 

I could manage if i could get them down. But i only way i can go down is to press c and cut the engines. Lol. Its quite scary 😅

I gave up trying to use vertical thrusters as they are a pain. Now for Haulers and Heavy Haulers I simply just add Hover Engines. They work perfectly to get you off the ground and for smooth landings.

Share this post


Link to post
Share on other sites
9 hours ago, itsmeB3AR said:

okay , so im trying to make a cargo hauler with vertical atmospheric engines. 

They turn on. Ship lifts up. But only way i can make it come down is to cut power to them with " c" 

 

How can i make them act like hovers ? 

 

And how can i make them turn off once im at altitude and moving ? 

Vertical atmosphere engines just arent worth it. They burn too much fuel, are too heavy, and not enough power. That being said you can still use them, and I know exactly what you are talking about. But you have to use some form of lua to shut them off while airborne or they stay on sucking your fuel dry even at 2500 alt. I dont know the lua but someone else did it for me a long time ago. But trust me, it's just poor design these days. If you need more thrust use rockets. If not use hovers/vert boosters.

Share this post


Link to post
Share on other sites

it's quite easy in fact: each engine has got tags which  tell him what it is done for, and you can change these tags yourself, or via lua programmation inflight.

https://dual.sh/codex/

in the chapter physic scripting, it give you the tags that can handle your engines.

I've used it in alpha to program vertical engines which I switch between vertical, idle and brake. it can really be done easily.

Share this post


Link to post
Share on other sites
26 minutes ago, coyote76340 said:

it's quite easy in fact: each engine has got tags which  tell him what it is done for, and you can change these tags yourself, or via lua programmation inflight.

https://dual.sh/codex/

in the chapter physic scripting, it give you the tags that can handle your engines.

I've used it in alpha to program vertical engines which I switch between vertical, idle and brake. it can really be done easily.

This is excellent! Thank you. 

Share this post


Link to post
Share on other sites
6 hours ago, itsmeB3AR said:

mine do work with space. And cut off with c. But i cant decrease altitude once im up. Which is essentially what im after. 

Did you checked to change the hover altitude with ALT+C permanently (permanently until next restart of the ship)?!

Share this post


Link to post
Share on other sites
10 hours ago, itsmeB3AR said:

How do you make them work with throttle. ? Mine wont turn off at 0 throttle. 

I could manage if i could get them down. But i only way i can go down is to press c and cut the engines. Lol. Its quite scary 😅

Unfortunately that I don't know.  I use alt+c to lower my altitude till I am in contact with the ground.  That is about the extent of my knowledge.

Share this post


Link to post
Share on other sites
11 hours ago, itsmeB3AR said:

whats the max vert lift altitude ? I easily had them still kicking 1500 metres up which isnt what i want. I need them just to get me up off the ground. Then disable. 

That dosen't sound right. The vertical isn't supposed to be able to go much higher then a hover. A long, long time ago they got nerfed because people where using them to shoot straight up into space.

Share this post


Link to post
Share on other sites

Vertical atmospheric are not efficient for hauling, but if you have wings they should mostly shut off when you get enough speed flying (at least they do when I tested it recently). Instead of using C you can just point towards the ground and fly forward to it.

Share this post


Link to post
Share on other sites

I have a set pointed at a 45 degree down angle, so I still get forward thrust, but also lets me use them for semi-vertical lift. good for flaring your ship on re-entry

Share this post


Link to post
Share on other sites
1 hour ago, Velase85 said:

I have a set pointed at a 45 degree down angle, so I still get forward thrust, but also lets me use them for semi-vertical lift. good for flaring your ship on re-entry

One of our ship designers has some in that orientation; he attests that they only fire when he pushes the throttle past 60%, which seems like an advantage, since you're generally wanting to lift at high throttle, and once you're at cruising altitude you can throttle back and save some fuel cos the angled thrusters turn off. 

Share this post


Link to post
Share on other sites

That is fairly accurate to how mine would work, but I did some added scripting to mine and linked it to the gyroscope; if I remember I will post the code snippet to here later this weekend.

 

But to give you an example, you can make a function on the engines to only fire based on x factor. For mine I wanted to to only really turn on the angled thrusters when under 300kh/r or my ship was pointed at a 30 degree angle or greater.

 

I was thinking about trying engines pointed down and have them only fire when under X height

Share this post


Link to post
Share on other sites
On 9/12/2020 at 3:42 AM, Kezzle said:

One of our ship designers has some in that orientation; he attests that they only fire when he pushes the throttle past 60%, which seems like an advantage, since you're generally wanting to lift at high throttle, and once you're at cruising altitude you can throttle back and save some fuel cos the angled thrusters turn off. 

Oh i havent tried that.  As im usually always at 100% thrust unless landing lol. 

Share this post


Link to post
Share on other sites
On 9/12/2020 at 7:48 AM, Velase85 said:

That is fairly accurate to how mine would work, but I did some added scripting to mine and linked it to the gyroscope; if I remember I will post the code snippet to here later this weekend.

 

But to give you an example, you can make a function on the engines to only fire based on x factor. For mine I wanted to to only really turn on the angled thrusters when under 300kh/r or my ship was pointed at a 30 degree angle or greater.

 

I was thinking about trying engines pointed down and have them only fire when under X height

Oh that sounds amazing. 

Id love to know how to add in only fire under x speed or x height. 

Ive asked many times in discord to help understand how to do it( scripting is not my strength at all 😅) and i need to be shown to learn. The codex doesnt realllly explain anything properly lol. 

 

Im really into the vtol aesthetic. So im not really fussed if they are inefficient or not. 

Vertical thrusters to which im using atm are useless at slowing my descent until im near ground. 

Where i want to be able to fire mine on approach etc and throttle down/up 

Share this post


Link to post
Share on other sites
7 hours ago, itsmeB3AR said:

Oh that sounds amazing. 

Id love to know how to add in only fire under x speed or x height. 

Ive asked many times in discord to help understand how to do it( scripting is not my strength at all 😅) and i need to be shown to learn. The codex doesnt realllly explain anything properly lol. 

 

Im really into the vtol aesthetic. So im not really fussed if they are inefficient or not. 

Vertical thrusters to which im using atm are useless at slowing my descent until im near ground. 

Where i want to be able to fire mine on approach etc and throttle down/up 

Vertical thrusters are good but also suck. It depends on how you use them. Like I said I use mine at an angle mainly to flare my ship as i re-enter the atmosphere at full throttle to give me some upwards thrust as I try to throttle forward without hitting the stall angle. I have used vertical thrusters in the alpha to try VTOL with cargo haulers (think the shuttle in Star ship troopers) but medium containers instead of marines.  So I can explain it as best I can below, and while implementing the actions are simple, they can quickly get complicated. 

 

So the codex has the api for what to call, but dosen't really explain how to implement this in the LUA scripts. I recommend watching some videos or going to LUA.org but here is a brief overview

 

Click on your pilot seat -> Advanced -> Edit LUA 

 

You are going to be interested mainly in the "UNIT" and "SYSTEM" slots; here you will see a Start() and Stop() function and you can another filter called Tick().

Now in programming "Update" is called every frame and is frame rate dependent unless they system has a "fixed update" which is usually a set interval (UNITY uses this for physics calculations) DU uses tick but in a diffrent way. In LUA you will have "Update" (as stated above) "Flush" this is used in the physics calculations in DU for and is called automatically. and "TICK" this can be used as a timer to do a single event every time N has complected its duration. This TICK is done in UNIT slot, and I could for example have it fire a weapon, or hit my brakes every 30 seconds. You get the idea. 

 

Now System is where actions are managed (key board input, and casing does count) actionStart(action) would trigger when I press a key Down, actionStop when a key is released. The last is neat its actionLoop, which does the event while the key is held down, like an update function; this would be used for movement like applying brakes.

 

Now for any engines you put in the vertical or slanted orientation, you will have to make a custom group (this just makes it easier to identify and control)

Once done you could make it so when you enter the flight seat you could run "activate()" this would start the engines at full power letting you take off from the ground quickly. 

Or you could "setThrust(thrust)" this sets the engine thrust between 0 and maxThrust in Newtons. 

 

What i did was use "toggle()" and a combination of "getDistanceToObstabcle()" which reterns a value in meters of the first object detected in the direction of thrust (I uses this to know when I'm near my construct landing platform, and when that value is equal to or less than 50, it throttles back the thrust of the engine to lower me to the platform without me having to hold Alt+C)

and the other thing I do is do a call to the Core unit. "getConstructWorldPos()" it returns a vector 3 (x, y, z) position and "getAltitude()" which returns your height above sea level in meters, with respect to the closest planet (other wise in space it returns a null or 0 value) "g()" returrns you local gravitaiton acceleration in m/s^2 and "getVelocity()" returns your constructs liniear velocity in m/s

 

So you want to let your engines in the vertical pos when your construct is over n-speed and h-height. in my case i chose a speed of 600 m/s and a height of 1800 meters above sea level. here is where they would toggle off,  adding in my actual code would be kind of tedious and confusing, so I will post an example and a link to an alpha video about scripting. 

 

but if i wanted to write out what my constructs velocity is i would do something like:

 

local VariableName = method 

by defualt it would looking like this:

local constructVelocity = vec3(core.getWorldVelocity())

 

if you watch this video this is an example of how you can do in-game progam: 

 

 

and this is a post about LUA programing in general. 

 

 

 

 

Share this post


Link to post
Share on other sites
1 hour ago, Velase85 said:

Vertical thrusters are good but also suck. It depends on how you use them. Like I said I use mine at an angle mainly to flare my ship as i re-enter the atmosphere at full throttle to give me some upwards thrust as I try to throttle forward without hitting the stall angle. I have used vertical thrusters in the alpha to try VTOL with cargo haulers (think the shuttle in Star ship troopers) but medium containers instead of marines.  So I can explain it as best I can below, and while implementing the actions are simple, they can quickly get complicated. 

 

So the codex has the api for what to call, but dosen't really explain how to implement this in the LUA scripts. I recommend watching some videos or going to LUA.org but here is a brief overview

 

Click on your pilot seat -> Advanced -> Edit LUA 

 

You are going to be interested mainly in the "UNIT" and "SYSTEM" slots; here you will see a Start() and Stop() function and you can another filter called Tick().

Now in programming "Update" is called every frame and is frame rate dependent unless they system has a "fixed update" which is usually a set interval (UNITY uses this for physics calculations) DU uses tick but in a diffrent way. In LUA you will have "Update" (as stated above) "Flush" this is used in the physics calculations in DU for and is called automatically. and "TICK" this can be used as a timer to do a single event every time N has complected its duration. This TICK is done in UNIT slot, and I could for example have it fire a weapon, or hit my brakes every 30 seconds. You get the idea. 

 

Now System is where actions are managed (key board input, and casing does count) actionStart(action) would trigger when I press a key Down, actionStop when a key is released. The last is neat its actionLoop, which does the event while the key is held down, like an update function; this would be used for movement like applying brakes.

 

Now for any engines you put in the vertical or slanted orientation, you will have to make a custom group (this just makes it easier to identify and control)

Once done you could make it so when you enter the flight seat you could run "activate()" this would start the engines at full power letting you take off from the ground quickly. 

Or you could "setThrust(thrust)" this sets the engine thrust between 0 and maxThrust in Newtons. 

 

What i did was use "toggle()" and a combination of "getDistanceToObstabcle()" which reterns a value in meters of the first object detected in the direction of thrust (I uses this to know when I'm near my construct landing platform, and when that value is equal to or less than 50, it throttles back the thrust of the engine to lower me to the platform without me having to hold Alt+C)

and the other thing I do is do a call to the Core unit. "getConstructWorldPos()" it returns a vector 3 (x, y, z) position and "getAltitude()" which returns your height above sea level in meters, with respect to the closest planet (other wise in space it returns a null or 0 value) "g()" returrns you local gravitaiton acceleration in m/s^2 and "getVelocity()" returns your constructs liniear velocity in m/s

 

So you want to let your engines in the vertical pos when your construct is over n-speed and h-height. in my case i chose a speed of 600 m/s and a height of 1800 meters above sea level. here is where they would toggle off,  adding in my actual code would be kind of tedious and confusing, so I will post an example and a link to an alpha video about scripting. 

 

but if i wanted to write out what my constructs velocity is i would do something like:

 

local VariableName = method 

by defualt it would looking like this:

local constructVelocity = vec3(core.getWorldVelocity())

 

if you watch this video this is an example of how you can do in-game progam: 

 

 

and this is a post about LUA programing in general. 

 

 

 

 

thank you ! i will have a look through all that and see what i can come up with . sea level though ? how do you manage that when say you are landing on a mountain for example? if its going off sea level . or did i misunderstant that part? 

Share this post


Link to post
Share on other sites

I have it reading the sea level for high altitude flying to shut off the vertical thrust as it is no longer needed. If i was landing on a mountian than the distance to object in direction of thrust off that group should let me know to slowly cut the power% to land.

Share this post


Link to post
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...