Jump to content

Need help with module manager part code regarding sound replacement...


Justicier

Recommended Posts

Been using the Jet Sounds mod and the latest version has sound files for the RAPIER in the download, but no cfg file to make them work. So, I have been trying to create my own that will allow custom sounds for the RAPIER. I have hit a brick wall in that I can get the "power" and "running" sounds working in-game, but not the startup, and shutdown sounds. To further show me how terrible I am with coding, right now regardless of the state of the engine there is full exhaust particle effects being displayed. The engine could be completely out of fuel and shut off, but it still spews the full particle effect.

So, after about two weeks trying different configurations to the code, this is what I am currently running with the aforementioned effects. At this point I'm really at a loss, any help would be most welcome! Current code is in spoiler window below:

Spoiler

//CR-7 "R.A.P.I.E.R."
@PART[RAPIER]:NEEDS[JetSounds]:FINAL
{
    @MODULE,1
    {
        @engageEffectName = engage_new
        @disengageEffectName = disengage_new
        @powerEffectName = power_open_new
        @spoolEffectName = running_turbine_new
        engineAccelerationSpeed = 0.5
        engineDeccelerationSpeed = 0.5
    }
    @MODULE,2
    {
        @runningEffectName = running_closed_new
    }
    @EFFECTS
    {
        !engage {}
        !disengage {}
        !power_AirBreathing {}
        !running_turbine {}
        !power_ClosedCycle {}

        %engage_new
        {
            %AUDIO
            {
                channel = Ship
                clip = JetSounds/Sounds/RAPIER_Startup
                pitch = 1.0
                volume = 1.0
                loop = false
            }
        }
        %disengage_new
        {
            %AUDIO
            {
                channel = Ship
                clip = JetSounds/Sounds/RAPIER_Shutdown
                pitch = 1.0
                volume = 1.0
                loop = false
            }
        }
        %power_open_new
        {
            %AUDIO
            {
                channel = Ship
                clip = JetSounds/Sounds/RAPIER_Fan_High
                volume = 0.0 0.0
                volume = 0.05 0.0
                volume = 1.0 1.0
                pitch = 0.0 0.2
                pitch = 1.0 1.0
                loop = true
            }
            %MODEL_MULTI_PARTICLE
            {
                modelName = Squad/FX/shockExhaust_red_small
                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.5
                speed = 1.0 1.2
            }
        }
        %running_turbine_new
        {
            %AUDIO
            {
                channel = Ship
                clip = JetSounds/Sounds/RAPIER_Fan_Low
                volume = 0.0 0.0
                volume = 0.05 0.6
                volume = 1.0 1.0
                pitch = 0.0 0.7
                pitch = 1.0 1.4
                loop = true
            }
            %PREFAB_PARTICLE
            {
                prefabName = fx_smokeTrail_aeroSpike
                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
            }
        }
        %running_closed_new
        {
            %AUDIO
            {
                channel = Ship
                clip = JetSounds/Sounds/RAPIER_Rocket_High
                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_aeroSpike
                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
            }
            %MODEL_MULTI_PARTICLE
            {
                modelName = Squad/FX/shockExhaust_blue_small
                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.5
                speed = 1.0 1.2
            }
        }
    }
}

 

 

Link to comment
Share on other sites

That is how I had it set up before. No sounds worked at all. From what I have seen, MODULE,0 works for a single module file. Multi-module files work starting with MODULE,1 and so on. Setting the code to MODULE,0 still has no effect on the particle emitter, it still is at full emission regardless of engine state.

Link to comment
Share on other sites

On 11/13/2016 at 10:35 PM, Justicier said:

That is how I had it set up before. No sounds worked at all. From what I have seen, MODULE,0 works for a single module file. Multi-module files work starting with MODULE,1 and so on. Setting the code to MODULE,0 still has no effect on the particle emitter, it still is at full emission regardless of engine state.

that's because Module,0 references the Multi-Modal engine module in the RAPIER engine, whereas Module,1 is the first ModuleEnginesFX; 2 being the second engine.

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