Message Box Thread
Message Box Thread
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.
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.
- Deltamatic
- Posts: 163
- Joined: Tue Oct 06, 2009 5:33 am
- Deltamatic
- Posts: 163
- Joined: Tue Oct 06, 2009 5:33 am
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?
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?
- Deltamatic
- Posts: 163
- Joined: Tue Oct 06, 2009 5:33 am
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?
- CommanderSpleen
- Posts: 1017
- Joined: Sun Aug 31, 2003 12:11 pm
- Location: The Land of Sparkly Things
- Contact:
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
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
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.
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.
- Deltamatic
- Posts: 163
- Joined: Tue Oct 06, 2009 5:33 am
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?
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?