Creating Main Map Riftgates

How To Add Riftgates to the Main Map

Hopefully this will be clear enough to show how to create new riftgates on the main map. For this exercise, I will use as an example creating a riftgate near the Dermapteran Queen’s lair near Homestead. Also, this is broken up into multiple posts in order to have a less overwhelming wall of text effect.

Acknowledgement. In many respects this updates/fleshes out WareBare’s tutorial on this subject - from my experience doing this I think the process has changed a bit but without his tutorial and Elfe’s World Editor tutorial I would not have been able to figure it out before getting too frustrated and giving up.

1.1 Assumed knowledge. It is assumed the reader :

  1. Knows how to extract the game files and decompile the world file.

  2. Knows where said files reside

  3. Knows how to create a new mod to do this.

  4. Has some basic familiarity with the Asset Manager and World Editor.

  5. Knows the directory in which Grim Dawn/mod tools live - Right clicking on the Grim Dawn shortcut then clicking on ‘Properties’ will give that info.

    If you do not possess this knowledge in steps 1-4 read the Grim Dawn Modding Guide that comes with the game, and the tutorials in this forum to get up to speed on that stuff. Also just start the programs & see what they look like.
    General philosophical note : I like to conform to the naming conventions used by the devs, as will be seen below. Also, I use the default working directories and work offline.

1.2 Notation/acronyms, etc.

{Grim Dawn} The directory in which Grim Dawn and all the .exes for the tools live.
my_mod - The directory in which the mod is being created; i.e. {Grim Dawn}\mods\my_mod.
{Menu}->{Menu Item} This means 'Click Menu, then click {Menu Item}.

BEFORE YOU CHANGE ANYTHING make a backup copy of the map source files and the files in my_mod\database\records\ui\riftgatemap\locations

2.0 Creating the .dbr and .txt files for the Riftgate

NOTE : for creation of these files, I use Notepad++ since I’m going to copy existing files and edit them. IMHO it’s easier than using the editor in Asset Manager.

As WareBear noted, doing this requires the new riftgate dbr files exist in both {Grim Dawn}\database\records\ui\riftgatemap\locations and my_mod\database\records\ui\riftgatemap\locations.

2.1 Initial .dbr file creation.
Just to make life easy, do the initial creation in the main game area. First, note that all the riftgate files from the Homestead act start with ‘riftgatef’ and ‘riftgate1f’ And since we have a nearby riftgate at the Rotting Croplands just copy/paste those files
(riftgatef_witheringfields.dbr) and 'riftgatemap1f_witheringfields.dbr) and rename the -copy files to riftgatef_dermapteran.dbr and riftgate1f_dermapteran.dbr.

2.2 Editing .dbr files for the new riftgate.
Now edit riftgatef_dermapteran.dbr:

Change the line ‘description,tagRiftRottedCroplands,’ to description,tagRiftDermapteran,’
Save, and you’re done.

Editing riftgate1f_dermapteran.dbr:

Change the line ‘TeleportNameTag,tagRiftRottedCroplands,’ to ‘TeleportNameTag,tagRiftDermapteran,’
Change the line ‘ZoneNameTag,tagRiftRottedCroplands,’ to ‘ZoneNameTag,tagRiftDermapteran,’
Change the line ‘WindowLocationY,512,’ to ‘WindowLocationY,480,’

Save.

Now copy these files to my_mod\database\records\ui\riftgatemap\locations.

And here is the advantage of using a close by existing rift for creating a new one. The ‘WindowLoctionX’ and ‘WindowLocationY’ lines determine where the riftgate is displayed on the in game riftgate map. It’s a lot easier to come up with a decent initial guess at an X,Y position for a new riftgate starting off with the coordinates of a nearby one. And in this case, there was no need to change the X position!

As a general note, Y is 0 at the top of the riftgate map (the Malmouth/Necropolis riftgates have the smallest Y value), and maxes out (1024?) at the bottom (the Devils’ Crossing riftgate has the largest Y value). X is 0 at midmap (just a smidge east of the Broken Hills riftgate) and is positive as you go west and maxes at 512(?). Similarly, X is negative as you go east from midmap.

2.3 Adding the riftgate to the Master Table.

Now open my_mod\database\records\ui\riftgatemap\riftgate_mastertable.dbr in an editor.

Note : the following is personal preference, just to maintain the list of riftgates in region order. I am not aware of a reason that you could not just insert at the beginning of the list or the end of the list.

On the line ‘Region001ZoneList’ do a case insensitive search for ‘witheringfields’. It should take you to ‘;records/ui/riftgatemap/locations/riftgatemap1f_witheringfields.dbr;’.
Just after the preceding semicolon, insert ‘records/ui/riftgatemap/locations/riftgatemap1f_dermapteran.dbr’,
and add a semicolon after ‘dbr’ otherwise it will read “…/riftgatemap1f_dermapteran.dbrrecords/ui…” and the Asset Manager will get upset with you when it comes time to build.

Save.

2.4 Adding the riftgate label.

Now go to my_mod\source text_en. I am going to edit ‘tags_storyelements.txt’, but you can create a new file provided you create an asset for it - otherwise the game won’t see the label. And of course make sure you have auto created assets for all the text files in this directory.

Also note that with the ‘follow the dev’s layout’ idea, a new riftgate in the AoM area would have its label text put in ‘tagsgdx1_storyelements.txt’ and FG would be in tagsgdx2_storyelements.txt’

In tags_storyelements.txt, do a search for ‘#Riftgate Names’ Below that line, you will see a list of tagRiftxxxxx ={text}, and that they are grouped by region. So, before the line ‘tagRiftWitheringFields=Withering Fields Rift’ add a new line tagRiftDermapteran=Dermapteren Rift’. Do not use quotes.

Save file.

Now bring up the Asset Manager, and build the mod. If this is not done, the riftgate will not appear as a placeable object in the World Editor.

3.0 Adding the New Riftgate to the Map.

Now fire up the World Editor, select your mod, and load the map.

First, we need to get to the area we want to edit. Once the map loads;

  1. click the ‘Edit Mode’ tab.
  2. Select the Group Link tool.
  3. In the ‘Group List’ box, click ‘World Riftgates’.
  4. In the list of riftgates that appears in the ‘Current Group’ box, click ‘records/ui/riftgatemap/locations/riftgate1f_witheringfields.dbr’.
  5. After a moment, the screen should show the Withering Fields riftgate.
  6. Select the Placement Tool.
  7. Now zoom out, and scoot the map left to right and look for the possible entrances to the Dermatran Queen’s Lair.
  8. Now click on the region square where most of entrances live. The pulldown menu on the top right should say
    “Levels/Region0F010.lvl”. Remember or write down this name - it is important.
  9. Now expand the ‘records’ folder until you have are at records/ui/riftgatemap/locations.
  10. Click on ‘riftgatef_dermapteran.dbr’
  11. Click on the spot on which you wish to place the riftgate. A green riftgate will appear.
  12. Select the Group Link tool, and make sure ‘World Rifgtates’ are still selected.
  13. Zoom in on the riftgate you just placed, and click it. A red dot should appear on the riftgate, and ‘riftgatef_dermapteran.dbr’ should appear at the end of the list in the ‘Current Group’ box.
  14. Click on the ‘Layout Mode’ tab. Click on a square on the map so you can zoom out.
  15. Scoot the map (basically NE since it initially is focused on Devil’s Crossing)
    around until you get up to the area where Homestead is.
  16. Click on squares in the Rotting Cropland/Withering Fields/Gruesome Harvest area until ‘Levels/Region0F010.lvl’ appears
    as the square label. Steps 17-20 assume you don’t click a region after this.
  17. Click Region->Toggle Zone View. The map squares should now all be colored, and all the riftgate names
    associated with a colored square.
  18. Click Region->Add to Zone. A list of riftgates will appear. Click ‘records/ui/riftgatemap/locations/riftgate1f_dermapteran.dbr’, then ‘OK’ once it is enabled.
  19. Build->Rebuild Selected Pathing. Ignore the “Can’t save file(s)” warning.
  20. Build->Rebuild Selected Map. NOTE : If you accidentally click ‘Rebuild All Pathing’ or ‘Rebuild All Maps’, IMMEDIATELY cancel it or the Map Editor will lock up and crash.
  21. Click File->Save All.

Exit the World Editor. You shouldn’t be prompted to save again, but click ‘OK’ if you are.

Build the mod in the Asset manager. If the riftgate worked, the map compile will show a list of items that look a bit like a call stack dump.

Run the mod, and check it out. If it checks out ok, BACK UP THE CHANGED MAP FILES.

4.0 Odds and Ends.

DISCLAIMER. I have NOT tried this on the Forgotten Gods map. Looking at the FG riftgate files, it appears that the only difference is that the X coordinates are past the west edge of the main map. Not sure what if any relationship there is between the FG Y coordinates and the main map Y coordinates.

Don’t use the Burrwitch Village, Homestead, Fort Ikon, Inner Necropolis, or Malmouth Steelworks riftgates as a template, as they are configured to be tied to quests, and God knows what would happen if there were 2 riftgates with identical quest tie-ins. Zentai doubtless has this trigger something seriously nefarious. :wink:

I did not do this, but if you were feeling adventurous and wanted a gate to force a player to deal with a few waves of monster before it was useable you might use the Wightmire riftgate as a template since if memory serves it just spawns monsters and is not tied to a quest. If I am wrong, lump it with the ones mentioned above.

I will be happy to (try to) answer questions on riftgate creation, and I don’t mind having typos or wonky phrasing pointed out.
But please note that I will ignore any questions about using the Asset Manager, map decompiler, or the World Editor per section 1.1.