Hey there! I've been enjoying 7DTD for years and recently decided to explore the modding section to make the game slightly customized.
I'm working on a first simple mod which goal is to replace current zombies textures.
I have extracted the textures via UABEA (thanks a lot to 4sheetzngeegles!). First, I've tried to just replace the zombies.bundle with the updated textures but it caused errors, saying that the bundle was corrupted. Instead, I decided to create my own Unity bundle and embed it inside a mod.
Here is the bundle manifest:
ManifestFileVersion: 0
CRC: 1339901114
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: e1a876901da95e3cf3a34cf66d7a063e
TypeTreeHash:
serializedVersion: 2
Hash: b0363f7088f9761414f730641bf9a24b
HashAppended: 0
ClassTypes:
- Class: 28
Script: {instanceID: 0}
SerializeReferenceClassIdentifiers: []
Assets:
- Assets/zombies/HD_YoGrey.png
- Assets/zombies/HD_TomClarkGrey.png
- Assets/zombies/HD_ArleneGrey.png
Dependencies: []
For now, the bundle only contains 3 textures: HD_ArleneGrey, HD_TomClarkGrey and HD_YoGrey. I've created the entityclasses.xml file with the following content:
<Test>
<!-- CHANGE TEXTURES -->
<set
xpath="//entity_class[@name='zombieArlene' or @name='zombieArleneFeral']/property[@name='Mesh']/@value">
#@modfolder:Resources/entities.bundle?HD_ArleneGrey</set>
<set
xpath="//entity_class[@name='zombieTomClark' or @name='zombieTomClarkFeral']/property[@name='Mesh']/@value">
#@modfolder:Resources/entities.bundle?HD_TomClarkGrey</set>
<set
xpath="//entity_class[@name='zombieYo' or @name='zombieYoFeral']/property[@name='Mesh']/@value">
#@modfolder:Resources/entities.bundle?HD_YoGrey</set>
</Test>
I took a look at https://7daystodiemods.com/adredens-christmas-a20/ in order to understand how to replace a texture via XML. Maybe this way is outdated.
When I start the game and reach a location with zombies, I get this kind of error:
2024-01-12T11:53:48 346.878 INF 134.2995 SleeperVolume -1619, 58, 474: Still alive 'GameObject'
2024-01-12T11:53:48 346.971 INF 134.3931 SleeperVolume -1619, 58, 474: Restoring -1615, 60, 490 (-101, 30) 'zombieYo', count 2
2024-01-12T11:53:48 346.971 ERR Could not load file '#@modfolder(Test):Resources/entities.bundle?HD_YoGrey' for entity_class 'zombieYo'
ArgumentNullException: Value cannot be null.
Parameter name: Name cannot be null
at UnityEngine.Transform.Find (System.String n) [0x00009] in <799d47ea3fd1460380efad1aacedaf7c>:0
at AvatarZombieController.SwitchModelAndView (System.String _modelName, System.Boolean _bFPV, System.Boolean _bMale) [0x00000] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EModelBase.SwitchModelAndView (System.Boolean _bFPV, System.Boolean _bMale) [0x000e8] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EModelBase.InitCommon () [0x0002a] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EModelBase.Init (World _world, Entity _entity) [0x000d9] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at Entity.InitEModel () [0x00061] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at Entity.Init (System.Int32 _entityClass) [0x0000d] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EntityAlive.Init (System.Int32 _entityClass) [0x00000] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EntityEnemy.Init (System.Int32 _entityClass) [0x00000] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EntityFactory.CreateEntity (EntityCreationData _ecd) [0x004c2] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, ItemValue _itemValue, System.Int32 _count, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _transformRot, System.Single _lifetime, System.Int32 _playerId, System.String _skinName, System.Int32 _spawnById, System.String _spawnByName) [0x0001b] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _rotation) [0x0000c] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at EntityFactory.CreateEntity (System.Int32 _et, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _rotation) [0x00000] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at SleeperVolume.Spawn (World _world, System.Int32 entityClass, System.Int32 spawnIndex, GameStageGroup group, BlockSleeper block) [0x000cb] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at SleeperVolume.UpdateSpawn (World _world) [0x001e7] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at SleeperVolume.Tick (World _world) [0x00010] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at World.TickSleeperVolumes () [0x00027] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at World.OnUpdateTick (System.Single _partialTicks, System.ArraySegment`1[T] _activeChunks) [0x0024b] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at GameManager.UpdateTick () [0x00073] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at GameManager.gmUpdate () [0x00336] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
at GameManager.Update () [0x00000] in <4fda5fdf844d4aa1ab3483d85a7c21c0>:0
It happens for every kind of retextured zombie. The error sounds rather clear: "Could not load file". However, I have no idea how to fix that; are there invalid paths?
Thanks for reading!