Jump to content

I just can't get engine FX to work!


Recommended Posts

Hi.

I've been trying to make an engine based on a model from KSPI-E.

PART
{
	// --- general parameters ---
	name = ThermalNozzle
	module = Part
	author = Zzz

	// --- asset parameters ---
mesh = model.mu

rescaleFactor = 1

// --- node definitions ---
node_stack_top = 0.0, 0.055308 , 0.0, 0.0, 1.0, 0.0, 2
node_stack_bottom = 0.0, -1.196 , 0.0, 0.0, -1.0, 0.0, 2


// --- FX definitions ---

fx_exhaustFlame_blue = 0.0, -2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -2, 0.0, 0.0, 0.0, 1.0, running
fx_smokeTrail_light = 0.0, -2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustSparks_flameout = 0.0, -2, 0.0, 0.0, 1.0, 0.0, flameout

// --- Sound FX definition ---


sound_vent_medium = engage
sound_rocket_hard = running
sound_vent_soft = disengage
sound_explosion_low = flameout

	TechRequired = basicScience
	entryCost = 4000
		// --- editor parameters ---
	cost = 4000
	category = Propulsion
	subcategory = 0
	title = Thermal Nozzle
	manufacturer = SimpleNuclear
	description = A heat exchanger uses thermal Megawatts to heat propellant to temperatures upwards of 2500K. Can be run in Chemical mode (uses Liquid Fuel and Oxidizer to boost thrust) or in Hydrogen mode (uses LqdHydrogen for better Isp).

	// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
	attachRules = 1,0,1,0,0

	// --- standard part parameters ---
	mass = 2.0
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 2
	crashTolerance = 6
	breakingForce = 200
	breakingTorque = 200
	maxTemp = 2500
	skinInternalConductionMult = 4.0
	emissiveConstant = 0.7
	bulkheadProfiles = size2
	tags = nuclear engine simple
MODULE
	{
		name = MultiModeEngine
		primaryEngineID = Chemical
		secondaryEngineID = Hydrogen
	}
	MODULE
	{
		name = ModuleEnginesFX
		engineID = Chemical
		thrustVectorTransformName = TT
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 2000
		heatProduction = 150
		useEngineResponseTime = False
		useVelocityCurve = False		
	    fxOffset = 0, 0, 1.5
		exhaustDamageDistanceOffset = 0.19
		PROPELLANT
		{
			name = LiquidFuel
			ratio = 0.9
			DrawGauge = True
		}
		PROPELLANT
		{
			name = Oxidizer
			ratio = 1.1
		}
		PROPELLANT
		{
			name = MWt
			ratio = 18.5
		}
		atmosphereCurve
		{
			key = 0 500
			key = 1 450
			key = 9 0.001
		}
	}
	MODULE
	{
		name = ModuleEnginesFX
		engineID = Hydrogen
		thrustVectorTransformName = TT
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 188
		heatProduction = 250
		fxOffset = 0, 0, 1.5
		exhaustDamageDistanceOffset = 0.19
		PROPELLANT
		{
			name = LqdHydrogen
			ratio = 1
		}
		PROPELLANT
		{
			name = MWt
			ratio = 2
		}
		atmosphereCurve
		{
			key = 0 800
			key = 1 150
			key = 9 0.001
		}
	}
MODULE
{
	name = TweakScale
	type = stack
	defaultScale = 2.5
}
	MODULE
	{
		name = ModuleJettison
		jettisonName = Shroud
		bottomNodeName = bottom
		isFairing = True
		jettisonedObjectMass = 0.1
		jettisonForce = 2
		jettisonDirection = 0 0 1
	}
	MODULE
	{
		name = ModuleAnimateHeat
		ThermalAnim = overheat
	}

	MODULE
	{
		name = ModuleGimbal
		gimbalTransformName = Nozzle
		gimbalRange = 5
	}
}

Whatever I do, the flame effects just don't appear. It is extremely frustrating - I've tried everything, from copying stock effects, using an EFFECTS module, using the original FX, nothing.

Everything else works fine.

Link to comment
Share on other sites

ModuleEnginesFX needs an EFFECT node so that config won't work. You can use a PREFAB_PARTICLE ( or PREFAB_ANIMATION ? I forgot) if you want to use the "old" effect in an EFFECT node. You ll need a prefabName (exhaustFlame_blue I think), transformName, the optional emission/energy/speed curve, localOffset & localRotation.

 

Link to comment
Share on other sites

33 minutes ago, sarbian said:

ModuleEnginesFX needs an EFFECT node so that config won't work. You can use a PREFAB_PARTICLE ( or PREFAB_ANIMATION ? I forgot) if you want to use the "old" effect in an EFFECT node. You ll need a prefabName (exhaustFlame_blue I think), transformName, the optional emission/energy/speed curve, localOffset & localRotation.

 

I have tried that for the thermal turbojet:

PART
{
	name = ThermalTurbojet
	module = Part
	author = Porkjet
	mesh = TurboJet.mu
	rescaleFactor = 1

	node_stack_top = 0.0, 3.0, 0.0, 0.0, 1.0, 0.0
	node_attach = 0.0, 0.0, -0.875, 0.0, 0.0, 1.0, 1
	CoMOffset = 0.0, 2.3, 0.0
	TechRequired = basicScience
	entryCost = 10000
	cost = 1500
	category = Engine
	subcategory = 0
	title = Thermal Turbojet
	manufacturer = SimpleNuclear
	description = A heat exchanger that consumes thermal Megawatts to heat incoming air. It's low power-to-weight ratio is compensated by no longer needing on-board propellant. 
	attachRules = 1,0,1,0,0
	mass = 1.1
	heatConductivity = 0.06 // half default
	skinInternalConductionMult = 4.0
	emissiveConstant = 0.8 // engine nozzles are good at radiating.
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 2
	crashTolerance = 7
	maxTemp = 2000 // = 3600
	bulkheadProfiles = size1
	tags = aircraft jet plane nuclear
	MODULE
	{
		name = ModuleEnginesFX
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 250
		heatProduction = 300
		useEngineResponseTime = True
		engineAccelerationSpeed = 0.5
		engineDecelerationSpeed = 0.2
		useVelocityCurve = False
		flameoutEffectName = flameout
		powerEffectName = running_thrust
		runningEffectName = shockDiamond
		engageEffectName = engage
		disengageEffectName = disengage
		spoolEffectName = running_turbine
		engineSpoolIdle = 0.05
		engineSpoolTime = 2.0
		EngineType = Turbine
		exhaustDamageMultiplier = 40
		PROPELLANT
		{
			name = MWt
			ratio = 16750
			DrawGauge = True
		}
		PROPELLANT
		{
			name = IntakeAir
			ignoreForIsp = True
			ratio = 1
			DrawGauge = True
		}
		atmosphereCurve
		{
			key = 0 4000 0 0 
		}
		// Jet params
		atmChangeFlow = True
		useVelCurve = True
		useAtmCurve = True
		flowMultCap = 2.0
		machLimit = 10
		machHeatMult = 1
		velCurve
		{
			key = 0 0.5 0 0
			key = 0.1 0.75 0 0
			key = 0.6 1 2.433527 2.433527
			key = 1 1.5 1.986082 1.986082
			key = 2 2 1.452677 1.452677
			key = 3 2.5 0.0005786046 0.0005786046
			key = 6 3 -4.279616 -4.279616
			key = 10 0.5 -0.02420209 0
		}
		atmCurve
		{
			key = 0 0 0 0
			key = 0.001 0.01 4.304647 4.304647
			key = 0.1 0.5 0.5779132 0.5779132
			key = 0.5 0.6 0.4809403 0.4809403
			key = 1 1 1.013946 0
		}
	}
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TurboRamJetNozzle
		dependOnEngineState = True
		dependOnThrottle = True
		responseSpeed = 1
		layer = 1
	}
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TRJ_Heat
		dependOnEngineState = True
		responseSpeed = 0.0005
		layer = 2
	}
	MODULE
	{
		name = ModuleGimbal
		gimbalTransformName = Gimbal
		gimbalRange = 1
	}
	MODULE
	{
		name = ModuleAlternator
		RESOURCE
		{
			name = ElectricCharge
			rate = 5.0
		}
	}
	RESOURCE
	{
		name = ElectricCharge
		amount = 0
		maxAmount = 0
		isTweakable = false
		hideFlow = true
	}
	MODULE
	{
		name = ModuleSurfaceFX
		thrustProviderModuleIndex = 0
		fxMax = 0.6
		maxDistance = 25
		falloff = 2
		thrustTransformName = thrustTransform
	}
	EFFECTS
	{		
		running_thrust
		{			
			AUDIO
			{
				channel = Ship
			//	clip = sound_jet_deep
				clip = sound_rocket_spurts
				volume = 0.0 0.0
				volume = 0.5 0.4
				volume = 1.0 0.5
				pitch = 0.0 0.8
				pitch = 1.0 1.5
				loop = true
			}
			PREFAB_PARTICLE
			{
				prefabName = fx_smokeTrail_light
				transformName = smokePoint
				emission = 0.0 0.0
				emission = 0.05 0.0
				emission = 0.075 0.25
				emission = 1.0 1.25
				speed = 0.0 0.25
				speed = 1.0 1.0
				localOffset = 0, 0, 1
				localRotation = 1, 0, 0, -90
			}					
		}
		shockDiamond
		{
			MODEL_MULTI_PARTICLE
			{
				modelName = Squad/FX/afterburner_shock
				transformName = smokePoint
				emission = 0.0 0.0
				emission = 0.45 0.0
				emission = 0.6 0.8
				emission = 1 1.15
				speed = 0.4 0.3
				speed = 0.6 0.8
				speed = 1.0 1.15
			}
		}
		running_turbine
		{
			AUDIO
			{
				channel = Ship
				clip = sound_jet_low
				volume = 0.0 0.0
				volume = 0.02 0.0
				volume = 0.1 0.8
				volume = 0.2 1.0
				volume = 0.5 1.0
				pitch = 0.0 0.5
				pitch = 0.2 1.0
				pitch = 1.0 1.2
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = Squad/FX/afterburner_flame
				transformName = smokePoint
				emission = 0.0 0.0
				emission = 0.16 0.0
				emission = 0.3 0.5
				emission = 0.5 1.0
				emission = 1.0 1.0
				speed = 0.1 0.05
				speed = 0.3 1.0
				speed = 0.5 1.15
				speed = 1.0 1.15
			}
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_medium
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
		disengage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_soft
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout_2
				transformName = smokePoint
				oneShot = true
			}
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
	}
MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TurboJetThrottle
		dependOnEngineState = False
		responseSpeed = 0.5
	}
}

Copied directly from the stock Whiplash, to no avail.

Link to comment
Share on other sites

If you are using old effects,than you have to use module engines

fx_exhaustFlame_blue = 0.0, -2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -2, 0.0, 0.0, 0.0, 1.0, running
fx_smokeTrail_light = 0.0, -2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustSparks_flameout = 0.0, -2, 0.0, 0.0, 1.0, 0.0, flameout
sound_vent_medium = engage
sound_rocket_hard = running
sound_vent_soft = disengage
sound_explosion_low = flameout

MODULE
     {
      name = ModuleEngines

     }

For module enginesFX you have to specify effects

MODULE
	{
		name = ModuleEnginesFX

		flameoutEffectName = flameout
		powerEffectName = running_thrust
		runningEffectName = shockDiamond
		engageEffectName = engage
		disengageEffectName = disengage
		spoolEffectName = running_turbine

	}

	EFFECTS
	{		
		running_thrust
		{			
		}
		shockDiamond
		{
		}
		running_turbine
		{
		}
		engage
		{
		}
		disengage
		{
		}
		flameout
		{
		}
	}

 for older effectst with module enginesFX you have to use PREFAB_PARTICLE and MODEL_MULTI_PARTICLE for new ones

MODEL_MULTI_PARTICLE
   {
   modelName = Squad/FX/afterburner_flame
   }

PREFAB_PARTICLE
   {
   prefabName = fx_smokeTrail_light
   }

But the most important is "transformName",this is the name of object where your particles are generated and is case sensitive and model specific

This is for stock Whiplash,it uses two diferent objects

transformName = thrustTransform
transformName = smokePoint

the model you are trying to edit uses only one

transformName = TT

it needs to match with

MODULE
 {
 name = ModuleEnginesFX
 thrustVectorTransformName = TT
 }

So,basically you need to change "ModuleEnginesFX" to "ModuleEngines" and *.cfg from OP should get the effecs,
or if you copying from other engines,be sure to rename all "thrustVectorTransformName" and "transformName" to corresponding module,in your case to "TT".

Edited by sebi.zzr
Link to comment
Share on other sites

11 minutes ago, sebi.zzr said:

If you are using old effects,than you have to use module engines


fx_exhaustFlame_blue = 0.0, -2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -2, 0.0, 0.0, 0.0, 1.0, running
fx_smokeTrail_light = 0.0, -2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustSparks_flameout = 0.0, -2, 0.0, 0.0, 1.0, 0.0, flameout
sound_vent_medium = engage
sound_rocket_hard = running
sound_vent_soft = disengage
sound_explosion_low = flameout

MODULE
     {
      name = ModuleEngines

     }

For module enginesFX you have to specify effects


MODULE
	{
		name = ModuleEnginesFX

		flameoutEffectName = flameout
		powerEffectName = running_thrust
		runningEffectName = shockDiamond
		engageEffectName = engage
		disengageEffectName = disengage
		spoolEffectName = running_turbine

	}

	EFFECTS
	{		
		running_thrust
		{			
		}
		shockDiamond
		{
		}
		running_turbine
		{
		}
		engage
		{
		}
		disengage
		{
		}
		flameout
		{
		}
	}

 for older effectst with module enginesFX you have to use PREFAB_PARTICLE and MODEL_MULTI_PARTICLE for new ones


MODEL_MULTI_PARTICLE
   {
   modelName = Squad/FX/afterburner_flame
   }

PREFAB_PARTICLE
   {
   prefabName = fx_smokeTrail_light
   }

But the most important is "transformName",this is the name of object where your particles are generated and is case sensitive and model specific

This is for stock Whiplash,it uses two diferent objects


transformName = thrustTransform
transformName = smokePoint

the model you are trying to edit uses only one


transformName = TT

it needs to match with


MODULE
 {
 name = ModuleEnginesFX
 thrustVectorTransformName = TT
 }

So,basically you need to change "ModuleEnginesFX" to "ModuleEngines" and *.cfg from OP should get the effecs,
or if you copying from other engines,be sure to rename all "thrustVectorTransformName" and "transformName" to corresponding module,in your case to "TT".

I'll do some testing, thanks.

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...