The Dink Network

Dink's Map - How does it work?

February 6th, 01:12 PM
pq_knight.gif
ExDeathEvn
Peasant Male New Zealand xbox steam
Don't look at me, I'm a ghost 
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:
 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?
February 6th, 02:30 PM
boncag.gif
JugglingDink
Peasant Male United Kingdom
Wagwarn 
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.
February 6th, 05:02 PM
custom_king.png
redink1
King Male United States xbox steam bloop
A mother ducking wizard 
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?)
February 6th, 06:43 PM
peasantmp.gif
Skurn
Peasant Male Equatorial Guinea xbox steam duck bloop
can't flim flam the glim glam 
duckin magnets. how do they work
February 6th, 07:30 PM
anon.gif
ExDeathEvn
Ghost
 
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.

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();

}
February 7th, 04:04 AM
dinkdead.gif
megadogV2
Peasant Male New Zealand bloop
Only paritally dead. 
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?
February 7th, 12:21 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
@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.
March 31st, 02:53 PM
slayer.gif
Exzcimus
Peasant Male Philippines
We'll find you soon, live fresh meat... 
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.
March 31st, 06:34 PM
peasantmp.gif
Skurn
Peasant Male Equatorial Guinea xbox steam duck bloop
can't flim flam the glim glam 
i just used wde+2's screenshot tool to grab the whole map and that worked
March 31st, 09:32 PM
custom_king.png
redink1
King Male United States xbox steam bloop
A mother ducking wizard 
Classic DinkEdit also has a map creation function - I forget how to do it, though.
March 31st, 10:46 PM
spike.gif
SlipDink
Peasant Male United States bloop
2nd generation. No easy way to be free. 
Gimp under Linux can take screenshots. I suspect that the windoze version can too.
April 1st, 12:26 AM
pq_knight.gif
ExDeathEvn
Peasant Male New Zealand xbox steam
Don't look at me, I'm a ghost 
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.
April 1st, 06:51 AM
custom_robj.png
Robj
Jester Male Australia
You feed the madness, and it feeds on you. 
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.
April 2nd, 02:04 AM
peasantmb.gif
yeoldetoast
Peasant Australia steam
discord.gg/Ukugfbh 
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.