The Dink Network

I love photoshop.

March 31st 2013, 04:04 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
March 31st 2013, 04:45 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
That IS pretty amazing!
March 31st 2013, 04:50 PM
spike.gif
It's okay. Keep getting better.
March 31st 2013, 07:53 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
I love it One thing, why did you decide to stick with the Dink palette for it? I mean, yes, it's traditional style for it, but you can just use 32 bit graphics instead without a palette^^

When I think about it, it's impressive that you made that witht he palette intact and still looking good.
April 1st 2013, 01:32 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
I love it One thing, why did you decide to stick with the Dink palette for it? I mean, yes, it's traditional style for it, but you can just use 32 bit graphics instead without a palette^^

Why not? Maybe.. in case you live in 1995 and can't play in true color...?

Just need a name for it now...

EDIT: Made a major discovery... I found a font that may be the same font used for Dink Smallwood.

Boister Black.
April 1st 2013, 05:27 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
Also have a Dink Smallwood V2 in the making as we speak.

Wish me luck.
April 1st 2013, 06:51 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Okay.... GL? xD
April 1st 2013, 09:09 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
All right.. no tutorial seems to help me with this.

How do I script a chest with 100 gold in it, and a longsword? No tutorial I found has anything about a chest.

Thanks.
April 1st 2013, 09:22 PM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
I'm sure Robj will have one made/uploaded regarding chests if he hasn't already done one.
April 1st 2013, 09:25 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
I hope so, I owe most of my Dmod knowledge to him.

Plus your race with him in the original Dink is entertaining as all hell.
April 1st 2013, 09:44 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
How do I script a chest with 100 gold in it, and a longsword? No tutorial I found has anything about a chest.

I didn't exactly look into detail if this had what you were looking for, but it should be of some help, in any case.

Pre-used Scripts by Category - v1.01
April 2nd 2013, 05:27 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
You should also look into the scripts of the original Dink Smallwood, which are located in a zip file in the develop folder. I'm not too sure about which script is the chest script, but it shouldn't be that hard to find
April 2nd 2013, 09:26 AM
wizardg.gif
Leprochaun
Peasant He/Him Japan bloop
Responsible for making things not look like ass 
How do I script a chest with 100 gold in it, and a longsword? No tutorial I found has anything about a chest.

You'll want to do several things for this.

void hit(void)
{
freeze(1);
wait(20);

//play the chest animation by changing the brain, base_walk, and speed of the sprite.
wait(20);
//create the gold sprite and use sp_script on it.
//add the sword to the inventory.
say_stop("LOOK AT THE SIZE OF THIS POKING STICK!", 1);
wait(50);
unfreeze(1);

//if you're using a global declare it now.
}

For the script you make to assign to the gold:

void main(void)
{
sp_touch_damage(&current_sprite, -1);
//make it hard(giggity)
}

void touch(void)
{
&gold += 100;
// then use a nodraw and an sp_active

}

So your scripts should be something like those. I'd suggest playing around with each thing step by step. Like just start by trying to make sure the animation will play.

Good Luck.
April 2nd 2013, 03:12 PM
fairy.gif
Kerrek
Peasant He/Him United States
oao 
@Skull That's useful, thanks.

@Kyle Didn't know about that. Thanks also.

@Leprochaun Thanks a bunch, I just wish I knew how to add the sword to the inventory.

I know it's like

add_item("item-????",sequence, frame);

but I'm not sure what the abbreviation for "longsword" is. If there was like, a list of them I'd appreciate it.

Also, one more.. quick question, it's dumb but how do I make a screentriggered script happen only one? Like if I enter another screen, and go back, the script doesn't trigger?

Man , I wish I knew more about DinkC, it's interesting.
April 2nd 2013, 03:48 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
I think what you can do is just copy the sword script from source.zip, into your D-Mod's story -folder. And then you can name it item-whateveryouwish.c.
April 2nd 2013, 05:13 PM
wizardg.gif
Leprochaun
Peasant He/Him Japan bloop
Responsible for making things not look like ass 
All the sword scripts can be found in the develop folder. I believe they're "sw-1", "sw-2", and "sw-3".

1 is the longsword
2 is the claw sword
3 is the light sword
April 7th 2013, 06:03 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Hi, Kerrek!

First you need to locate the folder called "develop" (it's under the folder-structure where you have installed Dink Smallwood). Open the folder and copy the script called "item-sw1.c". You don't need to edit the script as this point. At some point you might want to, but in this early stage, I think it's better to just use the same sword script as in the main Dink game. Paste the script in to your STORY folder.

Open your editor (WinDinkEditPlus is recommended) and add an object. Add a script to it and open the script (you probably know this already, of course).

Add the following rows:
void main(void)
{
        sp_touch_damage(current_sprite, -1);
}

void hit(void)
{

 	if(&story == 0)
	{
 	add_item("item-sw1",438, 7);
	&story = 1;
	}
	else
	{
	say_stop("I really wanted another sword. *Sob*", 1);
    }
     

}

void touch(void)
{
sp_touch_damage(current_sprite, 0);

 &gold += 100;

//***The part below sees that your chest stays open***

  int &hold = sp_editor_num(current_sprite);

  if (&hold != 0)
    {
     //this was placed by the editor, lets make the chest stay open
     editor_type(&hold, 4); 
     editor_seq(&hold, 177);
     editor_frame(&hold, 6);
     //type means show this seq/frame combo as background in the future
    }

  sp_seq(current_sprite, 177);
  sp_script(current_sprite, "");
  sp_notouch(current_sprite, 1);
  sp_nohit(current_sprite, 1);
  kill_this_task();
 
}


Pretty much the same code as Leprochaun posted, but with the row "add_item("item-sw1",438, 7);" added. I also removed all the "wait(50);" commands, as they're there for no specific reason other than making you confused, in my opinion.

Also, when you're working with touchable objects (void touch) you want to add the "sp_touch_damage(current_sprite, 0);" command. If you exclude this, the script will go bananas when you touch the object and loop too many times (for example, give you 2000 gold instead of the intended 100 gold... Might be handy to know).

(I also added story-progression when you get the sword, you can remove this. Play around with it).

Also, one more.. quick question, it's dumb but how do I make a screentriggered script happen only one? Like if I enter another screen, and go back, the script doesn't trigger?

You could use global variables for this. Like the &story progression. Open your Main.c script and add a custom global variable (under the make_global_int("&story", 0); variable). When you have done your desired action and don't wish it to repeat itself, just follow the example with the &story variable and the sword above. Best of luck!

Edit:

You can probably skip the whole "touch" part, since it would make more sense to have the sword and the gold simultaneously.

void hit(void)
{

 &gold += 100;
 add_item("item-sw1",438, 7);

 int &hold = sp_editor_num(¤t_sprite);

    if (&hold != 0)
    {
     //this was placed by the editor, lets make the chest stay open
     editor_type(&hold, 4); 
     editor_seq(&hold, 177);
     editor_frame(&hold, 6);
     //type means show this seq/frame combo as background in the future
    }

  sp_seq(current_sprite, 177);
  sp_script(current_sprite, "");
  sp_notouch(current_sprite, 1);
  sp_nohit(current_sprite, 1);
  kill_this_task();

}