The documentation to the roodylib extension suite explains the use of SpecialKey to add another option during a particular ending state. I'm pretty sure you're also going to need to tell the player that there is such a choice, by printing your "(A)musing" (or whatever) notice.
You could almost use NewMessages to replace the messages for case &EndGame. However, I only want to show the special option for some ending states and not all of them. I'd need to add a new "num" value case, but that would mean I'd also have to replace EndGame itself, in order to test for the new case.
I've added roodylib, and I see that roodylib has changed EndGame. Looking at the code, I still don't see what I have to replace in order to add text to the message.
Adding to EndGame message
Moderators: Ice Cream Jonsey, joltcountry
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
If you notice, EndGame has this line:
"end_type" is the endflag value you used to call EndGame (example: endflag = 3)
Because of this, you can replace the EndGame message with something like this:
where the applicable text only prints when it's the right endflag.
Code: Select all
Message(&EndGame, 1,end_type)
Because of this, you can replace the EndGame message with something like this:
Code: Select all
replace NewMessages(r, num, a, b)
{
select r
case &EndGame
{
select num
case 1
{
print "\nThe game has ended. Do you want to (R)ESTART,
R(E)STORE a saved game, ";
#ifclear NO_UNDO
if not UNDO_OFF ! if not otherwise overridden
print "(U)NDO your last turn, ";
#endif
if a = 3 ! ( a = end_flag)
print "(A)musing notes, ";
print "or (Q)UIT? ";
}
case 2
{
print "Enter (R)ESTART, R(E)STORE, ";
#ifclear NO_UNDO
if not UNDO_OFF
print "(U)NDO, ";
#endif
if a = 3 ! ( a = end_flag)
print "(A)musing notes, ";
print "or (Q)UIT: ";
}
}
case else : return false
return true ! this line is only reached if we replaced something
}