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:
To be able to build mods for Fireworks Mania there are a few prerequisites, at least it will be pretty hard to do if you don't know anything about the below.
- 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, so go check out what YouTube have to offer, the two recommendation are just one place to start.
NO CODING SKILLS NEEDED
It is very important to note that you do NOT need to be able to code 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 (with some security limitations of cause).
Go and get the Unity Hub (not the Beta version!)
When Unity Hub is installed on your machine, you are ready to install "Unity" (also called "Unity Editor").
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 and you can have multiple versions installed at the same time.
You find the current target Unity version in the Change log.
To install that specific version, go to the Unity Archive and click the green "Unity Hub" button on that version. This should make Unity Hub download this version.
Fireworks Mania mods are build from inside Unity and you therefore need a empty 3D Unity project. This is (initially) exactly as you would do if you were going to create your own game, however, when building mods there are a few things that are different, which we will get to a bit later.
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:
Now we need to install the actual Fireworks Mania Mod Tools.
Go to the Package Manager, click the little + button and select that you want to add an git package.
Paste in this url and hit Add: https://github.com/Laumania/FireworksMania.ModTools.git
For experimental branch, use this url: https://github.com/Laumania/FireworksMania.ModTools.git#experimental
Troubleshooting:
If you get an error saying something with "Git" when you try to add the Mod Tools, its because you don't have Git installed on your computer. You can get git from here, install that and restart your computer: https://git-scm.com/
Once it's done installing you might see a few errors in the console.
Restart Unity and reopen your project.
To verify that your project is working and building, press the "Play" button in the top.
You should see something like this, with no errors.
If you see errors, try and read them and see if you can solve them, else reach out in the Mod Creation channels on my Discord.
You are now ready to start creating your first mod.
This is the point where things start to get interesting.
As mentioned previously, it is important to remember that you can build multiple, completely different, mods from this single Unity project you just setup. You can even have different things in a single mod.
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 an good descriptive and unique name, it's always an good idea to prefix it with your nickname like I have done here.
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 various fields with what fits your mod.
The "Mod Export Directory" can be set to exactly what you want, however, for easier test of your mod it is recommended that you set this to your local "Mods" folder for Fireworks Mania. This way you build your mod directly into the games mods folder and do not have to copy files each time.
To find the path press WIN + R to get the Run prompt up.
Put in: %userprofile%\appdata\locallow\Laumania ApS\Fireworks mania\Mods
And press Enter.
A new window will open in the correct location, copy the path from that and put it into the "Mod Export Directory".
On the "Build" tab, set the "Optimize for" to "File Size" to avoid your mods to be very large in size.
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
You will find all the possible firework types in this folder:
In my sample here I call it: Laumania_Rocket_TutorialRocket
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 rocket let us pick the Rocket 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 rocket in this case. It have the 3d model, rocket 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.
So to help you get started, I have included some "ModSamples" in the Fireworks Mania Mod Tools.
Find the prefab "Rocket_DummyRocket_Prefab".
As all these are inside a package you cannot copy or manipulate them here, which is as it should be. However, you can drag this prefab into your scene and from it create your own prefab.
First drag the prefab into the scene hierarchy.
Then right click it, Prefab -> Unpack to unpack it from being an prefab fra the ModSamples.
Now you can rename that gameobject in the hierarchy to fit your fireworks name.
Because it is no longer a prefab in the hierarchy, we can make it our own prefab by dragging it to the Prefabs folder in our mod's folder.
As it is now a prefab again, it is again showing up as blue in the hierarchy and you can see it in the Prefabs folder in your mod.
For now we can delete the game object (prefab instance) in the hierarchy to avoid by mistake make changes to that, instead of the actual prefab.
Instead, double click the prefab in the project window, to open up the prefab.
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 to fit to your FireworkEntityDefinition you created earlier.
Only thing we need to do here is to tell this prefabs RocketBehavior, which Entity Definition it is related to.
As you might have guessed, as we want this prefab to be related to our FireworkEntityDefinition from before.
So, again click the little round icon and select your definition.
Now we need to go back to where we came from, the FireworkEntityDefinition from before, where we needed to provide it with an prefab. We have now created that prefab and can therefore assign it to the FireworkEntityDefinition.
Drag the prefab to the field in the Inspector.
Our FireworkEntityDefinition also needs a name, which is the one showing up in the Inventory.
So let us give it a name.
We also need to provide an icon which is used in the Inventory. In your own mod you would create your own icon and I will do a guide on how to do that later.
For now let us just use one of the icons from the ModSamples.
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.
So let us start up the game and to go the Flat map. All map should work for this. When the map is loaded open the Inventory and head over to the "Workshop" part.
Here you should see your first mod rocket.
Now select it and spawn it and see it working.
Congrats - you have created your first Fireworks Mania Mod!
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.