Warezcrawler

[ANSWERED] Convert Effects between Effects nodes and flat format

Recommended Posts

Does anybody know how you can convert the "flat" format of effects in engines to the effects node structure and visa versa? And is it possible?

flat structure example from Skipper engine

	fx_exhaustFlame_blue = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, running
	fx_exhaustLight_blue = 0.0, -2.2, 0.0, 0.0, 0.0, 1.0, running
	fx_smokeTrail_light = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, running
	fx_exhaustSparks_flameout = 0.0, -2.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

Effects node structure example from small Jet Engine

	EFFECTS
	{		
		running_thrust
		{			
			AUDIO
			{
				channel = Ship
				clip = sound_jet_deep
				volume = 0.0 0.0
				volume = 0.05 0.2
				volume = 1.0 0.5
				pitch = 0.0 1.2
				pitch = 1.0 2.0
				loop = true
			}
			PREFAB_PARTICLE
			{
				prefabName = fx_smokeTrail_light
				transformName = thrustTransform
				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
			}					
		}
		running_turbine
		{
			AUDIO
			{
				channel = Ship
				clip = sound_jet_low
				volume = 0.0 0.0
				volume = 0.05 0.35
				volume = 1.0 0.5
				pitch = 0.0 0.6
				pitch = 0.05 0.8
				pitch = 1.0 1.5
				loop = true
			}
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_medium
				volume = 0.8
				pitch = 2.5
				loop = false
			}
		}
		disengage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_soft
				volume = 0.8
				pitch = 2.5
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout_2
				transformName = thrustTransform
				oneShot = true
			}
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 2.0
				loop = false
			}
		}
	}

 

Edited by Warezcrawler

Share this post


Link to post
Share on other sites

Hi. if I've your intention correct, all you need to do is swap the engine module from the stock module engines   to module engines fx and assign the appropriate FX and sounds. You may need to play with the offsets to get it lined up correctly but otherwise it should be fine, oh and you can usually get away with just calling the thrustTransform as in your example, you will find some FX that also call the smokepoint which is not present in the earlier engine versions

  • Like 1

Share this post


Link to post
Share on other sites

IIRC, you CAN use the same transform for the thrustTransforms AND smokeTransforms... I also seem to remember you can "stack" effects, using the same transform... but IIRC, once you get more than three of four total, performance takes a hit, or bad stuff happens?... something llike that :P

Unfortunately, I couldnt get any of the offsets to work on the transforms, IIRC... but that was all awhile ago in 1.1.3

Share this post


Link to post
Share on other sites
16 hours ago, SpannerMonkey(smce) said:

Hi. if I've your intention correct, all you need to do is swap the engine module from the stock module engines   to module engines fx and assign the appropriate FX and sounds. You may need to play with the offsets to get it lined up correctly but otherwise it should be fine, oh and you can usually get away with just calling the thrustTransform as in your example, you will find some FX that also call the smokepoint which is not present in the earlier engine versions

I have been trying for a while, without success... So I'm definately doing it wrong. Could I ask for an example of how to take a random moduleEngine in stock and changing it to moduleEngineFX with the EFFECTS node?

I have tried to moch around with offset, but it's like the stock implementation does not react to any settings for offset.... Using "SmokeScreen" it works fine, but apparently not in stock.

Share this post


Link to post
Share on other sites
Just now, Warezcrawler said:

I have been trying for a while, without success... So I'm definately doing it wrong. Could I ask for an example of how to take a random moduleEngine in stock and changing it to moduleEngineFX with the EFFECTS node?

I have tried to moch around with offset, but it's like the stock implementation does not react to any settings for offset.... Using "SmokeScreen" it works fine, but apparently not in stock.

I'll give it a go using your ref skipper and see if i can get the thing to work,  i can't see a reason why it wouldn't though.  I'll post back and let you know what i find

  • Like 2

Share this post


Link to post
Share on other sites

I haven't given up hope, that somebody out there knows how the convert to the effects node format (moduleEnginesFX) and want to share an example...

Share this post


Link to post
Share on other sites

Please. I am so sure this is possible, and with all the great modders out there, could it really be that nobody knows the answer to the above question?

I would really appreaciate some guidens here..... maybe a developer of ksp knows? 

Share this post


Link to post
Share on other sites
On ‎13‎.‎12‎.‎2016 at 5:15 PM, Warezcrawler said:

I would really appreaciate some guidens here..... maybe a developer of ksp knows? 

Hello,regarding our conversation in another thread,here is an example for "Skipper" engine:

	EFFECTS
	{
		running
		{
			AUDIO
			{
				channel = Ship
				clip = sound_rocket_hard
				volume = 0.0 0.0
				volume = 1.0 1.0
				pitch = 0.0 0.75
				pitch = 1.0 0.95
				loop = true
			}
			PREFAB_PARTICLE
			{
                                name = flame1
				prefabName = fx_exhaustFlame_blue
				transformName = thrustTransform
				emission = 0.0 0.0
				emission = 1.0 4.0
				speed = 0.0 0.8
				speed = 1.0 1.0
                                localOffset = 0,0,1
                                localRotation = 1,0,0,-90

			}
			PREFAB_PARTICLE
			{
                                name = flame2
				prefabName = fx_exhaustLight_blue
				transformName = thrustTransform
				emission = 0.0 0.0
				emission = 1.0 10
				speed = 0.0 0.8
				speed = 1.0 1.0
                                localOffset = 0,0,1
                                localRotation = 1,0,0,-90
			}
			PREFAB_PARTICLE
			{
                                name = smoke
				prefabName = fx_smokeTrail_light
				transformName = thrustTransform
				emission = 0.0 0.0
				emission = 1.0 2.0
				speed = 0.0 0.8
				speed = 1.0 1.0
                                localOffset = 0,0,2.2
                                localRotation = 1,0,0,-90
			}
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_medium
				loop = false
			}
		}
		disengage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_soft
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout
				transformName = thrustTransform
				oneShot = true
			}
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 2.0
				loop = false
			}
	}

If you use effect names: running,engage,disengage and flameout;then you don't need to specify those effects in "ModuleEnginesFX".
Otherwise you have this options:

MODULE
{
name = ModuleEnginesFX

engageEffectName = engage
runningEffectName = running
disengageEffectName = disengage
flameoutEffectName = flameout

spoolEffectName =
powerEffectName =
directThrottleEffectName =
}

Also,for better understanding of FX definitions you can read the explanation here.

  • Like 1

Share this post


Link to post
Share on other sites
On 01/04/2017 at 3:37 PM, sebi.zzr said:

Hello,regarding our conversation in another thread,here is an example for "Skipper" engine:


	EFFECTS
	{
		running
		{
			AUDIO
			{
				channel = Ship
				clip = sound_rocket_hard
				volume = 0.0 0.0
				volume = 1.0 1.0
				pitch = 0.0 0.75
				pitch = 1.0 0.95
				loop = true
			}
			PREFAB_PARTICLE
			{
                                name = flame1
				prefabName = fx_exhaustFlame_blue
				transformName = thrustTransform
				emission = 0.0 0.0
				emission = 1.0 4.0
				speed = 0.0 0.8
				speed = 1.0 1.0
                                localOffset = 0,0,1
                                localRotation = 1,0,0,-90

			}
			PREFAB_PARTICLE
			{
                                name = flame2
				prefabName = fx_exhaustLight_blue
				transformName = thrustTransform
				emission = 0.0 0.0
				emission = 1.0 10
				speed = 0.0 0.8
				speed = 1.0 1.0
                                localOffset = 0,0,1
                                localRotation = 1,0,0,-90
			}
			PREFAB_PARTICLE
			{
                                name = smoke
				prefabName = fx_smokeTrail_light
				transformName = thrustTransform
				emission = 0.0 0.0
				emission = 1.0 2.0
				speed = 0.0 0.8
				speed = 1.0 1.0
                                localOffset = 0,0,2.2
                                localRotation = 1,0,0,-90
			}
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_medium
				loop = false
			}
		}
		disengage
		{
			AUDIO
			{
				channel = Ship
				clip = sound_vent_soft
				loop = false
			}
		}
		flameout
		{
			PREFAB_PARTICLE
			{
				prefabName = fx_exhaustSparks_flameout
				transformName = thrustTransform
				oneShot = true
			}
			AUDIO
			{
				channel = Ship
				clip = sound_explosion_low
				volume = 1.0
				pitch = 2.0
				loop = false
			}
	}

If you use effect names: running,engage,disengage and flameout;then you don't need to specify those effects in "ModuleEnginesFX".
Otherwise you have this options:


MODULE
{
name = ModuleEnginesFX

engageEffectName = engage
runningEffectName = running
disengageEffectName = disengage
flameoutEffectName = flameout

spoolEffectName =
powerEffectName =
directThrottleEffectName =
}

Also,for better understanding of FX definitions you can read the explanation here.

wow this is great... However, I still don't get how translation work.

example

fx_exhaustFlame_blue = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, running

=>

PREFAB_PARTICLE
{
	name = flame1
	prefabName = fx_exhaustFlame_blue
	transformName = thrustTransform
	emission = 0.0 0.0
	emission = 1.0 4.0
	speed = 0.0 0.8
	speed = 1.0 1.0
	localOffset = 0,0,1
	localRotation = 1,0,0,-90
}

I have a hard time figuring out how the stats for emission, speed, offset and rotation is related to the original.

Share this post


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

I have a hard time figuring out how the stats for emission, speed, offset and rotation is related to the original.

Not much,except "fx_exhaustFlame_blue" which is prefabricated particle,that means that is built into the game not a separate effect.
With "ModuleEngines" the particle is what it is and you can only change its position,but with "ModuleEnginesFX" you can change three parameters:energy,emission and speed;where the first number is throttle (1 = 100%) ant the second is effect.Look in the link i posted earlier.
As for "localOffset" and "localRotation".If you're using the same "transform name" the particle is usually positioned right,but in most cases it doesn't have the right orientation.

localOffset = 0,0,1  //x,y,z //by how much you want to move the particle and 
                             //in which direction,you can also use negative number
localRotation = 1,0,0,-90  //x,y,z,orientation in degrees //on which axis you want to
                                                          //orientate the particle and
                                                          //by how much

So,when you want to convert from one module to another is best to start with simple format and after that is mostly trial and error.With the example i gave you for "Skipper",you can easily convert all old stock engines to "ModuleEnginesFX".All you need to watch is which and how many effects they use.
Nevertheless "practice makes perfect" :D

Edited by sebi.zzr
  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, sebi.zzr said:

trial and error

1 minute ago, sebi.zzr said:

Nevertheless "practice makes perfect" :D

Thanks... Trail and error it is then. Been a great help. Thanks.

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