How to change the AS3 music?


#1

Hello! I’m Leonardo, I wanted to ask how you can change the music in AS3. . . If anyone knows how to do this, please let me know!


#2

Hi Leonardo,

How to change room music in AS3

Navigate to /play/en/web_service/ of your media server (located on media.domain).

You will see a file called game_configs.bin, this can be extracted just like a .zip archive. Simply open it in an archive tool of your choice to see the goodies inside.

ZIP archives with a UI (like WinRAR or 7-zip) make this super-dooper easy.

Inside, you’ll see a bunch of files which look like this -

You need to look for rooms.json

Open rooms.json in your favourite text editor. (note there are both .json and .jsonp files in game_configs.bin, I think .json is the only one your are required to edit for this)

Inside rooms.json you will see a configuration for every room in the game (most likely on a single line, use a JSON beautifier like JSON Formatter & Validator to get a clearer picture of how this file is structured.

Example of beautfied room config entry in rooms.json -

   "100":{
      "room_id":100,
      "room_key":"town",
      "name":"Town Center",
      "display_name":"Town Center",
      "music_id":1160,
      "is_member":0,
      "path":"town.swf",
      "max_users":120,
      "jump_enabled":false,
      "jump_disabled":true,
      "required_item":null,
      "short_name":"Town"
   },

So here, for example, the music ID is 1160. If I were to change this, the music in the town would be updated.

If you don’t know which music ID is which, go to /play/v2/content/global/music folder of your media server, and you will find all the music along with their ID’s in SWF format, just open to listen.

Once you’ve made your changes to rooms.json save the file. Now you will need to recompress everything you extracted from game_configs.bin (all the JSON & JSONP files) back into a new zip archive, make sure it’s named game_configs.bin and replace the old one. Again, WinRAR and 7-zip will help a lot with this, as they allow you to drag and drop files out of (and back into) zip archives without the need to even extract, in which case you can almost completely skip this step.

Finally clear your browser cache and log back into your game, the music should have updated.