Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

In this tutorial, I will walk you through the process of enhancing your game's audio experience by adding and modifying various sounds.

Overview

First off, let’s cover the background music (BGM) that plays in different game maps or when selected from the music menu. This is quite simple: all you need to do is copy your MP3 files to the bgm directory, and the game will automatically detect and play them.

Setting Default Music for a Map

To set a specific MP3 file as the default background music for a particular map, open the locale/whatever/settings.lua file and locate a line that resembles:

 
This is the hidden content, please

In this line:

  • The first number is the map index,
  • The second part is the filename,
  • The third value specifies the volume level.

Adding Sounds to Actions

The game allows you to assign sounds to specific actions, such as skills or emotions. To accomplish this, find the .msa file for the motion you want to modify. Navigate to the folder that contains the mob, NPC, or character associated with the motion, review the motion list (motlist), and create a new folder under sound if it doesn’t already exist.

For example, to add sound effects to the motion npc/bakchon/01.msa, you would create the folder sound/npc/backchon/ and within it, add a text file named 01.mss with the following format:

 
This is the hidden content, please

Here’s a brief breakdown of the parameters:

  • SoundDataCount: Total number of sounds.
  • SoundData00, SoundData01, etc.: Used to list sounds sequentially; the preceding number indicates the delay in seconds before the sound is triggered after the motion starts. If the timing exceeds the duration of the motion, the sound will not play.

Direct Sound Integration in MSA Files

You can also add sound directly in .msa files using the MOTION_EVENT_TYPE_SOUND. This method is rarely used in practice, as utilizing the .mss files tends to be simpler and more straightforward.

Placing Sounds in Specific Locations

To add environmental sounds, such as water flowing under a bridge, create a .pra file in the property / pack directory using the following template:

 
This is the hidden content, please

Important Notes:

  • YPRT: Identifier for property files (denotes Ymir Property).
  • Number: Typically a CRC of the file, but can be any unique value. Changing this number later will detach the asset from the maps where it is used.
  • ambiencesoundvector: Path to your WAV or MP3 file.
  • propertyname: A user-defined identifier.
  • propertytype: In this case, "Ambience" (case-sensitive).
  • maxvolumeareapercentage: Indicates the percentage of the sound radius played at full volume (0 to 1). Set to 1 for non-looping sounds as they play once upon entering the defined area.
  • playtype: Specifies the playback type (ONCE, STEP, or LOOP).

In the World Editor, you can introduce your sounds as objects, adjusting their Size or radius using the AreaAmbienceSize control. If the max volume area is set below 1, the sound will diminish in volume as it reaches the edge of the total radius.

Working with Audio Formats

All sounds in the game can be in MP3 or WAV format. However, note that most WAV files available online may not be compatible with Metin2. While MP3 can be used, it adds additional overhead. For those wishing to use WAV files, follow these steps:

  1. Download and install the free Audacity Sample Editor from the official website.
  2. Open your original WAV file in Audacity. You may need to press CTRL+A to select the entire audio sample.
  3. Since Metin2 does not support stereo WAV files, go to the Track menu and select Mix > Mix Stereo Down to Mono.
  4. Choose Resample… from the same menu and set it to 22050.
  5. On the top left corner, change the Project Rate to 22050.
  6. Finally, navigate to the File menu, select Export, then choose WAV. Save it as 16 bit PCM format, and you’re done.

By following these steps, you can enhance the auditory experience of your game effectively.

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...