The Dink Network

I'am not sure how

December 11th 2004, 02:19 AM
Peasant Male United States
I am trying to make a DMOD but I'am not sure how to add BMP that are not in the basic libaray, it's all a little greek to me. can someone help
December 11th 2004, 06:09 AM
Peasant Male Norway steam
GlennGlenn doesn't want a custom title. 
I think there should be a tutorial for this
December 11th 2004, 01:27 PM
Peasant Male New Zealand
Mildly deranged. 
I downloaded two tutorials, but didn't find either of them to be particularly clear. I eventually managed to figure it out, but only after many attempts and a lot of frustration.

However, it may be different for somebody who has more experience in this sort of thing.
December 11th 2004, 03:57 PM
Peasant Canada
When the game is started the engine reads the file 'dink.ini' and loads the graphics listed, and assigns them the sequence # ,depth, and hardbox specified. EG:
load_sequence graphics\animals\duck\dk1w- 21 75 20 30 -13 -10 12 6
load_sequence is the loading command(sometimes used in .c scripts too.).
graphics\animals\duck is the path to the .bmps *note!* the engine will first look in the dmods' folder for the .bmps, and if not found, look in the original Dink folder. Handy!
dk1w- is the filename of the .bmp, the engine will now load the whole sequence of .bmps starting with dk1w-01, then dk1w-02, -03, ect(max 50 frames) and assign them the seq. # 21(that first # in the load command).
The next # (75) is the pause between frames (for animations).
Then next 6 numbers rarely need setting, they are the X/Y center of image for depth dot, and then sides of the hardbox in relation to that center.
For static objects it may say 'NOTANIM'after the sequence #.
At this point you can add your own static objects.
If you only need to add a few, you may put .bmps directly into the graphics folder with the name 'seed4-'(-01,-02...). The .ini has lines looking for 'seed4-'and 'seed6' and they will be given sequences 430 and 431.
This may clutter your graphics folder if you add too many.To add sub-folders of graphics add a new line in your projects dink.ini file. Start around 850, after the standard graphics. EG:
load_sequence graphics\newstuff\thing- 850
Now the engine will look for a folder called 'newstuff' in your graphics folder for .bmp files called thing-01( and thing-02 ect...).
Alternatly, you could look for a sequence you don't use and copy the folder names in your own project. EG:
load_sequence graphics\items\cup\cup- 448 NOTANIM can find an items\cup folder in your own project. Better to just add new after 850 though.
If a sprite is given brain 6, the engine will repeatedly run through all frames of that one sequence(eg,fires may have br.6)
For animated creatures the 'base_walk' is the big factor. The base walk is the sequence number rounded down to the nearest 10. EG:
load_sequence graphics\people\mom\c08w1- 351 100
load_sequence graphics\people\mom\c08w3- 353 100
load_sequence graphics\people\mom\death- 355 100 54 9 -52 -6 13 34
load_sequence graphics\people\mom\c08w7- 357 100
load_sequence graphics\people\mom\c08w9- 359 100
Moms' base walk is 350. Seq 351 is automaticaly used for mom to walk to the lower-left corner (the direction of 1 on the number pad.). Seq 353 will be to the lower right, ect.
The engine will use the appropriate direction when brain 9 or 16 is given to the sprite.(Brains 9 and 16 are for diagonal walks)
Some creatures have a base attack too. (only brain 9 for them.)
For base_attack the long and lat directions are used, so 2,4,6,and 8 are used by the engine when the sprite is in range to attack, but the engine won't let us share the same base for attacks. So for example the gold knights'base_walk is 300, and uses 301,303,307, and 309 to walk. But its' base_attack is 740, and uses 742,744,746, and 748 for attacking directions(down,left,right, and up)and 302,304,306,and 308 can't be used.
Hope this helps.
BTW, Notepad doesn't like to add to the .ini because it's too big. You can use a different text editor, or hit <space> about 10 times. Opening up empty lines tricks Notepad and lets you add to the .ini .
BTW2, Dink runs 8 bit .bmps in a custom pallet. But you can use any .bmp and your graphics card will just adapt them. Pure white is the standard transpartent color. If you convert .jpg images you will find that colors smear, and there will be an ugly 'halo' of almost-white.
BTW3, the new dink.ini re-write might not have those spare lines like 'seed-'.
December 12th 2004, 06:58 PM
Noble Male United Kingdom