Skip to content

Commit 4c99bf3

Browse files
committed
refining locals
1 parent 139f03d commit 4c99bf3

File tree

1 file changed

+49
-34
lines changed

1 file changed

+49
-34
lines changed

docs/modding/suitmodding/addinglocals copy.mdx

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,23 @@ import Tooltip from './tooltip';
1919
/>
2020
throughout the tutorial to explain any tricky terms as you encounter them.
2121

22-
<Tooltip text={<><strong>Key terms</strong><span className="icon-alert"></span></>} tooltip="These will need the most attention" /> are marked with an exclamation icon when they're necessary. <Tooltip text={<italics>Hover over almost any</italics>} tooltip="almost" /> **bold** term for a quick explanation. Highlighted terms become easier to understand over the course of the tutorial.
22+
<Tooltip text={<><strong>Key terms</strong><span className="icon-alert"></span></>} tooltip="These will need the most attention" /> are marked with an exclamation icon when they're first introduced. <Tooltip text={<italics>Not everything</italics>} tooltip="like this one" /> in **bold** is a tooltip. Keyterms become easier to understand over the course of the tutorial.
2323

2424
>Explore the tooltips as needed for clarification
2525
:::
2626
</details>
2727

2828
### **1. Finding Your LOCR**
2929
*We first need to locate where the text files are using their 'unique identifiers' called a* <Tooltip text={<><strong>HASH</strong><span className="icon-alert"></span></>} tooltip="A unique identifier that acts as the address or coordinates for a game file." />.
30+
<details>
31+
32+
<summary>Help: HASH?</summary>
3033

31-
>It's an assembly path (ring any bells?) that's been converted into code.
34+
>Hashes are basically assembly paths converted into code.
3235
36+
They are the specific addres of a game file and are easier to work with because of their size compared to full assembly paths.
37+
38+
</details>
3339
*Let's find the text by locating where it's stored:*
3440
#### Identify your LOCR
3541
Below are some of the <Tooltip text={<strong>HASH</strong>} tooltip="A unique identifier that acts as the address or coordinates for a file." /> for the suits:
@@ -46,7 +52,7 @@ import Tooltip from './tooltip';
4652
<details>
4753
<summary>**Advanced search guide**</summary>
4854

49-
*This guide will learn you how to find any text inside their respective LOCR files*
55+
*This guide will teach you how to find ***any text*** with their respective LOCR files*
5056

5157

5258
1. Click on the <Tooltip text={<><strong>Advanced Search Tab</strong><span className="icon-alert"></span></>} tooltip="A tab in GlacierKit for performing extended searches. It has a magnifying glass icon and, is like all other tabs, on the left side." />
@@ -117,15 +123,16 @@ Example of a Suit's Name line in a LOCR File:
117123
```
118124
- The **string**: `989928F2-06D6-42F3-871A-353F07DEF969_LEGACY_HERO_BLOODMONEYSUIT_M_HPA2293_NAME_`
119125
- The **text**: `Blood Money Suit`
126+
>Each text you see in game are hold by these "strings" just like the HASHes for game files. They are their 'unique identifiers'
120127
</details>
121128
122129
---
123130

124131
### **3. MANIFESTING OUR TEXT**
125-
*We will recreate the structure of a LOCR file in the manifest to replace the text*
126-
>Want to dive deeper into how that works? See the LOCR breakdown below.
132+
*Now, we will recreate the structure of the LOCR file in the manifest to replace the text in game*
133+
>Want to dive deeper into how that works? See the breakdown below.
127134
<details>
128-
<summary>LOCR breakdown</summary>
135+
<summary>*LOCR breakdown*</summary>
129136
130137
Let's take a closer look at a simplified LOCR file to understand how it's set up:
131138

@@ -160,12 +167,12 @@ Looking carefully at the Syntax of a LOCR file, we can see:
160167
>*We will recreate this structure in the manifest to replace the text, similar to how we handled blobsfolders.*
161168
162169
</details>
163-
- **Open Your Manifest**: Navigate to your manifest file.
170+
- **Open Your Manifest**: Navigate to your manifest file from the 'Files' Tab in GlacierKit
164171
- Add this line: `"localisationOverrides": {}`
165172
>Either copy it or type it in manually
166173
167174
:::tip using "suggestions"
168-
*Learn to use the* <Tooltip text={<><strong>suggestions feauture</strong><span className="icon-alert"></span></>} tooltip="This feauture is only supported in Glacierkit or in VS code with a schema." />.
175+
*Learn to type with the* <Tooltip text={<><strong>suggestions feauture</strong><span className="icon-alert"></span></>} tooltip="This feauture is only supported in Glacierkit or in VS code with a schema." />.
169176
>Suggestions will show up as soon as you type a **quote** `"`
170177
171178
It will auto-complete most of the tedious functions in the steps to follow like:
@@ -177,7 +184,7 @@ It will auto-complete most of the tedious functions in the steps to follow like:
177184

178185

179186
:::
180-
- Add your LOCR HASH and a language array:
187+
- Add your <Tooltip text={<strong>LOCR HASH</strong>} tooltip="The code that appeared on top when you clicked on the LOCR File" /> and a language array:
181188
```json
182189
"localisationOverrides": {
183190
"yourLOCRhash": {
@@ -208,16 +215,19 @@ It will auto-complete most of the tedious functions in the steps to follow like:
208215
*We can't use a string directly in the manifest before we convert it into a* <Tooltip text={<><strong>decimal number</strong><span className="icon-alert"></span></>} tooltip="A string converted into a numeral form" />
209216

210217
To do that, you first have to:
211-
- **Open the** <Tooltip text={<><strong>Text Tools tab</strong><span className="icon-alert"></span></>} tooltip="A tab in GlacierKit that provides tools for converting text and hashes for game modifications." />:
218+
- **Open the** <Tooltip text={<><strong>Text Tools tab</strong><span className="icon-alert"></span></>} tooltip="A tab in GlacierKit that provides tools for converting text and hashes for game modifications." />
212219
- **Paste Your String**:
213220
>Use the <Tooltip text={<><strong>Localisation Hash Calculator</strong><span className="icon-alert"></span></>} tooltip= "A tool that converts your string into a format the manifest can use, generating both hex and decimal codes." /> box to convert the string.
214221
215-
- **Copy the** <Tooltip text={<strong>Decimal number</strong>} tooltip="A string converted into a numeral form" />: You'll have to use this instead of the long string.
216-
- **Add decimal and New Text**: Return to your manifest and paste the new decimal with your custom text.
222+
- **Copy the Decimal number**: You'll have to use this instead of the long string.
223+
217224
:::tip Clipboard
218225
Use <Tooltip text={<strong>Windows clipboard</strong>} tooltip="A built-in tool that stores multiple copied items." /> (`Windows + V`) to keep track of multiple copied code simultaneously.
219226
>*Try making it a habit to paste using `Windows + V` instead of `Ctrl + V`.*
220227
:::
228+
229+
- **Add decimal and New Text**: Return to your manifest and paste the <Tooltip text={<strong>new decimal</strong>} tooltip="A string converted into a numeral form" /> with your custom text.
230+
221231
Result:
222232
```json
223233
"localisationOverrides": {
@@ -228,14 +238,16 @@ Result:
228238
}
229239
}
230240
````
231-
>Next up you can save and deploy your mod in SMF
232-
Done
241+
Next up you can:
242+
- Save the manifest
243+
- and deploy your mod in SMF!
244+
>In that order
233245

234246
:::tip Succes
235-
*Looking good, man!*
247+
*<Tooltip text={<italic>Looking good, man!</italic>} tooltip="Looking good!"/>*
236248

237-
We the best, next time the lorem ipsums
238-
>The steps below are optional but recommended for a more complete mod.
249+
You’ve successfully replaced the suit name and description in the game with your own custom text. Now, when you load up the game, your new text will appear in place of the default one.
250+
>The steps below are optional but recommended for a more complete mod.
239251
:::
240252

241253

@@ -247,11 +259,11 @@ We the best, next time the lorem ipsums
247259

248260
### 4. (Optionally) Change the Description
249261

250-
*To replace the description of your suit:*
262+
*To replace the description of your suit as well:*
251263

252-
- Head back to your LOCR file
253-
- Find and convert <Tooltip text={<strong>the string of suit's description</strong>} tooltip="Usually right below the string of your suit's name" />
254-
- add the <Tooltip text={<strong>decimal</strong>} tooltip="A string converted into a numeral form" /> to your manifest.
264+
- Head back to your <Tooltip text={<strong>LOCR File</strong>} tooltip="A file that holds game text in different languages, linked by unique 'strings'." />
265+
- Find and convert <Tooltip text={<strong>the string of suit's description</strong>} tooltip="Usually right below the string of your suit's name" /> using Text Tools
266+
- add the new <Tooltip text={<strong>decimal</strong>} tooltip="A string converted into a numeral form" /> to your manifest.
255267
>Full example of a suit mod:
256268
```json
257269
"localisationOverrides": {
@@ -268,16 +280,16 @@ We the best, next time the lorem ipsums
268280
<details>
269281

270282

271-
<summary>More language</summary>
283+
<summary>More language Support</summary>
272284

273285
### 5. (Optionally) Add more languages
274286
#### Same Strings:
275-
*Strings* are the same in each <Tooltip text={<><strong>language array</strong><span className="icon-alert"></span></>} tooltip="A single language array in a LOCR file consisting of strings" />
276-
>*This will make adding languages for each entry very easy.*
287+
To have your mod support more languages for users, you will need to make new <Tooltip text={<><strong>language arrays</strong><span className="icon-alert"></span></>} tooltip="A single language array consisting of strings holding text" />
288+
277289

278290

279-
To have your mod support more languages, simply:
280-
- make another <Tooltip text={<strong>language bracket</strong>} tooltip="A single language array that can contain multiple entries of strings each attached to text you see in-game" />
291+
To add more languages, simply:
292+
- make another <Tooltip text={<strong>language bracket</strong>} tooltip="A single language array that can contain multiple entries of strings" />
281293
- add the <Tooltip text={<strong>same decimal</strong>} tooltip="A string converted into a numeral form" /> with your text
282294

283295

@@ -295,13 +307,15 @@ Example of a new language line:
295307
}
296308
}
297309
```
310+
>***Strings*** *are the same in each language array, making adding languages very easy in the manifest as well.*
298311
299-
:::info language codes
312+
:::warning language codes
300313
- The reason why `french` is used here and not `français` is because the manifest's <Tooltip text={<strong>schema</strong>} tooltip="A structure used to validate and provide auto-completion for your manifest, helping you write error-free code." /> is coded in English.
301314
- As for why it doesn't use the same <Tooltip text={<strong>language codes</strong>} tooltip="The language identifiers in each language array of a LOCR file" /> as the actual <Tooltip text={<strong>LOCR Files</strong>} tooltip="A file that holds game text in different languages, linked by unique 'strings'." /> like `en` or `fr`, is because the manifest's schema is coded like that.
302315

303-
To see how all languages have to be written down in the <Tooltip text={<strong>manifest</strong>} tooltip="A file in your mod folder that holds important information and can execute code" />, see the <Tooltip text={<strong>documentation in SMF</strong>} tooltip="It's the book icon on the left after enabling developer mode." />.
304-
Or *expand below*
316+
To see how all languages have to be written down in the manifest, see the
317+
- <Tooltip text={<><strong>documentation in SMF</strong><span className="icon-alert"></span></>} tooltip="It's the book icon on the left after enabling developer mode in SMF." />.
318+
- Or *expand* the tab below
305319
<details>
306320
<summary>All languages Codes</summary>
307321

@@ -326,16 +340,17 @@ Or *expand below*
326340

327341

328342
<details>
329-
<summary>More locr?</summary>
343+
<summary>More LOCR files</summary>
330344
### Adding More LOCR Files
331345

332346
*If you need to modify more* <Tooltip text={<strong>LOCR Files</strong>} tooltip="A file that holds game text in different languages, linked by unique 'strings'." />:
333347

334-
1. **Insert a Comma**: After your previous <Tooltip text={<strong>LOCR Array</strong>} tooltip="an array in the manifest resembling the game's LOCR file syntax" /> in the <Tooltip text={<strong>manifest</strong>} tooltip="A file in your mod folder that holds important information and can execute code" />.
335-
2. **Repeat [the steps from start](#1-identify-your-locr)** (or continue here)
336-
2. **Add a New** <Tooltip text={<strong>LOCR Array</strong>} tooltip="an array in the manifest resembling the game's LOCR file syntax" />: Use the same structure, making sure to follow the <Tooltip text={<strong>syntax rules</strong>} tooltip="A set of rules that define how code is written and organized." />.
348+
1. **Insert a Comma** after your previous <Tooltip text={<><strong>LOCR Array</strong><span className="icon-alert"></span></>} tooltip="an array in the manifest resembling the game's LOCR file" /> in the manifest
349+
2. **Repeat [the steps from start](#1-finding-your-locr)** (or continue here)
350+
2. **Add a New LOCR Array**: Add your LOCR's <Tooltip text={<strong>HASH</strong>} tooltip="A unique identifier that acts as the address or coordinates for a file." /> and make new language array(s) as needed
337351
3. <Tooltip text={<strong>Repeat the Conversion</strong>} tooltip="Using the Localisation Hash calculator" />: Use <Tooltip text={<strong>Text Tools</strong>} tooltip="A tab in GlacierKit that provides tools for converting text and hashes for game modifications." /> again to convert any new <Tooltip text={<strong>strings</strong>} tooltip= "A key that links to text in the LOCR File" /> into <Tooltip text={<strong>decimals</strong>} tooltip="A string converted into a numeral form" />.
338-
4. **Update the** <Tooltip text={<strong>manifest</strong>} tooltip="A file in your mod folder that holds important information and can execute code" />: Add the new language entries, keeping everything consistent.
352+
4. **Update the** <Tooltip text={<strong>manifest</strong>} tooltip="A file in your mod folder that holds important information and can execute code" />: Add the new decimals and your new text.
353+
>Remember the<Tooltip text={<strong>syntax rules</strong>} tooltip="A set of rules that define how code is written and organized." /> and to keep your manifest clean and organized to avoid errors.
339354
340355
Example of every aspect from this tutorial applied:
341356
```json

0 commit comments

Comments
 (0)