Jump to content

[1.9.x+] ModuleAnimateGenericEffects


linuxgurugamer

Recommended Posts

 

ModuleAnimateGenericEffects

The stock ModuleAnimateGeneric does not allow for any effects (ie: audio, or other).  This module extends the stock module and adds effects

 

This is an expansion of the stock  ModuleAnimateGeneric module.  It adds the following:

  1. Associate effects with the moving animation
  2. Modules now follow part symmetry
  3. animSpeed is now working to set the animation speed

Usage

This works by utilizing the stock EFFECTS stanzas as used in many parts.  See the stock documentation for information on how to set up the EFFECTS stanzas

The syntax for the module itself is identical to the stock ModuleAnimateGeneric, with the following additions:

        deployEffectName = deploy
        postDeployEffectName = deployed
        postDeployEffectLength = 0.5
        retractEffectName = retract
        postRetractEffectName = retracted
        postRetractEffectLength = 0.5
        animSpeed = 0.1

where

    deployEffectName is the effect(s) which should be played when deploying
    postDeployEffectName is the effect(s) which should be played when deployment is completed.
    postDeployEffectLength is how long the post-deployment effect should be played
    retractEffectName is the effect(s) which should be played when retracting
    postRetractEffectName is the effect(s) which should be played when retractment is completed
    postRetractEffectLength is how long the post-retractment effect should be played
    animationRampSpeed controls how quickly the animation gets up to speed.  If not specified, starts at full speed
    customAnimationSpeed is a multiplier to adust the speed without having to change the model
    reverseGUIName is the text to put into the PAW to reverse the motion.  If not specified, then will not be active
 

Default Values

        deployEffectName = deploy
        postDeployEffectName = 
        postDeployEffectLength = 0.5
        retractEffectName = retract
        postRetractEffectName = 
        postRetractEffectLength = 0.5
        animSpeed = 1
        animationRampSpeed = 0.005
        customAnimationSpeed = 1
        reverseGUIName = 
 

    If no value is specified, no effect will be played

Incompatible Option

This mod is not compatible with the stock option:

allowDeployLimit = true

 

Availability

Available via CKAN

Edited by linuxgurugamer
Link to comment
Share on other sites

5 minutes ago, AlphaMensae said:

@linuxgurugamer How hard would it be to add customized names for deploy limit sliders?  So they don't say "Deploy Limit", but anything you'd want.

Probably not too difficult.  I'm busy with some other stuff, but make an issue and I'll look at it.

 

Link to comment
Share on other sites

  • 1 year later...
  • 6 months later...

@linuxgurugamer

Hi. I am trying to use your plugin to get some gear for the Millenium Falcon to make noise when closing and opening.

I have installed the plugin in the folder structure as it came.

C:\KSP1.12.2\Kerbal Space Program\GameData\ModuleAnimateGenericEffects\Plugins\ModuleAnimateGenericEffects.dll

I do have the latest Module Manager if that is required. No dependencies were stated. I have set up the config as follows and the actual animation works fine. I tried the default set up at first and when no sound came I increased the value of length, though I do not know what unit you are using. Could you please look at the following and tell me if I missed something?
 

Spoiler

    MODULE
    {
        name = ModuleAnimateGeneric
        animationName = LandingGear
        startEventGUIName = Gear Up
        endEventGUIName = Gear Down
        actionGUIName = Landing Gear
        defaultActionGroup = Gear

        deployEffectName = deploy

        postDeployEffectName = deployed
 
        postDeployEffectLength = 5.0
        retractEffectName = retract

        postRetractEffectName = retracted
 
        postRetractEffectLength = 5.0

        animSpeed = 1

    
    }

    EFFECTS
    {
        deploy
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/elev_start
                volume = 0 0
                volume = 1 0.7
                pitch = 0.75
            }
            AUDIO_LOOP
            {
                channel = Ship
                clip = Squad/Sounds/elev_loop
                volume = 0 0
                volume = 1 0.7
                pitch = 0.55
            }
        }
        deployed
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/elev_stop
                volume = 0 0
                volume = 1 0.7
                pitch = 0.50
            }
        }
        retract
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/elev_stop
                volume = 0 0
                volume = 1 0.7
                pitch = 0.60
            }
            AUDIO_LOOP
            {
                channel = Ship
                clip = Squad/Sounds/elev_loop
                volume = 0 0
                volume = 1 0.7
                pitch = 0.50
            }
        }
        retracted
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/elev_start
                volume = 0 0
                volume = 1 0.7
                pitch = 0.75
            }
        }
    }

 

Link to comment
Share on other sites

On 2/7/2022 at 12:25 PM, ColdJ said:

@linuxgurugamer

Hi. I am trying to use your plugin to get some gear for the Millenium Falcon to make noise when closing and opening.

I have installed the plugin in the folder structure as it came.

C:\KSP1.12.2\Kerbal Space Program\GameData\ModuleAnimateGenericEffects\Plugins\ModuleAnimateGenericEffects.dll

I do have the latest Module Manager if that is required. No dependencies were stated. I have set up the config as follows and the actual animation works fine. I tried the default set up at first and when no sound came I increased the value of length, though I do not know what unit you are using. Could you please look at the following and tell me if I missed something?
 

  Reveal hidden contents

    MODULE
    {
        name = ModuleAnimateGeneric
        animationName = LandingGear
        startEventGUIName = Gear Up
        endEventGUIName = Gear Down
        actionGUIName = Landing Gear
        defaultActionGroup = Gear

        deployEffectName = deploy

        postDeployEffectName = deployed
 
        postDeployEffectLength = 5.0
        retractEffectName = retract

        postRetractEffectName = retracted
 
        postRetractEffectLength = 5.0

        animSpeed = 1

    
    }

    EFFECTS
    {
        deploy
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/elev_start
                volume = 0 0
                volume = 1 0.7
                pitch = 0.75
            }
            AUDIO_LOOP
            {
                channel = Ship
                clip = Squad/Sounds/elev_loop
                volume = 0 0
                volume = 1 0.7
                pitch = 0.55
            }
        }
        deployed
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/elev_stop
                volume = 0 0
                volume = 1 0.7
                pitch = 0.50
            }
        }
        retract
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/elev_stop
                volume = 0 0
                volume = 1 0.7
                pitch = 0.60
            }
            AUDIO_LOOP
            {
                channel = Ship
                clip = Squad/Sounds/elev_loop
                volume = 0 0
                volume = 1 0.7
                pitch = 0.50
            }
        }
        retracted
        {
            AUDIO
            {
                channel = Ship
                clip = Squad/Sounds/elev_start
                volume = 0 0
                volume = 1 0.7
                pitch = 0.75
            }
        }
    }

 

Your problem is on the third line. It still says ModuleAnimateGeneric.

I replaced it with:   ModuleAnimateGenericEffects   and the sounds worked

 

 

Link to comment
Share on other sites

37 minutes ago, ColdJ said:

Thank you for that. I hadn't realised it was a different module. Thought it was an expansion to the original. I shall try that and let you know if I get the same.

It is an expansion, but in order to do that, the new module inherits all the settings from the original

Link to comment
Share on other sites

@linuxgurugamerThank you again. Works as advertised. I have a number of things that this will be great for. It is amazing that it takes a modder like yourself to get useful stuff like this. You would think that it should be a stock module.

@AtomicTech Here is a great addition to your arsenal for useful mods to help with your own future mods.

Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...

@linuxgurugamer

Hi. I have a few people who when using the 0.1.4 version of the plugin get  animations stuttering and reseting before getting stuck part way. I personally use the 0.1.3 version and haven't had any issues with that version.

There are both varying levels of windows users and a Mac user.

Link to comment
Share on other sites

On 9/13/2022 at 12:58 AM, ColdJ said:

@linuxgurugamer

Hi. I have a few people who when using the 0.1.4 version of the plugin get  animations stuttering and reseting before getting stuck part way. I personally use the 0.1.3 version and haven't had any issues with that version.

There are both varying levels of windows users and a Mac user.

I'll take a look

Link to comment
Share on other sites

On 9/13/2022 at 12:58 AM, ColdJ said:

@linuxgurugamer

Hi. I have a few people who when using the 0.1.4 version of the plugin get  animations stuttering and reseting before getting stuck part way. I personally use the 0.1.3 version and haven't had any issues with that version.

There are both varying levels of windows users and a Mac user.

What parts are you having these issues with

Link to comment
Share on other sites

13 hours ago, linuxgurugamer said:

What parts are you having these issues with

The last was in my Oblivion Bubble Patrol Ship mod but also got a report from my Thunderbird mod. I am guessing those who started using the mod before the last update were fine but those who got it afterwards had trouble. Many people don't take the time to report and just assume my mod is broken, so I don't know how many had trouble.

The bubble ship is all one piece and I used the plugin for 2 of the animations. The landing gear and the transition of the engines.

Link to comment
Share on other sites

  • 1 month later...
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...