The Dink Network

DinkC Reference Guide Now Available

February 6th 2022, 07:33 PM
King He/Him United States 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 2022, 12:42 AM
Peasant He/Him Equatorial Guinea 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 2022, 08:20 AM
Peasant He/Him United States bloop rumble
2nd generation. No easy way to be free. 
Nice Work!
February 7th 2022, 06:12 PM
Jester He/Him 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 2022, 03:48 PM
That's amazing. Three cheers for Robj & Kyle!
February 13th 2022, 05:33 AM
Ghost They/Them
This deserves to be pinned, eh?
February 13th 2022, 12:48 PM
Jester He/Him 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 2022, 09:18 AM
Peasant He/Him United States
Love! True love! 
Awesome work RobJ and Kyle!
March 18th 2022, 05:16 PM
Ghost They/Them
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.

March 18th 2022, 06:21 PM
Peasant He/Him Equatorial Guinea duck bloop
can't flim flam the glim glam 
are you gonna continue the city
March 18th 2022, 06:36 PM
Ghost They/Them
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 2022, 07:57 PM
Peasant He/Him Equatorial Guinea 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.
March 3rd 2023, 08:57 PM
Ghost They/Them
Hi Folks,
Just touching base with a brief update. Haven't really checked the forum or discord for 6 months but have done a few hours on my D-mod here and there. In the middle of another flurry of activity after getting a nasty cold.
I was going to post on discord but thought it would get lost in the sea of other stuff if I'm making only occasional appearances.

Still working on a stand alone romp D-mod called Soleless. Map finished and detailed at about 84 screens, story is mostly there with the main NPCs' scripts and quests working well. The main thing left to do is tie the quests together into an ending and make it fit. Each story based thing I've done has required a lot of relearning and trial and error, I haven't done any programming before but it's making sense again. My aim has been to make something I would find fun and humorous to play (and make) while stretching the limits of what I can do with a pretty basic understanding of DinkC. It should be pretty well detailed and compact, lots to talk to and explore but probably only an hour of gameplay at most. No idea when it will be finished but it's all planned out so can't really balloon into anything too out of control.

Hope everyone is thriving as best they can in this weird old world.