[RSC+] Creating a music pack

Chat about various Open RSC related topics here.
Post Reply
User avatar
Aestel
Level 3
Posts: 2
Joined: Sun Jan 22, 2023 9:21 am

[RSC+] Creating a music pack

Post by Aestel »

Creating a music pack in RSC+

If you're simply looking to add RuneScape 2 music to RuneScape Classic, you may do that by downloading this 2004 RuneScape 2 music.zip archive from Hlwys: Here.

Place the music.zip file inside RSC+'s mods folder, which is located in Cache/extras/rscplus if you are using the OpenRSC launcher.

How it works

This section quickly explains what the client reads for the music. If you need a step-by-step guide, please see the next section.

RSC+ reads from a "music.zip" archive placed inside the mods folder. Inside the archive are all the music files, and an areas.json file which tells the client where to play each music track. For example:
  • areas.json
  • track1.mid
  • track2.mid
Music is played in a similar fashion to RuneScape 2, where each map "chunk" has a different music file associated with it, and will play while the player is stood within the chunk boundaries. Chunk co-ordinates can be found within the RSC+ world map with labelling turned on, listed as FXXYY numbers, where F is the floor number, XX is the x co-ordinate, and YY is the y co-ordinate.

The areas.json file will be formatted as follows, with a title line being a special case for the title screen:

Code: Select all

[
    { "version": 1 },
    { "soundfont": "soundfont" },
    { "title": "FILENAME", "trackname": "TRACKNAME", "filetype": "FILETYPE" },
    { "floor": FLOOR, "regionX": XCOORD, "regionY": YCOORD, "trackname": "TRACKNAME", "filename": "FILENAME", "filetype": "FILETYPE" },
]
As many lines can be inserted as desired. For example, if we were making a RuneScape 2 inspired music pack:

Code: Select all

[
    { "version": 1 },
    { "soundfont": "soundfont" },
    { "title": "scape_original.mid", "trackname": "Scape Original", "filetype": "mid" },
    { "floor": 0, "regionX": 62, "regionY": 49, "trackname": "Moody", "filename": "moody.mid", "filetype": "mid" },
    { "floor": 0, "regionX": 61, "regionY": 49, "trackname": "Sad Meadow", "filename": "sad_meadow.mid", "filetype": "mid" },
    { "floor": 0, "regionX": 52, "regionY": 50, "trackname": "Unknown Land", "filename": "unknown_land.mid", "filetype": "mid" },
    { "floor": 0, "regionX": 52, "regionY": 49, "trackname": "Start", "filename": "start.mid", "filetype": "mid" },
]
Note that currently, only .mid files are supported.

Guide for making a music pack

RSC+ allows users to add custom music to RuneScape Classic by packaging a set of .mid files in a “music.zip” archive, then writing an areas.json file to tell the client where to play the music.

The music will play in a similar fashion to RuneScape 2, where the world map is broken up into square chunks, and each chunk will play a different music track of the user’s choosing. A title screen theme may also be added.

Getting chunk co-ordinates

Before writing your areas.json file, it is important to decide where you want music tracks to play. Each area chunk can be viewed with its reference number by opening the RSC+ world map by clicking on the map icon, and clicking “Enable Chunk Grid” and “Enable Chunk Labelling” in the bottom right. This should bring up a screen that looks similar to the below:

Image

The numbers are the co-ordinates of each grid, styled as FXXYY, where:
  • F is the floor number; note that RSC uses UK floor numbers, not US.
  • XX is the x co-ordinate
  • YY is the y co-ordinate
For example, a chunk with a reference number of 05047 means:
  • Floor: 0 (or ground floor)
  • X co-ordinate: 50
  • Y co-ordinate: 47
These are important to remember for writing the areas.json file later which will tell the client where each music track will play.

Note that it is possible to have tracks play continuously across 2 different chunks, or across 4 chunks shaped in a square, this will be explained in the next section.

Writing the areas.json file

After deciding where the music files will go, make a text file called “areas.json” in the same location as all the music files.

Put the following in the file:

Code: Select all

[
	{ “version”: 1 },
	{ “soundfont”: “soundfont” },
]
Under the { “soundfont”: “soundfont” } line, music files are referenced with the following syntax:

Code: Select all

{ “floor”: FLOORNUMBER, “regionX”: XCOORD, “regionY”: YCOORD, “trackname”: “TRACKNAME”, “filename”: “FILENAME”, “filetype”: “FILETYPE” },
For example, if we were making a RuneScape 2 inspired music pack and wanted Harmony to play at Lumbridge Castle, we would write this into the areas.json file:

Code: Select all

{ "floor": 0, "regionX": 50, "regionY": 50, "trackname": "Harmony", "filename": "harmony.mid", "filetype": "mid" },
The file would then look like this:

Code: Select all

[
 	{ “version”: 1 },
 	{ “soundfont”: “soundfont” },
	{ "floor": 0, "regionX": 50, "regionY": 50, "trackname": "Harmony", "filename": "harmony.mid", "filetype": "mid" },
]
All that has to be done now is for new lines to be added that reference the correct chunks and music files that wish to be played.

Title screen

Title screen music can be added by adding the below line:

Code: Select all

{ “title”: “FILENAME”, “trackname”: “TRACKNAME”, “filetype”: “FILETYPE” },
Playing music across multiple chunks

Music tracks can be played continuously across multiple chunks in the below format:
  • 2 chunks vertically
  • 2 chunks horizontally
  • 4 chunks in a square
This can be achieved by adding the regionX2 and regionY2 parameters in the areas.json file.

For example, Entrana in RuneScape 2 plays a song across 2 chunks horizonally, which would be done the following way:

Code: Select all

{ "floor": 0, "regionX": 56, "regionY": 48, "regionX2": 57, "trackname": "Background",  "filename": "background.mid", "filetype": "mid" },
Note the use of regionX2, which will make Background the music of 05648 and 05748. If RegionY2: 47 was added to the above, it would make Background the music of:
  • 05648
  • 05748
  • 05647
  • 05747
Finishing up

After writing all the appropriate lines in area.json, package all the music files and the .json file in an archive called “music.zip”, then put it in the mods folder in the RSC+ folder.

If using the OpenRSC launcher, this will be located in Cache/extras/rscplus/mods.

Open up the game, and music should start playing (providing the option is enabled in RSC+)! You can check which chunks are playing which music by opening up the world map and looking at the chunk labels: it will display the music, as below.

Image
Marwolf
Level 80
Posts: 87
Joined: Mon Dec 28, 2020 4:17 pm
Location: Luna
Contact:

Re: [RSC+] Creating a music pack

Post by Marwolf »

Awesome tutorial! Thanks!
cooldude
Level 3
Posts: 1
Joined: Wed Feb 08, 2023 5:07 pm

Re: [RSC+] Creating a music pack

Post by cooldude »

imm gona be trying diz oncez i git my laptop back11!!!111 im playying on my n00b phon :lol: :lol: :lol:
RSCPrivateServer
Level 3
Posts: 2
Joined: Tue Feb 07, 2023 11:30 pm

Re: [RSC+] Creating a music pack

Post by RSCPrivateServer »

Thank you for creating this awesome RSCplus music pack tutorial :lol:
Post Reply