Quick question...
Firstly, I'm sorry if this question has been asked before. Secondly, I'm sorry if it's something really basic that has escaped me...
I've noticed that in several D-mods (Blood Scorpions is one that I can think of off the top of my head, but there's plenty more) if you read certain books or are told important information it appears like a piece of parchment on the screen... (I hope that makes sense). Unfortunately, most d-mods that include this have story files all in .d format, so I can't see how it's done.
Help, please? Step-by-step instructions, or just hints and tips would be much appreciated.
While I'm typing away, I'd like to say a quick 'thankyou' to all the d-mod authors who wrote tutorials (scripting and mapping) and those who left their story files in .c format... I've learnt a lot so far!
NB That is, the information appears like a typed page from a book, or a letter or a diary...
I've noticed that in several D-mods (Blood Scorpions is one that I can think of off the top of my head, but there's plenty more) if you read certain books or are told important information it appears like a piece of parchment on the screen... (I hope that makes sense). Unfortunately, most d-mods that include this have story files all in .d format, so I can't see how it's done.
Help, please? Step-by-step instructions, or just hints and tips would be much appreciated.
While I'm typing away, I'd like to say a quick 'thankyou' to all the d-mod authors who wrote tutorials (scripting and mapping) and those who left their story files in .c format... I've learnt a lot so far!
NB That is, the information appears like a typed page from a book, or a letter or a diary...
I'd like to second that request btw. I'd love to know how to do that myself.
It's just the show_bmp() command... take a look at in the new fabbo DinkC Ref:
show_bmp
Category: Screen
Version: 1.00+
Prototype: void show_bmp(string bmp_file[79], bool show_map_dot, int unused);
show_bmp will display the specified bmp_file to the screen and the game will be paused. The bmp_file should be a path relative to the D-Mod's root directory, and any directories (tiles, graphics, etc) should be specified. If the bmp file cannot be found, it will look in the main game's root directory.
If show_map_dot is set to 1, the sequence 165 will be overlayed on the bmp_file and will be centered at the screen equivalent to that of the player's last known 'outside' position. DinkEdit allows you to define screens as 'inside', and if Dink is on one of these screens, his map position will be displayed as the last known screen that was not inside.
The unused parameter is not used at all, but it is required. Just set it to 0.
Once the player hits a button, the graphic will disappear and the game will be unpaused.
show_bmp is generally used to show a map, or other full-screen information.
// 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();
}
1.07 had a couple bugs displaying the map dot: it would not be displayed properly if Dink was warped using DinkC or if he was on the 32nd screen of any row. This has been fixed in 1.08+.
show_bmp
Category: Screen
Version: 1.00+
Prototype: void show_bmp(string bmp_file[79], bool show_map_dot, int unused);
show_bmp will display the specified bmp_file to the screen and the game will be paused. The bmp_file should be a path relative to the D-Mod's root directory, and any directories (tiles, graphics, etc) should be specified. If the bmp file cannot be found, it will look in the main game's root directory.
If show_map_dot is set to 1, the sequence 165 will be overlayed on the bmp_file and will be centered at the screen equivalent to that of the player's last known 'outside' position. DinkEdit allows you to define screens as 'inside', and if Dink is on one of these screens, his map position will be displayed as the last known screen that was not inside.
The unused parameter is not used at all, but it is required. Just set it to 0.
Once the player hits a button, the graphic will disappear and the game will be unpaused.
show_bmp is generally used to show a map, or other full-screen information.
// 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();
}
1.07 had a couple bugs displaying the map dot: it would not be displayed properly if Dink was warped using DinkC or if he was on the 32nd screen of any row. This has been fixed in 1.08+.
The source code of several D-Mods (including Blood Scorpions) can be downloaded here in the Development->Source section
Thanks SimonK... will certainly try.
NB Thanks Simeon... I knew some of the sources were there but I was using a different computer... didn't have the internet... so just looking in the story folder of the d-mod... since it was on the aforementioed computer.
NB Thanks Simeon... I knew some of the sources were there but I was using a different computer... didn't have the internet... so just looking in the story folder of the d-mod... since it was on the aforementioed computer.
Cool! No internet, but posting anyway! I want that too! (Or do I?)
Lol... I just meant that the computer I use to post things... and the computer I use for my d-mod... are very separate entities.
Rightio, now back to this show_bmp thing. I followed instructions and the example of the 'lib' script in blood scorpions. In principle, it works... however, rather than the bmp showing up, the screen goes kinda white and fuzzy, and then I press a button and hey presto, it goes back to the screen Dink was on...
So... If I put the bmp in question in the tiles folder... and in the script use
void talk(void)
{
show_bmp("tiles\george-s2.bmp", 0, 0)
}
should I be doing anything else? Suggest away, I really appreciate it.
Ice.
So... If I put the bmp in question in the tiles folder... and in the script use
void talk(void)
{
show_bmp("tiles\george-s2.bmp", 0, 0)
}
should I be doing anything else? Suggest away, I really appreciate it.
Ice.
Your bmp propably hasn't been converted to the Dink palette. The fastest way to do that for the first time is to paste your picture on, for example, splash.bmp and then save the file as whatever, but it'll propably look like shoot.
Now that I think about it though, I don't think pictures that get show_bmp'd necessarily need the Dink palette... Just playing around with the colours, eg. decreasing the colour depth, might make it work.
show_bmp was the magical command with which the palette changes of Lyna's Story and Cycles of Evil are accomplished.
EDIT: Or, wait... it might have been copy_bmp_to_screen... Now I'm confuzzled.
EDIT: Or, wait... it might have been copy_bmp_to_screen... Now I'm confuzzled.
















