The Dink Network

Strange glitch

April 27th 2007, 06:11 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
I've pretty much finished version 2 of The Basilisk Smile, but I've come across a bizarre bug which is completely befuddling me.

Whenever a fireball is used to burn a tree, the tree turns into Dink holding a sword, facing north (seq 108?) for a split second or two before the animation proper starts. Now, this isn't a problem with the tree being scripted (it happens to all trees that can be burnt, and not just the one with a script), and the fireball script is being loaded from the main game.

I can't see anything wrong, and I don't see what I could have done with the .INI file (which I haven't touched for a looong time) to cause a problem like this. Also, the trees have no strange attributes assigned in the editor.

Any ideas?
April 27th 2007, 08:32 AM
custom_skull.gif
skull
Peasant He/Him Finland bloop
A Disembodied Sod 
After so honored question in "Hey" post, I'll ask you this. Is Dink just ONE second in the place where the tree should be? Or is Dink there the whole time?
April 27th 2007, 08:56 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Just for a split second. It shows 2 frames (approx.) of him before turning into a burning tree.
April 27th 2007, 09:26 AM
spike.gif
I've come across this bug a few times, don't remember very well what caused it though. Maybe something to do with initting graphics with more frames over an existing sequence with less frames..
April 27th 2007, 09:27 AM
custom_skull.gif
skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Ok! I'm sorry, but I can't help. I was just asking because the same problem was in "Quest for the Gems" d-mod. So, you should ask help from redink1, or metatarasal.
April 27th 2007, 09:40 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
It might help to attach a script to all burnable trees and preload the sequences in that script.

The problem probably lies in the dink.ini though. Make a copy of your Basilisk dink.ini and try using the original dink.ini.
April 27th 2007, 10:29 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Looking forward to play version 2

I'm also working on an update for my contest D-Mod... Soon done.
April 27th 2007, 12:45 PM
sob_scorpy.gif
Tyrsis
Peasant She/Her Russia
 
When you init graphic sequenses "on the fly", make sure the new ones are the same length (e.g. 5 frames). Or they must be packed into dir.ff
April 27th 2007, 01:40 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
It's an interesting problem that I noticed too. (like in Quest for the Gems) I decided to take another look at this problem, and I think I might have found a solution:

In the script "dam-fire.c" this is the part of the script that causes the tree to burn:

sp_pseq(&missile_target, 20);
sp_pframe(&missile_target, 29);
sp_hard(&missile_target, 0);
draw_hard_sprite(&missile_target);
sp_seq(&missile_target, 20);
playsound(6, 8000,0,&missile_target,0);

The draw_hard_sprite(&missile_target); command takes some time to execute, place sp_seq(&missile_target, 20); before the draw_hard_sprite(); command to resolve this problem. (It worked for me when I tested it just a moment ago.)

<EDIT> This is for generic trees only ofcourse, I think scripted trees might work the same way.
May 1st 2007, 10:40 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
No luck fixing it yet. I'll start messing about with the .INI when I get the time.
May 1st 2007, 12:17 PM
sob_scorpy.gif
Tyrsis
Peasant She/Her Russia
 
Let the trees be. Look for the graphics replaced in the scripts - dink's walk/hit ones.
May 1st 2007, 04:21 PM
fairy.gif
Arik
Peasant He/Him
 
Tyrsis is absolutely correct - I've tested the module and the bug is introduced by the sword script, from the moment you equip it. It tries to load the sword frames over the unequipped frames, doesn't find enough frame slots and for some unfathomable reason places the extra frames over the top of the next created sequence.

In this case, you should be able to fix the problem by going in to dink.ini and having it load dink/sword/idle instead of sword/idle. That way the higher frame limit will be set, and the unequipped graphics will be loaded anyway as you start the game with the fist.

Note that it's the idle sequence - 18 - that's the issue, not the attack sequence.
May 3rd 2007, 08:11 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Ah.

I solved it in a more roundabout/don't know what I'm doing kind of way. If people encounter any problems, I'll knock up a quick patch, fixing it in the way you and Tyrsis suggest.

Thanks for the help everyone!