You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modding/suitmodding/addingparts.md
+30-23
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,13 @@ For this tutorial, we will go over patching new parts to an outfit, like a hat o
9
9
10
10
- Start with an outfit we want to modify
11
11
- Find something interesting to add to it
12
-
- Open the outfit's entity with QuickEntity Editor and add the new pieces
12
+
- Open the outfit's entity with GlacierKit and add the new pieces
13
13
- Package it all up in an SMF mod
14
14
15
15
Before continuing, please make sure you have all the tools in the [requirements](.) section. Ideally, you should get your feet wet with [basic retexturing](basicretexture.md) first to acclimate yourself to these tools.
16
16
17
+
And make sure you have enabled the **developer mode** in Simple Mod Framework. To do this, open Simple Mod Framework, click **More information**, and then **Enable developer mode**. This will come with a few benefits, such as being able to edit the mod manifest directly in SMF, and access to SMF's internal documentation. You can consult the docs by clicking the book icon on the left in SMF.
18
+
17
19
## Find a Suit to Modify
18
20
19
21
We will once again consult [HMBM47's Outfit Spreadsheet](https://docs.google.com/spreadsheets/d/e/2PACX-1vRDiyiqdRebu0Olvvkr20CDhh6ANxu7FOQZ_O-1YHFN9e6kh0WmpbwDYbfgzevSvc3fO4_4Exu1fmQH/pubhtml#) for this. Bookmark it, if you haven't! For this tutorial, we will be modifying the Absolution Suit with Gloves.
@@ -22,13 +24,19 @@ Click the tab **chunk0 47 Base Suits** in the spreadsheet and find the **Absolut
22
24
23
25
## Decide What to Add
24
26
25
-
Finding accessories, clothing, and so on to use in your outfits can be as easy as finding an outfit in the game, sussing out what it's called in the RPKG tool, and opening its `TEMP` with QuickEntity Editor. From there, you can simply copy and paste the part entity to your own outfit. You can also look for the raw models (so-called `PRIM` files) in the RPKG tool.
27
+
Finding accessories, clothing, and so on to use in your outfits can be as easy as finding an outfit in the game, searching for it in GlacierKit and opening its `TEMP`. From there, you can simply copy and paste the part entity to your own outfit. You can also look for the raw models (so-called `PRIM` files) in the RPKG tool.
26
28
27
29
However, that is a little advanced for your first time, so for this tutorial, we will be adding a pair of sunglasses to the Absolution Suit. The easiest way to do that would be to copy and paste from another outfit. We will be using the Italian Suit's sunglasses. Look in the outfit spreadsheet again for the Italian Suit; its `TEMP` is `00444A5FE5DDA137`.
28
30
29
31
## Open the Source Outfit
30
32
31
-
First, we will be opening the Italian Suit to copy its sunglasses entity so we can paste it onto the Absolution suit. Open QuickEntity Editor, and click **Load** -> **Load entity from game**. Then, paste in the Italian Suit's `TEMP` hash, click Load, and wait a moment while the editor extracts the relevant files.
33
+
Firstly let's set up our project. We have already explained how to set up a mod project in the [previous chapter](basicretexture.md), but we will reiterate it here to make sure it sticks. Navigate to your Simple Mod Framework folder and open the `Mods` folder. Create a new folder in here called **MyName.AbsoSuitGlasses**. *(Good convention suggests that you name your mod folders with your username, a period, and the mod's name, no spaces.)* Go into this folder and create a folder called **content**. In the content folder, create a new folder called **chunk0**. All the game's assets are segmented into chunks, it's not important to know right now but if you are curious you can [see this article](../../glacier2/chunkdata.md).
34
+
35
+
To recap, that folder structure is MyName.AbsoSuitGlasses ➡ content ➡ chunk0.
36
+
37
+
With GlacierKit started, we will need to select this mod folder. Click the big button labeled **Select a project**. Navigate to the **MyName.AbsoSuitGlasses** folder you just made and select it.
38
+
39
+
Now, we will be opening the Italian Suit to copy its sunglasses entity so we can paste it onto the Absolution suit. Go to the **Game content** tab, second from the top that looks like a box. Then, paste in the Italian Suit's `TEMP` hash in the search bar - `00444A5FE5DDA137` - and hit enter. In the tree you will find `outfit_agent47_sapienza_heroa_v0.entitytemplate`, buried in a bunch of folders. Click it and you will see a bunch of information about it. Click the **Open in editor** button.
32
40
33
41
In the tree, expand the parent entity named `OUTFIT_Agent47_Sapienza_HeroA_V0`. We're looking for the sunglasses, which can be found lower in the tree. In this case, the entity is named `Part_Glasses`. By clicking on it, the entity's details will appear in the right tab, like this:
34
42
@@ -58,27 +66,25 @@ As you can see, this is a very simple and straight-forward entity with only two
58
66
59
67
Nice, this is what we're looking for.
60
68
61
-
Right-click Part_Glasses in the tree and mouse over **Clipboard**. Click **Copy Entity**. The whole entity is now in your clipboard, and you can paste it into any text editor if you want to save it for later.
69
+
Right-click Part_Glasses in the tree and mouse over **Clipboard**. Click **Copy**. The whole entity is now in your clipboard, and you can paste it into any text editor if you want to save it for later.
62
70
63
71
## Open the Destination Outfit
64
72
65
-
Now, let's load the Absolution Suit entity. Click **Load** -> **Load entity from game** and enter the Absolution Suit's `TEMP`, `0075CC9E284E3236`.
73
+
Now, let's load the Absolution Suit entity. In the game content search bar to the left, enter the Absolution Suit's `TEMP`, `0075CC9E284E3236` and hit enter. Click `outfit_agent47_absolution_gloves_heroa_v0.entitytemplate` in the search results and then click **Open in editor**. The entity will be opened as a new tab.
66
74
67
-
With the Part_Glasses entity you copied in your clipboard, right-click the root entity `OUTFIT_Agent47_Absolution_Gloves_HeroA_V0`, mouse over **Clipboard** and click **Paste Entity**. Expand the entity and look in the tree, and you should now see Part_Glasses further down.
75
+
With the Part_Glasses entity you copied in your clipboard, right-click the root entity `OUTFIT_Agent47_Absolution_Gloves_HeroA_V0`, mouse over **Clipboard** and click **Paste**. Expand the entity and look in the tree, and you should now see Part_Glasses further down.
68
76
69
77
There is one final step before we're done. The root entity has an array of body parts that it should render. We'll need to add the sunglasses to this array for the body part to show up in-game.
70
78
71
-
Right-click Part_Glasses and click **Copy ID**. Now, click the root entity `OUTFIT_Agent47_Absolution_Gloves_HeroA_V0` and scroll down until you find `m_aBodyParts`. Here, you will find all the body part pieces the outfit is made of. 47's head, hands, jacket, pants, shoes, etc. Add a comma to the last body part, press enter to make a new line, and paste in the ID of the Part_Glasses entity that you just copied. Make sure it's enclosed in quotes like all the others. Finally, ensure it says _Valid entity_ just above the editing panel and not _Invalid JSON_.
79
+
Right-click Part_Glasses and click **Copy ID**. Now, click the root entity `OUTFIT_Agent47_Absolution_Gloves_HeroA_V0` and scroll down until you find `m_aBodyParts`. Here, you will find all the body part pieces the outfit is made of. 47's head, hands, jacket, pants, shoes, etc. Add a comma to the last body part, press enter to make a new line, and paste in the ID of the Part_Glasses entity that you just copied. Make sure it's enclosed in quotes like all the others. Finally, ensure it says _Valid entity_ just above the editing panel and not _Invalid entity_.
72
80
73
-
Now that the sunglasses body part is in the array, click **Save as** -> **Save as patch file**. Name it something like `absolution_glasses.entity.patch.json` and save it to your disk. Next, we will make an SMF mod to apply it to our game.
81
+
Now that the sunglasses body part is in the array, click the diskette save button on the Absolution suit entity's tab. Navigate to your **content** and then **chunk0** folder. Name the file `absolution_glasses` and save it.
74
82
75
83
## Make Our SMF Mod
76
84
77
-
We have already explained how to create a basic SMF mod in the [previous chapter](basicretexture.md), but we will reiterate it here to make sure it sticks.
78
-
79
-
First, navigate to your Simple Mod Framework folder and open the `Mods` folder. Then, create a new folder in here called **Absolution Suit with Glasses**. Enter the folder.
85
+
In GlacierKit, click the **Files** tab to the left, at the very top. Right click the **MyName.AbsoSuitGlasses** folder and click **New File**. Call it **manifest.json** and hit enter. Click the file to open it.
80
86
81
-
Make a new file called **manifest.json** in the folder and populate it with the following info:
87
+
Paste the following info into it. If GlacierKit asks for permission to access your clipboard, click **Allow**.
82
88
83
89
```json
84
90
{
@@ -87,49 +93,50 @@ Make a new file called **manifest.json** in the folder and populate it with the
87
93
"name": "Absolution Suit with Glasses",
88
94
"description": "Makes the Absolution Suit much cooler.",
89
95
"authors": ["My Name"],
90
-
"frameworkVersion": "2.33.4",
96
+
"frameworkVersion": "2.33.18",
91
97
"version": "1.0.0",
92
98
"contentFolders": ["content"]
93
99
}
94
100
```
95
101
96
102
:::tip VSCode Schema
97
103
98
-
If you edit the manifest with Visual Studio Code (VSCode), it will use the schema you imported with the first line to help you validate your manifest. That is, if you make any errors or write anything invalid, VSCode can point it out to you. This is why we first recommend VSCode as an editor.
104
+
If you edit the manifest with GlacierKit or Visual Studio Code, they will use the schema you imported with the first line to help you validate your manifest. That is, if you make any errors or write anything invalid, the editor can point it out to you. This is why we first recommend VSCode or GlacierKit as editors.
99
105
100
106
:::
101
107
102
-
`frameworkVersion` is the version of the framework you are currently using. At the time of writing, the latest version is 2.33.4.
108
+
`frameworkVersion` is the version of the framework you are currently using. At the time of writing, the latest version is 2.33.18.
103
109
104
110
`contentFolders` in the manifest tells Simple Mod Framework what folders will be used for mod content.
105
111
106
-
Next, create a new folder called **content**, and open it. From inside the content folder, create a new folder called **chunk0**. If you want to know more about chunks, [please see this article](../../glacier2/chunkdata.md). Enter the chunk0 folder and move your mod file there. That way, when all is said and done, this should be the tree structure of your mod:
112
+
When all is said and done, this should be the tree structure of your mod:
107
113
108
114
```
109
-
📁Absolution Suit with Sunglasses
115
+
📁MyName.AbsoSuitGlasses
110
116
├── 📁content
111
117
│ └── 📁chunk0
112
118
│ └── absolution_glasses.entity.patch.json
113
-
└── manifest.json
119
+
├── manifest.json
120
+
└── project.json
114
121
```
115
122
116
123
That's all we need. Next, start Simple Mod Framework and click **Enable/disable mods**. From there, you'll want to find your mod in the list under Available mods and click **Enable**, then **Apply**, and watch it work for a minute. When it's done, close Simple Mod Framework and start up the game.
117
124
118
125
Go into pre-planning at any level you like and choose the Absolution Suit with Gloves. Finally, start the level, and if you did everything right, the fruits of your labor should be before your eyes!
119
126
120
-

127
+

121
128
122
129
And that is how to patch an outfit to add new body parts. Of course, as you can also remove body parts, the combination of these principles is the foundation for composing entirely new outfits. We will soon go over the best practices for making new and exciting outfits.
123
130
124
131
## Addendum
125
132
126
-
If you have any doubts or difficulties with adding certain things to your outfits, the best question you can ask is, _"how are IOI doing it?"_ You can learn a lot by opening `TEMP` files in QuickEntity Editor and studying the makeup of the outfit. Do not be afraid to open the RPKG Tool, search for an outfit, and study any `TEMP` files you find.
133
+
If you have any doubts or difficulties with adding certain things to your outfits, the best question you can ask is, _"how are IOI doing it?"_ You can learn a lot by opening `TEMP` files in GlacierKit and studying the makeup of the outfit. Do not be afraid to open the game content tab, search for an outfit, and study any `TEMP` files you find.
127
134
128
-
Something else you can do is open RPKG Tool and search for `PRIM` files named after articles of clothing, such as jacket, shirt, pants, shoes, etc. From there, you can select a `PRIM` that seems interesting, and in the 3D Viewer tab, you can see what the clothing looks like, and if you want to incorporate it into an outfit, you can see how IOI implemented the model by looking at the reverse hash depends in the Details tab. Under the reverse hash depends, you should see a list of `TEMP` outfit files. By opening any of them in QuickEntity Editor and looking in the tree, you can find the clothing's entity.
135
+
Something else you can do is open RPKG Tool and search for `PRIM` files named after articles of clothing, such as jacket, shirt, pants, shoes, etc. From there, you can select a `PRIM` that seems interesting, and in the 3D Viewer tab, you can see what the clothing looks like, and if you want to incorporate it into an outfit, you can see how IOI implemented the model by looking at the reverse hash depends in the Details tab. Under the reverse hash depends, you should see a list of `TEMP` outfit files. By opening any of them in GlacierKit and looking in the tree, you can find the clothing's entity.
129
136
130
-
In seasons 2 and 3 of Hitman, IO switched to a more templated model of building outfits. Rather than having a body part entity in the outfit pointing to a model, they will usually have an entity pointing to, say, a jacket template, which contains the model, cloth collisions, materials, and many other things, all in one, to streamline their development of outfits.
137
+
In seasons 2 and 3 of Hitman, IO switched to a more templated model of building outfits. Rather than having a body part entity in the outfit pointing to a model, they will usually have an entity pointing to a jacket template, which contains the model, cloth collisions, materials, and many other things, all in one, to streamline their development of outfits.
131
138
132
-
It is also worth mentioning that seasons 2 and 3 have a different skeleton compared to season 1. So, introducing models from season 1 to an outfit built on a season 2 or 3 skeleton, or vice versa, will look completely bizarre and broken. There are ways to get around that by recompiling the model with a new skeleton, but that is for advanced users and will be covered in a suffix chapter.
139
+
It is also worth mentioning that seasons 2 and 3 have a different skeleton compared to season 1. So, introducing models from season 1 to an outfit built on a season 2 or 3 skeleton, or vice versa, will look completely bizarre and broken. There are ways to get around that by converting the model to a new skeleton with [Rebone](../../rebone.md), but that is for advanced users.
133
140
134
141
And one final note on `PRIM` files: any body parts that you put into your outfit **must be in chunk0** or the game will experience crashes. You can read more about how chunks work [here](../../glacier2/chunkdata.md), but the gist of it is that anything you can wear in a starter suit needs to be in chunk0 for the game to be able to use it on all maps. If you find a model that you really, really want to use for an outfit that just isn't in chunk0, there's still hope. You simply need to add a `dependencies` key to your manifest that tells SMF to move that file to chunk0 when you apply the mod. You just need to add all the hashes you want to move, like this:
0 commit comments