Custom-Main-Menu icon indicating copy to clipboard operation
Custom-Main-Menu copied to clipboard

Random Slideshow?

Open lolapkfight opened this issue 6 years ago • 3 comments

I want to make my Slideshow randomized. but I don't know how to write the prperty. My current json file:

`{ "images": { "title": { "image" : "modpack:textures/mystic_legends.png", "posX" : -135, "posY" : 0, "width" : 270, "height" : 100, "alignment" : "top_center" },

    "edition":
    {
        "image" : "modpack:textures/modpack.png",
        "posX" : -42,
        "posY" : 67,
        "width" : 80,
        "height" : 40,
        "alignment" : "top_center"
		
	},
	
	"buttonbg":
	{
	    "image" : "modpack:textures/buttonbg.png",
		"posX" : -250,
		"posY" : -10,
		"width" : 500,
		"height" : 60,
		"alignment" : "center"
    }
},

"buttons":
{
    "singleplayer":
    {
        "text" : "menu.singleplayer",
        "posX" : -225,
        "posY" : 0,
        "width" : 100,
        "height" : 20,
		"texture" : "modpack:textures/button.png",
		"alignment" : "center",
        "action" : 
        {
            "type" : "openGui",
            "gui" : "singleplayer"
        }
    },
    
    "multiplayer":
    {
        "text" : "menu.multiplayer",
        "posX" : -120,
        "posY" : 0,
        "width" : 100,
        "height" : 20,
		"texture" : "modpack:textures/button.png",
		"alignment" : "center",
        "action" : 
        {
            "type" : "openGui",
            "gui" : "multiplayer"
        }
    },
    
    "mods":
    {
        "text" : "fml.menu.mods",
        "posX" : -15,
        "posY" : 0,
        "width" : 100,
        "height" : 20,
		"texture" : "modpack:textures/button.png",
		"alignment" : "center",
        "action" : 
        {
            "type" : "openGui",
            "gui" : "mods"
        }
    },
        
    "options":
    {
        "text" : "menu.options",
        "posX" : 90,
        "posY" : 0,
        "width" : 100,
        "height" : 20,
		"texture" : "modpack:textures/button.png",
		"alignment" : "center",
        "action" : 
        {
            "type" : "openGui",
            "gui" : "options"
        }
    },
    
    "quit":
    {
        "text" : "menu.quit",
        "posX" : -65,
        "posY" : 25,
        "width" : 100,
        "height" : 20,
		"texture" : "modpack:textures/button.png",
		"alignment" : "center",
        "action" : 
        {
            "type" : "quit"
        }
    },
    
    "language":
    {
        "text" : "",
        "posX" : 200,
        "posY" : 25,
		"imageWidth" : 1500,
		"imageHeight" : 1500,
        "width" : 20,
        "height" : 20,
		"tooltip" : "Change Language",
		"texture" : "modpack:textures/language.png",
		"alignment" : "center",
        "action" : 
        {
            "type" : "openGui",
            "gui" : "languages"
        }
    },
    
    "refresh":
    {
        "text" : "",
        "posX" : 40,
        "posY" : 25,
        "width" : 20,
        "height" : 20,
        "texture" : "custommainmenu:textures/gui/buttons.png",
		"tooltip" : "refresh Resources",
		"alignment" : "center",
        "action" : 
        {
            "type" : "refresh"
        }
    },
	
	"bugs":
    {
        "text" : "",
        "posX" : 200,
        "posY" : 0,
		"imageWidth" : 800,
		"imageHeight" : 1050,
        "width" : 20,
        "height" : 20,
        "texture" : "modpack:textures/report.png",
		"tooltip" : "report Bugs",
		"alignment" : "center",
        "action" : 
        {
            "type" : "openLink",
			"link" : "https://forms.gle/NgNr5746d5xnE1RJ6"
        }
    },
	
	"more":
    {
        "text" : "",
        "posX" : 225,
        "posY" : 15,
		"imageWidth" : 250,
		"imageHeight" : 250,
        "width" : 20,
        "height" : 20,
        "texture" : "modpack:textures/more.png",
		"tooltip" : "Check my CurseForge Profile",
		"alignment" : "center",
        "action" : 
        {
            "type" : "openLink",
			"link" : "https://minecraft.curseforge.com/members/lolapkfight"
        }
    }
},

"labels":
{
    "mojang":
    {
        "text" : "lolapkfight",
        "hoverText" : "§nlolapkfight",
        "posX" : -55,
        "posY" : -10,
        "color" : -1,
        "alignment" : "bottom_right",
        "action" : 
        {
            "type" : "openGui",
            "gui" : "credits"
        }
    },
	
	"version":
    {
        "text" : "Mystic Legends 1.0",
        "posX" : 5,
        "posY" : -10,
        "color" : -200,
        "alignment" : "bottom_left",
        "action" : 
        {
            "type" : "version"
        }
    }
    
},

"other":
{
    "background": 
	
	{ 
	     "image" : "",
		 "slideshow":
		 {
		      "images" : ["modpack:backgrounds/bg1.png","modpack:backgrounds/bg2.png","modpack:backgrounds/bg3.png","modpack:backgrounds/bg4.png","modpack:backgrounds/bg5.png","modpack:backgrounds/bg6.png","modpack:backgrounds/bg7.png","modpack:backgrounds/bg8.png","modpack:backgrounds/bg9.png","modpack:backgrounds/bg10.png","modpack:backgrounds/bg11.png","modpack:backgrounds/bg12.png","modpack:backgrounds/bg13.png","modpack:backgrounds/bg14.png","modpack:backgrounds/bg15.png","modpack:backgrounds/bg16.png","modpack:backgrounds/bg17.png","modpack:backgrounds/bg18.png","modpack:backgrounds/bg19.png","modpack:backgrounds/bg20.png","modpack:backgrounds/bg21.png","modpack:backgrounds/bg22.png","modpack:backgrounds/bg23.png","modpack:backgrounds/bg24.png","modpack:backgrounds/bg25.png","modpack:backgrounds/bg26.png","modpack:backgrounds/bg27.png","modpack:backgrounds/bg28.png","modpack:backgrounds/bg29.png","modpack:backgrounds/bg30.png","modpack:backgrounds/bg31.png","modpack:backgrounds/bg32.png","modpack:backgrounds/bg33.png","modpack:backgrounds/bg34.png","modpack:backgrounds/bg35.png","modpack:backgrounds/bg36.png","modpack:backgrounds/bg37.png","modpack:backgrounds/bg38.png","modpack:backgrounds/bg39.png","modpack:backgrounds/bg40.png","modpack:backgrounds/bg41.png","modpack:backgrounds/bg42.png","modpack:backgrounds/bg43.png"],
			  "displayDuration" : 100,
			  "fadeDuration" : 100
	}
   
}

}`

Pls can someone tell me how to make the images randomly.

lolapkfight avatar May 26 '19 12:05 lolapkfight

Try this

`"other": { "background":

{ 
     "image" : "",
	 "slideshow":
	 {
	      "images" : ["modpack:backgrounds/bg1.png","modpack:backgrounds/bg2.png","modpack:backgrounds/bg3.png","modpack:backgrounds/bg4.png","modpack:backgrounds/bg5.png","modpack:backgrounds/bg6.png","modpack:backgrounds/bg7.png","modpack:backgrounds/bg8.png","modpack:backgrounds/bg9.png","modpack:backgrounds/bg10.png","modpack:backgrounds/bg11.png","modpack:backgrounds/bg12.png","modpack:backgrounds/bg13.png","modpack:backgrounds/bg14.png","modpack:backgrounds/bg15.png","modpack:backgrounds/bg16.png","modpack:backgrounds/bg17.png","modpack:backgrounds/bg18.png","modpack:backgrounds/bg19.png","modpack:backgrounds/bg20.png","modpack:backgrounds/bg21.png","modpack:backgrounds/bg22.png","modpack:backgrounds/bg23.png","modpack:backgrounds/bg24.png","modpack:backgrounds/bg25.png","modpack:backgrounds/bg26.png","modpack:backgrounds/bg27.png","modpack:backgrounds/bg28.png","modpack:backgrounds/bg29.png","modpack:backgrounds/bg30.png","modpack:backgrounds/bg31.png","modpack:backgrounds/bg32.png","modpack:backgrounds/bg33.png","modpack:backgrounds/bg34.png","modpack:backgrounds/bg35.png","modpack:backgrounds/bg36.png","modpack:backgrounds/bg37.png","modpack:backgrounds/bg38.png","modpack:backgrounds/bg39.png","modpack:backgrounds/bg40.png","modpack:backgrounds/bg41.png","modpack:backgrounds/bg42.png","modpack:backgrounds/bg43.png"],
		  "displayDuration" : 100,
		  "fadeDuration" : 100
		  shuffle=true
}

}`

WIFIGUN avatar Aug 23 '20 08:08 WIFIGUN

shuffle=true results in a crash

jusipat avatar Dec 20 '20 05:12 jusipat

Fixed via a .json checker, guarentee that "fadeDuration": 100, has a comma and "shuffle": true

jusipat avatar Dec 21 '20 23:12 jusipat