How to setup a modded M&B or NW server
You may have downloaded or created a Napoleonic Wars or M&B server side modification and the next step would be to install it on your server. If you find yourself lost at this point, this tutorial will explain how to upload the modified files to the server, and where to put them.
Well, there are several answers depending on where your server is hosted and what your capabilities are, read on.
1) Ask the server hoster to do it
If your hoster is an individual who you know personally, this will be an easy ride. If it is a company, you will have to login into their user area and open a support ticket, or send an email to their support address.
When asking your hoster to upload the files, make sure to send the actual files as well, you can either pack them as an email attachment or upload to a file sharing service and send them the link. There are many file sharing services, you can get started for free on Google Drive or Dropbox. As for how to upload and share files there are many tutorials out there.
Don’t feel awkward about talking to your hosting company, they take your money and are obliged to read your requests and respond politely.
2) Get someone else to do it
Again, an easy ride if you know an individual with such skills personally. Otherwise, you may have to ask around or even hire a freelancer. If you hired a modder to make the scripts, you can try asking him to install them on your server as well.
You will need to help that person by providing:
- Some login details to work with files. Look around the hoster’s user area or ask the support directly, they may provide FTP access. FTP is used to work with files on the server, through some FTP client installed on a local computer. If your hoster only has file manager, then you will have to provide the person who is helping you with login details to a control panel, the same ones you use to login (though it would be wise to temporarily change the password, if you don’t fully trust the person who is helping you).
- Modded files themselves, you can either pack them as an email attachment or send a link to a sharing service where you uploaded the files. If the mod is publicly available you can just link the mod’s page.
Then sit back and relax, and hope that this person knows what he is doing.
3) Do it yourself
I suggest doing it yourself if your hoster gives you access, it may be frustrating at start but you will learn new things and gain some confidence. These instructions attempt to be universal, parts of your experience may vary depending on your hoster, tools of choice, operating system etc..
tldr: 1) connect through FTP client or control panel’s file manager, 2) backup and then overwrite .txt files in Modules/Napoleonic Wars with modded .txt files, 3) restart the server.
Step 0: Before we continue, let’s have a little talk on how to not break stuff
If you are able to edit the server files then you are able to break them as well, as simple as that. Keep these things in mind:
The right folder: If you are uploading a NW server side modification, then there is only one folder where you want to make changes:
(Game installation)/Modules/Napoleonic Wars/
Inside the Modules/Napoleonic Wars folder are .txt files which are the compiled version of module system, readable by the game. You want to overwrite these files with your own modded .txt files, uploading those files anywhere else would be a mistake that will not break the game but will create some hard to clean garbage among files. If you accidentally edit or delete files outside of the Napoleonic Wars folder, you will most likely break the game itself.
Of course, if you are hosting some non-NW mod then you would use that other mod’s folder, in case of M&B:Warband it would be Modules/Native.
The files you may not want to overwrite: If your server has custom scenes installed then you don’t want to overwrite scenes.txt file, as it is possible that someone (or you) have previously edited that file which contains additional terrain data. If your server has custom strings implemented then you don’t want to overwrite strings.txt file. If both the server and the modification have custom strings implemented in that file, you would have to merge the two strings.txt files into one using a text editor. If you never made any modifications on these files before then there is nothing to worry about.
Needless to say but I will anyway, if you had server side mods installed previously, overwriting those .txt files will also overwrite the modification with a new one.
Copying the wrong way: Depending on what FTP client you use, it may happen that you get confused and overwrite files on the wrong end of a stick, so just always be aware of which view shows files on the server and which shows local files on your computer.
Backup server files before editing: You never know what may go wrong, so it would be a good idea to download the server’s .txt files somewhere safe before you overwrite them with modded ones. Then if something goes wrong, you can just overwrite files on the server with the backup from your computer, returning the server to it’s old self.
If you messed things up before making a backup, you can download the unmodded dedicated server files to your computer, unpack somewhere and copy the content of Modules/Napoleonic Wars to the server, overwriting the messed up module. This would return the game to vanilla NW state. Again, think before overwriting scenes.txt and strings.txt files.
Step 1: Figure out a way to edit files on your server
First, look around your hoster’s control panel for any info on how to edit files, it will either be a file manager that you can access through your browser, or FTP connection details. If in doubt, contact their support.
File manager, if your host provides one, is the easiest solution as it would be integrated with the website and you don’t need to install anything, but it may be limited in a way so you cannot edit the module files themselves. In that case you can either contact the hoster and ask for restriction to be lifted, or have them do the work for you.
FTP connection details, if available, would contain server address and port, username and password. You need to copy/paste those or write them down somewhere. You must also download and install some FTP client, a program which connects to the server and gives you an interface to work with files. This may sound complicated, but once you try it a few times you will see that moving files to and from the server and overwriting them is easy, even too easy, which is why you have to remain focused when working with files on the server.
If none of the above is available and the hoster doesn’t want to cooperate, your only choice would be to host elsewhere.
Step 2: Prepare modded files
All the bits of how a NW server will work are contained within the .txt files. Depending on where you got the modification from, you will either receive a whole bunch of them or just a few. This is because not all the files are needed for modification be applied.
The .txt files most commonly modded for server-side are: item_kinds.txt, mission_templates.txt, scene_props.txt, scripts.txt, strings.txt, troops.txt, variables.txt
Most simple modifications which just alter stats and/or inventory will be contained within item_kinds.txt and/or troops.txt
More advanced modifications will alter at least one of these: mission_templates.txt and scripts.txt
Maybe you have downloaded modded files packed as a .zip or .rar file. In that case, try right clicking on the packed file and look for unpacking options installed on your computer. If you can’t find any, you will have to find and download and install some program for packing/unpacking files, but you will most likely already have something installed.
Double check that you are looking at proper compiled .txt files. In case you are looking at source files (a lot of .py files) you will have to compile them into .txt files first, and that is outside of scope of this tutorial.
Keep the modded .txt files open in one file explorer window.
Step 3: Access the module folder on the server
If using a FTP client, you would create a new connection, entering details you have got from the hoster – server address, port, username and password. If using a file manager provided by the hoster’s control panel all you have to do is open it.
In either case, you would have to navigate to the folder of the module that you are hosting. In case of Napoleonic Wars, that would be:
(Game installation)/Modules/Napoleonic Wars
Double check that you are in the correct folder, which contains module .txt files that you are about to overwrite.
Step 4: Backup the files on the server
You can skip this step if you are confident enough. Otherwise, it would be a good idea to first backup the .txt files by copying them from the server to somewhere safe on your computer.
Step 5: Overwrite the files on the server with modded ones
If using a FTP client this will be as simple as overwriting any files on your local computer, just drag&drop the modded server files into the window where server files are hosted, and confirm that you wish to overwrite files. As for file manager, look around the interface for an option to upload files.
Step 6: Restart & test
Use whatever method your host provides to restart the server. After restart, the game will read modded .txt files, and if everything went well, your server should now have the server side modification, congrats.
And that’s it, hope this article helped you out. It was written to be universal, disregard of where you are hosting or what tools you use. If you feel this tutorial is lacking something or needs to get into more details of a specific step, let me know in comments.