Generic Scripts
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?
Yeah, that sounds cool to me since there is quite a few things I don't recognize. I might have some use for those commands if I know what they do.
What about those hole-warp scripts and secret trees? (Ideas)
About the trees, btw. It's kinda stupid, but I've never played a D-Mod in which secret trees that are burned, stay burned even after a screenchange. Should be easy to do with the editor_seq(); thingy, I guess. (A comment)
Anyway, just my 2 cents. (Spare change)
About the trees, btw. It's kinda stupid, but I've never played a D-Mod in which secret trees that are burned, stay burned even after a screenchange. Should be easy to do with the editor_seq(); thingy, I guess. (A comment)
Anyway, just my 2 cents. (Spare change)
I've never played a D-Mod in which secret trees that are burned, stay burned even after a screenchange
Seriously? Well, something needs to be done about that!
Seriously? Well, something needs to be done about that!
Secret trees worked that way in the original game, so ut became kind of a standard I guess. Though having them stay burned could eaisly be done using the editor_seq trick.
Anyway, how about some generic items?
A do-nothing item (for story purposes) that dink would just comment on when used.
A generic weapon (or various weapon types)
Maybe even A generic spell.
You can do pretty well copying item-fb -fst -sw1 or -b1 but for newbies especially a cleaned up version with more comments might be handy.
And what about enemies?
Anyway, how about some generic items?
A do-nothing item (for story purposes) that dink would just comment on when used.
A generic weapon (or various weapon types)
Maybe even A generic spell.
You can do pretty well copying item-fb -fst -sw1 or -b1 but for newbies especially a cleaned up version with more comments might be handy.
And what about enemies?