from unitypack.modding import import_texture
new_texture = tabledata.add_object(28)
import_texture(new_texture._contents, 'path_to_your_image.png', 'some_name', 'dxt5')
tabledata.add2ab('some_new_path_in_tabledata.png', new_texture.path_id)
"does the 28 ever need to be changed? or do I always use that number?"
Nope it shouldn't be changed. It's the type id for a texture2d
and I don't change this --> new_texture.path_id ?
just change the things in quotes where i wrote
path_to_your_image some_name some_new_path...
new_texture = tabledata.add_object(28)
import_texture(new_texture._contents, 'path_to_your_image.png', 'some_name', 'dxt5')
tabledata.add2ab('some_new_path_in_tabledata.png', new_texture.path_id)
"does the 28 ever need to be changed? or do I always use that number?"
Nope it shouldn't be changed. It's the type id for a texture2d
and I don't change this --> new_texture.path_id ?
just change the things in quotes where i wrote
path_to_your_image some_name some_new_path...