Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Model Replacing tool - A Modding Tool for Persona 4 Golden (PC)

Updates

a function didn't work properly 6mo
  • BugFix a function didn't work properly
new features 7mo Addition2 Lots of new function 10mo Addition3 Texture replacing is now possible 10mo Addition

It just works...

I have decided to upload this tool I've been using for my Less flat Characters mod.

Here is a summary of what it does



  1. Path to the texture folder: this folder will have to contain the new textures you want to apply with the original name of the texture in .tm2 format (when replacing a model the material is the same as the original so you have to overwrite the original texture with yours), it's set to the texture folder in the tool when you launch it but it can be varied so that you can use multiple textures for different characters in different folders, putting too much stuff in this folder will only slow down the process but the results will always be the same because the model will only pick the textures that have the same name as the originals when compiling. 

  2. Path to the Input folder: here you'll have to give the path to the original .amd files you want to edit, do not use files that you already edited with this process because it could result in some errors.

  3. Output1: here you have to specify the path to the folder you want to use as an output, in that folder will be generated a folder for each .amd file in the input with the name of the .amd containing the new .gmo and .mds of the file and the texture folder, it's useful for fixing problems and stuff but it's pretty much all stuff that you want to delete at the end most of the times. Do not set your desktop as an output it's not a wise choice for sure.
    *sometimes the amd can not be previewed in noesis so it is convenient to have the gmo too.

  4. Output amd: this is the important thing, this will be the folder in which you will find all the new amd files.

  5. Start button: this will start the editing of the files.

  6. Replace.ini: this is a text file that will be located in the tool path in a folder named "parts" it contains the instruction the tool will need to work:

    You can make as many substitutions at once as long as you keep copying and pasting the [SOSTx] form with increasing numbers.
    The lines it contains refer to:
    -Part: the part in the model that you want to replace, you can either fill this or not but you'll have to at least fill one of the two first parameters.
    -Material: the material that is used for the part you want to edit, it's useful for those things that have a dedicated material considering that in some models for example you could have the hair model that is called in different ways across the models but has the same model, finding it through the material saves some time if the hair is not divided in multiple objects.
    -Patch: the name of the .mds patch you want to apply, it will have to be located in the parts folder in the tool path.
    -Subset: this is a value that indicates how many lines you have to cancel before your patch, most of the times it's either 0 or 1, 0 if you want to keep the original subset 1 if you want to use a  different subset, note that for the "test subset" function you'll have to set it to 1.
    If you want to only replace textures you just have to put your textures in the texture file, leave the parameters in replace.ini blank (like they are from the start), and start the tool on the amds you want to edit.
    The button tries to open the .ini file but you'll have to set a program to open it like notepad or notepad ++.

  7. The drop .fbx panel and repeat function act pretty much the same, the first one is a drag and drop panel that will take your patch in .fbx format and put a patch created with that in the patch folder, the "repeat" button will reload that same file you gave him earlier and refresh the patch, in this way you can edit the file and overwrite it all the times with the same name and update the patch quickly.

  8. The window will display all the amds that the tool is editing

  9.  The drop .amd panel is part of the test subset function, this is used to test various values for the subset, you first give the program your amd file with drag and drop, then (10) set the interval of numbers you want to test for the subset  (it's normally set from 0 to 50) and then hit "test subset" (11) for the replacements it will use the "replace.ini" instructions as the normal process does and the output .gmos will be located in the "SUBSETS" folder in the tool path. At the end the program will try opening the .gmo file so I suggest setting Noesis as the default program for .gmo files.

  10. The save path button can save a custom path for the files that will be stored.
  11. The replacement folder is used to do other replacements in the mds file, after adding the custom new strings to the folder the model will first check in the model if there is a line that is exactly the same as the first line of the replacement file, then replace all the section with the custom one, I've made it specifically for material replacement but it can be used in a number of different ways, so you should copy the material in a separate file, modify what you need except the name of the material (that wouldn't make much sense) and then replace it. 

Here is what you should do to create a patch:

  1. Get the amd file you want to edit, extract with Amicitia the gmo file and turn it into an mds with P4GModel converter (or GMOTool), then open it in Noesis and get the fbx without animations too.

  2. Open the fbx file in your 3d model editing software of choice and create the part you want to substitute in the original file, use the original to align the model in it's dimensions, rotation and location and always apply those parameters before exporting the fbx.


  3. At this point, you can save the fbx (export only the part that you want to modify and not the original model used for reference) and use the "drop .fbx" panel to create a patch that will be automatically put in the parts folder.

  4. Set the parameters in the "replace.ini" file with the help of the mds file to get the name of the material or the part (you can also get them from the original fbx model), for this first test set the subset to 0.

  5. Give the amd files folder to the software through the "input Amd files" function and set the output folders.

  6. Hit start, wait for it to finish (it can take a while if you go for a lot of models at once) and then open the output amd folder and check the results in noesis, I suggest doing this with only one file if it's the first try you make, to understand if the patch is in the correct location, size and rotation (to check the model i use Noesis and hit the f12 key to watch the T-pose model), if not tweak it in your software, save it on the previous attempt and just hit "repeat" to refresh the patch. 
    If the animation has problems but the T-pose model does not: the problem is with the subset, a value before the model data, that is correlated to how it will be animated, I am still quite far away from understanding it, that is why I just go with trial and error to find the right subset, I've made that quicker in this version.

  7. After finding the patch that matches the model in T-Pose set the replace.ini with that patch and the right material/part, then set the subset to 1 and drop the amd file you want to test in the "drop .amd" panel, set an interval of numbers (i usually go from 0 to 50 but you can do less) and it will create all the possible subset using the numbers you gave him, the results will be automatically opened and can be found in the SUBSETS folder in the tool, they will all have as a name "name of the amd"+"number used for the subset", after finding out what number you need (I'll call it x) just add to your patch the line: " BlendSubset 1 x" at the start and then to use it set the "subset" value to 1 and hit start.

  8. If you also want to delete a part of the model you can use the included "delete.mds" patch, which will need the subset to be set at 0.

If you'd like to land me a hand with my mod using this you're welcome cause I won't be completing it soon for sure.
HUGE thanks to shrine fox that gave me permission to use part of his code for some parts of my tool.