Victoria 3

Victoria 3

29 ratings
How to move settlements in the map editor
By Savs
This modding guide will describe how you can move cities and other types of settlements on the map, so that they are in a different spot at the start of the game.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Is some city in the wrong place? Want to rearrange cities? Have you created a new state and you need to move cities around? Look no further!

Vocabulary:
- Hub / Anchor / Anchor hub : Invisible in the game, this is the point that roads and other types of splines connect to. It is associated with settlements and in the map editor it has a purple sphere around it.
- Locator : An object which has visible graphics that look like a city, farm, mine, wood camp or port. In the map editor it has a yellow sphere around it (when the appropriate settings are enabled). It is normally placed near the hub.
- Splines / Strips : Roads and other things that connect hubs

But what exactly does that mean for the map?

Hubs and locators together help define what I called in the title settlements and in the thumbnail cities. Every state has four settlements, and coastal provinces have an extra. These are:
  • city
  • farm
  • mine
  • port
  • wood

While the roads are frequently visible always, the settlements themselves will only be on the map if the state has a building associated with that settlement type, such as a naval base for a port, or a chemical plant for a city. If during the course of your testing you want to make sure that a settlement is in the right place, start a building for that settlement!
The Map Editor
If you don't know how to open the map editor, you have a few choices.

  • Open the console by pressing the key above Tab and to the left of 1 in the top left of your keyboard. It is possible that you will need to have debug mode enabled, which you can do in two ways: Either have it in your commandline by having the argument -debug_mode (and while you're there, add -filewatcher, too!) - make sure you have the - at the front, OR in the launcher go to Gameplay Settings in the menu at the left and launch the game with the option Open game in Debug Mode. Once you've got that sorted, in the console type map_editor.
  • Add a commandline argument that reads -map_editor. This will automatically launch the map editor after the game has been loaded, so you will need to remove it before you can properly play the game again.

The map editor is fairly resource-heavy, so if it crashes, it's probably because you don't have enough (free) computer resources. If this happens, try closing other programs while the editor is launching.

When it launches, and you get rid of the console if you had it open, you will see something like this:

The first thing you're going to want to do is click on the Mask Painter Tool in the left menu, the second one from the bottom.

Then in the menu that it opens on the right, look at the bottom-left window and tick the two boxes circled in red: Autorefresh and Draw City Spheres.
NOTE: Autorefresh requires a lot of resources, too. I have frequently crashed the editor by not giving it enough resources, so here it's also important to make sure your computer has enough.
Moving the Settlement
I've decided for this guide that I want to adjust the location of Tampere in Finland slightly. I'll click the Spline Network Strip Tool so I can see hubs and their splines (the roads and other connections).

We need to move both spheres - the pink/purple one that's the hub, and the yellow one that's the locator. It doesn't matter which order you move them in, but if you want the locator to be right on top of the hub (which I normally do because I don't like the look of the ends of the roads when they just stop abruptly), then I suggest starting with the hub. That's what I'll do. I'll just move it a little bit to the southeast.

So I'm dragging the hub southeast, and once it's in a good place I let go, and the game recalculates where the splines (roads) should go. I can adjust those with the Spline Network Adjustment Tool if I want, which is just below the currently-selected tool.

Now let's move the locator. Choose the Map Objects Editor tool and click the Tampere sphere once.


Then choose the Move tool from the top menu (shortcut key W) and drag the sphere to the desired location. If you're doing more than just one, it's good practice to switch back to the selection tool immediately by pressing Q and clicking away from the currently selected locator, that way you won't accidentally drag locators around.
SAVE SAVE SAVE
It's happened before that I accidentally crashed the map editor after having made lots of edits to hubs. It may be annoying to save frequently, but it's better than losing 10+ minutes of work!

Hit the Save As... button, and make sure that any files that have changed (that have their box ticked), are saving to your mod.

I strongly recommend against hitting the Save All button ever. Just reject it. I once hit it and it took a while to save and overwrote the base game files, so I needed to verify my game cache. It really put a dent in my modding vibe.

Save and save often.
Advanced: Hub IDs and types
There are some other important things to note that didn't fit in this example:

Hubs have an ID associated to them, which when you select a hub you can see in the top right of the map editor. The ID is always of the format [State ID #][settlement type]. State IDs are perhaps most easily found in the map_data/state_regions folder. Settlement types are as follows:
  • 00 - city
  • 01 - farm
  • 02 - mine
  • 03 - port
  • 04 - wood

Thus, the ID of the city for Lombardy (id 76) is 7600. The mine for Hedjaz (id 402) is 40202. The port for Guangdong (id 497) is 49703.

With ports you might notice that it in fact has TWO hubs! This second hub always has the ID [State ID#]00, and is different to the city because it's a Type 1 hub (which tells the game that it's a sea hub). Thus, although Guangdong's sea-facing hub's ID is 49700, because it's Type 1 instead of the normal Type 0, the game doesn't confuse it with the city in Guangdong (which is 49700 Type 0).

To create a type 1 hub, select one of the two naval splines (to set it as active) and then place the hub.
Other advanced info
At its foundation, hubs are intended only to connect splines/strips. For that reason, sometimes locators are not in the exact same location as their hubs. One example is in the Yukon Territory in North America. Deciding to put the locator somewhere different from the hub is a choice of visual design - maybe you want the road/railroad to go somewhere different than the settlement. Maybe you want to represent a settlement that was extremely difficult to reach. Maybe you want to make it easier for roads to reach hard-to-reach places.

After all, splines/strips cannot pass through a third state to connect hubs in different states. Sometimes a hub far from its locator may make it easier to connect disparate states.

Spline types:
  • Roads are always present
  • Railroads will only appear when you have researched the relevant technology
  • Coastal naval routes connect ports to sea hubs
  • Naval routes are the thick dashed line that connect sea hubs to other sea hubs

Each one has its own colour in the editor, which you can see when you play around with them a bit.

(I may write more here when it comes to mind)
Renaming settlements
Moved some settlements around and need to change their names? You need to change their localization. Localization is the dictionary the game uses to translate code into whatever human language you want. This is found in Documents/Paradox Interactive/Victoria 3/yourmod/localization. If you don't already have such a folder, you'll want to make one, and note that it's spelled with a "z"!

Localization files are in the .yml format. Use Notepad++ or Sublime or something else more advanced than plain Notepad to edit them. Rather than create your own file, it is strongly recommended that you copy an existing, working file (maybe from the base game) and repurpose it for your needs. In your newly copied file, delete everything except the first line where the language is defined, e.g. l_english: . The file's name must also end with _l_english.

Let's look at an example of something currently used in my mod:

File name: HtA_vanilla_hub_names_l_english.yml

l_english: #Aquitània HUB_NAME_STATE_LANGUEDOC_city: "Mauguio" HUB_NAME_STATE_LANGUEDOC_farm: "Narbona" HUB_NAME_STATE_LANGUEDOC_mine: "Alés" HUB_NAME_STATE_LANGUEDOC_port: "Seta" HUB_NAME_STATE_LANGUEDOC_wood: "Carcassona"

We start with the language of the file being defined, so the game knows to use this when the game language is set to English.
Then we've got #Aquitània, which is just a comment telling the person looking at the file that the following hubs are in that country. Using these is optional. Anything following a # on the same line is ignored by the game.
Hub localization, as you might deduce, follows the following format:
HUB_NAME_STATE_(state name)_(hub type): "Hub name"

Thus, my state is Languedoc, and for each of the five hub names I've set a new name. The order of these in your localization doesn't matter, though I've put them in the same order as the IDs for convenience. Note that the state name must be the one in code, and not any custom localized name. For example, if my Languedoc is localized as Lengadòc, I still have to use LANGUEDOC in all code references to the state.

If you're not sure which hub a certain one is on the map, there are a few options. Look at its ID, or with the map content editor hover over its associated locator and it should read the type there, or even just rename all the hubs in the state and track things that way. The game has no problem updating localization while running (though maybe you need the -filewatcher command line).

Important: It seems to be best practice in Vic3 localization to put anything that modifies basegame localization a folder called "replace", such as in my mod's path:
Documents\Paradox Interactive\Victoria 3\mod\The Heirs to Aquitania\localization\english\replace
This is where the abovementioned example file for changing the hubs in Languedoc is found in my mod. While normal localization files are typically additive, that is that they are read together with the base game files, anything in a file in the replace folder will, well, replace the same localization entry in the base game.
Closing remarks
I hope this was useful! Let me know if you have suggestions about (relevant) things to add to this guide!

If you are having some problems following this guide, join the Victoria 3 Modding Coop Discord server and ping me - Savs: https://discord.gg/UZkHqyq5vj

Check out my guide on how to mod in a new country: https://steamcommunity.com/sharedfiles/filedetails/?id=2881355788

Happy modding!
15 Comments
ParagonRenegade Dec 7, 2023 @ 10:24pm 
I've referred to this guide several times now, it's very helpful. Thank you Savs :)
Arnil Nov 12, 2023 @ 8:08pm 
@Savs

Hi, Savs!

Do you understand how to mod spline network after 1.5.1 update? 🤔
Savs  [author] Sep 17, 2023 @ 9:57am 
> what is softwave ?
If you're asking about the software used, it's the map editor included in the game.
Nguoi Suy Tuong Sep 14, 2023 @ 3:45am 
what is softwave ?
Savs  [author] Apr 21, 2023 @ 7:49am 
Every state is limited to its 4-5 possible settlements, and I don't think it's possible to mod in a new/additional settlement type. The approach the devs have taken is to increase the number of states, it seems, based on stuff I've seen in upcoming stuff for 1.3.
thunder crap Apr 21, 2023 @ 12:37am 
Is there a way to make new settlements?
Savs  [author] Jan 21, 2023 @ 3:03am 
Aye, thanks, I forgot to update it!
Ergo Doctor Hawk Jan 17, 2023 @ 8:35am 
Also I believe the way you create type 1 hubs is by selecting the spline type "coastal_naval_route" before placing the hub anchor.
Ergo Doctor Hawk Jan 17, 2023 @ 7:51am 
Yes. You are quite awesome sir. I asked here before I knew you were the same person.
Savs  [author] Jan 17, 2023 @ 4:25am 
Answered and dealt with (IIRC) in Discord