# Creating String Mods

<p class="callout info">See [Extracting Strings](https://wiki.eternalmods.com/books/beginners-guide-how-to-create-mods/page/extracting-strings) before proceeding.</p>

<p class="callout danger">Make sure to backup the unmodified **BLANG** file.</p>

<p class="callout success">Strings can be added to **BLANG** files, but you must reference them with **decls** files.</p>

### String Editing ( BlangJsonGeneratorUI )

- Extract the contents of **BlangJsonGenerator-\*.zip**.
- Open **BlangJsonGenerator.exe**, then go to **File** -&gt; **Open blang** **file...** to edit an existing BLANG file, or to **File** -&gt; **Open blang from .resources file** to edit a BLANG file contained in a .resources file. You can also go to **File** -&gt; **New...** to create a new BLANG JSON mod from scratch.
- You should now see something like this:

[![screenshot.png](https://wiki.eternalmods.com/uploads/images/gallery/2022-03/scaled-1680-/screenshot.png)](https://wiki.eternalmods.com/uploads/images/gallery/2022-03/screenshot.png)

- You may edit any string **Identifier** or **Text** you wish.
- To add a string, use the **+** button in the top-right corner.
- After modifying the strings go to **File** -&gt; **Save...** -&gt; Give it the same name as its original BLANG file, with the extension changed to JSON. (ex: **english.json**).
- Create the following folder directories in your **DOOMEternal\\Mods** folder:

**gameresources\_patch1\\EternalMod\\strings**

- Copy your **modified** JSON file into the strings folder.
- Run the **EternalModInjector** like normal.

### String Editing ( BlangJsonGenerator )

<p class="callout success">Any unused string can be **deleted**, so it can be **compatible** with other mods that affect other strings.</p>

- Create a backup for the string JSON file.
- Open the string JSON file. ( ex: **english.json** )
- The strings should be formatted like this:

[![image-1631218573399.png](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/scaled-1680-/image-1631218573399.png)](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/image-1631218573399.png)

- If they are not, see the [Extracting Strings](https://wiki.eternalmods.com/books/beginners-guide-how-to-create-mods/page/extracting-strings) page, under **Extraction Instructions: ( BlangJsonGenerator )**
- Go to the Replace tab (CTRL + F) -&gt; Replace -&gt; Search Mode: Check **Regular expression**
- Input the following and select **Replace All** for each:

[1) ![image-1631217604007.PNG](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/scaled-1680-/image-1631217604007.PNG)](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/image-1631217604007.PNG)  
**"identifier":**  
**"name":**

<p class="callout info">The "**Replace with :** " box is empty for screenshot 2.</p>

[2) ![image-1631217614687.PNG](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/scaled-1680-/image-1631217614687.PNG)](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/image-1631217614687.PNG)  
**"modified": 0**

<p class="callout info">The "**Replace with :** " box is empty for screenshot 3.</p>

[3) ![image-1631217622425.PNG](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/scaled-1680-/image-1631217622425.PNG)](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/image-1631217622425.PNG)  
**^(?:\[\\t \]\*(?:\\r?\\n|\\r))+**

- The results should be formatted like this:

[![image-1631218052834.png](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/scaled-1680-/image-1631218052834.png)](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/image-1631218052834.png)

- The JSON file is now in a format that can be properly re-injected into DOOM Eternal.  
    Save a backup of this JSON file as well, so you would not need to go through this process again   
    (before the next DOOM Eternal update).
- Find the strings that you wish to modify. (CTRL + F)
- After modifying the strings of your choice, delete all other **unmodified** strings.
- Save your **modified** JSON file with the same name as it was exported. ( ex: **english.json** )
- Create the following folder directories in your **DOOMEternal\\Mods** folder:

**gameresources\_patch1\\EternalMod\\strings**

- Copy your **modified** JSON file into the strings folder.
- Run the **EternalModInjector** like normal.

<p class="callout info">The commas "," at the end of each string name and text are unnecessary and can be deleted.  
However, they do not impact the syntax in any way.</p>

<p class="callout success">Since JSON files can be edited with raw text editors,   
you can execute scripts or [regular expressions](https://en.wikipedia.org/wiki/Regular_expression) to edit strings more efficiently.</p>

### String Editing ( BlangParser )

<p class="callout danger">The entire **BLANG** file will be modified, which means it will be **incompatible** with other string mods.</p>

- Extract the contents of **BlangEditorv#.#.zip**
- Open **BlangEditor.exe** you should be prompted with the following:

[![image-1631220049230.PNG](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/scaled-1680-/image-1631220049230.PNG)](https://wiki.eternalmods.com/uploads/images/gallery/2021-09/image-1631220049230.PNG)

- You may edit any string **Identifier** or **Text** you wish.
- Upon highlighting a string line, you may select the **DELETE** key to remove it.
- To add a string, scroll down to the bottom of the list and add your own **Identifiers** and **Text** lines.
- After modifying the strings go to **File** -&gt; **Save As...** -&gt; Give it the same name as its original BLANG file.   
    (ex: **english.blang**)
- Create the following folder directories in your **DOOMEternal\\Mods** folder:

**gameresources\_patch1\\strings**

- Copy your **modified** BLANG file into the strings folder.
- Run the **EternalModInjector** like normal.

<p class="callout warning">It is not recommended to delete existing string lines because DOOM Eternal will fail to recognize them.</p>