Mix N’ Match Character Outfit Pieces

Hogwarts Legacy Mods |

Mix N’ Match Character Outfit Pieces

Python script to help modders create mods which mix and match different outfit pieces, along with an example mod generated with the script (and Tangerie’s JSON2DA loader).

IMPORTANT NOTE: To use my Python script to generate mods, I am assuming that you already have Fmodel and a custom UE project for Hogwarts Legacy all set up properly. The Python script I included here is meant more to help modders who are already somewhat familiar with modding Hogwarts Legacy, have Fmodel and UE properly set up already, and want a quick way to make new outfit combinations. I posted this mod here since I figured everyone could at least enjoy the sample mod I made using this script.

The sample mod here uses textures from my silky tights mod ( https://www.hogwartslegacymod.com/silky-tights/ ), so it requires that mod to work.

To install the sample mod:
– Grab z_104_silky_sheer_tights_P UTOC/UCAS/PAK (chunk 104) and one of the color UTOC/UCAS/PAK (chunk106) from https://www.hogwartslegacymod.com/silky-tights/, but do NOT grab chunk105 (e.g., do NOT install z_105_no_sock_overrides_in_outfit_DAs_P).
– Install z_105_mix_n_match_outfit_pieces_P UTOC/UCAS/PAK from this mod.

The rest of this guide pertains to using my Python script to quickly generate your own custom outfit mods, and assumes you are already relatively familiar with at least the basics of modding Hogwarts Legacy (e.g., the custom Fmodel, the custom UE project, etc.):

My Python script allows you to combine pieces from different outfits and set them into any outfit you want. I’ve attached the script and a mod that I generated using the script.

This mod also illustrates the procedure for using my silky tights mod with any custom data assets (DAs) you want, such as the ones I created in this mod.

To use the Python script to make your own custom outfits, first extract the outfit data assets using Fmodel ( https://github.com/LongerWarrior/FModel ), where the data assets are in Phoenix\Content\Data\GearAppearances\Outfit .

You may also want to extract all the outfit icons in Content\UI\Icons\Gear , so that you can see which outfit corresponds to each outfit number.

You will then need to edit the Python script as follows:
# Set the JSON path to extracted outfit JSONs from Fmodel.
# Set the source pieces you want to go into outfit number target_idx in src_outfits[target_idx]
# You can set a given src piece into multiple targets
# Any pieces not specified will use the original piece from the target.
# If src_outfits[target_idx] isn’t specified, then I won’t generate a new JSON for that target_idx
#
# EXAMPLE 1: To overwrite outfit #72 to have Upper from outfit100, Lower from outfit82, Socks from outfit51, Shoes from Outfit2, specify:
# src_outfits[72] = {‘Upper’: 100, ‘Lower’: 82, ‘Socks’:51, ‘Shoes’:2}
#
# EXAMPLE 2: To overwrite all female outfits to have the socks from outfit 51:
# for target_idx in all_valid_female_outfits:
# src_outfits[target_idx] = {‘Socks’: 51}
#
# Flags:
# – add_missing_pieces_to_target[target_idx] controls whether to add a piece to the target in target_idx if that target doesn’t already have it
# – Set to False to skip copying over any pieces not already in the target
# – Set to True to append the piece to the target if it’s not already there
# – I originally set all of these to False by default
#

Run the script, which will create the modified target JSONs for each target_idx specified in src_outfits, and will place the modified JSONs in a ‘Modded’ sub-directory

Note that if you want your custom data assets to be compatible with my silky tights mod ( https://www.hogwartslegacymod.com/silky-tights/ ), be careful not to overwrite the Socks piece with the original game’s sock textures and parameters.

After running my Python script, you will have JSON files with the outfits you specified. Import these into UE using the batch import script or individual import script here: https://github.com/Tangerie/Json2DA


Credits: peek6
This content was uploaded by website visitors. If you notice any mistake, please let us know.


Useful Information: How to install Hogwarts Legacy Mods | Hogwarts Legacy System Requirements | About Hogwarts Legacy Game

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *