The Dink Network

Music doesn't loop.

Dink Smallwood

April 21st 2010, 10:17 PM
pq_frog.gif
predcon
Peasant He/Him United States
 
I recently picked up playing Dink again after finishing it years ago, and I'm pleasantly surprised to find that it runs just as well on Windows 7 as it did on Windows 98. There is one thing though, and it's really just a small issue (if it can't be fixed, que sera, sera). All music plays through till the end of the MIDI only once, until I enter a new area with a new MIDI theme. I know it's been a while, but I could have sworn that the music was supposed to loop once it hit the end of the MIDI.
April 21st 2010, 10:39 PM
spike.gif
Nope, the music in the original game has never looped. There was a command added in v1.08 of Dink that allows the music to loop, though, so it would be possible to get that now.
April 21st 2010, 10:50 PM
pq_frog.gif
predcon
Peasant He/Him United States
 
At last! Tech support that hasn't been outsourced! Anyway, how do I get the game to loop it's music now? Can I add this mysterious command line as default through a frontend like DFArc2?
April 22nd 2010, 12:19 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
Most of the music should last long enough for it to not need to loop. If you really wanted to do this, you'd have to do it on a per file basis and it's really not worth it.
April 22nd 2010, 12:31 AM
pq_frog.gif
predcon
Peasant He/Him United States
 
it should, shouldn't it? Then maybe the player on my machine is playing at a slightly faster tempo. such a thing happens.
April 22nd 2010, 01:04 AM
spike.gif
I do remember a fair amount of silent portions in the game... Some of the music (the classical pieces, mostly) last a while, but there are also many short songs in the game. Setting the music to loop isn't a lot of trouble, really, but it could get complicated as you need to edit one of the scripts that the game uses.

1. Open "Dink Smallwood\develop\source.zip"
2. Open "savebot.c" with notepad
3. Add the command "loopmidi(1);" in the main procedure so that the beginning of the script looks like this:

void main( void )
{
loopmidi(1);
sp_seq(&current_sprite, 449);
sp_sound(&current_sprite, 34);
sp_brain(&current_sprite, 6);
sp_hitpoints(&current_sprite, 0);
}


4. Save the script as "savebot.c" in the "Dink Smallwood\dink\story\" folder (not in source.zip). Also make sure it's actually named "savebot.c", not "savebot.c.txt".

That's it.

Adding the command in the savebot script makes sure the music will still loop when you load a previously saved game (otherwise loopmidi() will reset to 0, I think). In the beginning of the game, midis will only start looping once you reach the first savebot, but that should be a non-issue (you could also add the loopmidi(1); command to "start.c", for example, if you really wanted the title song to loop too).
April 22nd 2010, 01:58 AM
pq_frog.gif
predcon
Peasant He/Him United States
 
wait, so, I save the "savebot.c" file in the dmod's folder and DON'T put it back into the source.zip? oops.
April 22nd 2010, 02:03 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
You put it back in the source.zip? Nice.

Now you'll have to extract the modified one out of the zip into your dink/story directory now, and then re-modify the one in the zip back to the old way (remove the single command) and save it back to the zip.
April 22nd 2010, 09:08 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
And another thing, make sure that you remove savebot.d. If Dink finds both a .c and a .d file, it'll first use the .d file.
April 22nd 2010, 09:41 AM
spike.gif
Isn't that the other way around? Ahh, I could be wrong. Stupid .d scripts.
April 23rd 2010, 12:14 AM
pq_frog.gif
predcon
Peasant He/Him United States
 
well none of this seems to have changed anything.
April 23rd 2010, 08:34 AM
dinkdead.gif
Try putting the loopmidi in start.c instead of (or as well as) savebot.c. Also, this will only affect the original game, you'll need to do it seperately for D-Mods! But it might screw stuff up slightly in some D-Mods.
April 23rd 2010, 12:56 PM
spike.gif
Did you delete "savebot.d" from dink\story\, as per magicman's suggestion? He's right, if you have both a "savebot.c" and a "savebot.d" in the story folder, the game will use "savebot.d". You might want to rename "savebot.d" instead of deleting it, though, so you can easily get it back later (in case something goes HORRIBLY WRONG ).