An Intro To PopcornFX!
For those of you familiar with game development through Unity, Blender, or other engines utilizing Particle Effect rendering Popcorn may be easy to grasp. For those unfamiliar with such things I'll try to break it down as best I can: Trove makes pretty through not only voxels, but Particle things which are made using PopcornFX a free VFX particle system software. There's an insane amount of PopcornFX utilized throughout Trove, from the mining laser to your favorite costume effects.
If you want to spice up some default vfx this guide should make for a good start.
The First Thing To Do for modifying VFX in Trove is to extract the necessary files and copy them to your own Popcorn Project directory.
Using the scripts in quotes above, extract everything related to vfx and copy them to your desired directory and open popcornfx.
Add PopcornProject.xml from the extracted Trove archives as your project. You may now open the popcorn project file which will contain every particle effect available for modification (including wings!!).
(If previews for the effects do not show you may need to run -
Trove.exe -tool extractarchive textures extracted\textures
and copy textures from this folder into your popcorn project vfx/textures folder.)
Now we can begin modifying files we want.
A Basic Intro To Editing Trove Stuff in PopcornFX
So, you've now got total access to every vfx file Trove uses; you probably feel like Kira (god of the new world), but perhaps you're not sure where to start...
For the purpose of this tutorial I am going to create some "basic" wings to convey my personal approach to PopcornFX editing and attempt to show you how to manipulate any and every effect to the way you want it to be.
To Begin
Either double click an existing effect to open it or right click the "Particles" folder in popcorn's folder view, go to "New Asset" and click new "Particle System". Name it accordingly.
(If you chose to create a new effect, will be presented with a brand new particle effect; a dummy particle going in a single direction and dying out. On the left you will see "Layer_1", you may delete this effect. )
Right click "Layer Groups" on the left and select "New Layer" to create a new layer for your effect. Alternatively, you may locate an existing effect in Trove for modification and open that in a seperate window to copy a layer from that effect into your new effect.
PopcornFX Custom Texture Creation
(Note: VFX Are Not Accepted for Implemented Mod Creations Aside from Wings)
We'll be using GIMP to create a New texture for Trove (although, such things are not officially implemented or supported). Keep in mind it is often best to modify existing textures, but do take note the mipmaps must be recreated for those textures. In any case it is always best to reference the aspects of relative existing texture files for the sake of performance.
Note: Texture files can be mostly black and white as the properties and color can be modified in popcornfx. The texture file size should be optimal for Trove and relative to existing texture files; for certain things, mipmaps are not necessary and so the file size can be reduced drastically. Keep the resolution no bigger than existing textures. Animation of the texture will be covered, should that be something you'd like to do.
Export your texture file as a .dds, depending on your application you'll probably want to tick "Generate Mipmaps".
Important!
The Trove Team does not accept custom textures anymore, but still you should definitely compress your textures for the sake of performance and portability (download speed and such):
You'll want DXT1 or DXT3 if you are not utilizing "Alpha"/Transparency and DXT5 if you want appropriate levels of Transparency. Save an uncompressed original if you are unsatisfied with any of the compression method results or saved with an unintended compression at first. Failing to compress may mean files upwards of 25mb for what could be a simple or compressed texture.
Creating New Layers With Existing Layers As Reference
For this tutorial we're making some wings, and they're very specific to positioning, so we grab the top wing from the Level 20 Mastery set (Simple_Mastery) and paste it into our custom vfx for a reference to positioning.
(hold Alt and click to control the camera (if you are unfamiliar with popcorn))
Now we can actually begin by creating a new layer for the base to our effect, in this case the left wing.
You should be left with an unmoving weird orb thing. This is progress!
We can edit various attributes of the Layer by just clicking the layer name:
Now we change the texture to the custom texture created (or just use an in-game one).
It's not quite self explanatory and I'd be going over the word limit even more if we went into detail on the "Geometry Details" of "Billboards"... But, basically the Billboard Mode of the Texture tells the engine how to display the texture and how to position it. For the purpose of these wings, we want them to lay flat and face a certain positon, so PlanarAlignedQuad will do.
When it comes to Billboarding Material we are left basically with a combination of attributes of lighting, "AlphaBlend" and "Additive" coloring. There are various attributes to either to explain, but I'm not going into that now. Think of "Additive" as additive-coloring, and "AlphaBlend" as subtractive, in a sense. Either will utilize transparency, but additive will of course have a plethora of possibility of color manipulation effects while only AlphaBlend is capable of "black" color.
To continue with what we were doing...
For simplicity's sake we shall follow the formatting in the base wings by changing the Axis field and Axis2 fields similar to the neophyte wings.
AxisField will be AlignAxis
Axis2Field will be NormalAxis
We'll have to add these to the layer's variable Fields:
If everything turns invisible then you've failed the test. Go home. (Obviously just kidding).
We now need to actually position the stuff back into visibility for this particular Wing project (we'll get to fancy effects later in the tutorial, for now weird complexBasic Positioning
Since we want the movement and positioning of this in particular to follow the movements of the character in game we add a new LocalSpace evolver:
Now we can begin actually giving this effect some particular particle positioning.
First we should refer to the spawner script and adjust the variables. I adjust the size accordingly with the AxisScale of the billboard, setting the ratio to 0.1 for a single float sizability.
I copy some numbers from the neophyte wings and adjust accordingly to come up with:
Size = 4;
Life = 1.0;
AlignAxis = normalize(float3( -1 , 0 , -0.48 ) );
Position = float3(0.0,0.0,0.1);
Everything seems to be in position from there so I hit CTRL+S to save and compile the script.
Since we want this to have a certain turbulence like the base neophyte wings we add a ParticleEvolver_Script:
And for a base we add (before adjusting it to our liking of turbulence):
NormalAxis = normalize(float3( -0.35 + 0.04 * (sin(Age*12)) ,1,0));
to this script and press CTRL+S as with the spawner script.
Once everything is in position we can delete the original wing layer.COLORING In PopcornFX
To start, make sure that "Color" as a variable is present in the layer's Fields section:
From there we can choose to modify the color directly through code:
Or through a color graph:
If we choose to color the item through code then this popcornfx scripting guide is an invaluable tool
To make an interesting color-changing effect then putting something like this:
Color = float4(sin(0.1 - scene.Time),sin(0.1 * (scene.Time / 0.33)),sin(0.1 * (scene.Time / 0.66)),0.25);
into the ParticleEvolver_Script will result in a color-changing rainbow effect. The Spawnerscript is static while the Evolver_Script is fluid/dynamic and updates at a constant.
Since color changing through the graph will take trial and error, we will further this by delving into color-changing by code with attributes for convenience when adding more layers.
Utilizing "Attributes" in PopcornFX
First we create a custom attribute like so:
We begin erratically defining the values in the attribute, roughly, knowing that the first value is R(ed), the second G(reen), the third B(lue). Though we cannot yet see the resulting color we begin to define the attribute by clicking the cog near it:
Once that is done we can freely use the attribute, as we named it, as a built in field variable for every layer in our particle emmitter here.
Such as...
Either copy and paste the initial wing layer then position them accordingly until you've got what you want, or add more layers doing different stuff.
The next Segment will involve dealing with my "Revolution Ribbons" for easy wing-making.To start with some wingmaking tricks seldom used elsewhere (except in official trove wings) I'll show you all the "WingFlip", conceived with the Wings of Lunacy:
Simply create a new attribute with a minimum of -1, and maximum of 1. Title it "WingFlip" and multiple your x axis by it, wherever position and rotation etc. are referenced you simply use *WingFlip to make the value go into the negative or positive.
This means you only need to make a single wing from this point on. Click "Save" on the attribute when it's left or right, then "Save As..." to save it as either left or right. It should double production speed.
To start with the Revolution Ribbon approach/method simply Download Here and we begin toying with the graphs of Velocity to change their shape. Change the Velocity or Size field evolver to radically change their appearance; they will follow the curve you set.
The wings are not limited by these perimeters, but the size and velocity fields alone can tweak these wings to be unrecognizable, such as the M'ovember Wings.Extracting the Archives!
Locate your Trove Game folder. It may be in program files(x86) or in steamapps depending on your installation. Hold Shift then RIGHT-CLICK in an empty space within your Trove game folder to open the Command Prompt (CMD).
[/CENTER]
Once you open CMD you may simply enter one of the following commands regarding what directory the file you would like to extract for reference or modification is in:
Originally Posted by BlueprintsOriginally Posted by PopcornFXOriginally Posted by UI(Alternatively... Ignitas made an awesome guide)Originally Posted by Placeable Binfab (for Metaforge)
Comphensive Trove Modding Tutorial by Milambit (BACKUP)
February 23, 2022 (updated 3 years ago)
by Etaew
Unpublished Page: share via: https://trovesaurus.com/page=4930/cd2ba
Greetings!
Welcome to the...
Comprehensive Trove Modding Guide
We'll skip all the gushy philosophical stuff of how you're awesome for even thinking about contributing to Trove's community and modding sub-community and dive straight in!
Though... Before we begin, I must implore you to check out This awesome list of Trove Creations-related guides. These will show you how to make the actual mod itself and further direct the style and everything else
What You Need:
Trove itself
Basic understanding of computer directory structure
7-Zip
GIMP + the .dds plugin (or equally sufficient image editing program)
A voxel editor of your choice (I would personally recommend Magicavoxel, Zoxel-(the 0.50 updated fork), or Qubicle 1 or 2), Sproxel is also excellent with various tools, but requires Zoxel to incorporate into Trove.
PopcornFX 1.8.4.27161 (or until Trove's version is updated)
A Mod Loader (Sort of optional...)
(NOTE: This guide was written on Windows and when the Mac version of Glyph is installed the steps to achieve PopcornFX and Archive extraction may be different in the future.)
[Center]The First Steps and Getting Ready
First things first...
THIS
Creating the qbexport folder is necessary for future steps. Necessary
-See File Extraction below if you have not already extracted your Trove files-
Convert The Blueprint of your choice into .QB files
Find the blueprint file you would like to convert.
(I personally find that it helps to have two file explorers open...)
There are multiple ways to actually convert the blueprint(s), the essential goal is to use the devtool_dungeon_blueprint_to_QB.bat file to convert the blueprint in question. The simplest way is to drag and drop any blueprint file on top of it; a complex method would be to customize the code itself to convert blueprints of your choice. Other easy ways is to copy the blueprint to your clipboard (highlight, CTRL+C) and paste it into the devtool (highlight, CTRL+V).
(Don't worry, you only have to go through the extraction process like once a week at most if you want to stay on top of what's new in the folders...)
Actual Voxel Model Modification!!!
Moving on! Let's begin modifying your first .qb mod thing and get it to show in the game!
Firstly open the voxel editor of your choice and do what needs to be done to open a .qb file.
Once your .qb selection dialog is present simply navigate to the Trove game folder and locate the "qbexport" folder you created earlier. The blueprint file you dragged into the devtool will be in qbexport. Select the file and open it through your voxel editor.
At this point it's up to you to modify the qb file to your liking with the voxel tools at your disposal. Make sure to leave the hot pink (255,0,255) voxel where it is - this voxel determines the attachment point of the model within the game environment. If you are creating a helmet, place a pink voxel approximate to a hairstyle, hat, or mask pink voxel placement (see the guide, or convert existing hats for reference).
Moving on! Let's begin modifying your first .qb mod thing and get it to show in the game!
Firstly open the voxel editor of your choice and do what needs to be done to open a .qb file.
Once your .qb selection dialog is present simply navigate to the Trove game folder and locate the "qbexport" folder you created earlier. The blueprint file you dragged into the devtool will be in qbexport. Select the file and open it through your voxel editor.
At this point it's up to you to modify the qb file to your liking with the voxel tools at your disposal. Make sure to leave the hot pink (255,0,255) voxel where it is - this voxel determines the attachment point of the model within the game environment. If you are creating a helmet, place a pink voxel approximate to a hairstyle, hat, or mask pink voxel placement (see the guide, or convert existing hats for reference).
Exporting your QB to use in Trove:
When you're done modifying your file, save the main qb according to the file you intend to replace.
For instance, if you were to replace the Front Left foot of the Steampunk Meownt you would find that file name and use it in your .qb such as: C_MT_cat_steam_foot_FL.qb, C_MT_cat_steam_foot_FL_s.qb, etc.
Save your .qb to a location that does not have excess security, privelidge, rights, firewall, and the like - it helps to keep it cohesive and/or matching the file structure of its placement (Mod_FileName/Blueprints/modded.qb) for easy loading into the mod loader.
To convert your modded .qb into a blueprint (and also optionally add specularity, glowiness, or change its opacity) refer to This Awesome Guide.
In summary; put your modded .qb file into devtool_convert_to_blueprint.bat similarly to how you originally converted it with the other .bat devtool.
To quickly check out the blueprint file you can type /mf while in game to go to the metaforge; drag the resulting .blueprint into your Trove window to preview the modified file in full detail.
Getting The File To Load As A Mod In Trove
(also mod-loading in general and complete summary)
(also mod-loading in general and complete summary)
Trove has total mod support through it's "/override" oriented file structure. Which gives us, as modders, or mod enthusiasts, more options as to how to get our mod to work.
To make things simple for us I'll present two basic approaches:
Firstly, to do it without using a mod-loader, one would simply create a new folder inside trove/live/blueprints (or even trove/pts/blueprints) and name it "override". When a blueprint is added to this folder, as long as the name is exact, the file will override any file present within the archives inside the blueprints folder that conflict with the file internal to the archive's file name.
The /override folder must be placed beside the archive which has the files intended to be replaces. For textures of VFX you would need to place /override such as "trove/live/particles/vfx/textures/override" for instance. (HINT: You can do cool stuff in the metaforge by messing with binfabs and adding blueprints ;D) .
Alternatively...
Create a new folder for your mod files respective of the trove file directory; eg. if you have a blueprint file you simply place the file in "mod_name/blueprints/"; place all other modded files corresponding to the location of their original archive. Make sure you're inside the mod folder itself highlight the folders you created to be zipped, right click, go to "7-Zip", click "add to .zip". The zip should automatically retain the name of its parent folder (the folder of the mod itself), if it does not; simply name it whatever title you wish to give your mod (it helps to add a version number here...).
Now we simply open Trove Toolbox by Trovesaurus and add the mod.
Once the "Apply Mods" button is clicked the mod will be automatically installed into their corresponding /override directories and the mod will be ready for in-game testing!