The Dink Network

Need Some Help for my First DMOD

July 9th 2004, 06:11 AM
slayer.gif
Astral
Peasant He/Him
 
Hi I'm Astral,

I wanted to make a DMOD for a long while and yesterday, I finaly desided to make 1! It a little less hard then I was thinking but I still have some question...

1-I Want to make a script like that but I have some problem...

How to give a Monster a music(Boss music) so when you enter a room whit him the music start but when he die the music stop...

How to make boss die forever?

2-I have also Problem whit the map...

How do you change hardness from a tile whitout making them all change?
--------------------------------------
That all for now and I think i might be able to post it in 1-2week

Have a Good Day!
July 9th 2004, 07:09 AM
farmer.gif
hi astral. welcome to the dink network.

if you want to make a script so that when you enter the room with the boss, it plays the music, and the music stops when he dies, then add these few lines to your script (which should be attached to him).

void main (void)
{
playmidi("x.mid"); //where x is the name of the midi that you want to play

//other crap you want to happen now
}

void die (void)
{
stopmidi(); //stops whichever midi is playing
}

as far as making a boss die forever, there are two ways i can think of to do this. this first way works if you created the boss through the editor (dinkedit or windinkedit).

in the same boss script, place this:

void die (void)
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
{
// this [sprite] was placed by the
editor_type(&hold,type);
editor_seq(&hold, seq);
editor_frame(&hold, frame);
// type means show this seq/frame combo as background in the future
}
}

replace the italicized "type" with an integer according to the following...

0 no change
1 kill sprite completely
2 draw pic from enclosed seq/frame data as a sprite WITHOUT hardness
3 draw pic from enclosed seq/frame data as a BACKGROUND object WITHOUT hardness (can be walked on [but not] behind)
4 draw pic from enclosed seq/frame data as a sprite WITH hardness
5 draw pic from enclosed seq/frame data as a BACKGROUND object WITH hardness (can't walk [on or] behind)
6 kill sprite, but let him come back after 5 minutes
7 kill sprite, but let him come back after 3 minutes
8 kill sprite, but let him come back after 1 minute

this is if you want to set the sprite as a background for later, come back later, or just have it not show up at all, ever again.

next, replace the italicized "seq" with the sequence number of the sprite you want to show for the background. then, replace the italicized "frame" with the frame number of that sequence that you want to show up.

if the boss was created through a script, then you can have a global variable that's set to 0 called, let's say, &bossexist. then, make sure that the boss is only created if that variable is equal to 0. then, when the boss dies, set that variable to 1 to keep him from coming back later.

as far as the hardness goes, can you explain a little bit more about your problem? i'm not sure exactly what you mean by making them all change. i hope this helped. good luck with the dmod!
July 9th 2004, 07:16 AM
fairy.gif
glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
read the riudiments of scripting by binirit. that filenhelped me to learn the basics of Dinkc scripting. but you must learn the editor by you selves. i dunno about an toturial for that!
July 9th 2004, 07:22 AM
slayer.gif
Astral
Peasant He/Him
 
Thank you very much for your help!
I dint think to get a responce like that lol

As for the hardness...
Like when 1 change a tile hardness
EX: Water
all the other Water tile have hardness changed so is there a way to counter that!

hmm.

Ill tell you exacly what i want to do ok lol

I want to remove the hardness from a little beach so dink can go in water lol.And for a Bridge too!

-Astral
July 9th 2004, 07:57 AM
farmer.gif
if you want to remove the hardness so that dink can walk through, then what you might want to do is just copy a blank hardness tile and paste it where you want dink to walk. and for the spots that are left that you don't want dink to walk, just make some invisible sprites and turn them hard. once again, good luck.

edit: feel free to pm me or email me if you need some extra help or a beta tester
July 9th 2004, 08:04 AM
spike.gif
you need to press H or whatever to put hardness that really isn't there on the screen. those buttons that you do it with change though, depending on the type of the keyboard you have.
July 9th 2004, 08:18 AM
slayer.gif
Astral
Peasant He/Him
 
Hey Thanks all!

I mostly Finiched The map (86screen)
Now all i need to do is scripting stuff lol

Illusivefing! I did what you said for the boss and it work! The Bridge/Beach too! Thank

-Astral
July 9th 2004, 08:19 AM
spike.gif
hey, you need to make two screens more!
88 is a lot better number than 86.
July 9th 2004, 02:00 PM
fairy.gif
glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
hey scrathcer, when you make a d-mod. must that D-Mod be at least 88 screens or more?
July 9th 2004, 05:26 PM
slayer.gif
Astral
Peasant He/Him
 
Well... Now i have exacly 88 screens lol
Do I win something

Ha! and is there a *Ghost* Slayers
Like the ghost knight?
I would need it for my final Boss
July 9th 2004, 05:55 PM
spike.gif
perhaps I'll give your dmod a higher score

No, I don't think there is though there are modified slayers in every this and that dmod.
July 10th 2004, 09:04 AM
slayer.gif
MadStalker
Peasant He/Him Finland
tag line 
Hey, Master of Puppets and Reign in Blood (along with others) came out in '86, that's why 86 is better
July 10th 2004, 09:47 AM
slayer.gif
Astral
Peasant He/Him
 
lol

Hi! it me again and I have another question!

I created a boss (Mini-Pillbug) harder to hit and Faster

My question is, when you kill it i want a barrier to move (in another screen). So can I do it?

And how to make a seller(point me some script to check)that all...

If i can do thease two thing it wont take long before i finich it

-Astral
July 10th 2004, 09:58 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Use visions. Create a global variable that stores the state of the barrier (like: 1 = barrier moved and 0 = barrier not moved). Then, you should create two visions at that screen - one with the barrier there and one with the barrier moved. Then, attach a script to the screen (B in DinkEdit) and in that script, write something like:

void main(void)
{
if (&barrier_state == 0)
{
&vision = 1;
//in case vision 1 = barrier in place
}
if (&barrier_state == 1)
{
&vision = 2;
//in case vision 2 = barrier moved
}
//or whatever your variable for barrier state is
}

Sell script: look at s4-st3p.c in source.zip.
July 10th 2004, 10:07 AM
slayer.gif
Astral
Peasant He/Him
 
I...Think I understand most of it... lol

Thanks Simeon!

July 10th 2004, 02:15 PM
slayer.gif
Astral
Peasant He/Him
 
Hi it me again! (for the last time lol)

I have a little question about bonca...
How can i make them attack other monster (to make them hunting) Like in bane of the magie?

and in generale do you people like when monster are hard to kill or easy...
Same question for boss...

-Astral
July 10th 2004, 02:41 PM
spike.gif
Here. this is from en-boncd.c
int &mtarget = get_sprite_with_this_brain(9, &current_sprite);
if (&mtarget > 0)
{
sp_target(&current_sprite, &mtarget);
}
There are several more ways to do that, but that's one of the easiest.

I like it when ordinary monsters are relatively easy, (so that you have to concentrate when fighting them but don't have to go save the game everytime after you've cleared a screen) but bosses are extremely hard. Not in means of defense or strength though, rather that they have some sort of unique abilities that force you to use some kind of tactics to beat them.
July 10th 2004, 04:24 PM
slayer.gif
Astral
Peasant He/Him
 
Ok ok last time i said it was the last time i needed help but i really want to make a xp machine (exchange gold/xp) like quest for cheese.

I dont really like to take other idea but...
I need it

For the monster/I made them exacly like you said lol
...but for the boss can you give a exemple of Tactic?

-Astral
July 10th 2004, 08:13 PM
dragon.gif
eug1404
Peasant He/Him New Zealand
 
Just download the quest for cheese source in the developement section, the script will be in there.
July 10th 2004, 08:44 PM
slayer.gif
Astral
Peasant He/Him
 
Ok lol I dint know!
Thank for telling me that!

-My Progress-
I completed the map.
All the storyline script are done. (not the ending i dont know yet how to do one... same for the intro )
Is there a credit deffiler to download or i have to make one?(dont know how lol)

I think (if i find the stuff i dont know fast) i would be able to relase it in 2-3 days

-Astral
July 10th 2004, 09:01 PM
farmer.gif
credits are fairly easy to make, but there are a few tricks, depending on which kinds of credits you want to make. here's how to make credits scrolling up.

void main (void)
{
int &credit1 = say_xy("`3Thanks to illusivefing", 300, 500);
sp_kill(&credit1, 0);
move(&credit1, 8, -200, 1);

wait(500);

int &credit2 = say_xy("`3for helping me make credits!", 300, 500);
sp_kill(&credit2, 0);
move(&credit2, 8, -200, 1);
}

you'll probably want to fade down the screen or something first. play around with some of the values to get different coordinates, or even different direction scrolling credits.
July 10th 2004, 09:46 PM
wizardb.gif
merlin
Peasant He/Him
 
And don't make the strings too long! That'll crash the engine faster than you can say...something. I think the max length is about 80. I'd have to check though.
July 10th 2004, 10:33 PM
slayer.gif
Astral
Peasant He/Him
 
Hi I made a script and I have some problem whit it...

here is it

void main( void )
{
freeze(1);
freeze(&current_sprite);
stopmidi("9.mid");
say_stop(" Bla bla bla!",1);
say_stop("`5 Bla bla bla",&current_sprite);
unfreeze(1);
unfreeze(&current_sprite);
playmidi("2.mid");

screenlock(1);
int &mcounter;
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 5);
sp_distance(&current_sprite, 60);
sp_range(&current_sprite, 45);
sp_frame_delay(&current_sprite, 45);
sp_timing(&current_sprite, 0);
sp_exp(&current_sprite, 0);
sp_base_walk(&current_sprite, 640);
//sp_base_death(&current_sprite, 680);
sp_base_attack(&current_sprite, 630);
sp_defense(&current_sprite, 2);
sp_strength(&current_sprite, 15);
sp_touch_damage(&current_sprite, 8);
sp_hitpoints(&current_sprite, 1000);
preload_seq(632);
preload_seq(634);
preload_seq(636);
preload_seq(638);

preload_seq(641);
preload_seq(643);
preload_seq(647);
preload_seq(649);
}

void hit( void )
{
sp_target(&current_sprite, &enemy_sprite);
playsound(28, 22050,0,&current_sprite, 0);
}

void die( void )
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 2);
editor_seq(&hold, 645);
editor_frame(&hold, 1);
&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);
}
{
stopmidi(2);
playmidi("12.mid");
freeze(1);
freeze(&current_sprite);
say_stop("`5 Bla bla bla",&current_sprite);
say_stop(" bla bla bla",1);
unfreeze(1);
unfreeze(&current_sprite);
}

void attack( void )
{
playsound(27, 22050,0,&current_sprite, 0);
&mcounter = random(4000,0);
sp_attack_wait(&current_sprite, &mcounter);
}

It a boss and when i enter the screen i talk whit it after we fight and when he die the music change and dink stay there not moving but i want him to talk whit the sprite...

What I'm doing wrong?
---------------------------------------
And for the credit i dint test it for now...
But thank!
July 10th 2004, 11:09 PM
farmer.gif
void die( void )
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
{
//added this bracket, so that script would not terminate when it got to the next closing bracket
editor_type(&hold, 2);
editor_seq(&hold, 645);
editor_frame(&hold, 1);
&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);
}
//removed the bracket here because it wasn't necessary
stopmidi(2);
playmidi("12.mid");
freeze(1);
freeze(&current_sprite);
say_stop("`5 Bla bla bla",&current_sprite);
say_stop(" bla bla bla",1);
unfreeze(1);
unfreeze(&current_sprite);
}

there. it should work just fine now. at least, i can't see anything else from looking at it
July 10th 2004, 11:53 PM
slayer.gif
Astral
Peasant He/Him
 
Hmm...
It still not working...
I Really wonder why!

Is there somethig I have to add or remove for it to work?

-Astral
July 11th 2004, 01:43 AM
slayer.gif
Astral
Peasant He/Him
 
Well Well... It all finished!
The only thing that I need to do is the end boss (The script that dont work lol)

and also the credit...Where do i put it in my end boss script.
after...

unfreeze(&current_sprite);
}

At the end of void die( void )
Or somewhere else?

If i can have it to work I'll post it Today!
July 11th 2004, 02:12 AM
farmer.gif
void die( void )
{
&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);

int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
{
//added this bracket, so that script would not terminate when it got to the next closing bracket
editor_type(&hold, 2);
editor_seq(&hold, 645);
editor_frame(&hold, 1);
}
script_attach(1000);
int &othersprite = create_sprite(&save_x, &save_y, 0, 645, 1);
stopmidi();
playmidi("12.mid");
freeze(1);
freeze(&othersprite);
say_stop("`5 Bla bla bla",&othersprite);
say_stop(" bla bla bla",1);
unfreeze(1);
unfreeze(&othersprite);
external("credits", "main");
}

i can't believe i didn't think of this before. i was having the same problem with a boss script when he died. i'm not quite sure exactly what you're wanting to do, but you have to attach the script to sprite 1000, or the script just dies with the boss. i modified the script to do this, plus fixed a few other things. i created another sprite for the boss to talk after he's dead. at least, that's the only way i can think of doing it at the moment. as far as the credits go, you should create another script for them named credits and just put whatever you want to do for them. the external() command will run the credits script when it gets to that part of the boss script.
July 11th 2004, 02:52 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Am I getting the wrong end of the stick, or wouldn't...

spawn("ending");

...be the simplest solution?

void die( void )
{
&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);

// Now, before the sprite kills itself off...
spawn("ending");
//Then you just have Dink running about celebrating or whatever in that scrpt, with the credits rolling.
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
{
//added this bracket, so that script would not terminate when it got to the next closing bracket
editor_type(&hold, 2);
editor_seq(&hold, 645);
editor_frame(&hold, 1);
}
etc
July 11th 2004, 03:44 AM
slayer.gif
Astral
Peasant He/Him
 
Ok now My end boss is working greath Thank!
But i have a problem with the credits lol

It very ugly... it all tossed together on the right side of the screen and i only see half of what I writed lol

and i did what you said...

void main (void)
{
int &credit1 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit1, 0);
move(&credit1, 8, -200, 1);

wait(500);

int &credit2 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit2, 0);
move(&credit2, 8, -200, 1);

wait(500);

int &credit3 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit3, 0);
move(&credit3, 8, -200, 1);

wait(500);

int &credit4 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit4, 0);
move(&credit4, 8, -200, 1);

wait(500);

int &credit5 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit5, 0);
move(&credit5, 8, -200, 1);

wait(500);

int &credit6 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit6, 0);
move(&credit6, 8, -200, 1);

wait(500);

int &credit7 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit7, 0);
move(&credit7, 8, -200, 1);

wait(500);

int &credit8 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit8, 0);
move(&credit8, 8, -200, 1);

wait(500);

int &credit9 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit9, 0);
move(&credit9, 8, -200, 1);
wait(500);

int &credit10 = say_xy("`3 ... ", 300, 500);
sp_kill(&credit10, 0);
move(&credit10, 8, -200, 1);
}

I'm I doing something wrong or it an error!

An how can I make the screen fade(go black) for the credit?

And to make the game return to windows by himself?(after the credits)

if i can do that I post my game right away
July 11th 2004, 03:50 AM
farmer.gif
er, try changing all the 300's to 0's, i think. for fading down use fade_down();, and for the very last line of the code, use kill_game();

oh, and one more thing i might mention. at the very end of the script where you do the sprite_attach(1000), put this line before the last bracket:
kill_this_task();
this insures that there aren't any horrible memory leaks, and keeps the code from going weird places when the script is finished. i can't wait to play your game.
July 11th 2004, 03:53 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
You need to give the text strings a speed. So after each thing, add:

sp_speed(&creditX, 3);

And if it still doesn't work, look at s3-cred.c, Mystery Island (it's in tutorial/msource.zip).

To make a screen go black:

fade_down();
fill_screen(0);
//0 = black

To return to Windows:

kill_game();
July 11th 2004, 04:59 AM
slayer.gif
Astral
Peasant He/Him
 
Yeah!! It finished!
ok... now how can I send to the site?
Do i have to encrypt and compress?

I want it to be bug free before I relase the next one so... If you find a bug or hardness error tell me ok (when you can play it lol)

PS:Simeon ...I was able to make the credit with the s3-cred thank!
July 11th 2004, 08:12 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Well, now you need to put all the files in a zipfile and get it to the public. So, in WinXP: create a new zipfile and place all the files and folders in there. Do it so that there are four (or less) folders (Graphics, Sound, Story and Tiles) and some other files. In other Windows versions, create a new zipfile using WinZip. Oh, and when you're creating a zipfile in WinXP, it might be handy to check the Graphics folder for any Thumbs.db files; they're hidden in WinXP itself but they're still in the zipfile, increasing the downloadsize for nyet - as they're simply created/used by WinXP to create small pictures of the file.

Then, you should use the Upload link at the left to submit your D-Mod to the public. I've never used it (simply because my D-Mods were released before this got introduced - I'm old ), but I'm sure redink1 will see your file that way.
July 11th 2004, 11:38 AM
slayer.gif
Astral
Peasant He/Him
 
Whoa! my dmod was relased at the same time then two other...
I hope your going to have time and write a nice review

PS:Without paying attantion I ereased my .c file when I compiled them so i hope there not gonna be too much bug or ill have to redo it
July 11th 2004, 02:48 PM
goblinm.gif
I think I gave it an 8.1, which might be a little more than it deserved. Not much plot, but some good fighting. Quite good for a first mod. Overall I enjoyed it.
July 11th 2004, 02:54 PM
slayer.gif
Astral
Peasant He/Him
 
Hey thanks a lot!
As for the plot... I'm going to make it better (some how) in my next Update!

Any idea to propose?
Find any bug?

-Astral
July 11th 2004, 03:37 PM
goblinm.gif
The only bug I noticed was that you can walk on some of the buildings.

I can't really suggest anything in the way of plot, though, sorry.
July 11th 2004, 05:10 PM
slayer.gif
Astral
Peasant He/Him
 
I dint notist the house hardness when i tested it myself!

Well now all the house are modified so you dont enter in the wall... It gona be in my next update!

-Astral