Page 1 of 1

Message Box Thread

Posted: Mon Aug 23, 2010 6:44 pm
by lemm
This thread is for organizing all the popup message boxes in the game. To make the code more compact, the message box stuff will be handled by a simple indexing system. There won't be room otherwise if it isn't done this way, plus it separates messages from patching so it divides the work load a bit more.

There are two pieces of data that will be patched.
The first is the message text itself. This is done exactly the same as in normal vorticons: $0A is newline, $0D is carriage return, and $00 is end string. The next string starts immedately after the one prior. (The whole message is one string).
The second item is the index, which is an array of 2-byte offsets of the start of each message. (The first message has offset of 0).

So, for example, you the seventh in the index uses the text at byte $134 in the message data, then the seventh word in the message index is $134. Very easy for anybody to edit. To make message seven readable in ANY level (even the world map), just put a message tile down and in the sprite plane put a 7. (Note: this won't spawn sprite #7 because sprites are only spawned on No-behaviour tiles). Message boxes will still be the same size as in marooned on mars, and they will say press enter to continue in the last line.

Since the message system is decoupled from the patching, can somebody go ahead and start organizing the messages for all the levels? They don't have to be in any particular order, and there can even be multiple messages in one level if this is necessary.

Posted: Mon Aug 23, 2010 10:53 pm
by Deltamatic
Clarification: you're talking about the messages the replacements for Yorp statues will give?

Posted: Tue Aug 24, 2010 2:59 am
by lemm
That's correct. In addition, some of the messages included in this file can be played on the world map (e.g. BWB, trying to enter a lick town after you've pulled the pepper prank or before you've gotten the soda, etc.)

Posted: Tue Aug 24, 2010 3:05 am
by levellass
And they require carriage returns, unlike the other Keen text?

Posted: Tue Aug 24, 2010 3:16 am
by lemm
No carriage returns are required. It's just exactly like writing yorp messages. (Using white background as well).

Posted: Thu Aug 26, 2010 12:20 am
by levellass
You might want to note that in your original post about $0D then.

Posted: Sat Aug 28, 2010 10:15 pm
by Deltamatic
http://files.commanderkeen.org/users/om ... 20FULL.jpg
Where in here do we want messages?
We need to have them somewhere in the slug and lick areas to tell the player about their feud and poisoning the well / peppering the feast. But I'm not sure how that is arranged within the levels.
Will the boot people say anything?

Posted: Mon Aug 30, 2010 4:41 am
by levellass
I shouldn't think so, all they seem to want to talk about is that weird lady who lives in the shoe. Quite a lot of children I'm told.

Posted: Mon Aug 30, 2010 11:41 pm
by Deltamatic
We need a text that's an introduction to the feud and an invitation to join their side on both the slug and lick sides. If the player accepts an invitation on one side, and then goes to the other, can the intro/invite be removed because he's on the other side now? How does the player accept the invitation?

Posted: Tue Aug 31, 2010 12:51 am
by CommanderSpleen
We've got that issue covered. The player is awarded with an item necessary for each quest. Upon completing either quest, both of these items are removed resulting in only one path being made available.

There are currently placeholders for the bridge levels. Ideally they will have a mechanism for
1) informing the player of the quest and providing the item
2) kicking the player out with a reminder if the quest is incomplete
3) granting passage with a congratulatory message when the quest is complete
4) kicking the player out with a disgruntled message if the opponent's quest was chosen

Posted: Tue Aug 31, 2010 1:06 am
by lemm
Here's how it works now which is the way that was agreed upon in some thread back in the day, and I ain't changing it:

Slugs have a slugpost, and licks have a lickpost, and they won't let you in at first.

You can, however, go to the bridge of either faction, where you accept the item. (There will be a message box explaining this in both levels). If you don't want to accept item, you can just exit the level (it is reenterable for later). If you accept the item for one faction, they give you access through THEIR side's post into their city/castle/whatever. Effectively, you have to accept both quests (but neither side knows you accepted the other one; keen is crafty and plays sides you see).

So you voyage on and either prank the slugs or prank the licks. Once this is done, you can no longer access any levels of the side you have pranked, and the side you have aided will let you through their bridge. Conceivably, you could prank one side, and then prank the other, so that neither bridge is passible. Therefore, level design necessitates the use of the "changer" (pogo) tile, as this tile will be replaced by another pending completion of a quest (quest and replacement tile defined in sprite plane; refer to LevelGuide.Txt for further details). The changer tile will block off the prank exit in the slug city and lick castle so that only one prank is completable, and the game, not borkable.

Posted: Thu Sep 02, 2010 8:29 pm
by Deltamatic
So the messages we need are:

1. We won't let you in. (Post at first.)
2. Join our side! (Bridge.)
3. Go and do the work you lazy bum. (Bridge on acceptance without completion.)
4. Hurrah you did it! (Bridge on acceptance with completion.)
5. Get out of here you spy. (Faction's level after pranking that faction.)

Anything else, or is that it?

Posted: Fri Sep 03, 2010 12:26 am
by lemm
Those are the ones essential to the slug/lick plot, along with messages for acquring the prank item and pulling the prank.

Other non-essential messages can be put in levels as well (as many as desired, will be called by contact with message box).