[DiscordArchive] I'm modifying a mining node .m2 in 010 and I want to change the texture that is hardcoded to somethi
[DiscordArchive] I'm modifying a mining node .m2 in 010 and I want to change the texture that is hardcoded to somethi
![[Image: image.png?ex=690c26c1&is=690ad541&hm=aa3...415be88c6&]](https://cdn.discordapp.com/attachments/415944535718494208/1216969056481972244/image.png?ex=690c26c1&is=690ad541&hm=aa3dc3978d48c2aa2150fee1ab99bca910bc5bddb108598a85b06d3415be88c6&)
Archived author: ReynoldsCahoon • Posted: 2024-03-12T04:40:33.311000+00:00
Original source
I'm modifying a mining node .m2 in 010 and I want to change the texture that is hardcoded to something else. I can modify the value but it's obvious that there is a specified amount of data for the texture string, and if my new value is less or more characters than the original it probably isn't going to work. What's the proper way to modify a hardcoded texture string without breaking the file?
![[Image: image.png?ex=690c26c1&is=690ad541&hm=aa3...415be88c6&]](https://cdn.discordapp.com/attachments/415944535718494208/1216969056481972244/image.png?ex=690c26c1&is=690ad541&hm=aa3dc3978d48c2aa2150fee1ab99bca910bc5bddb108598a85b06d3415be88c6&)
Archived author: felcleaner • Posted: 2024-03-12T04:59:46.341000+00:00
Original source
perhaps changing texture name would be easier, like uranium.blp -> uraniumore.blp or smth like that
Archived author: felcleaner • Posted: 2024-03-12T05:00:33.856000+00:00
Original source
you might ensure that it will fit that amount of data
Archived author: ReynoldsCahoon • Posted: 2024-03-12T05:01:27.631000+00:00
Original source
I can easily pass it a bunch of extra characters to have it match the length, but is there no non-destructive way to give it the desired texture name, and have it adjust the size/value?
Archived author: ReynoldsCahoon • Posted: 2024-03-12T05:01:37.315000+00:00
Original source
What do m2 pros do in this scenario?
Archived author: felcleaner • Posted: 2024-03-12T05:02:22.322000+00:00
Original source
wonder how that's destructive, that's just another shenanigan of modding
Archived author: ReynoldsCahoon • Posted: 2024-03-12T05:14:57.033000+00:00
Original source
It's destructive in that in the image you can clearly see that the m2 texture string has a defined length in the file, and when the value is changed to something shorter, the rest of the original string remains, and will likely cause issues. My question was in regards to how one would modify the length of this hardcoded texture to actually fit the string, in a non-destructive way. i.e. not damaging the file and making it unreadable to the client.
Archived author: ReynoldsCahoon • Posted: 2024-03-12T05:18:10.337000+00:00
Original source
If the answer is "there is no way to do this, just use a filename that matches the length of the original" then that's what I'll do, but if there is a method to modify it, I would like to learn to do it that way (properly).
Archived author: ReynoldsCahoon • Posted: 2024-03-12T05:23:32.390000+00:00
Original source
<@239448375152345089> perhaps you know the answer?
Archived author: A2 • Posted: 2024-03-12T05:29:00.592000+00:00
Original source
M2 texture strings are zero/null-byte terminated which means that if you have a 50 char long string cutting it to 40 with 41 and 42 being null bytes will not damage anything since the remaining 8 bytes to fill rest of the hole to cap out the original 50 will not harm anything and will jut remain there as unused data