The Dink Network

Adding graphics to the dink.ini file

March 11th 2009, 03:38 PM
maiden.gif
nawal
Peasant She/Her Egypt
 
How do we add grpahics using the dink.ini commands? Also, i need my main character to be other than Dink, how do I change that using Dink.ini commands? Thanks.
March 11th 2009, 06:06 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
As you might have noticed I'm writing a tutorial. It actually answers both these questions, I'll just copy it from there: (So sorry if it is a bit long...)

Dink uses 8 bit bmp files for graphics. So you have to make sure your graphics are as well. This can be easily done by taking a file which is in the dink palette (say the start/load buttons of your DMOD) and copying it. Now open the copied file in MS paint and paste your own graphic into MS paint, MS paint will make sure the graphic will be in the correct Dink palette.
You can work around this problem with the Dink palette by using true color mode in your DMOD. This does require that the entire DMOD is played in true color though…
See simple graphics for an excellent explaination of this process. Simple graphics is a bit old, but it still contains valuable information.

Next, save your file in the ‘GRAPHICS’ folder in your DMOD (you can use subdirectories if you want). Give your file a name in this form: XXXX-01 in which XXXX is any name you like (keep within 8 characters). The 01 is the frame number, so if you want to add multiple frames to a sequence your next graphic should be called XXXX-02. You can use up to 50 frames per sequence.

Now you need to tell Dink that it looks for the graphic you just made. You do this by editing dink.ini in the main folder of your DMOD. Add this line to add your first graphic to Dink:

load_sequence_now graphics\XXXX- <number> NOTANIM

For the <number> value you can use any unused sequence number. If you use skeleton B safe numbers to use include 34-40, 98-99, 198-200 and 850-999. There is a list for download at the Dinknetwork which lists all available numbers:

Now instead of writing NOTANIM you could also write a set of numbers or other information there. This is how you can edit the hardbox and depth que of your sprite.


If you're interested in which numbers should go there I recommend the Dink ini index. You can use DinkEdit or WinDinkEdit to edit the hardbox of an individual frame. This creates a set_sprite_info line in the dink.ini, copy all the information neccessary from that and place it instead of NOTANIM. (Check the dink ini index to see what exactly you need to copy.)

If you're interested in creating a different character than Dink using dink.ini lines you need to replace the following sequences with your own: 12, 14, 16, 18, 71, 72, 73, 74, 76, 77, 78, 79, 436.
If you plan to let Dink crawl through a hole also 452.
If you plan to let Dink push also 312, 314, 316, 318.
If you plan to give Dink any weapon check out the weapon's script to see the rest of the seq's you need to replace.

However I would not do that using ini lines at all. Again a citation from my tutorial:

You can use these commands to make Dink appear differently:
sp_base_walk(1, <number> );
sp_base_idle(1, <number> );
push_active(0);

I included push_active(0); so Dink can’t push anything when he is an alternative hero, otherwise he might turn back into Dink when he pushes something. There is no such thing as a base_push();

Next it’s probably also a good idea to modify how Dink hits something. You’ll have to edit Dink’s weaponscripts, there usually is a variable there called &basehit. You need to change that value to a new basehit suitable for your alternative hero.


Hope this helps!