Text prompt

From SRB2 Wiki
Jump to navigation Jump to search
This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article.

SRB2 allows for text prompts, to display text. In vanilla, this is used for the Tutorial. A prompt is created using SOC

Format

A Prompt section in a SOC consists of two elements: a header and page blocks.

Header

  • Prompt defines the number of the prompt. (NOTE: This number should not go beyond 291)
  • NumPages defines the number of pages that the prompt will have. This number should match the number of page blocks that will follow afterwards.

Page blocks

  • Page defines the number of the page. This line starts a page block.
    • Tag The text to use to call this prompt
    • Name The Name to display for this prompt
    • Icon The Icon for this prompt
    • IconAlign Should the icon be on the left or right?
    • Lines How many lines of text space to give
    • PageText The actual text to display
    • HideHud TODO
    • PicMode TODO
    • PicToLoop TODO
  • NumberOfPics sets the number of pictures that exist in the page. If a page consists of multiple pictures, the game will cycle through them one by one, like a slideshow. Each picture is shown for a specific duration before moving on to the next one, until all pictures have been shown.
  • The next section of the page block defines the parameters for each picture defined in NumberOfPics. The names of the parameters depend on the picture number – for each picture number i, there are five parameters: PiciName, PiciHires, PiciDuration, PiciXCoord and PiciYCord. Below the parameters are explained using picture 1 as an example.
    • Pic1Name is the lump name of the picture used in the page. The lump referenced must be in Doom Graphics Format; otherwise the game will crash.
    • Pic1Hires defines whether the picture is in high resolution (if set to true or 1) or not (if set to false or 0). Picture placement is based on a 320×200 resolution base screen. A high resolution picture has double the width and height of a normal resolution picture. For example, if a normal resolution picture were to cover up the entire screen, its size would be 320×200. A high resolution version of the picture would be 640×400.
    • Pic1Duration is the amount of time the individual picture will stay on the screen, measured in tics. Remember that 35 tics = 1 second. After the duration is over, either the next picture will be displayed, or the page ends if there is none. Note that the total length of the page is based not just on the sum of the individual picture durations, but also on the time it takes to display the page's text. The page will end either after all pictures have been displayed or a few seconds after the text has finished displaying, whatever comes first.
    • Pic1XCoord is the X-axis, or horizontal, position of the picture on the screen, measured in pixels. Note that positioning is based on a 320×200 resolution base screen. If the picture's X coordinate is 10, it will be placed 10 pixels to the right of the left border on a 320×200 screen. For higher screen resolutions, the sizes and positions are scaled proportionally, e.g., on a 640×400 screen a picture with an X coordinate of 10 will be placed 20 pixels to the right.
    • Pic1YCoord is the Y-axis, or vertical, position of the picture on the screen, measured in pixels.
    • MetaPage TODO
    • TextSpeed How quickly to display the text
    • TimeToNext How long to wait before automatically moving to the next page
  SOC [view]
General ClearMainCfg
Objects ObjectStateSoundSprite2SpriteInfoSprite2InfoFreeslot
Unlockable content EmblemExtraEmblemUnlockableConditionSet
Miscellaneous WipesCharacterLevelCutscene / ScenePromptMenuHudItem
Related links ActionsConstantsCustom Object tutorial