Question:
I'm a 3d modeler, and someone asked about adding a whip antenna to the back of the minibike. If I can get the minibike model and textures, I could easily do this in a half hour.
The only issues I could foresee if if the collision box for the minibike would change with the antenna addition, and how to export or just add the generic metal texture to the antenna itself, and the red flag at the top.
Would this tool give me the capability to export and then import the minibike model, once changed?
I'm thinking the minibike is probably a grouped object, combining its components. (seat, chassis, handlebars, ect.) Or maybe its a new separate model that replaces versions that are partially completed?
Its easy to loose the minibike in tall grass, and adding a whip antenna with a flag seems like an easy solution.
Maybe someone can partner up with me on this if I create the new geometry changes to make it available?
The minibike is created from the GameObject "entities/vehicles/minibike_prefab" (if you open globalgamemanagers through UABE, you can search for that path without " of course). It contains a Transform component (in View Data, expand m_Component, Array, 0, data, second and view asset) that has all minibike parts linked as children Transform (they contain a reference to the according GameObject).
There are two options :
1) Extending one of the minibike's part meshes by the whip antenna, which requires adding your texture to an existing one (I'm not sure if that's easily doable).
You can find the mesh location in GameObject->m_Component->Array->(usually 1)->data->second->view asset->Base->m_Mesh, the file id in brackets is the one you're looking for.
You can find the texture location in GameObject->m_Component->Array->(usually 1)->data->second->view asset->Base->m_Materials->Array->0->data->view asset->Base->m_SavedProperties->m_TexEnvs->Array->5->data->second->m_Texture.
UABE can't export rigged meshes and can't import meshes at all so far. As far as I know, all the minibike parts have bones though so it likely won't work good. The only way to import a mesh is through the .assets of a built custom Unity project with that mesh in a scene.
2) Adding another part to the minibike.
While it should work in theory, I haven't found a way not crashing the game even though I have created a new Transform, GameObject and SkinnedMeshRenderer and added all necessary dependencies to the ResourceManager assets. The game crashes because it somehow doesn't load my assets properly but tries to access them, so either the assets themselves are wrong or I am missing another dependency tree.
I'll report back if I find a way to fix it.
DerPopo,
First of all, let me say to you that your tool already helped me immensely with my project (I'm creating Mod for different 2D game). Using UABE, I was able to change IsReadable flag to true and thus, make possible to change hue of the textures in game.
I've come to the point where I need to add my own files to the bundle (textures for now). Using UABE I managed to successfully add needed texture.
Problem is that I can't seem to figure out how to apply needed path to this texture (or should I say create a reference to this texture). The only PreloadData file I found in a bundle just points to the all .assets files, w/o mentioning texture names.
If I open mainData file, I can see my newly added texture but w/o path (like portraits/enemies/thistexture).
Could you please suggest how to solve this issue? Is it possible or it really depends on the game?
I would have asked too. - how to make this way:
if this is not about the "TerrainTextures" as I asked earlier, but I want to add the texture in the maingames assets.
I want to add another type of spectrum for the biomes (textures/environment/spectrums).
I think the structure of the maingame assets is different, for example - there is have common "globalgamemanagers" ...
How to find this "header", to add the path ?
In case you store your texture in a bundle file, there should be an unnamed asset of type AssetBundle (path id always is 1 afaik) in at least one of the bundle's .assets that contains the names in the m_Container array. Export a dump, copy
the last entry in m_PreloadTable and adjust it so it e.g. looks like this :
Code:
0 Array Array (144 items)
[b][size=3]0 int size = 145[/size][/b]
... (entries 0-142)
[143]
0 PPtr<Object> data
0 int m_FileID = 0
0 SInt64 m_PathID = 45
[b][size=3][144][/size]
[size=3]0 PPtr<Object> data[/size]
[size=3]0 int m_FileID = 0[/size]
[size=3]0 SInt64 m_PathID = 46[/size][/b]
The changed lines are marked in bold font.
You don't need to fix the index in the brackets. It's important that the new entry is at the end and that you fix the size. Adjust the file id and path id to match your asset.
Perform similarly on m_Container. Copy one item (you can use any in this case), increase the size, enter the new name, set preloadIndex to the index of the entry in m_PreloadTable, preloadSize to 1 and also modify the PPtr to match your asset.
In .assets files, the ResourceManager asset in the mainData or globalgamemanagers file (depends on the Unity version of the game) has all the names. Copy the first entry (or any other entry) in m_Container, set your name and file/path ID and adjust the size. The file id here isn't the same one as in the list UABE shows, you need to look for other named assets in the same .assets file to find the correct one.