Beware this is not clicky-dragy user-friendly tutorial. This is your company IT guy playing Pokemon. You will have to use command line and work with script I hacked together over one night. You are also expected to know Blender and being at least able to mod textures by yourself.
- Switch Toolbox
- lender 2.8
- ython 3.7 (3.8 should be OK)
- Decrypted dump of Pokemon Sword/Shield
- his ZIP with script and Blender plugin (v3) (old v2 v1)
As tutorial, i'd like to make my favorite black hoodie just a little shorter.
2. Extract the ArchiveMake some working directory and extract attached zip to it. Start Blender and install io_scene_pkmn_obj.zip as new addon. This will add importer and exporter for OBJ format with support for vertex weigths, groups and bitangents, all features youd need for importing models back to game.
3. Copy your fileFind file you want to change and MAKE COPY of it. In fact, make two backups just in case.
You will ever work ONLY on that copy.
Script may detect you are working on original and break it by "mistake".
4. Open in Switch ToolboxCopy that file (p2_out0001_00_7parker.gfpak in case of hoodie) to your working directory and open it in Switch Toolbox. As you already know, every gfpak contains textures, shaders and one file named like "4016001560820856538.gfbmdl".
That's the model you need to change.
5. Export Raw DataRight click that model and select "Export raw data". Export it to your working directory.
6. Start command promptStart command prompt and navigate to your working directory
7. Execute Python commandType gfbmdl.py 4016001560820856538.gfbmdl and press enter. If you managed to install
python properly you should get output like this - it displays groups inside of model.
Groups are part of model that are hiding depending on what other clothes are on your character. For example, hair has group that is not drawn when player wears hat. Materials (such as skin or cloth) are also hardcoded to group, so yuou can only use them on that part of model.
8. Export OBJType gfbmdl.py 1234567890.gfbmdl extract nameOfSomeGroup to export it to OBJ.
Beware that script will overwrite files without asking
9. Import to BlenderImport created nameOfSomeGroup.obj to Blender.
Use "PKMN obj" importer installed in step 0 and make sure your import settings are set like this:
It's default so they should be.
10. Edit your ModelThere are some rules you want to hold, or import will be broken.
- Don't change number of materials. You can assign vertices to material but number and order has to stay the same.
- Don't add more than 4 groups to same vertex. This seems to be limitation of game engine.
- Make sure every vertex belongs to some group, or they will fly away from your model in game.
- Make smal changes and test them often. Sometimes model just breaks the game and youll get around it only using trial and error.
11. Export Edited ModelUse "PKMN obj" exporter to export edited model back to obj file. Export settings should look like this:
12. Perform Model ReplacementType gfbmdl.py 1234567890.gfbmdl replace nameOfSomeGroup edditedObjFile.obj to replace part of model.
Beware that every replacement makes gfbmdl file slightly bigger and once you reach certain treshold game will just crash trying to load it.
Its best to make 2nd copy of gfbmdl, copy it over your working file and then replace all modified parts.
13. Replace Raw DataGo back to Switch Toolbox, right click 123456798.gfmdl file and select "Replace raw data".
Replace it with modified gfmdl, save it and copy it to your switch to test it out.