Granny UIL



Granny UIL (User Interface L2) is the language used in the user interface and levels of Super Granny 4 and higher. It is more simpler than Granny UIX and is also used in Sandlot's other games but named Granny UIL because of it's own implementation. It can be edited using Notepad++ or any other text editor.

NOTE: These are only research and speculations based on data from the game's archives.

Level Format
Shown below is the format of the level file used in the game. (Meta 	(Build 82) 	(Theme 3) 	(Collectibles 2) 	(Name "Coding Level") 	(BonusTime 85) ) The Meta tag defines the basic information of the level such as:.


 * 1) Build - The game's build number.
 * 2) Theme - Theme of the current level.
 * 3) Collectibles - Number of collectibles in the level to achieve the Packrat Bonus.
 * 4) Name - The name of the current level.
 * 5) BonusTime - The timer of the level. Used in Bonus Levels only. Can also be put in regular levels  for extra action.

After the Meta tag, the next tag that must start will be the Objects tag, which identifies that the segments of code below are objects.

Example:
(Objects 	(Land (POSI(position 48 528) ) ) 	(Land (POSI(position 80 528) ) ) 	(Land (POSI(position 112 528) ) ) 	(Land (POSI(position 144 528) ) ) 	(SuperRock (POSI(position 304 496) ) ) 	(SuperRock (POSI(position 304 272) ) ) 	(SuperRock (POSI(position 464 464) ) ) ) There are lots of types that can be referenced in the objects tag. However, there are special tags available only in certain editions of Super Granny. For example, the Granny2 and Granny3 tags can only be used in Super Granny 4 because it's the only game in the series that has Multi-Granny (Play with a Friend).

Example of a full level: (Meta 	(Build 82) 	(Theme 3) 	(Collectibles 2) 	(Name "Coding Level") 	(BonusTime 85) ) (Objects 	(Land (POSI(position 48 528) ) ) 	(SuperRock (POSI(position 304 496) ) ) )

UI / User Interface Format
The UI or User Interface Format was somewhat, similar to the level format but with some changes. In the UI format, you can use animations using '''(UIStatic). '''An example can be seen below. (UIStatic 	(POSI (position 4 600)) 	(SPRT (file gfx/interface/bang.ani)) ) In the example, you will show a never ending animation of the BANG animation.
 * 1) You cannot use any of the Level Objects tags such as (Land), (SuperRock), (PlatformA), etc. or otherwise your game will crash.
 * 2) The META tag is not needed. It must only be used on levels.
 * 3) You must put a (UIMainMenuFX) tag at every start of a UI file, after the (Objects) tag.

If you want to show some text, you must use either of these 3 tags. Examples of each of these will be shown below.
 * UIMenuLabel
 * UILabel
 * UIMenuTextButton

UIMenuLabel: (UIMenuLabel     (POSI (position 400 70) )     (TEXT (zOrder 2) (text "Sample Text!") (align 1) (scale 0.6) (color 255 240 100))     (Data (animate 1)) ) UILabel: (UILabel     (POSI (position 340 70) )     (TEXT (zOrder 2) (text "Sample Text!") (align 1) (scale 0.6)) ) UIMenuTextButton: ​(UIMenuTextButton     (POSI (position 560 180))     (TEXT (text "Sample Button Text"))     (Data (clickEvent CONT) (regionFromText )) )