================================================================================ == The SMTC SubScreen Design Kit == ================================================================================ This is a quick guide to designing your very own subscreen, useful for adding items to a custom quest or giving things your own personal touch. This is not a quick guide, creating a subscreen can take some time and testing. Be sure to create a before hand picture of your subscreen so the design is much easier. ================================================================================ == Tutorial == ================================================================================ If you are reading this then you are interested in creating a custom subscreen for SMTC. Congratulations, I suppose. This is a moderately tedious task and it's also pretty thankless. Getting started is very simple. Go to the Subscreen.scp in the same folder as this file and open it in notepad or some other text editor. Now, begin using the functions outlined in Appendix A to draw your subscreen as you desire. I advise creating a blueprint of your subscreen before getting started. One is included in the regular SMTC download. Drawing the lines and bars is fairly self-explanatory. Look at the default subscreen.scp if you have a problem with the syntax. The difficult part is the item placement and pathing. Placing an item is moderately simple. Use the Define_Item_Location function in Appendix A, and draw a rectangle. The text of the item's name is located at the x1 value + 8, y1 value + 2. The small button on the rectangle is at x1 + 2, y1 + 2. Leave enough bar space for the full text of the item. A list of items can be found in Appendix C. The hard part comes with pathing the items. A path must be defined for all items, or they will default to Charge Beam(item 0) whenever a key is pressed. Use the Item_Path function in Appendix A to path the item. The four paths are actually the number of the item to go to when that key is pressed. If that item does not exist in Samus' inventory, the move will either not occur (if you pressed left or right) or go to the nonexistant item's path (if up or down is pressed). If that seems confusing, then just think that it will skip items when up or down is pressed. To make a path go nowhere, set it to -1. The reserve tank box is not functional, so don't worry about it yet. ================================================================================ == Appendix A: Commands == ================================================================================ // Comments Comment line, discarded by scripter. Useful for documenting your script. Any line beginning with two slashes is a designated comment. Draw_Bar(x, y, thickness, orientation, length) Draws a "bar" object on the screen, usually used to surround the item names. The variables are defined in the appendix. Draw_Corner(x, y, rotation) Draws the corner of a box, at a rotation also listed in the appendix. These first two functions will compose the beef of your screen, so get used to them. Rotation should be in degrees. Note: You may also use any function from the RegDraw.txt in the Scripts folder. Define_Item_Location(x1, y1, x2, y2, item) Defines where (x, y) on the screen an item is located. The item box can be defined by x1,y1 to x2,y2. Item_Path(item, leftdef, updef, rightdef, bottomdef) Defines which item can go to where on the subscreen. When you are highlighting the item in the path and you press left, the item of leftdef will be selected. See tutorial for additional information. Define_Base_Item(item) Defines which item the subscreen starts on. Place this line to change the default from 0. Define_Emergency_Item(leftdef, rightdef) Defines which item to go to when left or right is pressed and the item referred does not exist. Print_Text(x, y, "Text Here") Prints text in the standard subscreen font at location x, y. The text MUST be enclosed in quotes! Max of 40 chars please. Use multiple statements for longer lines. ================================================================================ == Appendix B: Variable Definitions == ================================================================================ x - The x coordinate on the screen that the object will be drawn to. Bear in mind that this is in relation to the SMTC's draw rectangle, the black border on the screen cannot be drawn to. Positive integers only. y - The y coordinate on the screen that the object will be drawn to. Bear in mind that this is in relation to the SMTC's draw rectangle, the black border on the screen cannot be drawn to. Positive integers only. Item - Which item you want to place. An index of the names can be found in appendix C. DIRECTIONdef - Which item to go to for corresponding direction. See tutorial. "Text Here" - Any letter from the standard ASCII set and some of the extended set as well. Text must be enclosed in quotations to be valid. To use the quote character, enter /". Some other special characters are // to use the / character, /' to use the apostrophie, etc. rotation - In degrees, which direction to rotate the object to. 90 is a right angle, 180 is a half spin, and 270 is a right angle backwards. orientation - Whether the bar being drawn is horizontal(0) or vertical(1). thickness - For bars, 4, 3, or 2 width is acceptable. See pieces.bmp to see what each looks like. length - How many pixels long a bar should be. rgb - RGB componenets of the colour of the object. R, G, and B must be less than or equal to 255 and greater than or equal to 0. ================================================================================ == Appendix C: Constant Definitions == ================================================================================ Item Listing: 0 - Charge Beam 1 - Ice Beam 2 - Burn Beam 3 - Wave Beam 4 - Spazer Beam 5 - Plasma Beam 6 - Varia Suit 7 - Gravity Suit 8 - Corrosion Suit 9 - Morphing Ball 10 - Bombs 11 - Spring Ball 12 - Screw Attack 13 - High Jump Boots 14 - Space Jump 15 - Speed Booster 16 - Reserve Tank (Data is in a special tutorial section)