Horizon's Gate

Horizon's Gate

Not enough ratings
Supplemental Modding Guide
By Prominence
This guide offers insights, tips, and suggestions for making your own mod for Horizon's Gate. It is intended to serve as a supplement for the Basic Modding Guide.
5
   
Award
Favorite
Favorited
Unfavorite
Introduction
Welcome to the Supplemental Modding Guide! To start, you should know a little about me. I am not much of a coder or programmer, nor have I studied game/level design. I'm an English teacher who plays a fair amount of video games in his free time. Before Horizon's Gate, my modding experience was limited to Neverwinter Nights 1 & 2... more than a decade ago. Despite my lack of experience, I have made quite a few mods for Horizon's Gate. I hope that what I've learned from modding this game can make the modding process easier for you, if you're interested in making your own mods.

Please understand that I do not believe my modding suggestions are the only way to create mods. I am merely posting what I have found effective.

My modding philosophy with Horizon's Gate can best be summed up by the phrase, "Add; don't change." As such, this guide may not be particularly helpful if you're trying to completely overhaul the game. My goal has always been that my mods integrate with the base game fairly seamlessly.

If it wasn't obvious from the title, let me make it clear. This guide is not intended to replace any existing modding guides for Horizon's Gate. Instead, it's supplemental, meant to add to what is already there. The creators of the other guides are much more knowledgeable about the ins and outs of this game than I am, and their expertise should be respected and referred to when creating your own mods.

Some portions of this guide are in-depth or step-by-step. Others are deliberately cursory to avoid excessive repetition of the contents of another guide.
Resources
Here is a list of resources that I have found quite helpful in making my own mods.

Finally, one more resource. Here's the mod that pairs with this guide. I go over most aspects of creating this mod in this guide. It might be helpful to refer to it, but it's certainly not required.
Overview and Workflow
When I'm making a mod, the general process follows these steps:

  1. Get inspired/come up with an idea.
  2. Record ideas, adding and trimming as needed.
  3. Create the pieces for that idea that aren't yet in the game (objects, class, artwork, dialog, icons, etc.).
  4. Playtest.
  5. Create the zones needed.
  6. Playtest.
  7. Publish.
  8. Await feedback and bug reports.
  9. Fix issues.
  10. Repeat steps 7-9 as needed.

It's a time-consuming process. I won't lie to you. This is one of the games that I spend most of my free time on. Creating a large mod takes a lot of time and energy. You've got to have a pretty beefy attention span. And even then, that isn't always enough. Feature creep is very real. And the bigger the mod, the harder it is to test. The harder it is to test, the less likely it is that your testing will be sufficient, and you may just shove out a buggy, unenjoyable mod.

To keep the modding process from becoming overwhelming, start small. My first mod, Shallow Graves, started as three relatively simple zones. No complex triggers. No new items, actors, skills, classes, dialog, or anything of the sort. Just simple zones with base game actors and objects.

Some of the steps in the workflow above might seem a little vague. Like, how do you actually get inspired or come up with an idea? I can't pretend I'm an expert on this, but some of my mods have sought to add something that I noticed the base game didn't have yet. When I first beat the game, I found myself wanting more dungeons to explore. As a result, I made Shallow Graves. Then, I purchased and played Voidspire Tactics and Alvora Tactics. I found myself wanting larger dungeons and adventure zones in Horizon's Gate, so I made Mage Hunter. There's no real ice/water based melee class in the base game, so I introduced the Grave Knight. Try to notice something the game doesn't have yet, and see if you can create it. Make enough mods, and you might find that one mod leads to another. The Tomb Guardians of Shallow Graves indirectly nerfed ruin damage, so I created Bloodstone as an apology.

Another way to come up with ideas is to be inspired by other games, movies, shows, books, etc. that you love. The Dishonored series is one of my all time favorites, so I put the Outsider class in Horizon's Gate. I have fond memories of playing Guild Wars, so I created Class Academy. Love Elden Ring? Then maybe you could put Malenia, Blade of Miquella in Horizon's Gate. After all, isn't Waterfowl Dance just an overpowered version of the Swashbuckler's Sweeping Strikes? Just watch out for copyright infringement. I'm not a lawyer, but I think it's best to maintain a low profile and a modicum of plausible deniability.

You should make mods for your own enjoyment first and foremost. But it does feel nice when people download your mods and comment on them. From what I can tell, this community seems eager for more adventure zones above all else. Custom classes are awesome and fun to create, and there are plenty of players who love to experiment with new build options. But when I think back to my first playthrough, I remember that I didn't feel like I had enough experience points to fully explore the wealth of classes already in the base game. It's not surprising to me that mods that add adventure zones to explore are popular on the Workshop. If you're looking for an audience and positive feedback, it's worth considering.

Finally, I recommend playing and completing the base game at least once before getting into modding. If you aren't familiar with the game, you may set out to solve a problem that it doesn't even have, or make more work for yourself when you don't know where to begin when reverse engineering. Familiarity with the game helps a lot with build mode as well, as you can more easily emulate the style of the base game if you've played it enough to know how things should look.
The Art of Reverse Engineering
A lot of what I've been able to accomplish with modding boils down to reverse engineering. When I couldn't figure out how to do something, I found an area in the base game that had already done it, or done something similar to it, or I checked for an example in a mod.

In this section, I'll list different things you might want to do in your mod, then provide example mods or base game features to check out. Be warned. I'll be plugging my own mods here quite a bit. This is not because I'm some sort of narcissist. It's because I'm most intimately familiar with my own mods. One more warning. I'm not as experienced or courteous with making mods as someone like Mafe. My mods don't have a lot of comments in them. They might be inscrutable at first.

Before we get into this, though, let's make sure you know how to access a mod's files.
  1. Go to the main menu of the game.
  2. Press Mods.
  3. Find the mod you're interested in examining.
  4. Click on the folder icon.

Making a Port
Admittedly, this is a pretty tall order. A lot goes into making a port. You'll likely be examining different ports depending on what you want your port to offer.

Making a Class
Another tall order. Check Paul’s Modded Class Guide of course.

Making a Quest
The term "quest" is a bit ambiguous. Here I'm using it to refer to messing around with the Goals portion of the journal.

Making a Companion with Quest and Cafe Dialog
Ah, dialog. Such a delight. Of all the aspects of modding this wonderful game, custom dialog is probably the area where I've had to do the most reverse engineering.

Making a New Crafting Material or Weapon Type
You'll have to be pretty comfortable with cloneFroms and actions to pull this off.

Making a New Actor/Monster
Time consuming, but a lot of fun.

Making a Repeatable Dungeon or Arena
Ahlvarza is amazing, but more repeatable dungeons are always welcome! I don't know how to do legitimate procGen, and I don't think I'll take the time to learn. But I faked it with Mummy Dust and Heartwood, and I'm pleased with the results.

Making Naval Content
The Sea Below hardly counts for this, but it does have an example of an alternate boat zone.
Getting Started: gob
Once you have an idea for a mod, the starting point very much depends on what sort of mod you're going to make. Let's assume, though, that you'll be creating a zone as part of your mod. We'll start there.
  1. Load up a save of your choosing.
  2. Open the console by holding shift and ~.
  3. Type "gob" followed by the ID of the zone you want to create.

Keep your zone ID one continuous word (no spaces). Do not include quotation marks. Make sure it's unique and unlikely to be copied by other mods. "dungeon" is a bad ID for a zone, but "pd3_necro_dungeon" is probably safe.

I'm keeping this section pretty simple because one of the biggest obstacles that held me back from modding was creating a new, completely empty zone. I must have glossed over the part of the Basic Modding Guide that says "Going to a zone that doesn't exist yet generates a brand new zone." So the very first zone I "made" (the Tomb of Essence in Shallow Graves) was actually a deconstructed version of the mine in Wraele.
Building a Zone: Starting and Saving
Once you've created a new zone by sending your party there with the gob console command, you'll be greeted with a rather bleak sight.

On the left, you've got tabs for adding objects and actors (creatures/units) to your zone. On the right, you've got the terrain tiles you can choose from, along with some useful buttons. The Basic Modding Guide goes over the various buttons and hotkeys pretty early on, so I won't repeat them here.

Let's start by setting a starting point for when players arrive in the zone. Then we'll talk about how to save your zone. Let's be honest- it's not really worth saving yet.

To set a starting point:
  1. Navigate to the "Hazards" tab at the top left.
  2. Find the red arrow with the zero on it (Point 0).
  3. Click on that red arrow with the zero on it.
  4. Navigate around your zone (WASD), rotate the arrow to the desired starting direction (R), and then place Point 0 (left click).

I'm placing my starting point on the top portion of the zone, facing downward. I'm not going to place it right at the very top though. I'll leave a few tiles above it. That way I can have enough space to add a trigger for leaving this zone later. Also, it will just look better to have our characters fully visible when we arrive.


With that out of the way, we should probably save the zone. To do that, click the little disk icon at the top right. Doing so will pull us out of Build Mode. To get back into it, open the console again (shift ~), type b, then press enter.

Here are some things to know about saving your zone and where it's stored:
  • Save your zone frequently.
  • Your zone is actually two files: a text file and a png.
  • Your zone files can be found in the ZoneData folder.
  • I do not recommend saving your game while editing a zone. Saving your game is different from saving your zone. Saving your game inside a zone that you're in the process of creating and then loading that same save can lead to some conflicts and lost progress. To avoid that headache, always edit zones with a fresh save that hasn't seen that zone yet. This might be obvious, but it took me a while to figure out.

All right. Let's mess with some other basics before moving on. Back in build mode (shift ~), type b, then press enter, I'm now going to set the size of my zone. I'd like to start with a small zone so I don't get overwhelmed, so I'm going to reduce the X size (horizontal) to 40, and the Y size (vertical) to 36. Use the + and - at the top right to do this. My numbers are arbitrary. Follow your heart. For a small dungeon, 50x50 is perfectly fine, so you don't really have to change anything. My biggest zones rarely exceed 100 though.
Building a Zone: Terrain
With the basics in place, I usually get right to work on terrain (right side). The terrain can connect and react to other terrain tiles in ways that are occasionally unpredictable. Mess around with terrain enough and you'll likely start developing favorites. You can also make your own, but I've never done that, so I'm not knowledgeable enough to speak on it.

I plan to make a small dungeon that is mainly manmade as opposed to natural, so I'll choose my tiles accordingly. You don't really have to do this, but I usually pick out a few tiles that I'll stick with for most of the zone for the sake of consistency. This time, my floors will mainly be stoneFloor2. My "ceiling" tiles are going to be stoneSolid_noTrim (look for the black square with the T). My walls will be brickWall.

Before I get much further designing my entrance area, I'm going to go around the edges of the zone with the stoneSolid_noTrim to define the parameters for the zone. I recommend leaving 8 or so tiles of inaccessible terrain around most edges to help prevent camera issues. If you've played enough of my mods, you might know that I haven't always followed this rule. The puzzle dungeon beneath Gram's manor in Book of Thieves has players navigating some ducts that are too close to the left side of the zone for comfort.

It's easiest to set up these inaccessible boundaries by increasing the size of the terrain brush size to 1 (near the top right), and then clicking and holding while using WASD to slide around the edges of the map. Just make sure you set the brush size back to 0 when you're done making your boundaries.

With the boundaries more or less in place, I'm going to start defining the rough layout of rooms. I'll keep painting down stoneFloor2 with 2 tiles of brickWall for the vertical walls along the top sides of rooms. I'll continue to use stoneSolid_noTrim for my inaccessible tiles. I recommend making walls dividing rooms pretty thick. 2 tiles of stoneSolid_noTrim should do. If they're too skinny, sometimes the player can see through them.

With such a small zone, I won't be able to fit too many rooms into this dungeon. Ah well. I can always make more zones later, or attach another floor to this dungeon.

This next screenshot shows a zoomed out view of the zone. You can zoom in and out by holding ctrl and scrolling with the mouse wheel. I recommend returning to normal zoom before saving your zone. If you look closely, you can see that I dragged my party leader into the zone. Reeve, too. Moving actors around is pretty easy, and often necessary for testing.

As you can see, the zone is pretty barebones. You could even call it ugly. It's not symmetrical. It's only got three different types of terrain. It's bland. We'll change a lot of that with objects, but for now let's shake up the terrain a bit. Too much of the same is really hard on the eyes in a pixelated game like this.

I'm going to add some water_bubbly to the bottom left room. I can make that into a small environmental obstacle later, or perhaps a combat encounter with some Aelomanders that can push players into the water. Maybe both!

I want the room on the lower left to look a little worn down, maybe by a cave-in or something, so I'll swap out some of the stoneFloor2 with dirt_bog, found near the top.


And for the upper left, I'll make it a pile of bones (boneFloorDark) to make my dungeon seem like an ancient tomb or a mass grave or something. Very edgy.


Finally, for the area in the top right, I plan to make it a treasure vault with some mechanically sealed chests later, so I'm going to decorate the floor with different types of stone tiles.


There! Now my dungeon looks slightly less monotonous. There are still a lot of harsh edges that I'll want to soften with objects later, but for now we're in a good place. Before we get much further, though, I want to change up some of my stoneSolid_noTrim. I was using it for inaccessible tiles between rooms. I'll swap out some of the stoneSolid_noTrim for stoneSolid. Specifically, I use stoneSolid along the bottom of accessible rooms. It helps give the illusion of the walls being high, as the lower pieces of actors, objects, and terrain will be obscured by it. Like so.
Building a Zone: Objects and Details
When I make a zone, I want it to look like it belongs in the base game. I want it to look detailed and natural. Right now, my example zone doesn't meet any of those criteria. We need to add objects to it. Objects are technically items. I'll probably use those terms interchangeably.

The easiest room to start with is probably the cave-in room I created in the lower left. As this room has been hit hard by erosion or plate tectonics, it's going to have more of a natural feel. I recommend using objects from the Landscape tab (top left) to decorate it. Place some rubble in the dirt_bog. Here are some tips for placing objects:
  • Grab a single object with left click.
  • Grab multiple copies of the object with right click.
  • Place the object in the zone with right click (just one) or left click (the whole stack).
  • Delete all objects on a tile by using middle click.

Even with some rubble placed, we've still got some harsh edges, particularly between our dirt_bog and stoneFloor2 tiles. It doesn't look natural, right? It doesn't look like it belongs in the base game. So how can you blend those conflicting tiles?

Let me introduce you to my two best object friends: dirt_sandy1 and dirt_sandy2. Grab a ton of dirt_sandy1 and place it so that it bleeds off of the dirt_bog. Use right click so you're only placing one at a time. Then grab a ton of dirt_sandy2 and fill in the cracks. dirt_sandy2 stacks up to 4 times to change its appearance, so use a variety of numbers to keep it looking fresh. And remember to rotate objects with r.

You may notice that multiple objects of the same type on a tile want to face the same way. It's a nuance you'll get used to for the objects that it applies to.

Now there has to be a reason for this room to exist. It's basically empty right now. I'm going to bury an ice trigger (weapons tab) in the dirt. Place the ice trigger (or whatever treasure you choose) on a dirt tile, then double right click. If the little green arrow shows up, it's buried. I'm going to put a debris object on top of it to give players a hint about its location. I'll also decorate the rest of the dirt area with some more rocks and stuff to make it look natural. Some of the rocks I chose are rocks1. As with dirt_sandy2, rocks1 will change its appearance up to a certain point depending on how many rocks1 you place.

This room is looking a lot better, but the walls are still a little bare. Let's add some dirt_sandy1 seeping down, along with some filth_faint. Maybe a spider web or two.

This room, simple though it is, encapsulates some important principles for making a modded zone:
  • It has a reason for existing.
  • It features a surmountable obstacle.
  • It gives the player a hint about its secret.
  • It has been decorated to look as if it belongs in the base game.

The ice trigger that we buried can be used by the players to traverse the water in the next room if they don't have access to ice magic or long range jumping/teleportation.

Speaking of the next room, I'll work on that next. I'm going to set up some more of our stoneFloor2 to create a mild jumping puzzle. I'll pretend this is an early game area, so most players won't have more than 1 jump. Then I'll go into the Buildings tab (top left) and scroll down until I get to those nice little jagged floor pieces. I love those guys. I'm going to use them to smooth out the harsh edges between my stone floor and the water tiles I have placed. I'll use R to rotate the floor pieces, perhaps using F to flip them as well. Don't break your back here. Just add enough so that it looks good.

I'll also go back to Landscape and add some water trickling down. Play around with flipping the objects until they line up right. You can use the scroll wheel to move objects up and down. You can also hold shift and use the scroll wheel to move objects side to side. Be careful with this. Sometimes it can be difficult to click on objects that you've placed this way. Remember that you can delete all objects on a tile with a middle click.

I also added some stone_pole2_noJ objects to complicate my mild jumping puzzle.

I'll add some stains to the floor, and maybe some bones before I move on. This is where I want to add a combat encounter later, so I'll decorate it as such while leaving a fair amount of space open for a fight.

Let's mess with the top left room next. Right now, it's a boring rectangle of bones. The way I smooth out edges around the boneFloorDark terrain is with more bones. Head over to the Misc category (top left) and find the bonePileDark item. Arrange them around the edges, flipping and rotating as needed, so that the bone rectangle doesn't look terrible anymore. Then add a healthy selection of bone items on top. If this exhausts you, you can use the loot_bone_junk item to have the game automatically generate random bone items there. Be warned, though. This item uses a "replace with" list, and it will only be replaced with its random list items when you enter the zone normally... as in not through console commands like "gob" or "go" (which takes you to the zone without entering build mode). So your location will look a little funky until you enter it properly. "Replace with" lists are very powerful, though. I used them a lot in Mummy Dust and Heartwood. They help repeated zones seem fresh.

Anyway, this bone room still doesn't have much of a reason to exist outside of ambience, so I'll add some gold (Misc tab) underneath some bone dust to reward exploration. Decorate the walls a bit (filth, spiderwebs, etc.) and you're good to go.

The only room we have yet to revisit is the top right, where I was intending to add some sealed chests. You can find sealed chests in the Mechanisms tab. I like these chests a lot because you can open them in build mode to arrange loot without having them stay open forever, unlike other chests. I'll place three sealed chests, but I'm going to make one of them busted so that if the player wants to open it, they'll have to use a bomb. The functional ones will be linked to switches or other mechanisms that I'll place throughout the dungeon. This is pretty easy to do. Place a switch object, right click on it, and then drag it to the chest you want to open. The red line that you see in build mode (if it's not there, press alt) won't be visible to the player. Oh, if you look at that screenshot, you'll see that I accidentally opened one of the chests by messing with the switch attached to it in build mode. If that happens, replace the chest.

It's probably a good idea to link the sealed chests to their switches with wire or wire_long objects so as to give the player a clue of where to look.

We should actually put some loot in those chests. This intended to be an early game area, so let's not go overboard here. I'm thinking some essence gems, maybe a bit of trade goods, some consumables, etc. All of these can be found in the Tools tab (top left). Double click on a chest to open it, then arrange some loot. I would put the best loot in the busted chest so that players have to work a bit harder to get it.
Building a Zone: Adding Actors
Let's add some actors to this zone to give our players something to fight. I'm going to use aelomanders, or wind salamanders. Like all actors, you can find them in the Actors tab at the top left. Once I've placed them, I'm going to change their names. You can do this in two places (well, technically more than that, but let's keep it simple). Press E while mousing over one of the aelomanders. Type in a new name. I wouldn't mess with the other appearance options for an aelomander. That's more useful for creating a humanoid actor.

Now I want this fight to revolve around push mechanics with the water as a hazard, so I'm going to edit these aelomanders and give them the Sailor's Counter Push passive. To do that, mouse over the aelomanders, press C and pretend it's one of your party members. Go wild! Boost its stats if you want. Well, maybe don't go too wild. This is supposed to be an early game zone.

I'll add a few gold pieces here and there to lure the players into combat. Usually combat is enough of a lure, as it rewards experience points and is fun.

A few things to note about actors:
  • You can middle click on an actor to bring up its properties.
  • Humanoid actors often start with "auto" as their default dialog, which is usually not desirable. You can delete "auto" and leave it blank.
  • Most actors are hostile by default. Change this by left clicking on them and then clicking on the little red diamond at the top left of the small window that appears.
  • The AI doesn't know how to use certain skills.
  • Giving the AI massive AOE skills will slow down the game as it "thinks" about its options.
  • You can change an actor's ID in the properties window. This allows it to be easily referred to with triggers and dialog and such. I only bother with this if it's an important character, like a potential companion or a boss that might get moved around via triggers.
  • You can change an actor's combat team in the properties window, which allows you to have three-sided fights, or more.
  • Hold alt to see an actor's detection range.
  • When designing a zone with multiple combat encounters, keep the actors in the encounters separated by a lot of space, otherwise the encounters will bleed together. It's not unreasonable to have a 30 tile minimum. Eyeball it. Test it. Find out what works for your zone. Err on the side of more space, though, as you don't always know how players will approach your encounter.
Building a Zone: Lights, Colors, and Music
If you've messed with the lightbulb button at the top right, you already know that our zone is really, really dark. Let's change that. Go into the zone value editing window.

Change the darkness color to determine how light or dark the zone is by default. This is done with three separate numbers, each between 0 and 255. RGB. Red, green, and blue. The higher the number, the brighter it is. Be careful with formatting here. I used "75, 75, 125" without the quotation marks.

Items can also give off light. Let's go into the Hazards tab and put in a light at the very top of our zone so it looks like light is coming in from outside. I'll use Light (Circle, Med), or sunbeam_circle_med.

Open up the zone value editing window and check out the various palettes. The colors for our zone are currently very default. Hold right click on a palette and scroll with the mouse wheel to find new colors to use. Let me repeat that. Hold right click and scroll. When I made my first zones, I didn't know you could do that, so I would just type things in and hope they were legitimate palettes. It was slow going. Guess and check.

Here are the color palettes I settled on to make my dungeon look grimier.
You'll often notice items/objects changing color as you change the palettes of the zone you're editing. This is something that's determined by the item's definition text, which we'll get into later.

When making a mod with a lot of interconnected zones, I recommend taking a screenshot of the color palettes you're choosing. Alternatively, select the color palettes and make a base zone that you can just copy from. That's a bit more advanced, as you'll have to be comfortable with saving your zone so as not to overwrite it.

We're nearing completion on this zone, so let's add some music. I don't do this early on in a zone's creation because the music in this game is usually a loop of around 2 minutes. It can get insanely repetitive.
Head over to the music folder and listen to a few tracks. Pick one for travel mode, or when the player is not in combat. Then pick one for combat, which is... well, self-explanatory. You can fiddle with pitch and volume if you wish. I chose PM-Suspense7, which I pasted into the travelSong spot. And I'm using PM-LostPlace for my combat song.

You can use a combatMusicOverride in an actor's properties if you want to switch up the song for a specific encounter. This is only really useful in zones with multiple combat encounters. I use it a lot with Shallow Graves and the Tomb Guardians (ZP-MemoriesMoonLoopA).
Building a Zone: Travel Triggers, Map Placement, and Testing
The zone is almost done! We need to put in a way for the player to leave it though, otherwise you're likely to get some complaints about your mod.

This is done with triggers. I'm going to be honest here. Triggers can be a lot to deal with. I am not an expert. I had to reverse engineer a lot of my triggers from other mods or the base game.

Let's head into the trigger editing mode by pressing T. Click and drag to create a small pink rectangle in the zone's entrance area. Click on that zone when it's placed, and then change its effect ID to "travel_leaveLocation" (without the quotation marks).

As with palettes, you can hold right click and scroll through different effect IDs for triggers. Some have documentation. Some do not. Here are some of my favorites:
  • travel_leaveLocation: used for leaving a location and getting back to the world map
  • travel_point: used for interconnected zones (with more of those red Hazards arrows)
  • cancelIfItemNotPresent: used for many of my puzzles
  • talk: used for starting dialog

The possibilities with triggers are truly daunting. They can be used for simple things like travel or giving players an item. They can also do far more complicated things that I haven't even attempted yet.

The Basic Modding Guide covers our next steps quite well, but I'll reiterate them here. We need to make a mod folder now so that we can add a text file to it that tells the game where to put our zone.
  1. Save your zone.
  2. Quit the game.
  3. Navigate to the mods folder (user, AppData, Roaming, BoatTactics, Mods).
  4. Create a new folder.
  5. Title it with your mod's title. I'm going to call mine Guide Example.
  6. Open your mod's folder.
  7. Create a text file (.txt).
  8. Title this text file something like "Guide Example Locations" (sub in your own mod title).
  9. Open the text file and paste in the bolded text below.


[Location] ID=z_prom_newzone; name=Lost Tomb;
x=273; y=365;
port=false;
discovered=false;
namePopup_texture=tbg;
minimapIcon=ui_map_notable;
useWorldtimeZoneDarkness=false;
zoneThisLocationIsIn=eral;


Let's look at this line by line, shall we?
Code
Explanation
[Location] ID=z_prom_newzone; name=Lost Tomb;
The first line is spelling out the location's ID, along with its name that will show up for players. You'll have to change z_prom_newzone to your zone's ID. You can change the name to whatever you want.
x=273; y=365;
The second line tells the game where to place the location on Eral. I found those coordinates by sailing around the main sea area and going into the console (shift ~).
port=false;
It's not a port, so I'm leaving the third line as false.
discovered=false;
It has not been discovered yet, so I'm leaving the fourth line as false.
namePopup_texture=tbg;
I've literally never changed the fifth line, so let's just leave that as it is for display purposes.
minimapIcon=ui_map_notable;
The minimap icon on the sixth row is something I only recently started messing with. My Shallow Graves tombs have little skulls now.
useWorldtimeZoneDarkness=false;
I want it to be an interior area, so the seventh line gets set to false.
zoneThisLocationIsIn=eral;
And I want it to be in Eral, discoverable from the overworld zone, so I'll leave that as eral.
The only time I've changed this line is when making zones for The Sea Below.








Save your text file and launch up the game. If you've done this correctly, you should now be able to find your location on the map. If you used my coordinates, your location should show up at 83 S, 57 W. Go test it out! Enter the location, explore it thoroughly, and see if it needs any changes. Just remember to reload a game that hasn't been there yet if you are making any changes.

When testing a zone, I like to take notes of all the things I need to fix. Then, when I've completed the area, I reload a fresh save that hasn't been there yet and start making those changes.

If you have the time and energy, try playing through your zone with the goal of breaking it. Approach encounters from weird angles. Try messing with objects that you shouldn't. This isn't easy to do, but if you can playtest a zone from this perspective, you might spot more bugs.
Creating Items: Simple Accessory
It's all well and good to populate your modded zones with loot and gear from the base game. But it's also a lot of fun to create your own items. In this part of the guide, I'll create a relatively simple accessory.


Much of my modding process is reverse engineering. Let's see what base game accessories we can reverse engineer to create a new accessory. Go into build mode and find the Armor tab (top left). I'm going to copy the gauntlets item for my accessory. By mousing over that item, I can see its ID. Now I can easily find that ID in the appropriate text file.

I'll be looking at armor.txt. Once there, I can use CTRL + F to find the gauntlets, copy their information, and paste it into a new text file in my mod folder. I'll call my new text file something like "Guide Example Items."


We should probably do a line by line examination of this item. Here comes a table!


Line
Explanation
[ItemType] name=Gauntlets;
This starts up a new item definition. It also has the name of the item that will show up for players who mouse over the item.
ID=gauntlets; sprite=172;
The ID is what the game uses to refer to the item in question. If you're spawning the item through a trigger, you'll use the ID. If you're checking that the party has the item through a trigger, you'll use the ID. The sprite tells the game what art to use for the item. Sprites are typically 16x16 pixels in this game. I'll talk more about them when we make a weapon in the next section.
description=Sturdy steel gloves keep the hands safe when attacking.;
The description is what shows up when the player has the item in their inventory and mouses over it.
weight=2; volume=3; value=150;
Weight is called by certain effects, like Throw Weapon. Volume might have something to do with whether it fits in a container. Don't quote me on that. Value is how much gold it's worth.
itemCategory=4;
This little friend is pretty important. Without this, the game doesn't understand that the item is an accessory. The bonuses it provides won't take effect.
pR=pIron;
This tells the game what palette to use when coloring the item. The sprite for gauntlets only has one color channel, if you will. If it had more, you might see a pB and a pG section. For weapons and armor, the pG is used for augments. For other items it's not as prescribed.
[ItemEffect]
This is telling the game that the next part is going to determine the item's effects in game.
ID=gauntlets; actorValue=PhysAtk; magnitude=1; duration=-1;
There's the item ID again. And the actorValue portion is telling the game which actorValue will be modified. In this case, it's Physical Attack. The magnitude says how much. And the duration is complicated. For items like this, we'll use -1. When you start designing your own actions and status effects, you'll be using different durations. The Basic Modding Guide goes into more detail on that.
[JournalEntry]
This tells the game that we're now dealing with a journal entry.
ID=item_gauntlets;
You can set up journal entries this way, with item_ followed by the item ID. There are other ways too, like putting journalID=INSERTJOURNALIDHERE; in the ItemType section.
category=equipment; halfPage=true; rarity=1;
This tells the game how to categorize the journal entry. It's best to check the closest analogs you can find for the item you want to create. "halfPage" says whether the journal entry will be a half page or not. Rarity refers to how much a researcher will reward you.
title=Gauntlets;
Here we have the title for the journal entry as it shows up in the journal's table of contents.
text=<itemBig=gauntlets><title=Gauntlets><brAdj=>Protecting the hands is very important...
This tells the game which item to display in the journal entry. Then it provides the title that shows up on the page. Then it has the actual text for the journal entry.

All right. With that explanation out of the way, I'm going to set about changing some things to turn these base game gauntlets into a Diablo inspired accessory: Magefist.
  1. Change the name in the first line. I went with "Magefist" (without the quotation marks).
  2. Change the ID in the second line. I went with prom_magefist. Remember to keep ID's unique and unlikely to be copied by other mods. I'm going to keep the sprite the same.
  3. Change the description in the third line. "Magical gloves that are empowered with fire triggers."
  4. Increase the value in the fourth line. I'm going with 9500.
  5. Leave the fifth line alone.
  6. Pick a different palette in the sixth line. I'm choosing something dark, like p105. I use Furdabip's Palette Viewer and Tester[furdabip.com] for this. You can enter the sprite and preview what it will look like with a variety of palettes.
  7. Leave the seventh line alone.
  8. Copy your item ID onto the 8th line, replacing "gauntlets." I want my Magefist to boost skill_Fire and reduce actTime (for more frequent turns, very overpowered). So I'll change the PhysAtk to skill_Fire, then copy everything from [ItemEffect] to duration=-1; and paste it below. Then I'll swap out the pasted skill_Fire for actTime, and I'll change the 1 magnitude to -1.
  9. Fiddle with the journal entry as needed, increasing rarity to 3, changing the titles, and making sure the correct ID is called. Change the entry text as well.

Here's my end result:

[ItemType] name=Magefist;
ID=prom_magefist; sprite=172;
description=Magical gloves that are empowered with fire triggers.;
weight=2; volume=3; value=9500;
itemCategory=4;
pR=p105;
[ItemEffect]
ID=prom_magefist; actorValue=skill_Fire; magnitude=1; duration=-1;
[ItemEffect]
ID=prom_magefist; actorValue=actTime; magnitude=-1; duration=-1;
[JournalEntry]
ID=item_prom_magefist;
category=equipment; halfPage=true; rarity=3;
title=Magefist;
text=<itemBig=prom_magefist><title=Magefist><brAdj=>Blackened with soot from quickly slung fire spells, these metal gloves have clearly seen a lot of use. In battle, the wearer of these "Magefist" gloves will enjoy rapid response time and improved fire affinity.;

Save your text file and load up the game. Go into build mode, and you should be able to find your new accessory, ready to be placed in a zone. I'm going to put my Magefist item into the broken sealed chest, replacing some of the loot I already put in there.

Off topic, but I just noticed that I hadn't linked one of the chests to the power node that's supposed to open it. Playtesting is important!
Creating Items: Complex Weapon
Weapons, in general, are a bit more complex than accessories. In this section, I'm going to create a weapon with custom effects, a custom sprite, and a new action for its attacks. I'm going to make a rapier that's more focused on facing off against spellcasters than physical attacker opponents.

  • For the item type definition, I'll copy the Mythril Rapier into my Guide Example Items text file and then change its stats accordingly.
  • For the custom sprite, I'm going to need a png in my mod's folder that I can refer to for the weapon's "texture."
  • For the custom action, I'll have to go into the actions folder, find actions_weapons.txt, and copy the entire rapierAttack action into a new text file that I will place in my mod's folder and call Guide Example Actions.txt.

If you completed the last section, you've already got some experience copying and changing item definitions. So let's start with the art.

Art
In paint dot net, set up a 160x160 pixel square. Fill it with purest magenta (R=255, G=0, B=255). I like to break the square into a grid with purest black borders. Each 16x16 square has its outermost pixels turned black, like so.
If you're comfortable with paint dot net and its layers features, there are probably much, much better ways to do this. But this method works for me.

Before we continue, let me just say that I am not much of a pixel artist. Luckily, Eldiran, the creator of Horizon's Gate, is fine with modders using his sprites for a starting point.

I'm going to find the base sprites for a rapier and copy them into my png, which I have cleverly named guideexampleart. You can name yours whatever you want.

I like to get the base sprites from Furdabip's Palette Viewer and Tester[furdabip.com], but you can also hunt down the pngs that the game actually uses. According to the Mythril Rapier's item definition, the sprites I need are in the items_weapons texture, and are numbers 187 and 219 (when held).

Once I've got those pasted into my png, I can start messing with them. I think I'll keep the blade as it is, and expand the guard a bit. That's it. Just enough to make it look different.

While we're here, we might as well talk a bit more about palettes. As you can see in the rapier sprites, we've got three distinct shades. The red is for coloring with pR, the blue is for coloring with pB, and the green shouldn't be touched at all. It will take the color of whatever augment you put in it. When unaugmented, it defaults to the same as the blue, I believe.

And now the art is done. Let's move on to the stats.

Stats
I'm not going to belabor this too much. I copied the Mythril Rapier's item definition and changed some things.

[ItemType] name=Inquisitor;
texture=guideexampleart;
ID=prom_inquisitor; pR=p77; pB=overworld10;
description=An elegant weapon for skewering mages.;
journalID=journal_prom_inquisitor;
weight=1; volume=5; value=4500;
power=6;
sprite=0; spriteWhenHeld=1; itemCategory=weapon; element=sword;
action=prom_inquisitorAttack;
special=rotate180WhenSheathed; special=enhanceSlots_1;
[ItemEffect]
ID=prom_inquisitor; actorValue=MagEva; magnitude=6; duration=-1;

[JournalEntry]
ID=journal_prom_inquisitor;
category=equipment; halfPage=true; rarity=3;
title=Inquisitor;
text=<itemBig=prom_inquisitor><title=Inquisitor><brAdj=>Favored weapon of those investigating rumors of corrupt mages. Subtle ruin triggers beaded into the blade of this rapier allow it to chip away at its victims' magical essence.;


Highlights:
  • I changed the texture to refer to my png.
  • I changed the sprite numbers to refer to my sprites. The first 16x16 square is 0 (top left), then it counts across the page heading right. If you're using a 160x160 pixel square like I recommended, the top right is then sprite #9. Right below sprite #1 is sprite #10. I'm using the first two sprites, so 0 and 1.
  • I deleted the parts about breaking the weapon down into mythril.
  • I gave it a new action, "prom_inquisitorAttack," which I'll make in the next section.
  • I changed its item effect (remembering to change the item ID there as well) to boost MagEva, not PhysEva.
  • I created a new journal entry for it.

Action
Now this is where things get icky. If you've looked at Paul’s Modded Class Guide you might have some familiarity with actions. They're complicated, but they're very powerful. You have to be careful, though. A single typo can crash your game. I'm not going to explain every single piece of the rapier's action because honestly, there are pieces I don't fully understand. And that's okay. My goal here is to create a rapier attack that also deals a little bit of damage to enemy MP. Let's see how we can do that.

  1. Start by finding and copying the rapierAttack action over into a new text file if you haven't yet. You can find it in the actions_weapons.txt file.
  2. Change the ID= lines to refer to whatever you decided to name your action. I'm going with prom_inquisitorAttack.
  3. Copy the AvAffecter and AvAffecterAoE sections (along with everything in their sections) and paste them below.
  4. In the second AvAffecter section, find the actorValue line and change HP to MP.
  5. Still in that section, find the magnitude and change it to -3.
  6. Get rid of the elements in that section.
  7. Change the FXOnTile=cut; to FXOnTile=explosionHorizBlue;
  8. Duplicate your FXOnTile=explosionHorizBlue; line and change the second explosionHorizBlue; to DramaticNyeaow; to add some sound effects.

When you're done, your action should look like this:

[Action] ID=prom_inquisitorAttack;
applyWeaponBuffs=true;

casterAnimation=thrust;
casterAnimationDependsOnWeaponHand=true;
[ActionAoE]
ID=prom_inquisitorAttack;
cloneFrom=adjacent;
[AvAffecter]
ID=prom_inquisitorAttack;
actorValue=HP;
magnitude= d:rapierDmg;
duration=-2;
chance=d:rapierAcc;
element=melee;
element=physical;
element=slash;
FXOnTile=cut;
[AvAffecterAoE]
ID=prom_inquisitorAttack;
cloneFrom=oneTile;
[AvAffecter]
ID=prom_inquisitorAttack;
actorValue=MP;
magnitude= -3;
duration=-2;
chance=d:rapierAcc;
FXOnTile=explosionHorizBlue;
FXOnTile=DramaticNyeaow;
[AvAffecterAoE]
ID=prom_inquisitorAttack;
cloneFrom=oneTile;


Congratulations! You should now have a functioning custom weapon, complete with new art and a new action! You just need to put it in a zone somewhere so that players can find it.
Creating a Class: Initial Planning and Workflow
If you're interested in making a custom class, let me again recommend Paul’s Modded Class Guide. It's quite helpful, and explains actions in more detail than I will here.

When creating a class, I usually follow this process:
  1. Get inspired.
  2. Brainstorm active and passive abilities.
  3. Make blank active and passive icons.
  4. Make class icon.
  5. Start creating active abilities in a text file, one at a time, and testing them in an existing class.
  6. Start creating passive abilities in a text file, one at a time, and testing them in an existing class.
  7. Decide on/create art for the body parts.
  8. Complete the class' actorClass text file.
  9. Playtest a few runs through Ahlvarza, Mummy Dust, Heartwood, or Port Kapul with the class and see how it fares.
  10. Make changes as needed and test again.
  11. Publish (usually alongside other content).

I'll go through this process now with a class I've been meaning to make for a while: the Chevalier.


It will be a life focused melee class. A bit defensive and supportive in nature. It's been done before by other modders, so I'll do my best not to step on any toes in this process.
Creating a Class: Icon Artwork
With the rough planning out of the way, I like to focus on icon artwork next. For this, I use paint dot net[www.getpaint.net]. I'll go with a soft yellow/alabaster color scheme for my Chevalier.

I'll recolor this basic active ability icon so I can use it as the base for the Chevalier's abilities.

I often end up accidentally coloring the magenta a little in this process. It needs to be exactly 255,0,255 to function properly, so I always make sure I've changed the corners back.

With the base active ability icon complete, I can now start designing my active ability icons. I like to "borrow" from existing ability icons and artwork for this process. It saves me time and helps the icon look like it belongs in the game. The first ability I'll be designing is Shield Toss, so I'll consult the Gladiator's Throw Weapon icon, along with various shield icons to get an idea for how it should look. The Warden's Guard spell has an awesome shield on it, so I'll use that.

As I move from icon to icon, I'll copy the color scheme to keep the icons looking unified.

And here they are:

Now for the passives, and then the class icon. The blank passive icon is easy to create. Follow this format with a color scheme that fits the class you want to create: .

Here are my passives:

And the class icon:

The more classes you make, the easier this gets. You'll know where to look for artwork to "borrow." You can copy from icons you've already created, change the colors, and you're good to go. As a starting point, I recommend checking out the different folders in the Images folder (Steam, steamapps, common, Horizon's Gate, Content, Images...), particularly Icons and Status Effects.
Creating a Class: Active Abilities
The hardest class to create is the first one you make. Here's my best piece of advice for this. Download another class mod. Navigate to the mod's folder. Open the actorClass file for the class. And swap in one of your active abilities at a time to test them. A safe way to do this is to comment out one of the class' active abilities by putting -- in front of it. Then add your own ability.


When you've got your new active ability functional, swap in the next one. Create and test them one at a time. When all five are good to go, move on to the passives.

Why just one at a time? Well, if you test multiple abilities at a time and the game crashes, you won't always know what caused it.

When creating an ability, it's best to start with the closest analog available in the game. For my Shield Toss ability, that's clearly Hurl Weapon from the Gladiator. For Chamber, I'll have to consult Barrier and probably the basic bow attack action to get the right AOE that I want. For Covenant, I'll probably look at the Guardian's Discipline ability, but I'm going to have to change a lot about it. I'll probably base Benediction off of the Warrior's Charge... only I'll put in a heal instead of weapon damage. And for Exorcism, it will be a combination of the Sage's Cure, the Guardian's Rally, and the Warden's Negate for its AOE. This ability was too boring and didn't even make it past the planning phase. I decided to swap it out for an attack that dealt more damage for each active buff.

Copy the pieces that you need. Make changes, being sure to always modify the ID to match the current ability. Also, every AvAffecter needs an AvAffecterAoE after it in the action. If you forget that, or forget to correctly input the action ID, you're looking at a crash.

There are countless ways for something to fall apart here. Your best bet, as with any part of the modding process, is to start small. Find a base game (or modded) ability that works, and experiment with tweaking just one thing at a time. If you're making a complex ability with multiple AvAffecters and AvAffecterAoEs, add one pair at a time. Test it. If it worked, add another. With enough practice, you'll be able to undertake more ambitious endeavors.

If you get stuck, visit the mod creation channel of the Discord[discord.com]. People are usually willing to help.
Creating a Class: Support Abilities/Passives
Support abilities (sometimes called passives or passive abilities) might seem simpler than active abilities, but they have a frustrating wrinkle. You can't easily reverse engineer the base game support abilities due to how they're coded. Or something. Again, not a programmer. So start by looking at the mod samples. There are some examples in there that might prove helpful.
You can also check modded classes for their support abilities and how they function. Just know that some will be more complicated than others, and some might seem like they do nothing at all. Some support abilities have no base functionality. Instead, different actions in the game check to see if those support abilities are equipped when determining their effects. Check the Scout's First Aid ability to see an example of this in case you're hoping to create a similar effect.

Most classes in the base game have three passives. The class with the most has five. For my Chevalier class, I want to make three passives:
  • Blessed Cascade: guard on combat start, progressive buffs on turn start
  • Paragon: boosts life skill for each nearby ally at the start of your turn
  • Urgency: react to physical/magical attacks by accelerating your turn by 2

Unfortunately for me, all three of these passives are going to require an action to function. This isn't exactly a bad thing. It just means more work. For a comparatively simple passive, look at the Mesmer's Illusion of Haste or Distortion passives from Class Academy.

As with active abilities, I find it best to make one passive at a time and plug it into an existing, otherwise functional class for testing. Also as with active abilities, copying and pasting from existing actions (when the passive requires an action) is an easy way to get it to do what you want. For example, when creating the Chevalier's Paragon passive, I copied wholesale from the Desperado's Solitaire passive. I had to make a few changes, but it was simple enough to get it working because I had already created something similar to refer to.

The first class you make will probably be the hardest, so stick it out. It only gets easier as you make more. For the most part.
Creating a Class: Armor and Actor Class File
I'm not much of a pixel artist, and I find most of the body part art in this game inscrutable when editing it, so I tend to just cobble together my classes' armor art from base game classes. You can mix and match the arms and shoulders to create a wide variety of appearances. Sometimes I'll go and edit the sprites a bit, but I certainly don't start from scratch.

If you do decide to edit armor sprites, know that the reds are for armor, the blues are for cloth, and the greens are for skin/hair/fur/chitin (or whatever Crubs have).

Anyway, once you've settled on the body part art for your class, and once you've got all the actives and passives working, it's time to create its [ActorClass] file. The base game has all its classes bundled into one file. I tend to put my classes in separate files, even when creating a mod with multiple classes.

Simply copy a somewhat similar [ActorClass] over into your text file, then start making changes.

One mistake that I have made at this point was in choosing a paletteUI that was incompatible with actor classes, for whatever reason. The paletteUI determines what color the little rank dots will be on the active abilities. You can't use just any palette for this. Choose an incompatible palette, and your mod will crash. So my advice is to scroll through actorClasses.txt, or use CTRL + F for paletteUI, and pick from the colors listed. I'm going to go with pYellow.

The rest is pretty self-explanatory. "relevantStats" are the star stats for your class. "[ActorClassEffect]"s are those bonuses that your character gets when this class is their active class.

Because I want players to have to unlock my classes, I'll put in an fReq right after the required stats section. "fReq=g:class_chevalier;" without the quotation marks. I'm going to comment it out for now (--), though, so I can test my class easily.

If you're successful, your game will load and your class should be available for any characters who meet its prerequisites. Exciting! You can now start testing it.

I should mention that even if your class functions and feels balanced, fun, and great in game, it still might have some issues when put on an AI controlled character. The AI doesn't always understand complex abilities. Movement can mess with it. So if your plan is to put your class on some AI enemies for players to fight as part of your mod, be prepared to test each ability individually. You can give the AI a bit of a nudge towards using an ability it might otherwise ignore ("AIRatingBias = 5;" for example, on the Necromancer's Putrid Explosion). But this takes more testing too. When I designed the slimes for Mummy Dust, I had to give them just the right amount of AI bias on their abilities, as the AI doesn't love inflicting ailments on itself. If I overshot the bias though, then the slimes would just use the attack even if there were no enemies nearby. It's a balancing act. With a blindfold.
Building a Port: Overview
Before creating your own port, it's best to be pretty familiar with creating zones in build mode. I also recommend, as always, a fair amount of reverse engineering. Here's a list of things to try to familiarize yourself with how ports are structured:
  1. Go into build mode in your favorite ports in the base game.
  2. Take screenshots of the buildings (inside and outside).
  3. Try to take a building apart, noticing which parts are technically terrain, and which parts are technically items.
  4. Determine which building items count as a "roof" and what that means. They have a special border to them.
  5. Try to figure out what Unblacken_Tile objects do.
  6. Check to see how lighting is handled indoors.
  7. Check to see how lighting is handled outdoors (I always forget this).
  8. Take some screenshots of roof examples.
  9. Mess with the color palettes for the zone, and try to see which of the misc palettes influence roof objects and buildings.
  10. Check the dialog node for the main service NPC's.
  11. Find some NPCs that move around and see if you can figure out how the developer did that (hint: ai_lua).

When you've played around for a bit, you should have a better idea of how ports are built. There are plenty of similarities to building a dungeon, like in the earlier parts of this guide. But there are also plenty of differences.

Here are the basic steps for building a port. Plenty of these can be done out of order, but obviously you'll have to create a zone before you can do any building in build mode.
  1. Create the zone.
  2. Set the zone to Peaceful.
  3. Add port entering trigger.
  4. Create buildings.
  5. Populate port with NPCs.
  6. Create the port's location file.

To help illustrate the process of creating a port, I'll build one for the Guide Example mod that I've been working on alongside this guide.

Here's a list of the ports in the base game, listed by number. To visit one, simply type go portX in the console, subbing in the port number in the list below for X. For example, to visit Trabenton, you'd use the following command in the console: "go port14" ...without the quotation marks. This list also contains each port's cafe food, which is very helpful when creating your own custom crew member with cafe dialog.

1 Port Otype: crisp baguette
2 Port Alphe: rock yam
3 Bette Sands: hoppy lager
4 Bagu's Rest: reed perch
5 Ash Port: silk pepper
6 Searth: blueshine
7 Granserf: golden bisque
8 Runewald: bronze draught
9 Nordock: fin fillet
10 Dolor: beaf
11 Jascias: deep wine
12 Ravitus: ruecumber
13 Ralkhome: pickled skinkeyes
14 Trabenton: rutroot surprise
15 Condra: rimeberries
16 Eyrerock: mistral vapor
17 Luss: blood durian
18 Fivili: gojer flank
19 Dunning-Mars: flom cake
20 Bilibas: osso cakes
21 Tsavor: gloam truffle
22 Fantlin: sage starfish
23 Wraele: pepper blossom
24 Chrysol Farms: citrind jam
25 Towerwall: tower tankard
26 Dominio: just a placeholder- don't get excited
27 Gonhaldr: naga pepper
28 Solport: cheesebarley pie
29 Redens: stir kebab
30 Crubtown: rigor oil
31 Bellrique: grand bean
32 Port Midos: creamcake pie
33 Ahlvarza: sea flower souffle
Building a Port: Creating the Zone
Zone Creation and Boundaries
In an effort to avoid repetition, this section may be a bit slim. I'm going to assume that you've already built your own zone at least once, either on your own or by using this or other guides. So, if you're reading this section and you get lost, I suggest you refer to the Building a Zone sections of this guide.

You start creating your port's zone the same way you do for any zone: the console. Use the gob command followed by the zone ID for your port. Mine is going to be horrifically generic: z_prom_newport.

Once you're there, you have a lot of options for how you start. I recommend settling on a selection of color palettes and constructing the rough boundaries of the zone first.

Don't stress out about making the edges of the zone look perfect or natural. The base game has plenty of ports that have pureBlack tiles for a boundary. If the goal is seamless integration with the base game, then it's fine to do the same.

While you're down there, checking out the x pureBlack tile, I also recommend noticing the w, bgOcean. bgOcean is what many ports use for their ocean tiles. Right now, your "ocean" is very likely purple. To change that, simply type ocean into the bgFXID area of the zone value editing window (where you select terrain palettes, darkness color, music, etc.). Oh. While you're there, check the box that says Peaceful. If you forget to do that, players might start butchering everyone in your port.

The Shore and Entrance
Creating the shore can be a headache. Cliff type shores, like those using ocean_edge_smooth require a lot of objects from the Landscape tab to create their borders. If that's what you're dead set on for your port, then go ahead. I've created more than a dozen ports now, and I never really want to faff around with those tiles again.
Check out the image above though. I've used caveWallLedgeN to create my cliffs (without dealing with the cliff types that I can't stand). I've created a dock that is 3 tiles wide using pier_floor and its variations. I've added some Shade objects from the Misc tab to give my dock some depth (more on those later). I've got some rope objects for decoration. I already set my starting point and exit trigger. I've also added the infamous tEnterPort trigger. What does it do? A lot. I don't understand all of it, but it tells the game that the player has entered a port. This is useful for calling dialog that relates to entering a port, I think. It is also required if you want your cafe to spawn potential recruits. And even with this trigger, I'm still a little superstitious about modded cafes. They don't always seem to work in my experience. But it's better to have this trigger than not have it, so add it, and make sure its activation parameters are set to when the player enters the zone.

Buildings
Now it's time for some buildings. I'm going to make them fairly easily accessible, as ports should be convenient to use and not a chore. Creating a building is a fair amount of work, so I would go into this with a plan. What services will your port have? How many buildings will you need?

With a rough idea of what you want to do, it's now time to begin. I always start with the floor. For this building, I'm using woodFloor2. It's easier to do roofing on buildings that are wider than they are tall, at least in my experience, so you may want to keep that in mind.

You could put down some objects right now, like carpeting for the floor, or furniture. But I'd rather have a rough skeleton in place first. Let's move on to the walls.

For this building, I'll be using wooden walls like wall1_style6 from the Buildings tab. Each one of those very similar wall objects serves a different purpose. Frustratingly, some of them are also not quite a full tile wide. Those slightly skinny ones go on the outer edges. The ones with shadows at the top form the upper parts of the walls, right below the roof.

I've added Shade objects to give my building some height. The shadow for this building is made up of three different object types: fade_s1, fade_s2, and fade_s6. These are all found in the Misc tab. The s1 is the big square of shadow. The s2 is for the bottom portion, creating a diagonal wedge. The s6 is to fill in the gaps that having not-quite-full-tile-sized walls creates. It's a bit of a process, but it gets easier over time. The base game tends to have shadows on the right side of buildings.

Now it's time for the "roof." I put that in quotation marks because some of the roof tiles we use aren't what most people would consider a roof. They're more like walls. Still, they'll appear over the stuff inside the building, so they're technically roof objects for this game's purposes. I added a row of Wood Wall (Roof), better known as wall2_style6_roof to even out my walls. You'll notice that it has a shadow on top, which helps separate it from the real roof, which we'll add next.

The most common roof type in the base game is the Rough Shingle Roof, also known as roof2. It derives its color from the zoneMisc1 palette. I've created the roof for this building using the following items: roof2, roof2_top, roof2_back, and roof2_damaged2. Now to add a door. I recommend using doorway_closed_staticP from the Mechanisms tab. Simply put it on one of the bottom walls that isn't on the edge. I would also add windows now, but I made my building a bit too low for them. So I won't bother now, but I'll keep it in mind for the next building in my port.

Let's get started on the interior. I've added quite a bit in this screenshot. The carpet and tables are simple enough to figure out. I want to draw your attention to the weird x's though. These are two different items. I've placed cantBlackenTile on the bottom half of the outer walls. This will help the building look like a base game building when indoors. I've also used some item_cantGrabOrPlace objects to prevent players from getting the five finger discount when visiting this building. I'm not trying to code NPC reactions to theft. I put gemstones here because this is going to be my trading post/market, and I'll make this port have gemstones. Why not a custom trading good? There are already a lot of them, and I don't really want to add more. There's nothing wrong with you adding your own custom trading goods. Just know that if your port is the only place that offers it, your trading good might have an inflated value. Also, it can appear as a monthly requested good in a port, and I find that those are best to take advantage of when there are multiple locations that produce that trading good. Oh. I've also added some lights. Lights are easy to forget, but your building will look weird without them.

The sign on the outside is actually made up of two objects, both found in the Buildings tab, very near the bottom. With that, my building is basically done. Yeah, I need to add the NPC to it. I'll get to that later. I should also change up the terrain tiles around it and add pebbles and stepping stones to make it look less bland. Remember, as discussed in the Building a Zone sections, it's important to smooth out harsh edges.

Building a Port: The Cafe
All base game standard ports have a cafe, so you may want to put one in your mod. It's kind of a process, and it looks ugly in build mode, but it really isn't that difficult once you get your hands dirty. Check out this screenshot. Here's what you should notice:
  • The green arrows are for the player's crew during a cafe dialog scene. The 9, specifically, is for the food.
  • The blue arrows are where potential recruits will spawn. Hopefully.
  • The brownish arrows are where your dismissed crew will be placed.
  • I have created my own painting item for this port. You don't have to do this, but it's a nice touch. I copied the frame from the base game paintings. I also dug into the item definition files and copied the base game painting definition for my own purposes. I was sure to change the ID's and journal entry.
  • I have placed a lot of furniture and decorations. I have also used those "can't pick up or move" items on the ones that players could move.
  • I put in plenty of lighting.

I'll talk about the cafe NPC in the next section, but for now we should probably discuss how to make cafe food. You're probably going to have to do three things:
  • create a new food item
  • create new artwork for that food item
  • write cafe dialog

You can skip the custom cafe dialog, but I won't in this guide. To create a new food item, simply copy the food_basic1 item from item.txt and change the crucial parts:

[ItemType] name=Simple Bread;
ID=food_basic1; sprite=2379;
cloneFrom=food_base;
value=6; power=5;
description=Decently tasty bread.;
[ItemEffect]
ID=food_basic1; actorValue=PhysEva; magnitude=2; duration=6;
durationIsWorldtimeDays=true; showNoDescription=true; canBeRemovedByNonspecificAVEffectRemoval=false;



...would become...


[ItemType] name=Watermelon;
ID=guideexample_watermelon; sprite=3;
texture=guideexampleart;
cloneFrom=food_base;
value=7; power=6;
description=Sweet, juicy melon with seeds.;
[ItemEffect]
ID=guideexample_watermelon; actorValue=MagDef; magnitude=1; duration=6;
durationIsWorldtimeDays=true; showNoDescription=true; canBeRemovedByNonspecificAVEffectRemoval=false;

Do note that I added a line to refer to the sprite sheet that I am including with this mod. It's best to limit cafe food stats to 1-2 effects, otherwise it will bleed off of the dialog page. The value is how much the food costs per crew. The power is the morale effect. You may also see that I don't have a pR or pB in there. Cafe food (and trade goods) typically don't refer to palettes, and are instead colored by hand.

Now for the dialog. I recommend checking dialogOverrides_reeve.txt and dialogOverrides_hagger.txt (Program Files > Steam > steamapps > common > Horizon's Gate > Content > Data > SystemData > Dialog) for examples. Writing dialog for Hagger is very difficult, so I'll write a quick one up for Reeve. Reeve has a lot of dialog overrides, so scroll way down or use CTRL F to find reeve_cafe_party_dialog_port1_1a and copy that dialog.

[DialogNodeOverride] ID=reeve_cafe_party_dialog_port1_1a;
dialogNodeID_toOverride=cafe_party_dialog;
completeOverride=true;
overrideSpecialEffects=false;
fReq=party:reeve - g1:D_reeve_cafe_party_dialog_port1_1a + loc:port1 - 1;
speakerOverride=reeve;
specialEffect=delayDialog,3;
specialEffect=noSpeechFXLookOrAnim;
animations=sad;
animations=meh;
animations=happy;
animations=sly;
statements=Just bread, huh?<p=> No...<p=> toppings or anything...?;
statements=<speed=0.6>*crunch* *munch*;
statements=Oh!<p=> That's actually really good!;
statements=Could still use a bit of meat on top, but I'll take it.;
nextNodeID=endCafeTalk;

...would become...

[DialogNodeOverride] ID=reeve_cafe_party_dialog_PROM_1a;
dialogNodeID_toOverride=cafe_party_dialog;
completeOverride=true;
overrideSpecialEffects=false;
fReq=party:reeve - g1:D_reeve_cafe_party_dialog_PROM_1a + loc:z_prom_newport - 1;
speakerOverride=reeve;
specialEffect=delayDialog,3;
specialEffect=noSpeechFXLookOrAnim;
animations=scared;
animations=meh;
animations=happy;
animations=sly;
statements=That's a huge hunk of melon!;
statements=<speed=0.6>*chomp* *squish*;
statements=Oh!<p=> Delicious! It's really sweet, <pname>.;
statements=Watch out for those seeds, though. Might be missing a tooth after this.;
nextNodeID=endCafeTalk;

Note that I changed the parts in CAPS. I also had to change the location name to z_prom_newport in that fReq line. Don't get me started on fReqs. I'm really not qualified to explain them. They're powerful for checking conditions for things to happen, but they also cause my head to hurt when I'm working with them. Beyond that, I also changed up one of the animations and the dialog, of course.
Building a Port: NPCs
Adding NPCs to your port is very similar to adding other actors to a dungeon or something. Make sure you set the NPCs to friendly, and change their dialog. You may also want to give them stats for flavor, and change their appearance. Additionally, giving them items isn't a bad idea, as it helps them seem detailed and real.

For the main service NPCs, there are a few dialogs you should know about. Input the bolded portions of these exactly as they are written here to have your service NPCs eventually function (you'll have to set up the port's location file before their dialog will actually work).
  • merchant: the NPC that handles trade and investment
  • shipwright: the NPC that handles building and repairing boats
  • cafe: the NPC that handles cafe business (this is required for hirable crew to spawn)
  • merchant_items: the NPC that handles selling items (bag icon)
  • merchant_inv: the NPC that handles selling weapons, typically (sword icon)
There are more, but these are the basics. You can check existing ports or Demonbunny’s Port Kapul Mod for other examples. For the merchant_inv dialog, you'll also have to give that merchant some items in its inventory, all inside a Vendor Inventory item (box_vendor). This is probably a good time to mention that you can set the item amount of stackable items to infinite while holding the item in build mode and pressing I.
You may also wish to give your service NPCs some idle animations.
  • Check out Chuck(above) in port1 to see how to set up a blacksmith animation loop (complicated, involves giving the NPC certain prop items to hold).
  • Take a look at Scind in port2 to see how to give your cafe NPC the wash_cup idle animation (put wash_cup in the idleAnimOverride area when middle clicking on your NPC).

Of course, your port will feel pretty empty if it only has service NPCs. Add some others for scenic effect. You'll have to write quick dialogs for them. I recommend using <rand= when writing your "chatter" dialogs, as I call them, so that when the player talks to the filler NPC there are a few different things the character can say. Here's how to format that, featuring an example from The Summoners of New Vesper:

[DialogNode] ID=snv_dialog_flowerchatter;
animations=happy;
statements=<rand=Aren't the flowers lovely here?/I tend the flowers here./Have a pleasant day!>;
nodeToConnectTo=;

In that example, there are three different things that the character can say, each one separated by /. Make sure you copy that formatting exactly if you want it to work. You can add more options, but you'll have to keep adding / to separate them. For more suggestions on writing dialog, please check out the guide that covers it, Radiatoryang's Dialog Guide.

You may want your filler NPCs to walk around randomly. To do that, you'll need to middle click on the NPC and change their ai_lua text field. Here are some options you can choose from:
  • wander_leash1_slow
  • wander_leash5_slow

There are certainly more (check the AI folder in Steam > steamapps > common > Horizon's Gate > Content > Data > SystemData > AI), but these two work the best. The first one means the NPC won't wander more than 1 tile away from their starting point. The second one means they won't wander away more than 5. There are other wander_leash options, but I feel like the NPCs move too fast when they have those on.
Building a Port: The Location File
Before you can really test your port, you'll have to create its location file. So scout out a good place in the overworld for your port to go, and record its coordinates. Remember that you can bring up the console (shift ~) to reveal the X, Y coordinates of your mouse.

Creating your location file from scratch would be a headache that I can't even begin to imagine, so just copy and paste from mine, which is copied and pasted from another one of mine, which is copied and pasted from Demonbunny’s Port Kapul Mod.

I'll paste my commented example below so you can see what each section is for.

--Here's the custom port.
[Location] ID=z_prom_newport; name=Port Noble;
x=543; y=327;
port=true;
discovered=false;
namePopup_texture=tbg_port;
showNameAsAPopupOnEntering=True;
useWorldtimeZoneDarkness=True;
zoneThisLocationIsIn=eral;
zoneDescTitle=Port;
discoveryFameMod=1;
externalSong=PM-Resort2;
locationItem=port_bighouses5;

wealthLevel=30;

--Here's where I'm putting the cargo I've chosen, and the cafe food.
tradeGood_itemTypeID=cargo_gemstone;
cafeFood_itemTypeID=guideexample_watermelon;

--These icons are what show up on the map. You'll want to change these to whatever your port offers. You can also make your own, like I did in The Sea Below.
tooltipIcons=sign_icon_cup;
tooltipIcons=sign_icon_balance;
tooltipIcons=sign_icon_bag;
tooltipIcons=sign_icon_boat;
tooltipIcons=sign_icon_book;

--This is where the ship weapons go.
itemType_quantity=cannon_falconet=-2;
itemType_quantity=gear_boarding=-2;
itemType_quantity=cannon_culverin=-2;

--Here are some basic items available at the merchant.
itemType_quantity=reviveDust=-2;
itemType_quantity=bandage=-2;
itemType_quantity=splint=-2;
itemType_quantity=lifeshard=-2;
itemType_quantity=bottle_beer=-2;
itemType_quantity=dart=-2;

--Here are the ships available by default.
shipwright_boatTypes=lightgalley;
shipwright_boatTypes=caravel;
shipwright_boatTypes=cog;

--Now we're getting into unlockables. Notice how there are two lines for every unlockable item.
itemType_quantity_unlockable=cannon_harpoon=-2;
itemType_formula_unlockable=cannon_harpoon=m:locWealth(70);
itemType_quantity_unlockable=gear_extraCache=-2;
itemType_formula_unlockable=gear_extraCache=m:locWealth(80);
itemType_quantity_unlockable=cannon_cannon=-2;
itemType_formula_unlockable=cannon_cannon=m:locWealth(90);
itemType_quantity_unlockable=gear_boarding_hook=1;
itemType_formula_unlockable=gear_boarding_hook=m:locWealth(100);

itemType_quantity_unlockable=mythril_chunk=1;
itemType_formula_unlockable=mythril_chunk=m:locWealth(65);
itemType_quantity_unlockable=xpGem=3;
itemType_formula_unlockable=xpGem=m:locWealth(65);
itemType_quantity_unlockable=xpGemMed=2;
itemType_formula_unlockable=xpGemMed=m:locWealth(75);
itemType_quantity_unlockable=fish_mag=1;
itemType_formula_unlockable=fish_mag=m:locWealth(75);
itemType_quantity_unlockable=cloak_kingfur=1;
itemType_formula_unlockable=cloak_kingfur=m:locWealth(75);
itemType_quantity_unlockable=ghost_grub=1;
itemType_formula_unlockable=ghost_grub=m:locWealth(90);
itemType_quantity_unlockable=ironice_chunk=1;
itemType_formula_unlockable=ironice_chunk=m:locWealth(90);
itemType_quantity_unlockable=abilityCrest=1;
itemType_formula_unlockable=abilityCrest=m:locWealth(100);

itemType_quantity_unlockable=necklace_lifebead=1;
itemType_formula_unlockable=necklace_lifebead=m:locWealth(70);
itemType_quantity_unlockable=band_fire_elec=1;
itemType_formula_unlockable=band_fire_elec=m:locWealth(80);
itemType_quantity_unlockable=armor_shellworm=1;
itemType_formula_unlockable=armor_shellworm=m:locWealth(90);
itemType_quantity_unlockable=guideexample_armor_golden_mail=1;
itemType_formula_unlockable=guideexample_armor_golden_mail=m:locWealth(100);

itemType_quantity_unlockable=fullrigged=-2;
itemType_formula_unlockable=fullrigged=m:locWealth(100);

--This tells the game which crew to spawn at the cafe. Assuming it works...
auto_spawnDataID=hire_human;
auto_spawnDataID=hire_ferren;
auto_spawnDataID=hire_wilderi;

--This determines starting favor. Nothing too fancy.
faction_favor=seartial=20;
faction_favor=jasce=0;
faction_favor=rumane=0;


If you've made the appropriate changes as needed, your port should now be in the world! Still, it's a good idea to go in and test it out. Talk to the NPCs. Try out the cafe dialog. Make sure you can't kill anyone in town (peaceful!).
What's Next?
That depends on you. If there's something that you want to include in your mod, something that this guide (and the others) didn't shed enough light on, let me know in the comments, or on the Horizon’s Gate Discord Modding Channel[discord.com].

I've never written a guide before, so I hope this is helpful. But I'm kind of flying blind. Let me know if there are other topics to cover, or if certain topics need more attention.

Thanks for reading!

Oh, and here's the mod that pairs with this guide.