The Dink Network

DinkC Reference Guide Now Available

February 6th, 07:33 PM
custom_king.png
redink1
King Male United States xbox steam bloop
A mother ducking wizard 
The duckingly prolific RobJ (with website support from the shadowy figure known as Kyle) has revised and republished the DinkC Reference Guide. It is no longer a lengthy txt document or unviewable 'CHM' file. Instead, it is a clean and efficient web site, and thoughtfully maintained via a GitHub repository. There's also a permanent link in the 'Partners' section to your right.

Whereas the earlier versions of the DinkC Reference had significant errors and hadn't been updated in about 15 years, this version boasts a few major changes such as:
  • Anything in the Reference (functions or general guides) that behaves differently between version of Dink and FreeDink is clearly shown, with version text tags and also color coded.
  • Changes to many of the guides to make them more understandable, with extra stuff added to explain some common errors, and fixed some stuff that was incorrect.
  • Fixed a lot of incorrect information given in the "Graphics" section, particularly surrounding things that can or cannot be used in the "init" function, but also some other stuff too.
  • Where warnings are given for errors or flawed commands, a workaround example is provided, if one is possible.
  • Many functions corrected, some re-written.
For a glimpse of the minor changes, please see the comments.

  • editor_seq & editor_frame: to show that -1 works to get value.
  • init: updated version difference given, to explain that the 'dir.ff' packing requirement for graphics to work well is only needed for Dink < 1.08 and not for 1.08 or FreeDink.
  • preload_seq: A warning about a potential error causing sprites to be created with incorrect hardbox, and that using preload_seq for the fix, means this command is still useful in modern versions.
  • debug: A warning about freedink 109.6 bloating a debug.txt files very quickly with hundreds of "surface does not have colorkey" reports.
  • disable_all_sprites: Added info that the functions does not work as intended, and provided a workaround example in DinkC to accomplish exactly the same outcome.
  • enable_all_sprites: Same as disable_all_sprites, but in reverse.
  • external: A warning that calling a procedure with external will cause the calling script to continue past } and into code afterwards.
  • fade_down: Added info about text becoming barely readable on fade down in FreeDink, and a work-around given.
  • get_version: A note that FreeDink engine versions will return 108, and a link to Verion Checker file on TDN for if FreeDink version differentiation is required.
  • hurt: Added a bit of information here for varying behavior of this function between <1.08, and 1.08/freedink.
  • initfont: Info on diffrent behavior between versions and how to get this function to work most of the time
  • kill_cur_item: Warning of error where script stops executing when this function is called causing a status bar bug, with work-around fix given.
  • kill_cur_magic: Similar to kill_cur_item changes
  • kill_this_magic: Warning of bugs when calling this function, with work-around fix given
  • load_palette: Warning of flawed function and advised to use copy_bmp_to_screen for palette changes instead
  • make_global_function: Warning of flawed function
  • map_hard_tile: Corrected index range.
  • map_tile: Corrected index range, added tip of using larger 600x550 tilesets, gave updated DinkC example based on new range and added a link to google sheet tile_index calculator.
  • playsound: Added warning of FreeDink 109.6 returning the soundbank number +1
  • say_xy & say_stop_xy: Made corrections in that the text will actually be displayed at int x plus 320.
  • script_attach: Correction made in that this function updates active_sprite attached to the script, but not vise versa, and links to a DN thread for those seeking better understanding.
  • sound_set_kill, sound_set_survive, sound_set_vol: Warning added of FreeDink 109.6 returning the soundbank number plus 1.
  • sp_active: corrections made.
  • spclip: Edits made to all sp_clip functions to fix incorrect information. Examples added on how to initialize DinkC clipping without prior clipping required from the editor.
  • sp_custom: Version difference information added
  • sp_exp: Note about exp given for missile kill regardless of where the missile came from (prior DinkC Ref's specifically state only player missiles will credit the exp to the player)
  • sp_script: Corrections made based on version differences. Also added info that the main procedure will execute on the new script.
  • sp_touch_damage: Added an example of leveraging prior mentioned engine oversight to also detect when dink stops touching a sprite.
  • sp_x & sp_y: Added a tip that these functions should not be used to get the x or y of a shadow sprite, otherwise it can return an incorrect value.
February 7th, 12:42 AM
peasantmp.gif
Skurn
Peasant Male Equatorial Guinea xbox steam duck bloop
can't flim flam the glim glam 
holy shit, you even got rid of the dind translaty thing and dinkfan

now, time to have a new edition of this thing printed for all to collect
February 7th, 08:20 AM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
Nice Work!
February 7th, 06:12 PM
custom_robj.png
Robj
Jester Male Australia
You feed the madness, and it feeds on you. 
If anyone finds any bugs or errors with the website itself, message Kyle.

For any edits to the actual documentation, you can make a pull request on the github, or if you prefer just message one of us and we can add it for you.

So far since posting, several typos have been corrected, and also I have added some more information to the hurt() function, which shows how it behaves when called at the same time as damage caused by other attacks (the Dink engine treats it all as one attack, and shows one damage text sprite with all damage factored in). There is an example there of how to leverage this to add a "critical hit" chance to any attack as well.
February 9th, 03:48 PM
dinkdead.gif
That's amazing. Three cheers for Robj & Kyle!
February 13th, 05:33 AM
anon.gif
Toof
Ghost
 
This deserves to be pinned, eh?
February 13th, 12:48 PM
custom_robj.png
Robj
Jester Male Australia
You feed the madness, and it feeds on you. 
Probably not worth pinning since the forums activity is so low lately, and there's a permanent link over on the side bar there now.
March 11th, 09:18 AM
pillbug.gif
Pillbug
Peasant Male United States xbox steam
Love! True love! 
Awesome work RobJ and Kyle!
March 18th, 05:16 PM
anon.gif
Hades
Ghost
 
Hello folks,

I just finished reading the updated Dink C reference and it really is an amazing piece of work. I've spent the last week re-teaching myself how to script and have made solid progress with a little romp D-mod. I wish I had found and read the Dink C Reference page earlier but I got a bit lost with all the different versions of things.

Just thought I'd say hi and thanks after a bit of invisible lurking. Happy to give some details about the project on an appropriate thread if the community would like me to.

Cheers,
James
March 18th, 06:21 PM
peasantmp.gif
Skurn
Peasant Male Equatorial Guinea xbox steam duck bloop
can't flim flam the glim glam 
are you gonna continue the city
March 18th, 06:36 PM
anon.gif
Hades
Ghost
 
I'm still deciding on whether to continue the 'City' but I'm pretty sure I have all the old files and after reading my old updates I realised I got further with it than I remember.

I wrote some plot and map ideas down and realised I wanted to give it another go so this one I'm working on is a refresher and prequel/intro to The City. If it's not too painful to actually finish a D-mod then I will keep tinkering with the one I started back in 2008.
March 18th, 07:57 PM
peasantmp.gif
Skurn
Peasant Male Equatorial Guinea xbox steam duck bloop
can't flim flam the glim glam 
oh, believe me, its painful to finish a dmod. the language is broken as hell and sometimes just refuses to do what you actually program.

but, maybe if you start releasing stuff, others will be more inclined to get off their asses and make stuff too. it's pretty dead right now without enough developing.