This is a mod template based on the Minecraft.GX mod by KNKWasTaken. It uses the first version of Minecraft.GX
There are detailed instruction given below on how to use the template:-
- Mod Template
- How to use
- Table of Contents
- Manifest.JSON
- Mod Icons
- Mod Details
- How to try and debug your mod?
- How to upload your mod to public
- Other Resources
Manifest.JSON is the most important part of any Opera GX Mod. It describes which file should be used for what purpose. For the mod, you will need some prerequisite knowledge on JSON. Some things you can change right now are:-
{
"name": "Minecraft.GX",
"description": "A perfect experience for Minecraft gamers",
"developer":
{
"name": "KNKWasTaken"
},
"version": 1.0
}
name
is the name of you mod.description
is a short description of your mod.developer > name
is the name of the developer.version
is the version of your mod. There are other changable things we will talk about later. This file should be saved with the namemanifest.json
without any exceptions
These represent the icon of your mod. The icons of a mod are always in 1:1 aspect ratio with any usual size. The most common dimension are 128x128, 512x512, etc.. Here are examples of how to set them:-
{
"icons":
{
"512": "mcico512.png",
"128": "mcico128.png"
}
}
- Here, we will use the dimension for the key and the file for the value.
Ex. If
mcico512.png
has the dimensions 512x512, the key would be512
.
Here, we define what we want our mod to do. There are various kinds of mods, like Gamestrips (Exclusive for GameMaker), Wallpapers, etc. This is a tutorial on Mods which customize the appearance of Opera GX. In this mod, there are several kinds of features that can be added like:-
- License
- Background Music
- Browser Sounds
- Keyboard Sounds
- Webmodding (Page Styling)
- Shaders
- Themes
- Wallpapers
An Important Note:- Every feature listed should be nested under
mod
inmanifest.json
.
License describes how your mod is protected from others to use and how others are limited to use it. License are not neccessary. You can purchase a license like MIT or Creative Commons, copy the text format, and paste it in a file, say license.txt
.
To apply a license to your mod, do the following:-
{
"mod":
{
"license": "license.txt"
}
}
license
defines the license to Opera GX
Background Music play in the background whenever Opera is running. They are enabled by default. The format for the background music is preferably MP3 or WAV. To apply these, do the following:-
{
"mod":
{
"payload":
{
"background_music":
[
"music/track_1.mp3",
"music/track_2.mp3",
"music/track_3.mp3",
"music/track_4.mp3"
]
}
}
}
payload
covers the styling functions of a mod.background_music
specifies Opera about the tracks that are to be used.- If there are more than one file, keep them in square brackets ([]) seprated by a comma (,).
- It would be preferable to keep them in a seperate folder. If kept in a seprate folder, you need to specify the relative path inside the folder. Ex. If the folder name is
music
, then use the pathmusic/yourtrack.mp3
Browser Sounds are small sounds that play when you interact with the browser. They are enabled by default. The format for the bowser sounds are preferably MP3 or WAV. To apply these, do the following:-
{
"mod":
{
"payload":
{
"browser_sounds":
{
"CLICK":
[
"sound/click.mp3"
],
"FEATURE_SWITCH_OFF":
[
"sound/feature_switch_off.mp3"
],
"FEATURE_SWITCH_ON":
[
"sound/feature_switch_on.mp3"
],
"HOVER":
[
"sound/hover.mp3"
],
"HOVER_UP":
[
"sound/hover.mp3"
],
"IMPORTANT_CLICK":
[
"sound/important_click.mp3"
],
"LEVEL_UPGRADE":
[
"sound/level_upgrade.mp3"
],
"LIMITER_OFF":
[
"sound/limiter_off.mp3"
],
"LIMITER_ON":
[
"sound/limiter_on.mp3"
],
"SWITCH_TOGGLE":
[
"sound/switch.mp3"
],
"TAB_CLOSE":
[
"sound/close_tab.mp3"
],
"TAB_INSERT":
[
"sound/new_tab.mp3"
],
"TAB_SLASH":
[
"sound/tab_slash.mp3"
]
}
}
}
}
browser_sounds
specifies Opera what sounds to play when the user interacts with the browser. There are limited options on what is possible.CLICK
play whenever the user clicks with his mouse.FEATURE_SWITCH_OFF
plays whenever the user toggles off a feature in Opera.FEATURE_SWITCH_ON
plays whenever the user toggles on a feature in Opera.HOVER
plays whenever the user hovers over an interactive element in Speed Dial (New Tab)HOVER_UP
plays whenever the user hovers over a pop-out element, like YouTube videos or Twitch Livestreams in thier pop-out window.IMPORTANT_CLICK
plays whenever the user clicks some specific elements in Opera.LEVEL_UPGRADE
plays whenever the user upgrades the level (version) of Opera.LIMITER_ON
plays whenever the user turns the Limiter feature on.LIMITER_OFF
plays whenever the user turns the Limiter feature off.SWITCH_TOGGLE
plays whenever the user toggles a nomal switch.TAB_CLOSE
plays whenever the user closes a tab.TAB_INSERT
plays whenever the user adds a tab.TAB_SLASH
plays whenever the user kills a tab from the Hot Tab Killer feature.- If there are more than one file, keep them in square brackets ([]) seprated by a comma (,).
- It would be preferable to keep them in a seperate folder. If kept in a seprate folder, you need to specify the relative path inside the folder. Ex. If the folder name is
sound
, then use the pathsound/yourtrack.mp3
Keyboard Sounds are small sounds that are played whenever the keyboard is used. They are enabled by default. The format for keyboard sounds are preferably WAV or MP3. To apply these, do the following:-
{
"mod":
{
"payload":
{
"keyboard_sounds":
{
"TYPING_BACKSPACE":
[
"keyboard/backspace.wav"
],
"TYPING_ENTER":
[
"keyboard/enter.wav"
],
"TYPING_LETTER":
[
"keyboard/letter_1.wav",
"keyboard/letter_2.wav",
"keyboard/letter_3.wav"
],
"TYPING_SPACE":
[
"keyboard/space.wav"
]
}
}
}
}
keyboard_sounds
specify opera what sound to play when the user uses his keyboard.TYPING_BACKSPACE
plays whenever the user presses Backspace.TYPING_ENTER
plays whenever the user presses Enter.TYPING_LETTER
plays whenever the user presses a key on the keyboard, which isn't a special key.TYPING_SPACE
plays whenever the user presses Space.- If there are more than one file, keep them in square brackets ([]) seprated by a comma (,).
- It would be preferable to keep them in a seperate folder. If kept in a seprate folder, you need to specify the relative path inside the folder. Ex. If the folder name is
keyboard
, then use the pathkeyboard/yourtrack.mp3
- Keyboard Sounds work on a very minimalist keyboard, so most of the times, sections of the keyboard like the Number Pad doesn't apply for this.
Webmodding changes the appearance of of certain websites or webpages by the use of CSS (Cascading Style Sheets). Prerequisit knowledge of CSS and DevTools are neccesary. First you need to create any CSS file (.css
) for changing the appearance of a website. We then inspect the website, find the elements we need to modify, apply the CSS rule, save it and inject it through the mod.
An example of a CSS file modding the webpage of Opera is:-
body {
color: env(--opera-gx-accent-color)
background: env(--opera-gx-background-color)
}
- This is a basic CSS file that changes the appearance of text and the background of Opera.
--opera-gx-accent-color
is a variable in Opera that retrieves the accent color from the theme of the broowser. Other ways to access it are mentioned inwebmodding/opera.css
--opera-gx-background-color
is a variable in Opera that retrieves the background color from the theme of the browser. Other ways to access it are mentioned inwebmodding/opera.css
There are other CSS files provided that change the appearance of Discord. These are webmodding/dcmaintheme.css
& webmodding/dcchangecolors.css
. These are not explained here but usefull comments can be helpfull.
To apply these to the mod, do the following:-
{
"mod":
{
"payload":
{
"page_styles":
[
{
"css":
[
"webmodding/opera.css"
],
"matches":
[
"https://*.opera.com/*"
]
},
{
"css":
[
"webmodding/dcmaintheme.css",
"webmodding/dcchangecolors.css"
],
"matches":
[
"https://*.discord.com/*"
]
}
]
}
}
}
page_styles
specifies Opera the files to use for Webmodding. Always keep the files inside square brackets ([]), followed by a curly bracket ({}) for individual files.css
links to the CSS files that are to be used for webmodding. This is followed by square brackets ([]) for the files. If there are more than one file, seperate them by a comma (,) in the same bracket.matches
link to the sites which will take the effect of the CSS file. This is followed by square brackets ([]) for the sites. If there are more than one site, seperate them by a comma (,) in the same bracket. Usage of asterix (*) is used for subdomains and such.- It would be preferable to keep them in a seperate folder. If kept in a seprate folder, you need to specify the relative path inside the folder. Ex. If the folder name is
webmodding
, then use the pathwebmodding/yourmodif.css
.
Shaders are static or animated overlays that affect every webpages (Except a few browser-specific sites like opera://newtab (Speed Dial), opera://mods (Mods), opera://settings (Settings), opera://extensions (Extensions), opera://operius (Operius), etc.). These follow WebGL to achieve this. For making shaders, prerequisite knowledge of WebGL is needed. One example of a static green overlay is:-
uniform shader iChunk;
const float4 TINT = float4(1.33, 0.8, 1.33, 1);
vec4 main(vec2 xy)
{
return pow(iChunk.eval(xy), TINT)
}
Make sure to save the file in Text (.txt
) format
Animated shaders are also possible. For seeing one, go to shader/wave.txt
To apply this to the mode, do the following:-
{
"mod":
{
"payload":
{
"shaders":
{
"Wave":
{
"animation":
{
"duration": 60,
"steps": 3600
},
"path": "shader/wave.txt"
},
"Minecraft Matrix": "shader/matrix.txt"
}
}
}
}
shaders
specify the files to be used as shaders.- The key will be the name of your shader wheras the value will either be curly brackets (for animated) or string (for static). The string will specify the path to the WebGL file.
animation
specifies the shader is an animated one.duration
is the length of the animation in seconds.steps
is the number of steps in the animationpath
is the specification to the path of the WebGL file if it is an animated one.- It would be preferable to keep them in a seperate folder. If kept in a seprate folder, you need to specify the relative path inside the folder. Ex. If the folder name is
shader
, then use the pathshader/yourfile.txt
Theme is the color of browser. Some default themes are GX Classic, Ultravoilet, Sub Zero, Frutti Di Mare, Purple Haze, Vaporwave, Rose Quartz, Coming Soon, Hackerman, Lambda, After Eight, Pay-To-Win, White Wolf, etc. To apply this, do the following:-
{
"mod":
{
"payload":
{
"theme":
{
"dark":
{
"gx_accent":
{
"h": 125,
"s": 96,
"l": 36
},
"gx_secondary_base":
{
"h": 16,
"s": 42,
"l": 24
}
},
"light":
{
"gx_accent":
{
"h": 85,
"s": 100,
"l": 36
},
"gx_secondary_base":
{
"h": 12,
"s": 48,
"l": 46
}
}
}
}
}
}
theme
specifies Opera the theme colors.dark
specifies the theme for dark mode.light
specifies the theme for light mode.gx_accent
specifies the accent (foreground) color of Opera. It is the value of--opera-gx-accent-color
.gx_secondary_base
specifies the secondary base (background) color of Opera. It is the value of--opera-gx-background-color
.h
specifies the color hue.s
specifies the color saturation.l
specifies the color lighting.
Wallpaper is the background of Opera Speed Dial. It is enabled by default. There are three kinds of wallpapers: Static, Live, Interactive. Here we will only learn about Static and Live Wallpapers.
These are image wallpapers. They are also the most common type of wallpaper. The preferable format for this is PNG. To apply this, do the following:-
{
"mod":
{
"payload":
{
"wallpaper":
{
"dark":
{
"image": "wallpaper/minecraftbg.png",
"text_color": "#FFFFFF",
"text_shadow": "#757575"
},
"light":
{
"image": "wallpaper/minecraftbg.png",
"text_color": "#FFFFFF",
"text_shadow": "#0B000E"
}
}
}
}
}
wallpaper
specifies Opera what the background of the Opera Speed Dial is.dark
andlight
have the same functionality as when used intheme
but instead for theme, they specify for wallpapers.image
is the image to be used for background.text_color
is the text color for the text on Speed Dial.text_shadow
is the shadow added on to the text.- It would be preferable to keep them in a seperate folder. If kept in a seprate folder, you need to specify the relative path inside the folder. Ex. If the folder name is
wallpaper
, then use the pathwallpaper/yourbackground.png
.
More useful tips on how to make an image for static wallpapers are provided as a PDF Document, GXWallpaperGuidelines.pdf
These are video wallpapers. The preferable format for this is VP9 but MP4 and WEBM also works (some bugs might be possible with MP4). To applt this, do the following:-
{
"mod":
{
"payload":
{
"wallpaper":
{
"dark":
{
"image": "wallpaper/livewallpaper.webm",
"first_frame": "wallpaper/livewallpaperframe.jpg",
"text_color": "#FFFFFF",
"text_shadow": "#757575"
},
"light":
{
"image": "wallpaper/livewallpaper.webm",
"first_frame": "wallpaper/livewallpaperframe.jpg",
"text_color": "#FFFFFF",
"text_shadow": "#0B000E"
}
}
}
}
}
image
will be used to specify the video.first_frame
specifies where the video will start from, based on an provided image. It can cause errors is the frame is not found in the video.
These are wallpaper you can interact with using your mouse. They are a new feature. To make this, you will need GameMaker and a different manifest.json
version. Interactive Wallpapers are not covered in this tutorial, but you can learn how to make one from Opera's YouTube Tutorial to Interactive Wallpapers.
- Go to the Extensions page (opera://extensions).
- Enable Developer Mode.
- Click
Load Unpacked
. - Choose your mod folder and upload it.
- For a video tutorial, check out Opera's YouTube Tutorial on Making A New Mod
- Compress your mod folder to a ZIP File.
- Go to GX.Create (create.gx.games).
- Go to the mod tab, if not already.
- Click
Upload New Mod
>Choose File
. - Choose the ZIP file.
- Check detailss and upload a Cover Art by going to
Media
>Cover Art
. - Add some fitting tags and a long description in
Metadata
. - Go to
Publishing
>Staging
>Promote to Public
and toggle thePublishing
>Public
checkmark. - For uploading a new version, click
Publishing
>Staging
>Upload New Version
and chose the updated ZIP file.
Other resources you should check out are:-