================================================================================================================================ Welcome to DummyCore's main menu help file It got created automatically and exists to teach you how to create Main Menu using files You can delete this file if it is not necessary. It will get sad though :( ================================================================================================================================ Part 0: Bases ================================================================================================================================ To create your own custom main menu using DummyCore the following conditions must be met: a)You need to create a file with any name in this directory b)The file needs to have a .dcmenu extension c)The file must be a text file with UTF-8 encoding d)The file must contain valid JSON syntax within e)The file must contain both menuName and menuDesc strings declared A small example of a correct file: { menuName:"I am a menu name!", menuDesc:"I am a menu description!" } ================================================================================================================================ Part 1: Textures ================================================================================================================================ You can control the way your menu renders in the game. For that it needs to have the following declared: Your file must either contain an array of NBT(FadeTime:Integer and Texture:String) called Textures, or a String called Texture Your file must also contain a MenuType Integer representing the way your texture gets rendered Valid render types: -1 Will not render your menu 0 Will render the image given as a Texture String, with scaling it so it takes all the screen 1 Will render 6 images declared in the Textures NBT Array(Integer FadeTime takes no effect) just as vanilla MC does 2 Will render 1 small texture given as a Texture String, repeating it all across the screen 3 Will render N textures given in the Textures NBT Array with Texture String, leaving 1 texture for the time given in the Textures NBT Array with the FadeTime integer 4 Will render N textures given in the Textures NBT Array with fading one over another with the time given in the Textures NBT Array with the OverlayTime Integer and rendering each image FadeTime Integer ticks 5 Will render a .gif image declared in Texture String(This one might require 'not 10 years outdated OpenGL', though my videocard(read - crap) works fine). [GIF]To specify delay between frames you can use FrameDelay(Integer) to specify the delay for all frames, or FramesDelay(NBT Tag containing Integers) to specify delay for each frame specific. Delay is in ticks! [GIF]FramesDelay must contain FrameNumber:FrameTime. Example would be FramesDelay{0:5,1:3,4:12}. This will set the delay for frame 0 to 5 ticks, frame 1 gets 3 ticks and frmae 4 gets 12 ticks. All others get FrameDelay, or 0 if no specified [GIF]Please, for your own mental health use Forge's loading screen gif as an example, otherwise you are going to rage struggling to make this thing work. You've been warned! You can also add 2 Integer tags: GradientStart and GradientEnd. They are your gradient colors, rendered above your image. Use HEX(4 digit!(RGBA(Red Green Blue Alpha))) color as your color and any HEX -> Deciminary converter to find out your color number If you are using menu type 2(1 image across the GUI) you need to specify the amount of times the image is repeated across the GUI(or the scale of each individual image) This is done by adding TextureRepeats(Integer) to the tag. The more the number - the smaller the image will be, but the more repeated it will be. Default MC uses 10. You may not specify this field, the default value will be used then Valid example of a simple 4 repeating textures menu: { menuName:"I am a menu name!", menuDesc:"I am a menu description!", MenuType:3, Textures:[ { Texture:"examplemodid:textures/menu/MenuImage0.png", FadeTime:100 }, { Texture:"examplemodid:textures/menu/MenuImage1.png", FadeTime:100 }, { Texture:"examplemodid:textures/menu/MenuImage2.png", FadeTime:100 }, { Texture:"examplemodid:textures/menu/MenuImage3.png", FadeTime:100 } ] } ================================================================================================================================ Part 2: Music ================================================================================================================================ You can also include your custom music with DummyCore! To include your music you would need to declare it with an NBT Array with Music String(must be registered via sounds.json) The array itself must also be named Music and can contain up to infinite music tags The music will randomly get chosen in the menu once there is no music playing Valid example of a simple 3 music tracks menu: { menuName:"I am a menu name!", menuDesc:"I am a menu description!", Music:[ {Music:"examplemodid:music.MenuMusic0"}, {Music:"examplemodid:music.MenuMusic1"}, {Music:"examplemodid:music.MenuMusic2"} ] } ================================================================================================================================ Part 3: Custom Images ================================================================================================================================ DummyCore allows you to add custom images to your menu(like MC text) To add them you need to declare them within NBT Array called Images The NBT inside the array can contain the following tags: Texture(String) is a link to your image. Must be written as modid:texturepath, and can be either .png or .gif XAlignment(Integer) and YAlignment(Integer) is a way to represent the image's default position, before applying x and y translations. XAlignment(Integer) and YAlignment(Integer) can have the following Integers: 0 - means the default position will be 0(top left) 1 - means the default position will be in the center(middle, duh) 2 - means the default position will be in the bottom right corner anything>2 - means the default position will be guiSize/value Both those entries can have different values X(Integer) and Y(Integer) is defaultPosition + X or Y, so they are your offsets TextureMinX(Integer) and TextureMinY(Integer) is the start position on your texture file(the file is considered to be 256x256, so making a bigger file will require you to perform additional calculations) TextureMaxX(Integer) and TextureMaxY(Integer) is the end position on your texture file(the file is considered to be 256x256, so making a bigger file will require you to perform additional calculations) Alternatively you can use MinU, MinV, MaxU and MaxV doubles - these represent the texturePosition/textureSize. Only use if you know how that works. Allows for more custom HD texture positioning XSize(Integer) and YSize(Integer) is the size of your texture in the GUI. Text(NBT Array) allows you to declare custom text to be displayed somewhere near your image Text(NBT Array) can have up to infinite tags. Each tag needs to contain X(Integer), Y(Integer) and Text(String) values. The text is positioned the same way the image is. Text will be rendered as a splash if it has a |Splash| prefix. Can also contain Splashes(Text) link to a splashes.txt file and Angle(Float) to rotate the splashes text Valid example of a menu with Minecraft image: Notice, that there are 2 images, due to minecraft.png actually having a split texture { menuName:"I am a menu name!", menuDesc:"I am a menu description!", Images:[ { Texture:"minecraft:textures/gui/title/minecraft.png", XAlignment:1, YAlignment:0, X:-137, Y:30, TextureMinX:0, TextureMinY:0, TextureMaxX:155, TextureMaxY:44, XSize:155, YSize:44 }, { Texture:"minecraft:textures/gui/title/minecraft.png", XAlignment:1, YAlignment:0, X:18, Y:30, TextureMinX:0, TextureMinY:45, TextureMaxX:155, TextureMaxY:89, XSize:155, YSize:44, Text:[ { X:112, Y:48, Splashes:"minecraft:texts/splashes.txt", Angle:-20.0 } ] } ] } ================================================================================================================================ Part 4: Custom Buttons ================================================================================================================================ DummyCore allows you to add custom buttons to your menu To add them you need to declare them within NBT Array called Buttons Each NBT in the array can have the following declared within: Texture(String) is a link to the button's image. Must be written as modid:texturepath, and can be .png only XAlignment(Integer) and YAlignment(Integer) is a way to represent the button's default position, before applying x and y translations. XAlignment(Integer) and YAlignment(Integer) can have the following Integers: 0 - means the default position will be 0(top left) 1 - means the default position will be in the center(middle, duh) 2 - means the default position will be in the bottom right corner anything>2 - means the default position will be guiSize/value X(Integer) and Y(Integer) is defaultPosition + X or Y, so they are your offsets TextureMinX(Integer) and TextureMinY(Integer) is the start position on your texture file(the file is considered to be 256x256, so making a bigger file will require you to perform additional calculations) TextureMaxX(Integer) and TextureMaxY(Integer) is the end position on your texture file(the file is considered to be 256x256, so making a bigger file will require you to perform additional calculations) Alternatively you can use MinU, MinV, MaxU and MaxV doubles - these represent the texturePosition/textureSize. Only use if you know how that works. Allows for more custom HD texture positioning XSize(Integer) and YSize(Integer) is the size of your button in the GUI. ButtonYOffset(Integer) is the amount of pixels the button texture will be offset on the texture file to get the button's disabled and mouseover textures Alternatively can be ButtonYUVOffset double ButtonID(Integer) is the ID of the button. Valid IDs I know of: 0 - Options Button 1 - Singleplayer Button 2 - Multiplayer Button 3 - Empty 4 - Quit Button 5 - Language Button 6 - Mod List Button 7 - Empty 8 - Empty 9 - Empty 10 - Empty 11 - Demo Singleplayer Button 12 - Demo Reset Button 13 - Empty 65535 - DummyCore's change GUI Button Sound(String) is a link to the button's press sound. Must be a registered(via sounds.json) sound URL(String) is a URL link to any Internet website. Pressing the button will trigger site's page opening in the presser's browser Text(String) is a text or a localization reference for the button Valid example of a menu with default Minecraft buttons: { menuName:"I am a menu name!", menuDesc:"I am a menu description!", Buttons:[ { Texture:"minecraft:textures/gui/widgets.png", XAlignment:1, YAlignment:4, X:-100, Y:132, TextureMinX:0, TextureMinY:46, TextureMaxX:200, TextureMaxY:66, XSize:98, YSize:20, ButtonYOffset:20, ButtonID:0, Sound:"gui.button.press", Text:"menu.options" }, { Texture:"minecraft:textures/gui/widgets.png", XAlignment:1, YAlignment:4, X:2, Y:132, TextureMinX:0, TextureMinY:46, TextureMaxX:200, TextureMaxY:66, XSize:98, YSize:20, ButtonYOffset:20, ButtonID:4, Sound:"gui.button.press", Text:"menu.quit" }, { Texture:"minecraft:textures/gui/widgets.png", XAlignment:1, YAlignment:4, X:-124, Y:132, TextureMinX:0, TextureMinY:86, TextureMaxX:20, TextureMaxY:106, XSize:20, YSize:20, ButtonYOffset:20, ButtonID:5, Sound:"gui.button.press", Text:"" }, { Texture:"minecraft:textures/gui/widgets.png", XAlignment:1, YAlignment:4, X:-100, Y:48, TextureMinX:0, TextureMinY:46, TextureMaxX:200, TextureMaxY:66, XSize:200, YSize:20, ButtonYOffset:20, ButtonID:1, Sound:"gui.button.press", Text:"menu.singleplayer" }, { Texture:"minecraft:textures/gui/widgets.png", XAlignment:1, YAlignment:4, X:-100, Y:72, TextureMinX:0, TextureMinY:46, TextureMaxX:200, TextureMaxY:66, XSize:200, YSize:20, ButtonYOffset:20, ButtonID:2, Sound:"gui.button.press", Text:"menu.multiplayer" }, { Texture:"minecraft:textures/gui/widgets.png", XAlignment:1, YAlignment:4, X:-100, Y:96, TextureMinX:0, TextureMinY:46, TextureMaxX:200, TextureMaxY:66, XSize:98, YSize:20, ButtonYOffset:20, ButtonID:14, Sound:"gui.button.press", Text:"menu.online" }, { Texture:"minecraft:textures/gui/widgets.png", XAlignment:1, YAlignment:4, X:2, Y:96, TextureMinX:0, TextureMinY:46, TextureMaxX:200, TextureMaxY:66, XSize:98, YSize:20, ButtonYOffset:20, ButtonID:6, Sound:"gui.button.press", Text:"Mods" } ] } ================================================================================================================================ Part 5: Custom Text ================================================================================================================================ DummyCore allows you to add custom text(bottom corners) to your menu Your menu tag needs to have 2 NBT Arrays(String) in order for this to work 1 array is named TextLeft and 2 - TextRight You can insert 'symbolic links' in the text array For example, having a |FML| will add FML's current version to text Valid 'symbolic liknls': |MC| prints Minecraft's current version |MCP| prints MinecraftCoderPack's current version |FML| prints FML's current version |Forge| prints Forge's current version |SidedInfo| prints FML's special sided information |FMLBranding| prints FML's special brandings information |Mods| prints current amount of mods loaded |Copyright| prints Mojang's copyright Valid example of default main menu text: { menuName:"I am a menu name!", menuDesc:"I am a menu description!", TextLeft:[ "|MC|", "|MCP|", "|FML|", "|Forge|", "|SidedInfo|", "|FMLBranding|", "|Mods|" ], TextRight:[ "|Copyright|" ], }