SabreTrout's Profile
What would be the most useful generic scripts to have? I've been working on a few (typical NPC, typical shop, and typical random object) but am slowly hitting a standstill.
I'm trying to make them easy to understand and edit, so that those new to d-mod creation can use them to help make their own d-mods, yet also make them complex enough so that an experienced d-mod author could use them and not feel they were lacking in some areas.
Example (though this hasn't been fully annotated or explained as of yet)...
// A generic script for an NPC.
void main ( void )
{
}
void talk ( void )
{
int &hello = sp_editor_num(¤t_sprite);
int &greet = editor_seq(&hello, -1);
freeze(1);
freeze(¤t_sprite);
//HAVE WE EVER SPOKEN BEFORE?
if (&greet == 0)
{
&greet = 1;
editor_seq(&hello, &greet);
say_stop("Hey, have we spoken before?", 1);
say_stop("`%Nope. Not in this adventure, anyway.", ¤t_sprite);
goto done;
}
//THE CONVERSATION STARTS HERE
startloop:
choice_start();
set_y 240
set_title_color 9
title_start();
"Description of the NPC"
title_end();
"Gossip"
"Leave"
choice_end();
if (&result == 1)
{
say_stop("Have you heard any gossip?", 1);
say_stop("`%No, not really.", ¤t_sprite);
say_stop("Oh... never mind then.", 1);
goto startloop;
}
if (&result == 2)
{
goto done;
}
// FINISH THE CONVERSATION
done:
unfreeze(1);
unfreeze(¤t_sprite);
return;
}
void hit( void )
{
say_stop("`%That's not very nice, is it?", ¤t__sprite);
}
I'm thinking that if I can come up with a few of these scripts, and stick in a help file or two to explain what does what, and why it's a good idea etc etc, it will be pretty helpful.
Ideas? Comments? Spare change?
I'm trying to make them easy to understand and edit, so that those new to d-mod creation can use them to help make their own d-mods, yet also make them complex enough so that an experienced d-mod author could use them and not feel they were lacking in some areas.
Example (though this hasn't been fully annotated or explained as of yet)...
// A generic script for an NPC.
void main ( void )
{
}
void talk ( void )
{
int &hello = sp_editor_num(¤t_sprite);
int &greet = editor_seq(&hello, -1);
freeze(1);
freeze(¤t_sprite);
//HAVE WE EVER SPOKEN BEFORE?
if (&greet == 0)
{
&greet = 1;
editor_seq(&hello, &greet);
say_stop("Hey, have we spoken before?", 1);
say_stop("`%Nope. Not in this adventure, anyway.", ¤t_sprite);
goto done;
}
//THE CONVERSATION STARTS HERE
startloop:
choice_start();
set_y 240
set_title_color 9
title_start();
"Description of the NPC"
title_end();
"Gossip"
"Leave"
choice_end();
if (&result == 1)
{
say_stop("Have you heard any gossip?", 1);
say_stop("`%No, not really.", ¤t_sprite);
say_stop("Oh... never mind then.", 1);
goto startloop;
}
if (&result == 2)
{
goto done;
}
// FINISH THE CONVERSATION
done:
unfreeze(1);
unfreeze(¤t_sprite);
return;
}
void hit( void )
{
say_stop("`%That's not very nice, is it?", ¤t__sprite);
}
I'm thinking that if I can come up with a few of these scripts, and stick in a help file or two to explain what does what, and why it's a good idea etc etc, it will be pretty helpful.
Ideas? Comments? Spare change?
SabreTrout has released 16 files
Title | Category | Avg | Updated |
---|---|---|---|
Cloud Castle 2: Scarab | D-Mod, Epic | ![]() | July 14th, 2014 |
Valhalla | D-Mod, Unfinished | ![]() | October 30th, 2011 |
Basilisk Smile (The) | D-Mod, Romp | ![]() | May 3rd, 2007 |
Cloud Castle | D-Mod, Quest | ![]() | February 11th, 2007 |
Scriptus Generica | Development | ![]() | December 31st, 2005 |
Once a Hero | D-Mod, Demo | ![]() | December 31st, 2005 |
Knight's Tale Trois (A) | D-Mod, Romp | ![]() | March 7th, 2004 |
Knight's Tale 2 (A) | D-Mod, Romp | ![]() | July 7th, 2003 |
Knight's Tale (A) | D-Mod, Romp | ![]() | June 19th, 2003 |
Meridian Silver Design | Miscellaneous | ![]() | May 11th, 2003 |
Plane Walker | D-Mod, Demo | ![]() | December 31st, 2002 |
Dink Lantern Graphics | Development, Graphics | ![]() | December 10th, 2002 |
Fighterz | D-Mod, Romp | ![]() | October 30th, 2002 |
Alternative Heroes | Development, Tutorial | ![]() | August 28th, 2002 |
Super Midi Pack | Development, Music | ![]() | May 31st, 2002 |
Tutorial D-Mod | D-Mod, Development, Tutorial | ![]() | May 31st, 2002 |
SabreTrout has written 33 reviews
SabreTrout has taken 1 screenshot
Screenshot | File | Date |
---|---|---|
![]() |
Cloud Castle 2: Scarab | April 3rd, 2007 |