Jump to content

XML:SNDD: Difference between revisions

249 bytes added ,  18 May 2023
m
moving explanation of <Weight> from the music discussion to the taunt discussion since it's actually used for taunts
m (wording)
m (moving explanation of <Weight> from the music discussion to the taunt discussion since it's actually used for taunts)
Line 107: Line 107:
Breaking the main loop of the music into parts allows Oni to more quickly transition to the ending part when the music is commanded to stop playing. The shorter segments you can break the music into, the better – both for the sake of reaching the outro sooner, and because long segments can be taxing on the game. Oni's music averages 9 seconds per segment, and a segment rarely goes above 20 seconds.
Breaking the main loop of the music into parts allows Oni to more quickly transition to the ending part when the music is commanded to stop playing. The shorter segments you can break the music into, the better – both for the sake of reaching the outro sooner, and because long segments can be taxing on the game. Oni's music averages 9 seconds per segment, and a segment rarely goes above 20 seconds.


The parts of the music between intro and outro are played in a randomized order to add more variety to the playback. Note that .grp files have a <Weight> tag under each <Permutation>. As with TRAC's <Weight> field, this can be used to set the relative probability that a music segment will be picked. Each permutation's weight is figured in relation to the total weight of all segments, so if a piece of music has four permutations and the first one has a <Weight> of 30 and the other three have <Weight>s of 10, the first segment has a 50% chance of being played. This feature is effectively unused in Oni's music, as all music OSBDs assign a weight of 10 to all <Permutation>s.
The parts of the music between intro and outro are played in a randomized order to add more variety to the playback. Note that .grp files have a <Weight> tag under each <Permutation>. As with TRAC's <Weight> field, this can be used to set the relative probability that a music segment will be picked, however this feature is effectively unused in Oni's music as all music segments have a <Weight> of 10.


===OSBDfile.imp.xml===
===OSBDfile.imp.xml===
Line 534: Line 534:
* A link (OSBD.amb name) in the ONCC file will be looked up based on the sound ID. Note that the ONCC file has also a probability value that decides whether a sound will be played or not.
* A link (OSBD.amb name) in the ONCC file will be looked up based on the sound ID. Note that the ONCC file has also a probability value that decides whether a sound will be played or not.
* The game engine looks into OSBD.amb and follows the link into OSBD.grp.
* The game engine looks into OSBD.amb and follows the link into OSBD.grp.
* '''OSBD.grp can hold multiple links to SNDD files.''' That's why Konoko can have multiple taunt sounds.
* '''OSBD.grp can hold multiple links to SNDD files, called permutations.''' That's why Konoko can have multiple taunt sounds. Each permutation has its own "Weight" which determines its probability of playing. This probability is figured in relation to the total weight of all permutations, so if an OSBD has four permutations and the first one has a <Weight> of 30 and the other three have <Weight>s of 10, the first sound has a 50% chance of being picked. This feature is used to define rare taunts for some characters, such as the [[Comguy]]'s [[Easter eggs|Easter egg]] taunt, "Okay, okay, ''don't'' frog blast the vent core!"


===Step 1: Preparing the TRAM===
===Step 1: Preparing the TRAM===