Toggle menu
2
16
17
151
The My Singing Monsters Modding Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Menu Editing: Difference between revisions

From The My Singing Monsters Modding Wiki
Content added Content deleted
No edit summary
Line 6: Line 6:
'''Functions''' are short strings of code that hold data and are used internally to cause something inside of the game to happen. This article lists all of those functions.
'''Functions''' are short strings of code that hold data and are used internally to cause something inside of the game to happen. This article lists all of those functions.


This section lists all functions that you can find and use inside of the menu XML files.
This section lists all functions that you can find and use inside of the menu XML files, sorted by internal order.

===Common Functions===
This section lists the most common functions used across the game.


game.AcceptTermsOfService
This function checks if you have accepted the Terms of Service or not. Usage: game.AcceptTermsOfService(true)
<hr>
game.AnimateRecordButton
<hr>
game.Awakener_GetClosedAnim
<hr>
game.ContextBar_cancelButton
<hr>
game.ContextBar_confirmButton
<hr>
game.ContextBar_marketEnterButton
<hr>
game.ContextBar_marketExitButton
<hr>
game.ContextBar_mobileToPcMappingButton
<hr>
game.EnableRecordButton
This function enables and disables the record button. It can also be called to check if the record button is enabled. Usage: '''game.EnableRecordButton''' - '''if (game.EnableRecordButton()) then'''
<hr>
game.popPopUp()
game.popPopUp()
This function closes the current menu on the screen.
This function closes the current menu on the screen.
<hr>
<hr>
game.pushPopUp()
game.pushPopUp()
This function opens almost any xml file found in the 'menus' folder. Usage: game.pushPopUp("filename").
This function opens almost any xml file found in the 'menus' folder. Usage: '''game.pushPopUp("filename")'''.
<hr>
<hr>
game.displayNotification()
game.displayNotification()
This function displays a "Listen Up!" notification, with text that you can customize. Usage: game.displayNotification("your message"). To make line breaks, you have to enter a large amount of empty characters/spaces, and then put text after it.
This function displays a "Listen Up!" notification, with text that you can customize. Usage: '''game.displayNotification("your message")'''. To make line breaks, you have to enter a large amount of empty characters/spaces, and then put text after it.
<hr>
<hr>
game.showWebView()
game.showWebView()
This function opens a specified link. Usage: game.showWebView("yourlink")
This function opens a specified link. Usage: '''game.showWebView("yourlink")'''
<hr>
<hr>
game.loadWorldContext()
game.loadWorldContext()
Line 27: Line 44:
<hr>
<hr>
game.setMonsterVolume()
game.setMonsterVolume()
This function sets the selected Monster's volume. Usage: game.setMonsterVolume("number")
This function sets the selected Monster's volume. Usage: '''game.setMonsterVolume("number")'''
<hr>
<hr>
<tabber>
<tabber>
Line 43: Line 60:
<pre>game.is<b>Earth</b>Island()</pre>
<pre>game.is<b>Earth</b>Island()</pre>
</tabber>
</tabber>
This function calls something to happen/appear if you are on a certain Island. Usage: "if game.isXIsland() then" followed by what you want to happen. To use this function, replace the "X" in the above example to specify an Island.
This function calls something to happen/appear if you are on a certain Island. Usage: '''if game.isXIsland() then''' followed by what you want to happen. To use this function, replace the "X" in the above example to specify an Island.
<br>
<br>
<hr>
<hr>

Revision as of 16:55, 24 April 2024

This article is a stub. You can help the My Singing Monsters Modding Wiki by expanding it.
File:Menu Editing Page Thumb.png
An example menu edit

Menu Editing is a form of modding which consists of Lua and XML file menu editing. The following article will help you understand more about this topic.

Functions

Functions are short strings of code that hold data and are used internally to cause something inside of the game to happen. This article lists all of those functions.

This section lists all functions that you can find and use inside of the menu XML files, sorted by internal order.

game.AcceptTermsOfService

This function checks if you have accepted the Terms of Service or not. Usage: game.AcceptTermsOfService(true)


game.AnimateRecordButton

game.Awakener_GetClosedAnim

game.ContextBar_cancelButton

game.ContextBar_confirmButton

game.ContextBar_marketEnterButton

game.ContextBar_marketExitButton

game.ContextBar_mobileToPcMappingButton

game.EnableRecordButton

This function enables and disables the record button. It can also be called to check if the record button is enabled. Usage: game.EnableRecordButton - if (game.EnableRecordButton()) then


game.popPopUp()

This function closes the current menu on the screen.


game.pushPopUp()

This function opens almost any xml file found in the 'menus' folder. Usage: game.pushPopUp("filename").


game.displayNotification() 

This function displays a "Listen Up!" notification, with text that you can customize. Usage: game.displayNotification("your message"). To make line breaks, you have to enter a large amount of empty characters/spaces, and then put text after it.


game.showWebView()

This function opens a specified link. Usage: game.showWebView("yourlink")


game.loadWorldContext()

This function re-loads your Island after visiting certain menus.


game.setMonsterVolume()

This function sets the selected Monster's volume. Usage: game.setMonsterVolume("number")


game.is<b>X</b>Island()

game.is<b>Plant</b>Island()

game.is<b>Cold</b>Island()

game.is<b>Air</b>Island()

game.is<b>Water</b>Island()

game.is<b>Earth</b>Island()

This function calls something to happen/appear if you are on a certain Island. Usage: if game.isXIsland() then followed by what you want to happen. To use this function, replace the "X" in the above example to specify an Island.


game.logout()

This function logs the user out of their account.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.