Jump to content

Do I need to make a plugin for this?


Reign Of Magic

Recommended Posts

Ok, so my goal is to make an engine that only runs in vacuum (will flameout in atmosphere or if that isn't possible produce 0 thrust). In addition to that I would also like to have a vapor trail come out of the back for a short range (25 meters?) when the engine is on. This would be similar to the stock chemical rocket's smoke trail, but only show itself in vacuum and would glow as well.

Design/goal for the engine: Pretty much its going to be an Ion-esq futuristic engine so that is why I want it only to work in vacuum, plus I think the idea of an emmissive/glowing vapor trail would be a rather cool.

Since I am rather new to modeling/texturing I am unsure if this is configurable with a .cfg file exclusively, or if I need to make a plugin to get such an effect. I suspect that I will need a plugin.

I already know about the large post with all the tutorials, so I will have that to help me along with the plugin creation if necessary. I did a cursory search of the forums and that tutorial post, but I didn't see anything there with something like the vacuum only / glowing vapor trail.

Thanks in advance,

Reign

Link to comment
Share on other sites

Be careful on vacuum recognition, atmospherecurve is flawed (Duna ground level is considered as vacuum despite the atmosphere :huh:), it may be needed to get a stronger check on this.

Yeah, I noticed something like that when using the nuclear engine and its isp was at like 780 or something on the surface. That was probably due to its incredibly thin atmosphere tho.

atmosphereCurve is used only when body.useLegacyAtmosphere is false.

If you get vessel.staticPressure that should be valid either way.

So in the cfg it would be something like this (ripped from the lv-909 cfg)



MODULE
{
name = ModuleEngines
thrustVectorTransformName = thrustTransform
exhaustDamage = True
ignitionThreshold = 0.1
minThrust = 0
maxThrust = 50
heatProduction = 300
fxOffset = 0, 0, 0.21
PROPELLANT
{
name = LiquidFuel
ratio = 0.9
DrawGauge = True
}
PROPELLANT
{
name = Oxidizer
ratio = 1.1
}
vessel.staticPressure <----- changed section
{
key minThrust = 0 0
key maxThrust = 0 50
key minThrust .0001 0
key maxThrust .0001 0
key minThrust 1 0
key maxThrust 1 0
}

}

Or id I miss what you were going for entirely there NathanKell (/do bad things with that key min/maxThrust). Or did you mean in create a plugin for a thrust curve that is based off of the vessel.staticPressure and make it so it produces no thrust until a pressure of 0 is achieved.

I should also clarify I have no experience coding so the plugin will be my first go if that is what is necessary. A daunting task to be sure.

Link to comment
Share on other sites

Would making the Isp 0 at 0.001 atmospheres and up using the AtmosphereCurve cut it?

worth a shot. simpler and quicker to test than writing a plugin. vessel.staticPressure is probably something you can't use in a config file.

as far as the glowing exhaust trail, SmokeScreen FX plugin might be able to handle it.

Link to comment
Share on other sites

Apologies, I was confused for a sec. atmosphereCurve is used always; I thought Justin Kerbice was talking about pressureCurve (which is a CelestialBody property).

atmosphereCurve relates pressure (in atmospheres, i.e. 101.325kPa of pressure) to Isp. key = 1.0 does not mean "sea level" it means "1.0atm of pressure." Since Duna, at sea level, has rather less than 101.325kPa of pressure, sea level on Duna does not equate to 1.0 on the atmosphereCurve.

Unlike the fact that in real life thrust, not fuel flow is proportional to Isp (so thrust varies with Isp, fuel flow is constant--what, does the turbopump suddenly work harder at sea level!?), this variance of Isp purely by pressure *is* true to life.

Link to comment
Share on other sites

Apologies, I was confused for a sec. atmosphereCurve is used always; I thought Justin Kerbice was talking about pressureCurve (which is a CelestialBody property).

atmosphereCurve relates pressure (in atmospheres, i.e. 101.325kPa of pressure) to Isp. key = 1.0 does not mean "sea level" it means "1.0atm of pressure." Since Duna, at sea level, has rather less than 101.325kPa of pressure, sea level on Duna does not equate to 1.0 on the atmosphereCurve.

Unlike the fact that in real life thrust, not fuel flow is proportional to Isp (so thrust varies with Isp, fuel flow is constant--what, does the turbopump suddenly work harder at sea level!?), this variance of Isp purely by pressure *is* true to life.

No worries! I am a little overwhelmed, did some google searches didn't come up with much so I just threw that cfg together and hoped it might work. As for the ISP - Thrust thing. I was aware of that, I am just trying to make the engine produce no thrust while there is any atmosphere present. When I get home from work I shall try the 0 isp thing and see if that works. My guess is it will just use fuel extremely rapidly rather than making it not produce thrust.

One way I just though of to get around it "albeit a shoddy way" this is have a generator type module that produces "vacuum" when atmosphere is 0. Unless you have a simpler suggestion I'll futz around with that later tonight.

worth a shot. simpler and quicker to test than writing a plugin. vessel.staticPressure is probably something you can't use in a config file.

as far as the glowing exhaust trail, SmokeScreen FX plugin might be able to handle it.

I shall try when I get home from work and let you know, as for the vapor trail. Thanks for the SmokeScreen suggestion. I hadn't even thought of using an open sourced one like that!

Would making the Isp 0 at 0.001 atmospheres and up using the AtmosphereCurve cut it?

I shall try when I get home from work and get back to you on that.

Link to comment
Share on other sites

@NathanKell

@nili2work

@parameciumkid

Turns out that an ISP of 0 does infact just make the fuel cost really high.. Infinity high. This is probably a bug but that makes it so it will not consume resources and immediately flames out (which is what I want!) The best part is, it doesn't consume any resources prior to flaming out. So that part is solved, and doing some digging in the hotrockets thread/smokescreen thread it looks like the vapor trail won't be crazy hard to make.

Link to comment
Share on other sites

Apologies, I was confused for a sec. atmosphereCurve is used always; I thought Justin Kerbice was talking about pressureCurve (which is a CelestialBody property).

atmosphereCurve relates pressure (in atmospheres, i.e. 101.325kPa of pressure) to Isp. key = 1.0 does not mean "sea level" it means "1.0atm of pressure." Since Duna, at sea level, has rather less than 101.325kPa of pressure, sea level on Duna does not equate to 1.0 on the atmosphereCurve.

Unlike the fact that in real life thrust, not fuel flow is proportional to Isp (so thrust varies with Isp, fuel flow is constant--what, does the turbopump suddenly work harder at sea level!?), this variance of Isp purely by pressure *is* true to life.

OK, It would be really great to store this info somewhere where it will not be lost (the wiki for example), because in a year, this thread will may be buried deep.

A bit off-topic here sorry but a lot of people talk about stock aero model, but stock engine/fuel model could also benefit from improvements.

Link to comment
Share on other sites

@nili2work

& Everyone else since there seemed to be some interest

Here is my first rendition of the model with textures as it appears in KSP: https://www.dropbox.com/sh/0hbz9xuxy656op5/AACedZSR9QQRrEfABiZaF6zSa

Sorry for using dropbox, its 4 am and I am posting this before going to bed. Pretty much an "ok" first model it might/probably will change in the next iteration. I haven't messed with the vapor trail yet, & just seeing how the emmissives would look in game with only a few bits being emmissive.

What is your take on the emmissives? (Radiators, center bit & thruster)

Also ignore the other parts, most of them are stock with some tweakscale, and a massive RTG that I made just because.

Edited by Reign Of Magic
Link to comment
Share on other sites

@nili2work

& Everyone else since there seemed to be some interest

Here is my first rendition of the model with textures as it appears in KSP: https://www.dropbox.com/sh/0hbz9xuxy656op5/AACedZSR9QQRrEfABiZaF6zSa

Sorry for using dropbox, its 4 am and I am posting this before going to bed. Pretty much an "ok" first model it might/probably will change in the next iteration. I haven't messed with the vapor trail yet, & just seeing how the emmissives would look in game with only a few bits being emmissive.

What is your take on the emmissives? (Radiators, center bit & thruster)

Also ignore the other parts, most of them are stock with some tweakscale, and a massive RTG that I made just because.

Model and texture is icing on the cake. I'd just mess around with SmokeScreen using just a primitive and get a handle on how that works. :) after you have the FX you want, it's all cake walk from there.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...