Jump to content

Adding non-squad sounds to engines?


Nnimrod

Recommended Posts

What's the best way to do this? I can use the vanilla method if I am content with vanilla sounds, but I'm not. I see that KWRocketry uses non vanilla sounds, so I mimicked what it had, and pointed to some sounds that RealPlume has, but that didn't work.

EFFECTS
	{
		running_closed
		{
			AUDIO
			{
				channel = Ship
				clip = RealPlume/Felger_FX/RS25loop
				volume = 0.0 0.0
				volume = 1.0 1.0
				pitch = 0.0 0.0
				pitch = 1.0 1.0
				loop = true
			}
			
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = RealPlume/Felger_FX/RS25ignite
				volume = 1.0
				pitch = 1.0
				loop = false
			}
		}
	}

Sometimes I have trouble figuring things out by looking at .cfgs and the wiki >.<

Link to comment
Share on other sites

First be sure that the path to the sound file and 2nd you might try just adding alittle on the top pitch 0.2 or maybe 0.1 and

EFFECTS
	{
		running_closed
		{
			AUDIO
			{
				channel = Ship
				clip = RealPlume/Felger_FX/RS25loop
				volume = 0.0 0.0
				volume = 1.0 1.0
				pitch = 0.0 0.2
				pitch = 1.0 1.0
				loop = true
			}
			
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = RealPlume/Felger_FX/RS25ignite
				volume = 1.0
				pitch = 1.0
				loop = false
			}
		}
	}

 

Link to comment
Share on other sites

Do you have the sound set as the running effect in the engine itself?

MODULE
    {
        name = ModuleEnginesFX
        thrustVectorTransformName = thrustTransform
        engineID = VAD125A
        runningEffectName = running_closed   <--- This line
        exhaustDamage = True
        ignitionThreshold = 0.1
        minThrust = 0
        maxThrust = 350
        heatProduction = 250
        EngineType = LiquidFuel
        PROPELLANT
        {
            name = LiquidFuel
            ratio = 0.9
            DrawGauge = True
        }
        PROPELLANT
        {
            name = Oxidizer
            ratio = 1.1
        }
        atmosphereCurve
        {
            key = 0 295
            key = 1 280
            key = 9 0.001
        }
    }

Perhaps it bears mentioning that you must use a complete effects setup and use ModuleEnginesFX to use custom sounds, meaning you cannot use a vanilla particle effect setup and ModuleEngines alongside custom sounds. So you need something like:

EFFECTS
    {
        running_closed
        {
            AUDIO
            {
                channel = Ship
                clip = sound_rocket_spurts
                volume = 0.0 0.0
                volume = 1.0 1.5
                pitch = 0.0 0.2
                pitch = 1.0 0.7
                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
                localPosition = 0, 0, 5
            }
            MODEL_MULTI_PARTICLE
            {
                modelName = Squad/FX/ks1_Exhaust
                transformName = thrustTransform
                emission = 0.0 0.0
                emission = 0.05 0.0
                emission = 0.075 0.25
                emission = 1.0 0.5
                speed = 0.0 0.5
                speed = 1.0 1.2
                localPosition = 0, 0, 0.2
            }
        }
        engage
        {
            AUDIO
            {
                channel = Ship
                clip = sound_vent_soft
                volume = 1.0
                pitch = 2.0
                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
            }
        }
    }

coupled with a ModuleEnginesFX node as above.

Edited by Randazzo
Link to comment
Share on other sites

Do I need to remove existing effects or something? It's not evaluating the EFFECTS node at all. I changed and tried several things, and nothing results in changes. I copied the engage and flameout parts from what you had @Randazzo I also tried renaming the sound files to start with "sound_". Anyways, nothing is changing anything. It may be relevant that I'm using RealPlume stock for the exhaust effects.

EFFECTS
	{
		running_closed
		{
			AUDIO
			{
				channel = Ship
				clip = RealPlume/Felger_FX/sound_RS25loop
				volume = 0.0 0.0
				volume = 1.0 1.0
				pitch = 0.0 0.2
				pitch = 1.0 1.0
				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
                localPosition = 0, 0, 5
            }
            MODEL_MULTI_PARTICLE
            {
                modelName = Squad/FX/ks1_Exhaust
                transformName = thrustTransform
                emission = 0.0 0.0
                emission = 0.05 0.0
                emission = 0.075 0.25
                emission = 1.0 0.5
                speed = 0.0 0.5
                speed = 1.0 1.2
                localPosition = 0, 0, 0.2
            }
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = RealPlume/Felger_FX/sound_RS25ignite
				volume = 1.0
				pitch = 1.0
				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
            }
		}
	}

not sure why copy pasting messes the tabulation up :s

Link to comment
Share on other sites

Post the whole cfg

Edit : also if you are using RealPlume then the config is changed by its patch. You need to write a ModuleManger patch to apply your change after RealPlume's.

Edited by sarbian
Link to comment
Share on other sites

There's a bug in AudioFX since 1.1, even the stock ion engine is silent since then. I've issued a bug report multiple times in the last 1,5 years and you can find it on the bugtracker. I suggest upvoting it.

Squad does not seem interested in fixing it, at all.

 

Keep the log window open when loading the simulation, it will show things like "cannot assign ..... to AudioFX".

Edited by Azimech
Link to comment
Share on other sites

3 hours ago, Azimech said:

There's a bug in AudioFX since 1.1, even the stock ion engine is silent since then. I've issued a bug report multiple times in the last 1,5 years and you can find it on the bugtracker. I suggest upvoting it.

Squad does not seem interested in fixing it, at all.

 

Keep the log window open when loading the simulation, it will show things like "cannot assign ..... to AudioFX".

If AUDIO does not work explain why RealPlume engine have sounds since it replaces all the effect config with one that uses AUDIO ?

Link to comment
Share on other sites

11 hours ago, sarbian said:

Post the whole cfg

Edit : also if you are using RealPlume then the config is changed by its patch. You need to write a ModuleManger patch to apply your change after RealPlume's.

I'll do this soon as I can, this evening.

Link to comment
Share on other sites

4 hours ago, sarbian said:

If AUDIO does not work explain why RealPlume engine have sounds since it replaces all the effect config with one that uses AUDIO ?

I can't explain it. Some samples work, some don't. The bug is there. When using ModuleEngine most work fine, when trying ModuleEnginesFX things go wrong. Maybe it has something to do with file format, sample length, bitrate ... ?

Edited by Azimech
Link to comment
Share on other sites

55 minutes ago, Azimech said:

I can't explain it. Some samples work, some don't. The bug is there. When using ModuleEngine most work fine, when trying ModuleEnginesFX things go wrong. Maybe it has something to do with file format, sample length, bitrate ... ?

Not really a bug but looks like the file is missing maybe looked all over for it and can't find it but if thats the case not really a bug just not all the files where put in might have to find a file to point it to and see

Link to comment
Share on other sites

@PART[rn_aerobee150_eng]:FOR[RealPlume]:NEEDS[SmokeScreen]:FINAL
{
	//Old title: Aerobee Sounding Rocket Motor
	//Source mod: Raidernick's US Rockets
	@name = Nacreous-engine
	//@rescaleFactor = 1
	@mass = .014
	%tags = nacreous
	@MODULE[ModuleEngines*]
	{
		@name = ModuleEnginesFX
		runningEffectName = running_closed
		@maxThrust = 15
		!PROPELLANT[*],*{}
		PROPELLANT
		{
			name = Ethane, 42 bar
			ratio = 0.270463
			DrawGauge = True
		}
		PROPELLANT
		{
			name = Nitrous Oxide
			ratio = 0.729537
			DrawGauge = True
		}
		@atmosphereCurve
	 	{
			@key,0 = 0 237.7
			@key,1 = 1 220.1
	 	}
		%powerEffectName = Hypergolic-OMS-Red
	}
	PLUME
	{
		name = Hypergolic-OMS-Red
		transformName = thrustTransform
		localRotation = 0,0,0
		localPosition = 0,0,0.625
		fixedScale = .35
		energy = .4
		speed = 2
		emissionMult = 2
	}
	EFFECTS
	{
		running_closed
		{
			AUDIO
			{
				channel = Ship
				clip = RealPlume/Felger_FX/sound_RS25loop
				volume = 0.0 0.0
				volume = 1.0 1.0
				pitch = 0.0 0.2
				pitch = 1.0 1.0
				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
                localPosition = 0, 0, 5
            }
            MODEL_MULTI_PARTICLE
            {
                modelName = Squad/FX/ks1_Exhaust
                transformName = thrustTransform
                emission = 0.0 0.0
                emission = 0.05 0.0
                emission = 0.075 0.25
                emission = 1.0 0.5
                speed = 0.0 0.5
                speed = 1.0 1.2
                localPosition = 0, 0, 0.2
            }
		}
		engage
		{
			AUDIO
			{
				channel = Ship
				clip = RealPlume/Felger_FX/sound_RS25ignite
				volume = 1.0
				pitch = 1.0
				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
            }
		}
	}	
}

 

Link to comment
Share on other sites

@Nnimrod

There's so much going on there I really don't know where to begin. You definitely aren't getting the correct result from this. There is some stuff I'm guessing you just copy and pasted in there (like the effects I posted) but you really can't do that and get a working result.

My honest advice is to scrap that frankenstein config and start over with something simple, then build on it as you get it working. Try starting here:

 

@PART[rn_aerobee150_eng]:AFTER[RealPlume]:Final
{
    @EFFECTS
        {
            @Hypergolic-OMS-Red
                  {
                    @AUDIO
                       {
                          clip = RealPlume/Felger_FX/RS25loop
                        }
                  }
           }
}

I am making some assumptions here, based on your config: that you use realplume, that this engine has an existing realplume config, and that in this existing realplume config this engine is assigned the Hypergolic-OMS-Red plume. Since RealPlume is going to overwrite any changes made to the engine with it's own config data, you need to let it do it's thing then change the sound for that engine.

Edited by Randazzo
Link to comment
Share on other sites

1 minute ago, Randazzo said:

@Nnimrod

There's so much going on there I really don't know where to begin. You definitely aren't getting the correct result from this. There is some stuff I'm guessing you just copy and pasted in there (like the effects I posted) but you really can't do that and get a working result.

My honest advice is to scrap that frankenstein config and start over with something simple, then build on it as you get it working. Try starting here:

 


@PART[rn_aerobee150_eng]:AFTER[RealPlume]:Final
{
    @EFFECTS
        {
            @Hypergolic-OMS-Red
                  {
                    @AUDIO
                       {
                          clip = RealPlume/Felger_FX/RS25loop
                        }
                  }
           }
}

I am making some assumptions here, based on your config: that you use realplume, that this engine has an existing realplume config, and that in this existing realplume config this engine is assigned the Hypergolic-OMS-Red plume. Since RealPlume is going to overwrite any changes made to the engine with it's own config data, you need to let it do it's thing then change the sound for that engine.

Yes, there's a fair amount there. For my purposes I would rather make all the edits to a part in one config rather than having a bunch of compatibility files for various mods, which is how most people do it. The engine does not have an existing realplume config, it's from RN's US rocket pack. Here's RN's part file. Also, everything about my file works perfectly with the exception of the sound, and I did copy the rest of the effects node from what you posted.

 

PART
{
// --- general parameters ---
name = rn_aerobee150_eng
module = Part
author = Raidernick

// --- asset parameters ---
MODEL
{
	model = RN_US_Rockets/Aerobee/aerobee150_eng
	scale = 0.80, 0.80, 0.80
}
rescaleFactor = 1
scale = 0.80

node_stack_top = 0.0, 0.36697, 0.0, 0.0, 1.0, 0.0, 0

// --- FX definitions ---
fx_exhaustFlame_yellow_tiny = 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -0.0, 0.0, 0.0, 0.0, 1.0, running
fx_smokeTrail_light = 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustSparks_flameout = 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, flameout

// --- Sound FX definition ---
sound_vent_medium = engage
sound_rocket_mini = running
sound_vent_soft = disengage


// --- editor parameters ---
TechRequired = start
entryCost = 0
cost = 95
category = Propulsion
subcategory = 0
title = Aerobee Sounding Rocket Motor
manufacturer = RN Industries
description = Liquid rocket motor for Aerobee 100/150/150A/170/170A/300/300A.

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

// --- standard part parameters ---
mass = 0.01
dragModelType = default
maximum_drag = 0.3
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 8
maxTemp = 3400 
bulkheadProfiles = size0,srf
stagingIcon = LIQUID_ENGINE
stageOffset = 1
childStageOffset = 1

MODULE
{
	name = ModuleEngines
	thrustVectorTransformName = thrustTransform
	exhaustDamage = True
	exhaustDamageMultiplier = 2
	ignitionThreshold = 0.1
	minThrust = 12
	maxThrust = 12
	heatProduction = 100
	fxOffset = 0, 0, 0
	PROPELLANT
	{
	 	name = LiquidFuel
        ratio = 0.9
		DrawGauge = True
	}
	PROPELLANT
	{
		name = Oxidizer
		ratio = 1.1
	}
		atmosphereCurve
		{
			key = 0 270
			key = 1 235
		}
}

}

 

Link to comment
Share on other sites

29 minutes ago, Nnimrod said:

Yes, there's a fair amount there. For my purposes I would rather make all the edits to a part in one config rather than having a bunch of compatibility files for various mods, which is how most people do it. The engine does not have an existing realplume config, it's from RN's US rocket pack. Here's RN's part file. Also, everything about my file works perfectly with the exception of the sound, and I did copy the rest of the effects node from what you posted.

Since you're using realplume, you won't want to use the effects I posted. Realplume overwrites all of that once you add a plume.

Good luck with this. Maybe Sarbian can help you better.

Edit: Now I have an idea. Testing.

Edited by Randazzo
Link to comment
Share on other sites

EFFECTS
{
  running_closed
  {
    AUDIO
    {
      channel = Ship
      clip = KWRocketry/Soundbank/sound_altloop
      volume = 0.0 0.0
      volume = 1.0 1.0
      pitch = 0.0 0.2
      pitch = 1.0 1.0
      loop = true
    }
    PREFAB_PARTICLE
    {
      name = smoke1
      prefabName = fx_smokeTrail_light
      transformName = OldFXTransform
      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, 0
    }
    PREFAB_PARTICLE
    {
      name = smoke2
      prefabName = fx_smokeTrail_light
      transformName = OldFX2Transform
      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, 0
    }
    MODEL_MULTI_PARTICLE
    {
      modelName = Squad/FX/ks1_Exhaust
      transformName = FX2Transform
      emission = 0.0 0.0
      emission = 0.05 0.0
      emission = 0.055 0.15
      emission = 0.6 0.8
      speed = 0.0 0.5
      speed = 1.0 1.2
    }
  }
  engage
  {
    AUDIO
    {
      channel = Ship
      clip = KWRocketry/Soundbank/sound_liq3
      volume = 1.0
      pitch = 1.0
      loop = false
    }
  }
  flameout
  {
    PREFAB_PARTICLE
    {
      prefabName = fx_exhaustSparks_flameout_2
      transformName = NozzleTransform
      oneShot = true
    }
    AUDIO
    {
      channel = Ship
      clip = sound_explosion_low
      volume = 1.0
      pitch = 2.0
      loop = false
    }
  }
}

This is the EFFECTS node from a KWRocketry engine, so I know it's written correctly. KW engines are set up to use stock graphics for exhaust, but reference sounds added by the mod. And then RealPlume Stock has patches for the engines, but they only add plumes, they don't change the smoke or the audio. Can I use an EFFECTS node with only the audio portions or do I need to include the graphics portions? I'd rather not, because I've already got it set up with RealPlume graphics. Either way, what are the directory restrictions regarding where the audio clips be stored? The ".cfg documentation" wiki page has some very strict things to say about how the audio clips are to be stored, but KWRocketry doesn't do it that way, although KWR does have all the sound files start with "sound_". And the sounds I tried using in my clip, the Felger_FX sounds in RealPlume, don't start with "sound_". I did try changing the name of them to start with "sound_" but that didn't make everything work. But, it's entirely possible that naming them like that IS necessary, and that they weren't working because of other things I was doing wrong. Should I mimic KWR and make a "Soundbank" folder inside my mod folder and put sound clips in that, naming them with the "sound_" prefix?

Link to comment
Share on other sites

@Nnimrod

There's no need to add sound_ in front of the filename. When you see that, it's referring to the stock sounds in the squad folder, and the files are named in that fashion.

What's foiling you (and me) is RealPlume. It has a config set up to run after RealPlume itself (look in the 000_ Generic_Plumes folder) that is deleting all extraneous effects from any part with a plume. So regardless of what you add, it's getting wiped.

I might have a way around it, still testing.

Link to comment
Share on other sites

3 minutes ago, Randazzo said:

@Nnimrod

There's no need to add sound_ in front of the filename. When you see that, it's referring to the stock sounds in the squad folder, and the files are named in that fashion.

What's foiling you (and me) is RealPlume. It has a config set up to run after RealPlume itself (look in the 000_ Generic_Plumes folder) that is deleting all extraneous effects from any part with a plume. So regardless of what you add, it's getting wiped.

I might have a way around it, still testing.

Wow, glad you pointed that out. It's painfully obvious now why my EFFECTS node didn't seem to do anything no matter how I messed with it. That also answers a question that occurred to me awhile ago, that being "If I'm just adding RealPlume graphics with a PLUME node, why am I not seeing both vanilla and RealPlume graphics in game? I tried deleting the vanilla effects but it didn't seem to make a difference, so I just removed those lines, shrugged, and went about my business of messing with adding different sounds with an EFFECTS node. Which of course has not worked.

Link to comment
Share on other sites

OK. It's 1am and I don't have the brainpower to test anymore, but I do have a working solution. I used two configs. Yours, slightly modified:
 

Spoiler

 

@PART[rn_aerobee150_eng]:FOR[RealPlume]:NEEDS[SmokeScreen]
{
    //Old title: Aerobee Sounding Rocket Motor
    //Source mod: Raidernick's US Rockets
    @name = Nacreous-engine
    //@rescaleFactor = 1
    @mass = .014
    %tags = nacreous
    @MODULE[ModuleEngines*]
    {
        @name = ModuleEnginesFX
        runningEffectName = running_closed
        @maxThrust = 15
        !PROPELLANT[*],*{}
        PROPELLANT
        {
            name = Ethane, 42 bar
            ratio = 0.270463
            DrawGauge = True
        }
        PROPELLANT
        {
            name = Nitrous Oxide
            ratio = 0.729537
            DrawGauge = True
        }
        @atmosphereCurve
         {
            @key,0 = 0 237.7
            @key,1 = 1 220.1
         }
        %powerEffectName = Hypergolic-OMS-Red
    }
    PLUME
    {
        name = Hypergolic-OMS-Red
        transformName = thrustTransform
        localRotation = 0,0,0
        localPosition = 0,0,0.625
        fixedScale = .35
        energy = .4
        speed = 2
        emissionMult = 2
    }
    
}

 

 

 

And mine, again, slightly modified:

Spoiler

@PART[rn_aerobee150_eng]:AFTER[zRealPlume]:Final
{
    @EFFECTS
    {
    @Hypergolic-OMS-Red
        {
        @AUDIO
            {
             @clip = RealPlume/Felger_FX/RS25loop
            }
        }
    @engage
        {
        @AUDIO
            {
            @clip = RealPlume/Felger_FX/RS25ignite
            }
        }
    }
}

This gets the sound on the engine but there's some issue with the loop. If you throttle the engine down, the sound keeps playing. I'm too tired to figure it out.

The key things here are: Don't run your config :FINAL. Let it run like a standard RealPlume config. Mine has to run AFTER zRealPlume (which is another cfg file..yeesh) and it must be final. I don't know if you can successfully combine these into a single patch or not.

I'm going to bed. Good luck.

Edit: I suppose it would help if I tagged you first.. @Nnimrod

Edited by Randazzo
Link to comment
Share on other sites

17 hours ago, Randazzo said:

OK. It's 1am and I don't have the brainpower to test anymore, but I do have a working solution. I used two configs. Yours, slightly modified:
 

  Reveal hidden contents

 

@PART[rn_aerobee150_eng]:FOR[RealPlume]:NEEDS[SmokeScreen]
{
    //Old title: Aerobee Sounding Rocket Motor
    //Source mod: Raidernick's US Rockets
    @name = Nacreous-engine
    //@rescaleFactor = 1
    @mass = .014
    %tags = nacreous
    @MODULE[ModuleEngines*]
    {
        @name = ModuleEnginesFX
        runningEffectName = running_closed
        @maxThrust = 15
        !PROPELLANT[*],*{}
        PROPELLANT
        {
            name = Ethane, 42 bar
            ratio = 0.270463
            DrawGauge = True
        }
        PROPELLANT
        {
            name = Nitrous Oxide
            ratio = 0.729537
            DrawGauge = True
        }
        @atmosphereCurve
         {
            @key,0 = 0 237.7
            @key,1 = 1 220.1
         }
        %powerEffectName = Hypergolic-OMS-Red
    }
    PLUME
    {
        name = Hypergolic-OMS-Red
        transformName = thrustTransform
        localRotation = 0,0,0
        localPosition = 0,0,0.625
        fixedScale = .35
        energy = .4
        speed = 2
        emissionMult = 2
    }
    
}

 

 

 

And mine, again, slightly modified:

  Hide contents

@PART[rn_aerobee150_eng]:AFTER[zRealPlume]:Final
{
    @EFFECTS
    {
    @Hypergolic-OMS-Red
        {
        @AUDIO
            {
             @clip = RealPlume/Felger_FX/RS25loop
            }
        }
    @engage
        {
        @AUDIO
            {
            @clip = RealPlume/Felger_FX/RS25ignite
            }
        }
    }
}

This gets the sound on the engine but there's some issue with the loop. If you throttle the engine down, the sound keeps playing. I'm too tired to figure it out.

The key things here are: Don't run your config :FINAL. Let it run like a standard RealPlume config. Mine has to run AFTER zRealPlume (which is another cfg file..yeesh) and it must be final. I don't know if you can successfully combine these into a single patch or not.

I'm going to bed. Good luck.

Ok, so you just make a second patch so that you can run it after realplume, and then edit the defaults that 000_zRealPlume.cfg introduces (Which were previously deleted by 000_EFFECTS_remover.cfg. And use :FINAL on the last patch that should be run. I'll use this method tomorrow, as you said it's getting late. 

 

Thanks for your help with this!

edit: Ugh... this is complicated >.> 

Edited by Nnimrod
Link to comment
Share on other sites

So, as I understand it,

1. The part file has graphics and sound provided for via vanilla method, or an EFFECTS node. Either way, if the part has a RealPlume patch, all these effects are going bye bye.

2. A RealPlume patch, probably part of RealPlume-Stock, but could also be done seperately, adds a PLUME node to the part

3. 000_zRealPlume.cfg tidies up the PLUME node

4. The RealPlume patch that corresponds to the PLUME node added previously runs, creating an EFFECTS node with the desired exhaust graphics, smoke, and sound for running normally, ignition, flameout, and engine cutoff. The sounds used can be vanilla or can be added by a mod.

5. 000_EFFECTS_Remover.cfg removes the vanilla graphics/sound, and the pre-existing EFFECTS node. 

 

So, it would seem to me that the easiest way to add sound would be to make a new RealPlume patch that is a copy of the existing, desired RealPlume patch, but referencing the sounds you want. This does not involve messing with the part file at all.

Edited by Nnimrod
Link to comment
Share on other sites

8 minutes ago, Nnimrod said:

So, as I understand it,

1. The part file has graphics and sound provided for via vanilla method, or an EFFECTS node. Either way, if the part has a RealPlume patch, all these effects are going bye bye.

2. A RealPlume patch, probably part of RealPlume-Stock, but could also be done seperately, adds a PLUME node to the part

3. 000_zRealPlume.cfg tidies up the PLUME node

4. The RealPlume patch that corresponds to the PLUME node added previously runs, creating an EFFECTS node with the desired exhaust graphics, smoke, and sound for running normally, ignition, flameout, and engine cutoff. The sounds used can be vanilla or can be added by a mod.

5. 000_EFFECTS_Remover.cfg removes the vanilla graphics/sound, and the pre-existing EFFECTS node. 

 

So, it would seem to me that the easiest way to add sound would be to make a new RealPlume patch that is a copy of the existing, desired RealPlume patch, but referencing the sounds you want. This does not involve messing with the part file at all.

The easiest way to me would be to just edit the path if you don't then you will run in to what patch is running first and last.

Link to comment
Share on other sites

2 hours ago, Nnimrod said:

So, as I understand it,

1. The part file has graphics and sound provided for via vanilla method, or an EFFECTS node. Either way, if the part has a RealPlume patch, all these effects are going bye bye.

2. A RealPlume patch, probably part of RealPlume-Stock, but could also be done seperately, adds a PLUME node to the part

3. 000_zRealPlume.cfg tidies up the PLUME node

4. The RealPlume patch that corresponds to the PLUME node added previously runs, creating an EFFECTS node with the desired exhaust graphics, smoke, and sound for running normally, ignition, flameout, and engine cutoff. The sounds used can be vanilla or can be added by a mod.

5. 000_EFFECTS_Remover.cfg removes the vanilla graphics/sound, and the pre-existing EFFECTS node. 

 

So, it would seem to me that the easiest way to add sound would be to make a new RealPlume patch that is a copy of the existing, desired RealPlume patch, but referencing the sounds you want. This does not involve messing with the part file at all.

It seemed horribly complicated late last night, but it isn't really. The problem is simply getting the patches to execute in the correct order. The short of it is that 000_zRealPlume runs after the effects remover runs, so running your patch after zRealPlume prevents your effects from getting removed.

Running AFTER[zRealPlume]:Final allows you to change the audio after applying a RealPlume plume to the engine. You could write a new plume definition, but that's just manually doing what the sound patch is correcting when run in the correct order.

Edit: I think it is pertinent to some participants to point out that the issue here revolved entirely around trying to mod around another mod. There is no direct issue with using custom sounds.

Edited by Randazzo
Link to comment
Share on other sites

1 hour ago, Randazzo said:

It seemed horribly complicated late last night, but it isn't really. The problem is simply getting the patches to execute in the correct order. The short of it is that 000_zRealPlume runs after the effects remover runs, so running your patch after zRealPlume prevents your effects from getting removed.

Running AFTER[zRealPlume]:Final allows you to change the audio after applying a RealPlume plume to the engine. You could write a new plume definition, but that's just manually doing what the sound patch is correcting when run in the correct order.

Edit: I think it is pertinent to some participants to point out that the issue here revolved entirely around trying to mod around another mod. There is no direct issue with using custom sounds.

I may have been doing something wrong (Most of the time I am), but I couldn't get your method to work. By your method I mean this sort of patch. 

@PART[rn_aerobee150_eng]:AFTER[zRealPlume]:Final
{
    @EFFECTS
    {
    @Hypergolic-OMS-Red
        {
        @AUDIO
            {
             @clip = RealPlume/Felger_FX/RS25loop
            }
        }
    @engage
        {
        @AUDIO
            {
            @clip = RealPlume/Felger_FX/RS25ignite
            }
        }
    }
}

I have however gotten 100% success by making a slightly altered copy of the RealPlume file (ex. RealPlume/000_GenericPlumes/Hypergolic-OMS-Red). I have this patch just sitting in my mod folder/sounds/patch.cfg

As of writing this I was still fiddling with volume and pitch and things, but it works.

@PART[*]:HAS[@PLUME[Nacreous_Hypergolic-OMS-Red]]:AFTER[zRealPlume]:NEEDS[SmokeScreen]
{
    %EFFECTS
    {
        %Hypergolic-OMS-Red
        {
            MODEL_MULTI_PARTICLE_PERSIST
            {
                //Get the inputs from the other config.
                transformName = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/transformName$
                localRotation = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/localRotation[0]$,$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/localRotation[1]$,$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/localRotation[2]$
                localPosition = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/plumePosition[0]$,$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/plumePosition[1]$,$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/plumePosition[2]$
                fixedScale    = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/plumeScale$
                energy        = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/energy$
                speed         = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/speed$
                emissionMult  = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/emissionMult$
                //
                name = plume
                modelName = RealPlume/MP_Nazari_FX/KWflamesmall
                fixedEmissions = false
                sizeClamp = 50
                randConeEmit
                {
                  density = 1.0 0
                  density = 0.5 0.3
                  density = 0.25 0.3
                  density = 0.06 0.4
                  density = 0 0.6
                }
                logGrow
                {
                  density = 1.0 2
                  density = 0.1 2
                  density = 0.0 2
                }
                logGrowScale
                {
                  density = 1.0 1
                  density = 0.8 3
                  density = 0.46 4
                  density = 0.2 10
                  density = 0.1 5
                  density = 0.0 4
                }
                grow
                {
                  density = 1.0 -0.95
                  density = 0.5 0
                  density = 0.0 0
                }
                linGrow
                {
                  density = 1.0 -0.2
                  density = 0.8 0
                  density = 0.46 1
                  density = 0.2 7
                  density = 0.05 12
                  density = 0.0 14
                }
                speed
                {
                  density = 1.0 1
                  density = 0.46 1.5
                  density = 0.2 1.5
                  density = 0.05 1.3
                  density = 0.0 1.2
                }
                xyForce
                {
                  density = 1 0.65
                  density = 0.5 0.85
                  density = 0.25 0.9
                  density = 0.06 0.95
                  density = 0 1
                }
                zForce
                {
                  density = 1 1
                  density = 0.2 1.02
                  density = 0 1.033
                }
                emission
                {
                  density = 1.0 1
                  density = 0.8 1
                  density = 0.2 1
                  density = 0.1 1
                  density = 0.05 2
                  density = 0.0 3
                  power = 1 1
                  power = 0.01 0.2
                  power = 0 0
                }
                energy
                {
                  density = 1.0 1
                  density = 0.3 1
                  density = 0.2 1
                  density = 0.05 0.7
                  density = 0.0 0.3
                }
                size
                {
                  density = 1.0 0.85
                  density = 0.8 0.75
                  density = 0.2 0.65
                  density = 0.0 0.4
                }
            }
            AUDIO
            {
                channel = Ship
                clip = RealPlume/Felger_FX/RS25loop
                volume = 0.0 0.0
                volume = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/plumeScale$
                @volume,1 ^= :^:1.0 :
                pitch = 0.0 1.5
                pitch = 1.0 1.0
                loop = true
            }
        }
    }
}
@PART[*]:HAS[@PLUME[Nacreous_Hypergolic-OMS-Red],@EFFECTS:HAS[!engage]]:AFTER[zRealPlume]:NEEDS[SmokeScreen]
{
    @EFFECTS
    {
        engage
        {
            AUDIO
            {
                channel = Ship
                clip = RealPlume/Felger_FX/RS25ignite
                volume = #$../../../PLUME[Nacreous_Hypergolic-OMS-Red]/plumeScale$
                pitch = 1.5
                loop = false
            }
        }
        disengage
        {
            AUDIO
            {
                channel = Ship
                clip = sound_vent_soft
                volume = 1.0
                pitch = 2.0
                loop = false
            }
        }
        flameout
        {
            AUDIO
            {
                channel = Ship
                clip = sound_explosion_low
                volume = 0.075
                pitch = 2.0
                loop = false
            }
        }
    }
}

 

Link to comment
Share on other sites

9 hours ago, Nnimrod said:

I may have been doing something wrong (Most of the time I am), but I couldn't get your method to work. By your method I mean this sort of patch. 

I have however gotten 100% success by making a slightly altered copy of the RealPlume file (ex. RealPlume/000_GenericPlumes/Hypergolic-OMS-Red). I have this patch just sitting in my mod folder/sounds/patch.cfg

As of writing this I was still fiddling with volume and pitch and things, but it works.

 

As long as you're getting the desired end result, run with it.

1 hour ago, sarbian said:

@PART[rn_aerobee150_eng]:AFTER[zRealPlume]:Final

Order specification are not something you pile on top of each other. A patch is either AFTER something or FINAL, not both.

 

Is there a correct way to specify that it needs to be applied after all other patches that apply themselves after zRealPlume? Just FINAL?

I mostly fumble my way through these things and if something works I just go with it.

Edited by Randazzo
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...