infinity496
Content Creator
- Joined
- Apr 26, 2012
Does anyone know a trick for adding bytes back into a file? I tested swapping genders so it should be possible to do but I'm trying to swap one race for another (turning Humans into Elins) But I'm losing 1 byte from the name as Popori is 1 letter longer than Human and over the course of the big files it is hundreds of bytes that I need to add back in, I've been trying to add them in at various points as just null values without any success. Thanks in advance for any help that anyone is able to give ^_^
When renaming Popori -> Human, try keeping the name the original size and simply replace the final extra character on the end with another null char (0x00). That would make it essentially a string with 2 null-terminators (where only 1 is needed), but it should still read the data okay and you won't have to change the file size.
Example:
Code:
123_Popori_Example_Skel (original)
123_[COLOR=#ff0000]Human[/COLOR]i_Example_Skel (name is too short)
123_[COLOR=#ff0000]Human[/COLOR][COLOR=#ff0000]_Example_Skel[/COLOR]l (finish replacing the mesh name, without dropping any bytes)
This trick has worked for me in other games where the original name is longer than what I want to replace it with. Unfortunately, the reverse (replacing Popori models with Human models) won't work within the swap method because there's no way around growing the file size.