This is the place to start when creating mods for Fireworks Mania.
I have created a playlist with various videos about creating mods for Fireworks Mania. That playlist starts with a video of me going through all the stuff below. Further more it contains videos on a lot more stuff you can do with the Fireworks Mania Mod Tools.
The firework effects are made with the Unity Particle System and here is a guide that goes through how it works. This video is not specifically about making firework effects, but it explains the basics of the Particle System, which you need to know so you can create your own custom effects. Getting Started with PARTICLES in Unity
To be able to build mods for Fireworks Mania there are a few recommended prerequisites.
- Basic knowledge about Unity
- If you want to get started I recommend Imphenzia's "LEARN UNITY - The Most BASIC TUTORIAL I'll Ever Make"
- Basic 3D modeling skills (Blender is the tool I use, but there are others. As long as they can export to .fbx I think it's all fine)
- If you want to get started I recommend Imphenzia's "Learn Low Poly Modeling in Blender" if you are all new to Blender.
Keep in mind that there are tons of good tutorials out there for basic Unity and Blender stuff, so go check out what YouTube have to offer, the two recommendation are just one place to start.
It is very important to note that NO CODING SKILLS ARE REQUIRED to be able to build a mod - it can all be done via the Unity editor.
So, none-coders, fear not.
Coders, fear not either, you can do custom scripting 🤓
Download and install Unity Hub - The Unity Hub acts a a "launcher" and it's via this that you will install the actual Unity Editor.
Download and install Git - Unity need this to be installed to be able to install the Mod Tools package later one, so you might as well install it right away.
After the two above have been installed, restart your PC and come back here.
To avoid unintended behavior and issues you always need the specific version of Unity that the Mod Tools are build with.
When you have the Unity Hub installed, it's easy to install the specific version you want. Also know that you can have multiple versions installed at the same time.
You find the current target Unity version in the Change log.
If you don't have the given version installed, just click on the version number in the Change log. This will take you to Unity's website where you can click the "Install" button and it will open up in your Unity hub and install that version. Really easy!
Fireworks Mania mods are build from a Unity Project. So create an empty 3D (Build-in Render Pipeline) Unity project.
One important thing to know when naming your project is that you can have multiple mods within a single Unity project.
This means that you might want to name the Unity project something more generic like, "YourNickNameFireworksManiaMods", "YourNickName.FireworksMania.Mods" or simply "FireworksMania.Mods".
These are just suggestions and you should name the Unity project something that make sense to you and how you structure things. The name of the Unity project have no impact on actual mod(s) name(s).
At this point you should now have an empty Unity project that should look something like this:
To make sure we are off to a good start and all is as it should, it's a good idea to enter Play-mode. Click the Play button in the top and make sure there are no errors in the console. Click the Play button again to exit play mode.
Now we need to install the Fireworks Mania Mod Tools.
Go to Windows->Package Manager, click the little + button and select that you want to add an git package.
Paste in this url and hit Add:
The installation can take some time, so let its do its work.
Once its done you might get this popup. Just click Yes and it should automatically restart the Unity Editor.
You now have the Fireworks Mania Mod Tools installed and are ready to create your first mod!
Close the Package Manager window and hit Play again to make sure we don't have any errors. Click Play again to exit Play mode, which is important, as we dont want to be in Play mode.
This is the point where things start to get interesting.
As mentioned previously, it is important to remember that you can build multiple mods from this single Unity project.
Lets first create an "Mods" folder where we can have all our mods in.
Then let us go and create a new mod.
Now give the mod a good descriptive and unique name. It's always an good idea to prefix it with your nickname like I have done here.
Avoid spaces and special characters in the name.
Make sure to put the mod in "Assets/Mods" as shown.
It is not a requirement, but the more structure you have on your things, the easier it is to find and navigate as the project grows.
You can think of this folder, "Laumania_TutorialMod_01" in this sample, as the mod itself.
Simply put, everything you want to include in your mod needs to be inside this folder.
Now that we are in the mod folder, lets create some more folders that will help us better organize our files as we go.
You can organize your mod as you want, but if you are in doubt I recommend using this folder structure for a start.
Right click and create the following folders:
- Definitions
- Icons
- Models
- Prefabs
Now head to the Export Settings to setup metadata on your mod, some build options etc.
Fill out the following fields under "Mod Information" with what fits your mod, the rest can be ignored as they are not really used in the game.
- Mod Name
- Mod Version
- Mod Author
The "Mod Export Directory" is there you mod is eventually going to be placed everytime you build it. To make it easier and quicker to test, it make sense to set this directory to the local "Mods" folder of the game. This way, everytime you build the mod, all you have to do is restart the map in the game. The game will detect the mod have changed and reload it and you can test your changes.
As this "Mods" folder is placed in a location under your user on your PC, the path to it is unique to your machine and user.
Click the 3 dots to set the "Mod Export Directory".
This will open the normal file explorer. Copy/Paste the below into the adress bar in the top.
%userprofile%\appdata\locallow\Laumania ApS\Fireworks mania\Mods
Hit Enter and you will get to the folder we want.
Click the "Select folder" button and the correct path will be set as the "Mod Export Directory".
On the "Build" tab, set the "Optimize for" to "File Size".
This is very important! If you do not do this your mod will take up more space on players harddrive, take longer to download and take longer to load into the game. So do this for your own and all other players sake :)
After this you can close the "Export Settings" window and continue.
Now we are starting to hit Fireworks Mania specific stuff, EntityDefinition - what is that?
An EntityDefinition is basically metadata that describes any object you can spawn in Fireworks Mania. It holds data such as the name, icon, prefab to spawn etc.
All items in the inventory in Fireworks Mania is basically an "EntityDefinition".
Let us create our first "EntityDefinition" of the type "FireworkEntityDefinition", which holds metadata about a specific type of entity, namely "fireworks".
We of course create this in our "Definitions" folder.
As you will see in a moment, it is always a good idea to name your EntityDefinitions something unique, as the name of the file will also be used as the "EntityDefinitionId" that will be used to uniquely identify this specific firework that you are creating.
I therefore recommend naming it after this schema:
YourNickname_EntityType_NameOfTheItem
In my sample here I call it: Laumania_Cake_TutorialCake
You will see some "errors" in the console now - these are here to help you.
You can see the first one says something about you need to update the Id.
If you select the EntityDefinition you can see what fields it have in the Inspector.
Looking closer we see that Id the error is talking about.
For a newly created EntityDefinition, you can see this field it set to: INSERT UNIQUE DEFINITION ID
You CAN put in your own id here, but I recommend using the context menu method I have added that give it an Id that match the filename.
Right click in the top of the Inspector.
One important thing to note here is that this EntityDefinitionId is used, among other things, to save in blueprint files. Therefore, once your mod has been released the first time - do not change this id - as you will break users of your mods blueprints.
The next error says something about EntityDefinitionType that is missing. It is because an FireworkEntityDefinition needs to have a type.
As we know we are building a cake let us pick the Cake type.
EntityDefinitionType is the one that determine under what category/type the firework will show up in the Inventory in game.
Click this little round thingy to select a type.
If you window looks like this:
You need to click the little eye icon to toggle on assets from packages, as these types comes as part of the Fireworks Mania Mod Tools in a package.
Now we have a definition with an unique Id and an Entity Definition Type.
However, when you set the type, you get another error, saying something about missing a Prefab Game Object.
This is the prefab that will be spawned in game when a player spawns your firework. Therefore, this prefab is your actual firework with logic to act as a cake in this case. It have the 3d model, cake behavior, effect, fuse, sound etc.
Creating and modifying this prefab is where the majority of your time will be spend as a typical firework mod creator.
For now however, as this is a getting started guide, we will keep it simple so you get a basic idea of how a mod it put together, without going into the details of creating particle effect, setup the various fireworks behavior etc. We will get to that later.
Luckily, its very easy to get started, as the Mod Tools comes with some templates you can use to start from.
So right click in the Hierarchy and create an Cake_Template.
To the left you see the Cake_Template instance you just created (we will make that into an prefab in a bit as thats what we actually need) and to the right you see all the components on that game object because it's select. Don't look to much at the right for now, we get to that later.
Now lets rename the instance in the Hierarchy to what we want our prefab to be named.
Once its renamed, drag and drop it to the "Prefabs" folder in your mods folder.
You will now see the instance in the Hierarchy turned blue, because it's now an instance of an actual prefab and you now have the prefab in your "Prefabs" folder too.
At this point you delete the prefab instance in the hierarchy, as you want to make changes directly to the original prefab and not to the prefab instance.
Now we want to edit the prefab, you do that by double clicking in.
You now have the prefab open in edit mode and by selecting the top gameobject (root node) you can setup the last part of the prefab.
What you need to do here is set the "Entity Definition" to be the "Laumania_Cake_TutorialCake" we created earlier. This tells the prefab which entity definition it belongs too, you don't have to understand why now, just know that its needed for the game to work properly.
Press CTRL + S to save the changes on the prefab. It is recommended to have "Auto save" turned off, as it can in some cases slow down Unity a lot.
Now the prefab knows which FireworksEntityDefinition it belongs to, now we need to tell the "Laumania_Cake_TutorialCake" EntityDefinition which prefab it should spawn when selected in the Inventory in game. So the relationship goes both ways.
Select the "Laumania_Cake_TutorialCake" (the EntityDefinition) to make it show its details in the Inspector and then drag the "Laumania_Cake_TutorialCakePrefab" to the "Prefab Game Object" field.
(Alternative you can also click the little circle next to the field end select the prefab there - the result is the same)
Our FireworkEntityDefinition also needs a name, which is the one showing up in the Inventory.
So let us give it a name.
For the firework to look good in the Inventory we also need to provide a preview icon.
All you need to do is to right click the prefab in the Project window.
As you can see there are different options and you can test out which one you like the best. Everytime you click, a new icon is generated next to the prefab, if one is exiting there it will overwrite it. So very easy to test things out.
This looks good so lets go with that one. The icon starts out expanded, but you can click the little arrow to collapse it, so it's not too confusing.
You can decide to leave the icon next to the prefab, but we also made an folder called "Icons" earlier you can put it in. Drag and drop the icon file to move it.
Its up to you how you want to organize your project. My advise is to be consistant. Do the same thing the same way, everytime, to avoid confusing your future self.
Now you just select the "Laumania_Cake_TutorialCake" (the EntityDefinition) and drag in the generated icon to the "Icon" field.
With all the above setup building the mod is the easy part.
Unity will spend some time building and you should see this in the console when it is done.
At the same time the export directory will open and you should see your mod in the Mods folder of Fireworks Mania.
Your mod is successfully build - let us try it out!
With your mod, or mods, in the "Mods" folder of the game, the mods will attempt to load on the load of a map in the game.
In most cases you want to test out your mod in a Singleplayer game, to avoid others joining your host, as they will not be able to see your creation from the mod as they do not have it installed. For others to get access to your game it need to be put on mod.io, you will find a video about that in the YouTube playlist mentioned in the beginning.
So let us start up a Singleplayer game. Lets test it out in the Town map. All map should work for this. When the map is loaded open the Inventory and find your firework.
Here you should see your first mod cake.
Now select it and spawn it and see it working.
Congrats - you have created your first Fireworks Mania Mod!
So far you only scratched the surface of modding for Fireworks Mania and to be frank, all the above was the boring setup part.
Now the fun begins where you can make your own effects, maps, characters etc.
This written "Getting started guide" stop here and the rest you need to find in the YouTube Playlist mentioned in Video Tutorials, as it is much easier to explain and show in videos.
Love to see what awesome stuff you are going to create 🤓
This is not a requirement, but having your project in some sort of version control is essential.
If you are new to Github, Blender etc. and all seems overwhelming, I know it seems like another big thing you have to learn, but learning to use version control can save you so much time trying to figure out what broke your mod/game. Further more you are likely to try out a bit more risky things, because you know you can always just revert and get back to a version that worked.
There are many good videos out there, but here is one to get started, that can help you get started with getting your Unity project in Github.
Using GitHub with Unity effectively! Improve your workflow!
Alternatively, if Github and source control is too complicated, there is also an asset like the one below that simply backup your Unity project for you locally.
https://assetstore.unity.com/packages/tools/utilities/zip-backup-71979
Once your mod is ready for the world, it is time to get it into the workshop in the game.
You do that by uploading your mod to mod.io here: https://fireworksmania.mod.io
We all look forward to try out your mod :D
If you get a lot of bugs like missing FuseIndicator, Reimport All or restart Unity seems to fix the issue. Thanks guanaco0403.
The game uses Unity's new Netcode for GameObject (NGO) package for multiplayer. It works pretty well in the game and Unity clear spend a lot of time updating it, so new stuff being added over time.
However, in relation to mods in Fireworks Mania, there are some limitations when it comes to NGO. NGO depends on some "CodeGen" to run when the actual game is build, to make some NGO features work, lige RPC's and NetworkVariables.
The CodeGen can currently not be executed when building a mod, meaning you cannot utialize any of these features from within a mod - yet. It's very annoying as it's fundamental to a multiplayer game, but we have to wait a bit for it to work from within custom scripting in mods.
I have been in dialog with Unity about this for a while and it sounds like they want to support it, however, it still haven't happened. So crossing fingers. You can follow the issue here on NGO's Github page: Unity-Technologies/com.unity.netcode.gameobjects#2747
Most likely due to the same as above, some CodeGen stuff that NGO depends on, the "Network Prefabs" list in a MapDefinition is not working for modded maps. This field is suppose to hold network prefabs of objects that are placed in the scene and/or destructible versions of them. However, this is sadly not working in a custom map in a mod, only for maps that is build into the game. I hope when the above CodeGen issue is fixed, this will be fixed too. This means you can't have moveable objects placed in a custom map, or you can but they won't be synced with other players, making it not very fun.