Jump to content

deception

Members
  • Posts

    4
  • Joined

Posts posted by deception

  1. Extracting Terrain with Textures

     

    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.

     

     

     

     

     

    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 :

     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.

     

    Is it possible to extract the terrain with the textures if so please let me know thank you so much. :tears_of_joy:

×
×
  • Create New...