Skip to content

Add/Modify sounds#124

Draft
MrMiguel211 wants to merge 3 commits intorandovania:mainfrom
MrMiguel211:sounds
Draft

Add/Modify sounds#124
MrMiguel211 wants to merge 3 commits intorandovania:mainfrom
MrMiguel211:sounds

Conversation

@MrMiguel211
Copy link

No description provided.

Copy link

@toasterparty toasterparty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that certain sound IDs are exclusive to some worlds, so some sounds may not play outside of them

All sound files are located in AudioGrp.pak which is not specific to any world. The AGSC files in this pak, however, get added to each room's dependency table (on a per-layer basis) if that room is expected to use sounds from that file. In the current state of your implementation, it will probably be pretty frustrating to figure out what sounds can be used in each context. To fix this, you would need to add the AGSC file corresponding to the sound chosen to the room's dependency list.

We have enough information to do this. The disk has an ATBL asset which can be used to map sound id to the group of sounds it's found in. We can kill two birds with one stone and use strings to specify sound instead of the "mysterious" numerical value. For example, instead of 4249 for the landing site ship engine hum, you would write: "OverWorld/macro_sfx09E0"

Breaking that down:

  • Audio/OverWorld.AGSC is the asset with the sound which is provided by AudioGrp.pak
  • OverWorld.AGSC's asset ID is 0x41475e5f
  • We add ( AGSC, 0x41475e5f ) to the room's dependencies to ensure the sound is loaded before it is attempted to be played
  • The game has a single sound lookup table: AudioGrp/sound_lookup_ATBL.ATBL asset ID 0xb7c1b3a7 which is also provided by AudioGrp.pak
  • The object ID of macro_sfx09E0 is just the suffix of the object name 0x9E0
  • In the 1416th row of the table in sound_lookup_ATBL, we see:
Sound ID ObjectID
0x1099 0x9E0
  • The sound ID to use for the scly object is 0x1099 (4249 as shown in PWE)

@MrMiguel211 MrMiguel211 marked this pull request as draft July 12, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants