Dink's Map - How does it work?
You've all played Dink Smallwood. You've gotten out of the house, met the wizard, and made your way to Terris. But more importantly, Dink is given a map to look at from ingame, showing landmarks and where he is in relation to it all.
BUT HOW DOES IT WORK?
I looked at the original Dink, and all I can see so far from "s1-ltr.c" is this:
&s2-map also being listed as a global variable in Main.c.
Results of this investigation? Nothing useful.
As a test, I created a key-77.c script. By default, there isn't one. Nor a script named "Map".
Key 76 (L) and Key 78(N) are both listed in the DinkC reference book in alphabetical order so this should mean Key 77 is the letter M - Also known as the Map key. (A quick google search confirms this)
First of all, the script didn't run. At all. Dink just says as he normally does "I don't have a map yet." as his default when he doesn't 'have one'.
Secondly it never even appeared in the debug.txt anywhere that I could see.
So... is it possible to do anything to the ingame map function of Dink besides adding or removing a map? Can the M key be free to access with a key-77.c script at all?
BUT HOW DOES IT WORK?
I looked at the original Dink, and all I can see so far from "s1-ltr.c" is this:
say_stop("Hey! A map was enclosed!", 1); wait(500); &s2-map = 1; say_stop_xy("`%(Press M or button 6 for map toggle)", 20,380);
&s2-map also being listed as a global variable in Main.c.
Results of this investigation? Nothing useful.
As a test, I created a key-77.c script. By default, there isn't one. Nor a script named "Map".
Key 76 (L) and Key 78(N) are both listed in the DinkC reference book in alphabetical order so this should mean Key 77 is the letter M - Also known as the Map key. (A quick google search confirms this)
//Key script mapped to 'M' to test map replacement void main(void) { say_stop("Maps? MEN DON'T USE MAPS!", 1); debug("M key pressed! Did this get detected?"); kill_this_task(); }
First of all, the script didn't run. At all. Dink just says as he normally does "I don't have a map yet." as his default when he doesn't 'have one'.
Secondly it never even appeared in the debug.txt anywhere that I could see.
So... is it possible to do anything to the ingame map function of Dink besides adding or removing a map? Can the M key be free to access with a key-77.c script at all?
I was working on an unreleased DMOD a while ago and remember coming across this same problem. Can't remember exactly where I found the answer, but from reopening it and taking a look it seems everything needs to be placed into button6.c rather than key-77.c. I used this to create a sort of single player co-op game a bit like Resident Evil 0, as I think button6 meant it could also be accessed by App users on a phone instead of being exclusive to keyboard.
Yep, button6.c support has been in place since the beginning. Key-##.c support was added fairly late (with Mystery Island, around v1.05 I think?)
duckin magnets. how do they work
February 6th 2020, 07:30 PM

ExDeathEvn

Well that explains a lot; So the button6.c script overwrites the key-77 script.
That's annoying. Thanks for the info.
Turns out it's just a normal script at least.
That's annoying. Thanks for the info.
Turns out it's just a normal script at least.
button6.c void main ( void ) { //player map if (&s2-map == 0) { say("I don't own a map yet.",1); kill_this_task(); return; } show_bmp("tiles\map1.bmp", 1, 0); kill_this_task(); }
But isn't it supposed to place a little star on the square that Dink's on if it's not listed as "inside" or whatever?
@megadogV2:
(The following is from "DINKC Reference v3.1".)
#show_bmp()
# Category: Screen Drawing
# Prototype:
# void show_bmp( char string[200], bool over_position?, int unused );
["string" is a filename and directory, relative to the DMod's directory.]
Example:
show_bmp("tiles\crap.bmp", 0,0);
The first # parm [<over_position?>] tells [the dink engine] to show a cross
hair of their position on the map, used in Dink to show the location, only
works if you make the map from a screen shot from DinkEdit.
(The following is from "DINKC Reference v3.1".)
#show_bmp()
# Category: Screen Drawing
# Prototype:
# void show_bmp( char string[200], bool over_position?, int unused );
["string" is a filename and directory, relative to the DMod's directory.]
Example:
show_bmp("tiles\crap.bmp", 0,0);
The first # parm [<over_position?>] tells [the dink engine] to show a cross
hair of their position on the map, used in Dink to show the location, only
works if you make the map from a screen shot from DinkEdit.
The BIG question here is how do you make the darn bmp map illustrations allign each screen accordingly to the positions where the indicator star will appear.
I've been making a bmp map image by using the minimap mode through WDE and capture the whole thing with snipping tool and save as bmp, edited in Ms paint for some parts that shouldn't be seen, and to adjust to appropriate image resolution. But it doesn't work like a normal map. Also, I rarely encounter dmods with maps in them. I remember playing AGAE and FIAT, they had properly functioning maps. How? HOW!? Maybe dark magic was used in making those ducking maps.
I've been making a bmp map image by using the minimap mode through WDE and capture the whole thing with snipping tool and save as bmp, edited in Ms paint for some parts that shouldn't be seen, and to adjust to appropriate image resolution. But it doesn't work like a normal map. Also, I rarely encounter dmods with maps in them. I remember playing AGAE and FIAT, they had properly functioning maps. How? HOW!? Maybe dark magic was used in making those ducking maps.
i just used wde+2's screenshot tool to grab the whole map and that worked
Classic DinkEdit also has a map creation function - I forget how to do it, though.
Gimp under Linux can take screenshots. I suspect that the windoze version can too.
It's probably best to have the editor software take the screenshot to begin with and edit a map out of that without changing the image resolution.... probably.
Only matters if you want to enable the "You are Here" blip.
Only matters if you want to enable the "You are Here" blip.
For me, I'm pretty sure the save map or save screenshot function in windinkedit works just fine, even for the you are here thing... It creates the map as it should be.
I had a brief glance through the DinkEdit source but I couldn't find a map BMP exporter function. I always assumed that RTSoft did it manually and blanked out the relevant parts in Photoshop.