Hacking Sm4sh Injector Pack

DakotaBonez

Member
Newcomer
Joined
May 6, 2016
Messages
14
Trophies
0
Age
28
XP
70
Country
United States
Hmm I see thanks, and which file is the converter? The Inject Pack has too much stuff lol

Edit: So I think I figured this stuff out, but I don't have AMD installed, where is that?

Edit2: Nevermind lol
Alright I got custom stocks, character select portrait, battle portrait and result screen portraits working. I followed this tutorial, but it was pretty vague in some areas.
http://gamebanana.com/tuts/12010

So basically,
extract the texture from the nut file, convert it to dds, convert it to png, edit and save as A8R8G8B8 (also called 8 8 8 8 or ARGB8 or whatever) then you can inject your edited ARGB8 dds back into the nut file.

Note that when editing the png, the color channels are gonna be off, so the image is gonna look like it has inverted colors because ARGB8 switches the red and blue channels.
So open up the channel mixer and switch the red and blue values back to normal.
https://imgur.com/I852ZEB
https://imgur.com/D6AaqD4
The tutorial kinda explains it better.

In this tutorial he was able to directly edit the dds file, but I had to convert it to a png first.

ANYWAY, I'm not a very good artist, so I downloaded this green screen stage
http://gamebanana.com/maps/190686

Now I'm gonna play with my custom character texture, take a screenshot of it by opening up imgur from the internet browser, and use that screenshot to make a custom character select portrait. It should be much easier than going through all the trouble of re-skinning the existing character select portraits, and it will look more like the actual character texture. The downside of taking a screenshot is that the character select portrait's pose won't match the other existing CSPs.
 
Last edited by DakotaBonez,

Insdong

Member
Newcomer
Joined
May 14, 2016
Messages
22
Trophies
0
Age
31
XP
52
Country
Alright I got custom stocks, character select portrait, battle portrait and result screen portraits working. I followed this tutorial, but it was pretty vague in some areas.
http://gamebanana.com/tuts/12010

So basically,
extract the texture from the nut file, convert it to dds, convert it to png, edit and save as A8R8G8B8 (also called 8 8 8 8 or ARGB8 or whatever) then you can inject your edited ARGB8 dds back into the nut file.

Note that when editing the png, the color channels are gonna be off, so the image is gonna look like it has inverted colors because ARGB8 switches the red and blue channels.
So open up the channel mixer and switch the red and blue values back to normal.
https://imgur.com/I852ZEB
https://imgur.com/D6AaqD4
The tutorial kinda explains it better.

In this tutorial he was able to directly edit the dds file, but I had to convert it to a png first.

ANYWAY, I'm not a very good artist, so I downloaded this green screen stage
http://gamebanana.com/maps/190686

Now I'm gonna play with my custom character texture, take a screenshot of it by opening up imgur from the internet browser, and use that screenshot to make a custom character select portrait. It should be much easier than going through all the trouble of re-skinning the existing character select portraits, and it will look more like the actual character texture. The downside of taking a screenshot is that the character select portrait's pose won't match the other existing CSPs.

If I understood correctly, I have to convert to png, which I did and got this weird blue Peach face, which should be normal as I should be getting inverted colours, then I should edit that to the colours I want and then edit the colours so they are inverted again?
 

TyranitarGodzilla

Member
Newcomer
Joined
Jun 7, 2016
Messages
7
Trophies
0
Age
27
XP
60
Country
United States
"Use my easy injector via editing EasyInject.bat to change the folder to NUT_Inject and TexConv2
Copy that EasyInject.bat to the folder where your new dds and nut file
Open EasyInject and boom you are done"


This part of the original post is very confusingly worded, and it's where I'm stuck and get errors. Could someone explain this to me in a more layed out way? I get lost first and foremost in this part "Use my easy injector via editing EasyInject.bat to change the folder to NUT_Inject and TexConv2"'

This part makes no sense to me. So drag EasyInject.bat to the Notepad to edit it and then... do what? "change the folder to NUT_Inject and TexConv2"? What does that mean?

Then, "Copy that EasyInject.bat to the folder where your new dds and nut file". I have no idea what this means either.

Obviously the last step (open the file) is self-explanatory but the wording on the first 2 steps is not very good and I cannot comprehend it.
 

Segtendo

#TeamMarie
Member
Joined
Jun 30, 2010
Messages
252
Trophies
1
Age
31
Location
Illinois
Website
twitter.com
XP
394
Country
United States
The file that says put EasyInject into the folder? Ignore that. I've never gotten that to work.

Just put the DDS in the same folder as EasyInject and your NUT file.

EasyInject has 3 paths: the first one is a path to the folder its in, second is a path to Python, and the third is a link to Nut_inject.py.
 
Last edited by Segtendo,

TyranitarGodzilla

Member
Newcomer
Joined
Jun 7, 2016
Messages
7
Trophies
0
Age
27
XP
60
Country
United States
The file that says put EasyInject into the folder? Ignore that. I've never gotten that to work.

Just put the DDS in the same folder as EasyInject and your NUT file.

EasyInject has 3 paths: the first one is a path to the folder its in, second is a path to Python, and the third is a link to Nut_inject.py.
The DDS files are in the same folder as model.nut and EasyInject and everything else in the "Inject Pack" folder. I click on EasyInject.bat, and it does run. However, I get an error... it's on a post I posted earlier which no one responded to. I will attach a new file showing the error again...

I have a suspicion that the problem is the NUT_Inject.py file and not the EasyInject.bat or the DDS files or the model.nut. If you look at the error, and then you check the contents of the file NUT_Inject.py by dragging it to the Notepad (which makes you able to see the code of the file), you can see that the .py file contains the thing that's referenced specifically in the error: "readu64be." I attached the txt file version of the script. I know that readu64be is the thing that's messing me up. As you can see in the text file, the thing only appears in the script once, and the error describes it being undefined. The error clearly calls out line 87, "magic = readu64be(GTX)" and says it's undefined. I'm not so sure that readu64be is an un-instantiated variable (since readu16be and readu32be were not instantiated anywhere) as much as a supposed-to-be-integrated method that for some reason is not working on my version of Python?

So now my deductions have led me to this question: do I have to specifically get Python 2.7.11 x64? I do not have that version, I don't think. I just installed the default version that was offered on the Python site, and prior to that I was using Python 2.7.10 not x64. I guess I'll try that. If it doesn't work, I am officially in desperation mode and I NEED someone to help in trying to figure this out.

EDIT: RIGHT, of course that wouldn't be the answer. Alright, this is getting stupid. This error is mentioned a GRAND TOTAL (I AM DEAD SERIOUS) of 0 times on the internet, and I have no idea what the heck the problem is!! This is the default, unedited NUT_Inject.py that came with this Inject Pack! There's no reason for it to not work!!!!!!!!!!!!!! AGGGGGGGHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!

I REALLY WANT TO MAKE TEXTURE MODS! THAT'S WHY I HAVEN'T GIVEN UP YET! BUT IT SEEMS THE UNIVERSE DOESN'T WANT ME TO MAKE TEXTURE MODS!! WHY??
 

Attachments

  • total garbage.png
    total garbage.png
    19.8 KB · Views: 584
  • NUT_Inject_py.txt
    3.6 KB · Views: 407
Last edited by TyranitarGodzilla,

TyranitarGodzilla

Member
Newcomer
Joined
Jun 7, 2016
Messages
7
Trophies
0
Age
27
XP
60
Country
United States
-Yes... though the OP version does not include its own TexConv2.exe so I used the TexConv2.exe from the original pack from TS4M. Is there some cryptic way to get the "TRUE" TexConv2.exe or something?
-There are no spaces in my path. I tried putting quotes around it regardless and it did not work, nor should it have done anything because my error has not to do with my path but with something within the python file. I tried also the NUT_Inject_dds.py and the NUT_Inject_old.py... neither worked, even though both didn't show any errors.

This error has almost guaranteed nothing to do with the bat file, as if I try doing it the "hard way" (with the command window from folder and just typing it out, "python NUT_Inject.py model.nut 17.dds 17"... it doesn't work and gives me the same error about readu64be. So it's the fault of either python or this python file.

I guess I'll go to the Discord group as I have no other choice whatsoever... unless someone would kindly give me their inject folder which they know 100% for sure works and see if it's a problem with my crappy laptop (which would suck ballz) or if it was just my inject_pack...
 

DakotaBonez

Member
Newcomer
Joined
May 6, 2016
Messages
14
Trophies
0
Age
28
XP
70
Country
United States
I guess I'll go to the Discord group as I have no other choice whatsoever... unless someone would kindly give me their inject folder which they know 100% for sure works and see if it's a problem with my crappy laptop (which would suck ballz) or if it was just my inject_pack...

Here try mine. Use CleanUp.bat to get rid of the files I left lying around in the DDS and PNG folders. Ignore the profanity in the readme file.
http://host-a.net/u/chiptunegoon/TextureInjectPack.zip

I got TexConv2 from some old thread for modding Mario Kart, but I then found out that I also needed a couple of other files like util.py and util.pyc and gfd.dll and I needed to download amdcompress and all this other sh#$ scrounged from different corners of the internet.

Also when typing in the command window it's not case sensitive, so you can just type nut_inject.py instead of NUT_Inject.py. Also if you press the up arrow it will retype the previous line if you f#$% up the code ya typed. ALSO, if you right click the top of the command window and click edit->paste you can paste text that you copied directly into the window. Saves alot of typing time.

I think your readu64be error might be related to amdcompress. Did you download that program?
 
Last edited by DakotaBonez,

TyranitarGodzilla

Member
Newcomer
Joined
Jun 7, 2016
Messages
7
Trophies
0
Age
27
XP
60
Country
United States
OMFGGGGG THANK YOU!!! THANK YOU SO MUCH!!!!!!!!!!!!!! AFTER 5 DAYS OF TROUBLE, IT FINALLY WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! OMG. OMG!!!!!!!!!

YES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! YES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I have no idea what it is your folder has that mine doesn't, but I was able to make it work after dragging the missing files from my old folder! I tried installing amdcompress before working with your folder, and amdcompress did absolutely diddly squat to fix anything. However then, I just fixed the directory in the EasyInject.bat file (after adding the files you need to run A.Extract.A, which works for me) and it worked!!! I extracted the dds files from the "modified" nut file, and they were there!!! Your folder appears to have some intrensic, magical property wholly endemic to itself; and as such, I am very grateful for your help!!! :D :D A+++++++ *high-five* *hug* *warlock punch* *show me ya moves*
 

Kalomaze

Well-Known Member
Newcomer
Joined
Oct 26, 2015
Messages
97
Trophies
0
XP
159
Country
United States
I have a easy thing for people who are getting lost in stuff or are just plain lazy to open the scripts in the right order (me). Copy this NUT Tool to the injector pack folder and run. I'll make more options later maybe (such as injection)
 

Attachments

  • NUT Tool (Extract To InjectPack).zip
    35.9 KB · Views: 528

genandnic

New Member
Newbie
Joined
Aug 14, 2013
Messages
4
Trophies
0
Age
33
XP
139
Country
United States
Would anyone know why the NUT_check.py might not output a GTX file? I have a (modified, vertex edit) model.nut that works just fine in-game, but running NUT_check.py just prints out a bunch of slot IDs and outputs nothing to the "Convert" folder.
 

Brecert

Member
Newcomer
Joined
Jul 13, 2016
Messages
12
Trophies
0
XP
60
Country
United States
Made a bat script that will automatically extract and open NUT files by double clicking the nut.
Just put the script in the InjectPack Folder (or whatever you have it named) Make sure its the same as when it was extracted with only Tex Conv and such in it.
In the InjectPack folder make sure you have WTV in the folder. (Named WTV.exe)
This is the first script I wrote and was just hacked together mainly using the Inject Packs code and some code I did to make it work together.
To make this actually useful try to run a NUT file and set it so that it opens this script. Just double click the NUT file to get a view of it and have it extracted.
Mostly good for quick viewing of extracted files, but it does save time when extracting too.
Hope this helps.
Emoji_Blush.png
 

Attachments

  • AutoExtract.zip
    293 bytes · Views: 346
Last edited by Brecert,

notexecutive

New Member
Newbie
Joined
May 24, 2016
Messages
1
Trophies
0
Age
28
XP
56
Country
United States
This pack for some reason doesn't extract trophy textures properly. (unless I need to do something extra?) I can extract fighters just fine, but trophies don't seem to work.
 

BSC|GoldN

New Member
Newbie
Joined
Aug 15, 2016
Messages
3
Trophies
0
Age
23
XP
63
Country
United States
I'm attempting to edit the title screen logo, and I receive this error when I drag the img-00002.nut onto A.extract.A.bat (It goes through some Slot XX ID XXXX XXXXX Mipmaps first)

Traceback (most recent call last): File "C:\Users\<usernamehere>\Desktop\InjectPack\NUT_check.py", line 60, in <module>
skinNum = readByte(nut)
File "C:\Users\<usernamehere>\Desktop\InjectPack\util.py", line 5, in readByte
return struct.unpack("B", file.read(1))[0]
struct.error: unpack requires a string argument of length 1
 

Dogenberg

Well-Known Member
Newcomer
Joined
Jan 7, 2016
Messages
86
Trophies
0
Age
25
XP
231
Country
Italy
i'm trying to edit the duck hunt stage but most of the textures can't be opened with paint.net
this is the error:
System.FormatException: File is not a supported DDS format

in PaintDotNet.Data.Dds.DdsFile.Load(Stream input) in D:\src\pdn\src\PaintDotNet\Data\Dds\DdsFile.cs:line 469

in PaintDotNet.Data.Dds.DdsFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\Dds\DdsFileType.cs:line 225

in PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 496

in PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158

EDIT: i used a converter and it gave me a file but when i open it it's blank even if the icon is colored
 
Last edited by Dogenberg,

Mistah Spoon

Active Member
Newcomer
Joined
Sep 10, 2016
Messages
36
Trophies
0
XP
111
Country
United States
There's a problem.. whenever I use A.Extract.A on a .nut it gives me a ton of messages saying:
failed to load DDl. then, I look in one of the files to see 20 GTX files. what do I do with them?
 
Last edited by Mistah Spoon,

Mistah Spoon

Active Member
Newcomer
Joined
Sep 10, 2016
Messages
36
Trophies
0
XP
111
Country
United States
There's a problem.. whenever I use A.Extract.A on a .nut it gives me a ton of messages saying:
\Desktop\Inject_Pack\TexConv2"' is not recognized as an internal or external command,
operable program or batch file.
What is the problem? I have everything, I'm sure!
actually, I got the file back. but when I try to extract the .nut, it gives me the error "failed to load DDL." Now what?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Just 6 but dual band 6 lol