The Dink Network

Why does the grunt wav sound super-low?

December 30th 2012, 05:33 PM
anon.gif
M. Heller
Ghost They/Them
 
I've replaced the grunt noises Dink makes when he gets attacked, but they are super low-pitched. I'm not sure what to do to make them scripted to the normal pitch.

Thanks
December 30th 2012, 05:37 PM
anon.gif
M. Heller
Ghost They/Them
 
By super low-pitched, I mean in game. The audio files themselves are fine but not on the game itself.
December 30th 2012, 05:47 PM
knightg.gif
DackFight
Peasant He/Him United States
Making Topics off-track faster then you can say it 
Are you even of the DN, if so what is your screenname?
December 30th 2012, 05:48 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
Forgot my password, that's why.

Any help?
December 30th 2012, 06:07 PM
knightg.gif
DackFight
Peasant He/Him United States
Making Topics off-track faster then you can say it 
Who is M. Heller and i can provide only help in nonsense and things I know about.
December 30th 2012, 06:10 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
No offence, well not really but.

Why are you here then? Just wasting your time?
December 30th 2012, 06:13 PM
dinkdead.gif
Dink's grunt sounds have a speed of 22050 Hz, I assume the ones you have are a higher speed and so when the game plays them at 22050 they sound slow.

How to fix this... erm, you'd probably have to edit the sound files to make them 22050 as Dink grunting is done by the engine. Try Audacity.

Grunt. Hehe, pig farmer...

December 30th 2012, 06:22 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
I have audacity, and that works.

Thanks sparrow.
December 30th 2012, 11:04 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
LOL Sparrow - you still have it huh
December 31st 2012, 08:06 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
Got another question. I got windinkedit+, but i can't figure out how to export what i have as a .dmod file to upload to this site. Google comes up with Gmod stuff instead so I can't really use that. I wanna show you guys what i'm working on.

Thanks.
December 31st 2012, 09:20 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
go into DFarc
in preferences, turn on developer keys
Now pick your dmod in the list and click package or something like that

Hope that helps
December 31st 2012, 09:29 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
That's what I was looking for, thanks.

Yeah, sorry for asking again but I can't seem to add another graphic to the game. Just some scenery.

I've did the whole load_sequence_now graphics\ blah blah blah blah- then 98 and 75 like the DinkSmallwoodPT tutorial, but it's not showing it's face in the sprite library. Is there any solution to this?
January 1st 2013, 02:59 AM
dinkdead.gif
Do you have a blank space where it should be or does nothing happen at all?

If there's a blank space it may be because the bit depth is too high - 32 bit BMPs won't work, change it to max 24 bit (lower better if it won't ruin the colours, for smaller file size).
January 1st 2013, 03:02 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
It can also be a corrupt square (leaves it blue - i get that when i play with things and change too many times) - or you may have misnamed/numbered your pics or not got the correct pathway in the ini file

Edit: try a new square - i start adding at 34
January 1st 2013, 01:06 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
It doesn't show up at all, it's still sequence 97, then 99. I've checked the path and everything seems to be right.
January 1st 2013, 07:31 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
If you want - send it to me and I will fix for you Cant really tell whats wrong without seeing it, emails in my profile
January 1st 2013, 07:41 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
I'll just replace existing graphics since i won't be using most of them.

THanks anyways.
January 3rd 2013, 04:14 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
Is there any way to script an enemy to die when it touches the player, still giving damage to the player?
January 4th 2013, 03:24 AM
anon.gif
shevek
Ghost They/Them
 
Is there any way to script an enemy to die when it touches the player, still giving damage to the player?

Sure. Set the touch damage to -1, so a script is called. In that script, do whatever you like (that is, make the enemy die and hurt Dink). This happens for slimes in lost forest romp, for example.
January 4th 2013, 11:07 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Beware to set the touch damage to 0 first thing in the script, otherwise you risk the game freezing because it attempts to keep running the touch() procedure.

void main( void )
{
  // other things here
  sp_touch_damage(&current_sprite, -1);
}

void touch( void )
{
  sp_touch_damage(&current_sprite, 0);
  // other things here. Possibly involving hurt() and code to make it die.
}


If the sprite can somehow survive, remember to set the touch damage back to -1 after some delay, otherwise you'll continuously trigger the touch() procedure, which is probably not what you'd want.

If there's no way the sprite can survive, ignore that last paragraph
January 4th 2013, 10:09 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
I tried that and the infe- i mean pillbugs don't do any damage to the player at all.

Hmm.
January 5th 2013, 05:24 AM
anon.gif
shevek
Ghost They/Them
 
pillbugs don't do any damage to the player at all.

That is correct. Pillbugs hurt Dink through touch damage. If you set that to -1, they will no longer hurt him. However, because your script is run, you can make them hurt Dink in there:

void touch()
{
    sp_touch_damage(&current_sprite, 0);
    hurt(1, 5);
    sp_seq(&current_sprite, <insert dying sequence here ;
    sp_frame(&current_sprite, 1);
    sp_brain(&current_sprite, 5);
}


This first makes sure touch() is only called once, then hurts Dink, then sets the sprite's animation to its way to die, which is then run and left at the background with brain 5. If you don't want a death animation, you can simply use sp_active(&current_sprite, 0); instead.

Note that with the above script, they will always do exactly 5-defense damage, which isn't equivalent of touch damage 5. If you want that, you should compute random (5/2, 5/2) (a random value from the upper half of the touch damage) and use the result.
January 5th 2013, 07:03 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
This method won't give any experience points, or trigger the die() procedure (which triggers the item drops). hurt()ing &current_sprite will kill it properly, but still won't award the experience (and you'll see the amount of damage float over the sprite, which you may not want). add_exp() can be used for the former, though I'm not sure if you can trigger die() through the engine without making text appear. You could always call die() manually, though.

More meddling later

Seems like an sp_touch_damage unequal to 0 will trigger the touch() procedure, not just when it's -1. A difference is that a positive value will only trigger touch() every 400 milliseconds, at the same time the damage is dealt. I've confirmed this to be the case for brains 0 and 9, and because it works with brain 0, I expect it to work with every brain.

Also, damage from touching is not random, except the usual 50/50 case when your defense is greater than the damage dealt. hurt() may already do this, not sure. The upper-half thing shevek mentioned is true for sprites that have an attack() procedure and an sp_strength.