aliens

Author Topic: Sound and music missing on underwater battlescape  (Read 3631 times)

wcho035

  • Guest
Sound and music missing on underwater battlescape
« on: August 31, 2019, 05:27:21 am »
Hey guys,

      I have one outstanding major problem that I can't hack through. Missing Sound and music for an underwater map.

      I am hoping just some hint to go at the right direction.

      For Music, I dig into the sound folder of the TFTD game and expanded the .cat files. There are .raw music format. I found in the
music.rul of TFTD here are a list for example.

musics: #done
  - type: GMNEWINT #intro
    catPos: 0
  - type: GMSIG #tleth cutscene
    catPos: 1
  - type: GMWAITLO #main menu
    catPos: 2


If I copy sample.cat over to TFTD to UFO, I have to label the sample.cat to sample4.cat. Yet if I merge the Music.rul from TFTD to UFO's music.rul, what catPos it will be for GMWEWINT?

For the underwater sound, like weapon and sound of doors opening.. movement of Tanks and dead of soldiers. This completely stump me out. Please help. It is just a simple answer hope some one can help.
« Last Edit: August 31, 2019, 05:30:54 am by wcho035 »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Sound and music missing on underwater battlescape
« Reply #1 on: August 31, 2019, 10:08:03 am »
Don't modify CAT files.

Provide your music and sounds as OGG or WAV.

Surface sounds are defined in BATTLE.CAT, underwater sounds are defined in BATTLE2.CAT. Check any bigger mod how to do it.

To replace vanilla music, just provide files with the same names as vanilla (check any music mod for the exact names); any extra non-vanilla music should be defined in music.rul before it can be used in other ruleset.

wcho035

  • Guest
Re: Sound and music missing on underwater battlescape
« Reply #2 on: August 31, 2019, 10:31:26 am »
Thanks Meridian, you are the god as always in helping out.

Is there a check in the codes for sound transformation? Y/N I checked the forums and the notes BUT in case I miss something.

If not, is there a check in the item code for hit sound or fire sound underwater? Y/N

I know music is terrain bound, the ref for them is in music and terrain ruls. 

Yet how come sound is not terrain bound? I mean it works for all the other terrains but not the one you added on? If it not terrain bound, what will the best method one can implement it for weapons, movements and death and doors?  I have a good idea how music can be resolved, but sound is still out of my league


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Sound and music missing on underwater battlescape
« Reply #3 on: August 31, 2019, 10:38:28 am »
Is there a check in the codes for sound transformation? Y/N I checked the forums and the notes BUT in case I miss something.

I don't understand the question.
Please rephrase.

If not, is there a check in the item code for hit sound or fire sound underwater? Y/N

Yes, surface sounds are taken from BATTLE.CAT and underwater sounds are taken from BATTLE2.CAT.

Yet how come sound is not terrain bound? I mean it works for all the other terrains but not the one you added on? If it not terrain bound, what will the best method one can implement it for weapons, movements and death and doors?  I have a good idea how music can be resolved, but sound is still out of my league

Footstep sounds are defined directly in each type of tile... different sounds for example for grass tiles than for metal floor tiles... you need to modify them using map/tile editor.

Weapon, Death and Door sounds don't depend on terrain, just on whether it is surface or underwater... same as hit and fire sounds above.

wcho035

  • Guest
Re: Sound and music missing on underwater battlescape
« Reply #4 on: August 31, 2019, 10:45:27 am »
IS there codes for sound transformation or a feature like this in OXCE?

Okay, is there a way to make weapon, movement and death sound to ignore the underwater check and treat any terrain like it is a surface terrain?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Sound and music missing on underwater battlescape
« Reply #5 on: August 31, 2019, 10:48:54 am »
IS there codes for sound transformation or a feature like this in OXCE?

I really don't understand this, sorry.
What sound transformation? What codes?

Okay, is there a way to make weapon, movement and death sound to ignore the underwater check and treat any terrain like it is a surface terrain?

Yes, it's called disableUnderwaterSounds.
Check the ruleset documentation.

wcho035

  • Guest
Re: Sound and music missing on underwater battlescape
« Reply #6 on: August 31, 2019, 10:51:01 am »
You just hit the jackpot for me, thanks Meridian, you are the man.

wcho035

  • Guest
Re: Sound and music missing on underwater battlescape
« Reply #7 on: August 31, 2019, 02:14:39 pm »
Okay, I have all the problems with my hybrid mod almost iron out now. The only issue remain is music, I have a theory but need confirmation.

The music are stored in Sample.cat, and in UFO sounds, there is SAMPLE, SAMPLE2 and SAMPLE3.

So, from TFTD, I move the TFTD Sample.cat into the UFO sound folder, renamed it as SAMPLE4.cat.

I copy all the codes from TFTD into UFO music.rul and now, for the music to work, I need to get the catpos: number correct for the type.

I am face with 4 options.

1) get the catpos number correct, UFO catpos number goes from 1 to 20 and I revalued those from TFTD to the range 21 to 33, unfortunately that didn’t work.  I am missing something.

2) I unpack the cats from both UFO and TFTD and merge them.. then try method 1 again.

3) move TFTD cat into another folder within the UFO sound folder and ref the catpos to the folder, I don’t know how you ref the path of a file in music.rul

4) Unpack all cat files from TFTD and forcefully convert them into Wav or ogg files. I rather avoid this final method.

Any hint or suggestions please Mr Meridian? This is the final hurdle in my quest.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Sound and music missing on underwater battlescape
« Reply #8 on: August 31, 2019, 02:38:48 pm »
Don't use original files!

Let me repeat that once more, DON'T USE ORIGINAL FILES.

1/ First of all, they are copyrighted and you are not allowed to redistribute them or even modify them.
2/ Second of all, there are many different versions of them. Not all work on all platforms. Also they have different names, so if someone is using sounds from SOUND1/2.CAT they will not be able to use your sounds defined in SAMPLE1/2.CAT; and vice versa. In simple words, no matter what you do, it will not work for everyone!!

Also, music is not in the files you mentioned, only sounds... music is in completely different files, see: https://www.ufopaedia.org/index.php/SOUND#Music_files

I already told you how to properly mod sounds and music in this post: https://openxcom.org/forum/index.php/topic,7355.msg116238.html#msg116238
To repeat myself:
1/ For sounds, create OGG or WAV files and add them to "extraSounds" ruleset under "BATTLE.CAT" for surface sounds and "BATTLE2.CAT" for underwater sounds. This is the only proper, consistent and working method of modding sounds in OpenXcom
2/ For vanilla music, you can replace it just by creating OGG files with proper names, see for example how it is done in Cydonia's Fall mod: https://openxcom.org/download/extras/
3/ Custom music (for example when you want a different custom music for a particular mission), should also be created as OGG file, then defined under "musics" ruleset and then used in alien deployment ruleset, or any other place which allows to define custom music

There are no other ways to do it correctly.

Many mods already do that, download and check them for examples.

wcho035

  • Guest
Re: Sound and music missing on underwater battlescape
« Reply #9 on: August 31, 2019, 03:54:20 pm »
I am humble by this reply of yours. Very well, I will follow your advice.  Thank you Meridian. I really appreciate all the help you have given me.