Search the Community
Showing results for tags 'How to'.
-
This is a 2nd level Tutorial on how to edit assets and assetbundles. Tools - Unity Assets Bundle Extractor https://7daystodie.com/forums/showthread.php?22675-Unity-Assets-Bundle-Extractor - Text editor (e.g. notepad++) - Asset Studio https://github.com/Perfare/AssetStudio/releases - paint, gimp, photoshop, paint3d, blender 0. What is a 2nd level Tutorial? PoE2 has three levels at which one can mod the game. Level 1 is modifying the gamedatabundles, stringtables etc. Let's call it scripting and shuffling of existing things. You can't add totally new stuff or change the game mechanics. Level 2 allows you to add self made contend (new npcs, new hairstyles, new look etc.) just like a DLC. Level 3 is changing the game mechanics. In other games this is called the "hard coded" level and is normally not accessible to moders. Level 1 has no influence on level 2 or 3. Level 2 has no influence on level 3 but on level 1. Level 3 has influence on level 1 and 2. 1. What are assets and assetbundles? The Unity engine stores all files required to display anything in the game (animations, areas and character meshes, some scripts, visual maps, variable lists e.g. for companion stats) in so called assets and assetbundles. The asset files are the "levelxy" or "sharedassets" in the "PillarsOfEternityII_Data" folder. Assetbundles are the unity3d files in the "PillarsOfEternityII_Data\assetbundles" folder. The "levelxy" and "sharedassets" contain mainly areas and maps and the interaction between all the stuff on it (npc, quest and sequence triggers). So if you want to edit/build maps this are the once you need to get familiar with. The assetbundles in "PillarsOfEternityII_Data\assetbundles\streamtile" contain the textures for the areas and maps. The focus of this tutorial will be the assetbundles in "PillarsOfEternityII_Data\assetbundles". The contain the stats and appearance files for all items, characters, creatures and the UI. They have mostly convenient names. The ones that start with "lax" are the expansions and DLC's. 2. How to mod assetbundles? 2.1 UABE and Asset Studio In order to modify assets or assetbundles you need Unity Assets Bundle Extractor (UABE). It is the only tool I know, which can import files into existing assets or assetbundles. UABE is not very helpful for browsing the files. This is where Asset Studio shines. It can give you previews of files without the need for extraction and external programs. 2.2 Things you need to do, before start modding. The big unity3d files are "compressed"!? Not really, but you will have to "uncompress" them. UABE has a protection build in to prevent unwanted overwrite. To make your life easy just do this ALWAYS!!! when modding an assetbundle. - take the unity3d file you want to "uncompress" or mod and name it name2.unity3d e.g. characters.unity3d --> characters2.unity3d - open characters2.unity3d in UABE via File -> open - if you haven't "uncompress" the file you will be prompted to do so. - save the file as characters.unity3d without the number. Now you have two files, a backup with a number and one modded, which is used by the game. PS: there is no need to "compress" those files. 2.3 The file structure inside the assets or assetbundles. Use UABE or Asset Studio to open the assets or assetbundles. You will see many different file types. If you already know, how to mod gamedatabundles, you will recognize monobehavier files with "prefab" in their names. This prefab files are text files containing, how all the other files are put together. They are the assembly instructions. Here is an example, I will use in this tutorial. It's the prefab for the female Godlike head 1. Practically all visual object prefabs can be found in "items.unity3d". It looks like a lot, but it is more simple than it seems. If you want to change the appearance of anything in the game the cyan part is the most important. The locations of all necessary files are under "FBXModelData ModelData". The strings are all references to files in characters.unit3d. The next important part is "SubMeshSettings SubMeshes". Here are the meshes used and under "MaterialOverride" is the reference of their color files. When you open those meshes and material files, you will see the same structure and references to object (fbx), skeleton, and texture files. 2.4 Referencing in the assets or assetbundles I have used the term reference very often in the previous section. There are 3 ways to reference something in the assets or assetbundles. 1. Reference by name (eg. string MeshName = "F_GODM_Head01") 2. Reference by SInt64 m_PathID. When you open an asset or assetbundle in UABE and click on "Info" a window called "Asset info" with all the files in the asset will open. In this Window there is a tab called "PathID". This is the SInt64 m_PathID of the file. If you want to find a file mentioned in the prefab or other files, copy SInt64 m_PathID, open the "Asset info"-window of the asset, click on view, select file id (there is only one), fill in the path id and click ok to find the file. 3. In some cases we have files referenced across assets and assetbundles. The prefab files are in items.unity3d and reference to characters.unity3d. I have not figured out yet, how this is done. Presumably it has something to do with a file in every asset with the path id 1 and/or the "UnityAssetGuidString".
- 19 replies
-
- 3
-
Here's a very rough guide on how to add a new voice to Pillars of Eternity 2, without replacing an existing one. From the code side of things it's not too complicated, you'll just need 2 blocks of code. The main complication lies in creating the audio files and naming them correctly so that the game will know what to do with them. Go to the PillarsOfEternityII_Data directory, you can find this by default: Steam: C:\Program Files (x86)\Steam\steamapps\common\Pillars of Eternity II Deadfire\PillarsOfEternityII_Data\ GOG: C:\Program Files (x86)\GOG Games\Pillars of Eternity II Deadfire\PillarsOfEternityII_Data\ Inside the override folder (if this doesn't exist, create it) create a new folder, give it the name of your mod (E.g. Something like “Custom Voice”, “Zealous Voice”, something along those lines but it's really up to you). Inside this folder right-click and create a new notepad file. Give it the name of your mod and put .gamedatabundle (no .txt) at the end. Open it with Notepad (or your choice of code editor) and paste the following template: { "GameDataObjects": [{ "$type": "Game.GameData.SpeakerGameData, Assembly-CSharp", "DebugName": "DEBUG_NAME_1", "ID": "GUID_1", "Components": [{ "$type": "Game.GameData.SpeakerComponent, Assembly-CSharp", "Gender": "GENDER", "ChatterFile": "936c726d-d219-4771-80bb-83dd61c16cce", "ExternalChatterVOID": "00000000-0000-0000-0000-000000000000", "ChatterPrefix": "FILE_PREFIX", "WwiseChatterEventOverride": "", "WwiseChatterVoiceOverride": "" } ] }, { "$type": "Game.GameData.PlayerVoiceGameData, Assembly-CSharp", "DebugName": "DEBUG_NAME_2", "ID": "GUID_2", "Components": [{ "$type": "Game.GameData.PlayerVoiceComponent, Assembly-CSharp", "DisplayName": 465, "SpeakerReferenceID": "GUID_1", "Conditionals": { "Operator": 0, "Components": [] } } ] } ] } Change the following: DEBUG_NAME_1: change to something distinctive to your mod. This way if something isn't working, you can easily search for errors in the output.log. e.g. “DebugName”: “SPK_Player_Custom_F” GUID_1: Generate a GUID and paste it over GUID_1 (inside the quotes). e.g. "ID" : GENDER: Put Male or Female inside the quotes depending on which gender you want the voice to be available for. e.g. “Gender”: “Female” FILE_PREFIX: Change to something short, something easy to retype and remember. You will use this later as the name of the folder for your audio and as a prefix on all your audiofiles. Don't use spaces in the name. Use_underscores_ instead_to_separate_words. e.g. “ChatterPrefix”: “player_custom_f” DEBUG_NAME_2: same idea as DEBUG_NAME_1 but make sure they aren’t exactly the same. e.g. “DebugName”: “Voice_Custom_Female” GUID_2: Generate another different GUID and paste it over GUID_2 (inside the quotes). e.g. For “SpeakerReferenceID” paste the first GUID you generated over GUID_1 again. e.g. "SpeakerReferenceID": Finally: Make sure everything you've replaced still has quotes around it. Make sure there are no spaces inside of the “quotes”. Save your file. Your finished code should look something like this: Setting up your Audio files: Now go to: PillarsOfEternityII_Data\StreamingAssets\Audio\Windows\Voices\English(US)\ and create a new folder there naming it the same as what you have put in place of FILE_PREFIX. This is where all your audio files will go once they are converted to .wem and have the correct names. The naming of audio files goes like this: ch_FILE_PREFIX_USE_NODE.wem E.g. ch_player_custom_f_confirm_0025.wem , ch_player_custom_f_battlecry_0028.wem There are 121 audio files that'll make up this voice. I've attached a .txt file that contains all the file names. For your convenience use Find & Replace (crtl+h) to change all the lines with FILE_PREFIX to that of your ChatterPrefix. I would strongly suggest that you create a work files type folder for your project outside of the game's directory. And that you build your voice in stages, so as to avoid burning yourself out. The voice should still work if there are less than 121 files, but there will be silence for actions where there is no corresponding audio file or if there is additional line. E.g. if there is only one audio clip for when you clicking on the character there will be gaps in-between the character repeating that line. You can test the voice at any time by going into character creation, creating an adventurer at an Inn, or by opening the customization menu on an existing character. When loading it is worth clicking on your character a few times till they say something before going into the customization menu as voices don't always immediately load. Finishing touches: Create a mod manifest as described by BMac. The versions that support this mod should be: "Min" : "1.2.0.0017", "Max" : "5.0.0.0040" Currently your voice slot has the name “Test” when you look at it in game. Adding a piece of custom text to serve as your voice's name is a little finicky as it requires adding an entry to the gui.stringtable file. You can find some information on to do this in a few places. Once you have done this open up the .gamedatabundle file you made and replace 465 with the numbers that point to your text entry. Custom Voice Lines.txt
-
Hi, is there any way to make transparent textures using AssetsBundleExtractor? For example to remove the top from hide armor to make it looks more barbaric.
-
- textures
- transparent
-
(and 2 more)
Tagged with: