Jump to content

Linking sound to an effect


joemann

Recommended Posts

Posted

Hello All

 

I recently started playing CK2 and it is the first game that makes me want to start modding. I have no knowledge on programming but would like to learn .

I have been playing around with some event files from the KSV mod and can now change pictures and text. I am now trying to add  sound to an event, but am not able to make it work.

Is this possible and if so how?

 

I have tried the following:

 

# Oral sex 31
character_event = {
    id = ksv.431
    desc = ksv431desc
    picture = GFX_evt_ksv.sexoral2
    sound = "gagging_female_01"
        

        
    is_triggered_only = yes

 

This does not work. Anybody know how to do this?

 

Thanks

 

Posted

You can try putting the sound = x inside an immediate = {} to get the sound when you receive the event or inside an option = {} to get it when you click on said option.

 

Welcome to ck2 modding!

Posted

Thanks for your answer. I'm glad to know it is possible to do this!

 

However, i have tried some variations of your solutions but I can't get it to work. Probably because I am so new to this that I misinterpret what you mean.

 

For example, I have tried (in the same script as above):

 


     { sound = gagging_female01 } and also

 

option = {
        sound = gagging_female01
    }

 

The first one produces no sound but breaks of the event

 

The second one doesn't interrupt the event but still no sound (except for the regular game sounds)

 

I would really appreciate it if you could spell it out for a newbie!

 

Thanks again.

 
    

   

 

Posted


#Blend In-mission success
letter_event = {
    id = MNM.3251
    border = GFX_event_letter_frame_religion
    desc = EVTDESC_MNM_3251

    is_triggered_only = yes

    option = {
        name = EVTOPTA_MNM_3251

        if = {
            limit = { has_quest = quest_secret_religions_societies_blend_in }
            clr_quest = quest_secret_religions_societies_blend_in
            sound_effect = secret_cults_blend_in
            remove_character_modifier = attempting_to_blend_in
            clr_character_flag = blending_in_timer
        }
        add_society_currency_medium_effect = yes
        decrease_visibility_effect = yes
    }
}

 

The effect is "sound_effect".

 

 

secret_cults_blend_in =
{
    file = "secret_cults_blend_in_01.wav"
    volume = 65
    on_demand = yes
}

 

This is the file: interface/sound.sfx

 

https://ck2.paradoxwikis.com/Commands

 

Maybe that could help you.

 

Posted

I tried the following:

 

character_event = {
    id = ksv.43
    desc = ksv43desc
    picture = GFX_evt_ksv.sexoral1
     
        
    
    

    is_triggered_only = yes

    option = {
        name = ksvoptionfurther
        character_event = { id = ksv.431 }
        sound_effect = gagging_female_01


        {gagging_female_01 =

    file = "gagging_female_01.wav"
    volume = 65
    on_demand = yes
        
    }    
}

 

It did not work.

 

Did I put

 

 {gagging_female_01 =

    file = "gagging_female_01.wav"
    volume = 65
    on_demand = yes
        
    } 

   

in the right place?

 

You  refer   to the interface/ sound.sfx file. However, my sound effect  is not an existing game file  (so it won't be in the main interface/ sound sfx file) and it i in the wav format.

Does my new sound file need to be in sfx format and if so where do I put it? Do I need to create a separate sound sfx file in the interface directory of the mod?

 

 

I appreciate your help, but if you are new to this, each answer raises ten new questions :frown: I am enjoying myself though!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...