[ Help ] Options on the Menu Selection Deletion

Mods, guides how to use and install mods go right in here.
Post Reply
User avatar
zorua7551
Posts: 193
Joined: 10 Jul 2013, 04:23

Post » 06 Aug 2013, 00:31

didnt you configure the options link?

User avatar
HugoBDesigner
Posts: 2189
Joined: 19 Sep 2012, 02:23
Contact:

Post » 06 Aug 2013, 19:00

That shouldn't be hard at all. Instead of "hiding" the options, you should have "deleted" them. That's my version of it.

It's all in menu.lua:

In function menu_keypressed(key, unicode):
#1: Edit line 1535 from this:

Code: Select all

if selection < 4 then
To this:

Code: Select all

if selection < 2 then
#2: Remove lines 1544 to 1560. From this:

Code: Select all

			if selection == 0 then
				game_load(true)
			elseif selection == 1 then
				selectworld()
			elseif selection == 2 then
				editormode = true
				players = 1
				playertype = "portal"
				playertypei = 1
				bullettime = false
				portalknockback = false
				bigmario = false
				goombaattack = false
				sonicrainboom = false
				playercollisions = false
				infinitetime = false
				infinitelives = false
				game_load()
			elseif selection == 3 then
				gamestate = "mappackmenu"
				mappacks()
			elseif selection == 4 then
				gamestate = "options"
			end
It'll end up like this:

Code: Select all

			if selection == 0 then
				game_load(true)
			elseif selection == 1 then
				selectworld()
			elseif selection == 2 then
				gamestate = "options"
			end
#3: You said you only wanted singleplayer, right? Well, now you'd remove lines 1565 to 1573 (if you already did the step 2, then they're lines 1548 to 1556). From this:

Code: Select all

		elseif key == "escape" then
			love.event.quit()
		elseif (key == "left" or key == "a") then
			if players > 1 then
				players = players - 1
			end
		elseif (key == "right" or key == "d") then
			players = players + 1
			if players > 4 then
				players = 4
			end
		end
It'd become this:

Code: Select all

		elseif key == "escape" then
			love.event.quit()
		end
#4: This is optional, but I don't recommend: you could remove all the functions related to "Editor" or "Mappack Menu".

In function menu_draw():

#1: Change line 282 from this:

Code: Select all

properprint("player game", 103*scale, 138*scale)
To this:

Code: Select all

properprint("singleplayer game", 95*scale, 138*scale)
But don't forget to do the same in the title screen image (graphics/smb/title.png)

#2: Remove line 284. This one:

Code: Select all

properprint(players, 87*scale, 138*scale)
#3: Remove lines from 289 to 295. If you already did the step 2, then they should be lines 288 or 287 to 294 or 293.
These ones:

Code: Select all

		if players > 1 then
			love.graphics.draw(playerselectimg, 82*scale, 138*scale, 0, scale, scale)
		end
		
		if players < 4 then
			love.graphics.draw(playerselectimg, 102*scale, 138*scale, 0, -scale, scale)
		end
That's all you should do. Now it'll look something like this:
Image

And the title image (in case you wanna use it):
Image
And the menu.lua, in case you don't understood something (or if you're too lazy to redo all I've already done):
http://pastebin.com/LtYz0hZ6

EDIT: Now I'm feeling like Qcode!

Post Reply