Setting up a Windows POL server. A tutorial.
Posted: Thu Dec 27, 2018 12:42 pm
Thank you for taking a look at POL!
The POL server comes in two (2) parts, the Core and the Distro. POL is a virtual machine (VM). That is the Core part of POL. The Distro is a collection of eScript programmes that emulates a UO server. There is some cross-over between the Core and Distro as far as the emulation of a UO server is concerned but most of everything that handles actual gameplay is done by the eScript programmes. Just for clarification, eScript is the language used to write programmes, called “scripts” by most people, that the POL Core runs to emulate the UO world we have all come to know and love.
I suggest you read through this tutorial first so you have an understanding of the steps involved. Then come back and follow the steps to get up and running.
First, download the Distro. We have two (2) versions available. If you want a classic UO experience with no special or custom wood types and no damage modifications based on the materials used to craft a weapon then the Classic Distro is for you. The Classic Distro was intended for developers who want a basic working UO emulator that they can modify to work the way they want it to without the need to remove a lot of unwanted extra functionality. It is available on the Downloads page as well.
The other option is the Modern Distro. It has a crafting system modeled after the OSI system as it looks today plus the additions of the resistances and damage types you find in the current version of UO. The Modern Distro is still a work in progress. So some things might not work correctly though most should. I bet by now you can guess where you are able to find the Modern Distro.
I recommend starting with the Classic Distro for the purpose of working through this tutorial.
Once you have downloaded the Distro, create a directory and extract the files from the ZIP file into that directory. Please note that the Distro files are inside a folder within the ZIP file. You will need to open that folder to extract the Distro files. You should not receive any warnings about overwriting files but if you do let Windows replace files with those from the Distro ZIP file.
Note: If you already have a set of scripts for a shard, you do not need to download one of the POL Distros. Create a directory and place your shard scripts in that directory.
Next, download the POL Core. You can find the latest stable release here on the Downloads page. Go and download it. Extract the contents of the Core ZIP file to the folder you created earlier.
The POL Core relies on settings contained in at least 7 configuration files. These files are in plain text. You can, if you choose, edit them by hand. I do not recommend that unless you enjoy doing things the hard way. Fortunately, there is a tool available, the POL Configurator, which presents these settings in a graphical user interface that makes configuring POL much easier. You can read about it on the POL Forums. The links to download it are there as well. This tutorial will use the POL Configurator to setup POL.
Once you have downloaded the Configurator, double-click the pol_configurator.exe file to start the program. Near the bottom left of the program window use the Browse button next to the text box labeled Location of your POL Directory to locate your new POL folder. Remember that the dialog box that opens is a directory selection box. Highlight the directory and click on the Select Folder button. You will be presented with a dialog box informing you that your POL installation is missing the ecompile.cfg file. This is normal because we do not provide a default ecompile.cfg file with the Core or Distro files. This is because some of the settings in that file are dependent upon the location of your POL installation. Click the Yes button to allow the Configurator to provide the missing file. A message will appear informing you the missing file has been added to your installation. Click the OK button.
Now you need to tell the Configurator where your UO client files exist. Use the Browse button next to the text box labeled Location of your UO installation to locate your UO client folder.
If you do not select the proper directories for POL or UO the Configurator will inform you. The Configurator looks for certain files in those directories to determine that you have selected valid locations. If you receive a notification that one of these directories is not a valid location, try locating the appropriate folder again. Remember that these are directory selection boxes. They differ from file selection boxes. You merely need to highlight, single-click, on the directory then click the Select Folder button.
If the Configurator still refuses to accept your directories as valid then post the issue here and I will try to help you.
Assuming there were no problems locating your POL and UO installations the next thing is to review the current settings. Click on the eCompile tab and verify that the directory settings are correct in the eCompile CFG Directory Setting group box. They should be, but if they are not, browse to the appropriate folders. If you need to do that use the following examples, assuming your POL installation is D:\pol
Module Directory
D:\pol\scripts\modules
Include Directory
D:\pol\scripts
POL Script Root Directory
D:\pol\scripts
Package Root Directory(ies)
D:\pol\pkg
The /devpkg directory is optional. You will not have a directory by that name in the Distro and no error will occur if it does not exist. It is intended for packages that are in development but not ready to be implemented.
As of this writing, 2018-12-27, if you are using a client version in the 7+ range the other default settings will work fine. If your version is below 7 then you may have to adjust certain settings to meet your client’s requirements. See the Expansion Settings group on the Server Settings page if you need to set your server for an earlier expansion.
Feel free to have a look at all the various settings that are available with POL. The Configurator has tooltips for most of the settings that explain, briefly, their function. Just hover the mouse pointer over the check box, text entry box, or drop-down box to see the tooltip. Once you have reviewed your settings and are satisfied with them, click the Save Settings button. You will now be presented with a dialog box informing you that you are missing accounts.txt and pol.txt files. This is normal when setting up one of the Distro versions. We do not include either of those files in the Distro or Core downloads. Check the Clear Game Data check box. Do not worry. As this is a new installation you have no game data. The text entry boxes for a username and password will be enabled. The username and password are used to create the shard developer account. Please note that the password is not masked in the text box with asterisks. Once you have entered a username and password click the Yes button. You will be presented with a message informing you of the creation of accounts.txt and pol.txt. Click the OK button.
It is time to create POL’s internal representation of the world maps and a few configuration files related to art tiles, landtiles, and multis. Go to the Facet Generation page. Note that the only enabled group is Copy UO Files. Again we are going to assume you are using a version 7 or later client. If you are using an earlier client version then uncheck the Copy only UOP, statics, and tiledata check box. Now click the Copy Required Files button.
Once the file copy process is complete, the other groups will be enabled.
If you are using the POL 099.1 stable release, which you should be for this tutorial and you are using a version 7 or higher client, then you must extract the *.mul files from the newer *.uop files that version 7 and higher clients use. At the upper right corner of the Facets Generation page, you will see the UOP/MUL Unpack and Repack group. Click the Unpack the MUL files from the UOP files button. This will open a command line window and run an external programme to perform the extraction. Once it is finished press any key to close the window.
I should mention that POL 100, which is currently in beta, does not require you to extract the *.mul files but there are other reasons, such as editing maps, where the MUL files need to be extracted. We will not be editing maps in this tutorial.
Now back to the left side of the page… Just below the Copy UO Files group there is the Tiles, Multis, and Landtiles group. The three check boxes in that group should be checked. If they are not all checked, please check them. Then click the Build the selected cfg files button. This will open another command window and run the uoconvert.exe programme that will generate the three cfg files. Again, once that is done press a key to close the window.
It is now time to generate the facets. POL uses the term realm instead of facet. I do not know why that was chosen but it was. So in eScript programmes, we use the term realm but here we will call the different maps by their official designation, facets.
In the Map Generation Settings group select your map size. For clients before Mondain’s Legacy choose Third Dawn Map Size. Otherwise, you can leave it set to Mondain’s Legacy Map Size. Below the map size selector, you may choose the facets you want to generate. I recommend selecting them all but at least select Felucca. You may also choose to use the additional *.Dif files when generating the facets. I am not exactly certain what the Dif files are but it is my understanding they are used to patch the main map files. If anyone knows more about their purpose I welcome your input.
Once you have made your facet selections click the Build the Selected Facets button. This will open a command window and run uoconvert.exe to generate the internal map files for POL.
We are almost finished. I know reading this makes it seem like a long process but it goes pretty fast once you are actually doing it.
The last step.
Click on the eCompile tab. At about the middle of the page, you will see three wide buttons. I like to see the programmes, usually called scripts, being compiled. So click on the Compile modified Scripts. Send output to the console button. A command window will open and you will see eCompile’s output as it compiles each eScript programme. Once the compilation is finished press any key.
I said that was the last step. I lied. You have one more thing to do. At the far right of the Configurator window, you will see two large buttons near the bottom, Test Launch POL and Run POL. The very last step is to choose one of those buttons. I suggest using Test Launch POL since this is the first time you are running POL. The tooltips for each button will explain the difference between them. A new command window will open and you should see POL loading the realms (facets), packages, and various other things it needs to do to start. When you want to shut the server down there are several ways to do that. One way is to press <ctrl>-c when the server command window is in focus. You can enter a question mark (?) when the server window is in focus to see a list of console commands available to you. Before POL will accept any of those commands you must first unlock the console for input by pressing <shift>-s. You can re-lock the console by pressing <shift>-s again.
Now all you need to do is set your client to log in. There is a default localhost IP already set in the configuration files. Set your client to use IP 127.0.0.1, port 5003, and no encryption. Now login and enjoy.
P.S. I suggested using the Classic Distro with this tutorial because I know for certain that there are no issues with its programmes (scripts). However, this same process can be used with the Modern Distro, and should work with any complete world shard that is POL 099.1 compliant.
The POL server comes in two (2) parts, the Core and the Distro. POL is a virtual machine (VM). That is the Core part of POL. The Distro is a collection of eScript programmes that emulates a UO server. There is some cross-over between the Core and Distro as far as the emulation of a UO server is concerned but most of everything that handles actual gameplay is done by the eScript programmes. Just for clarification, eScript is the language used to write programmes, called “scripts” by most people, that the POL Core runs to emulate the UO world we have all come to know and love.
I suggest you read through this tutorial first so you have an understanding of the steps involved. Then come back and follow the steps to get up and running.
First, download the Distro. We have two (2) versions available. If you want a classic UO experience with no special or custom wood types and no damage modifications based on the materials used to craft a weapon then the Classic Distro is for you. The Classic Distro was intended for developers who want a basic working UO emulator that they can modify to work the way they want it to without the need to remove a lot of unwanted extra functionality. It is available on the Downloads page as well.
The other option is the Modern Distro. It has a crafting system modeled after the OSI system as it looks today plus the additions of the resistances and damage types you find in the current version of UO. The Modern Distro is still a work in progress. So some things might not work correctly though most should. I bet by now you can guess where you are able to find the Modern Distro.
I recommend starting with the Classic Distro for the purpose of working through this tutorial.
Once you have downloaded the Distro, create a directory and extract the files from the ZIP file into that directory. Please note that the Distro files are inside a folder within the ZIP file. You will need to open that folder to extract the Distro files. You should not receive any warnings about overwriting files but if you do let Windows replace files with those from the Distro ZIP file.
Note: If you already have a set of scripts for a shard, you do not need to download one of the POL Distros. Create a directory and place your shard scripts in that directory.
Next, download the POL Core. You can find the latest stable release here on the Downloads page. Go and download it. Extract the contents of the Core ZIP file to the folder you created earlier.
The POL Core relies on settings contained in at least 7 configuration files. These files are in plain text. You can, if you choose, edit them by hand. I do not recommend that unless you enjoy doing things the hard way. Fortunately, there is a tool available, the POL Configurator, which presents these settings in a graphical user interface that makes configuring POL much easier. You can read about it on the POL Forums. The links to download it are there as well. This tutorial will use the POL Configurator to setup POL.
Once you have downloaded the Configurator, double-click the pol_configurator.exe file to start the program. Near the bottom left of the program window use the Browse button next to the text box labeled Location of your POL Directory to locate your new POL folder. Remember that the dialog box that opens is a directory selection box. Highlight the directory and click on the Select Folder button. You will be presented with a dialog box informing you that your POL installation is missing the ecompile.cfg file. This is normal because we do not provide a default ecompile.cfg file with the Core or Distro files. This is because some of the settings in that file are dependent upon the location of your POL installation. Click the Yes button to allow the Configurator to provide the missing file. A message will appear informing you the missing file has been added to your installation. Click the OK button.
Now you need to tell the Configurator where your UO client files exist. Use the Browse button next to the text box labeled Location of your UO installation to locate your UO client folder.
If you do not select the proper directories for POL or UO the Configurator will inform you. The Configurator looks for certain files in those directories to determine that you have selected valid locations. If you receive a notification that one of these directories is not a valid location, try locating the appropriate folder again. Remember that these are directory selection boxes. They differ from file selection boxes. You merely need to highlight, single-click, on the directory then click the Select Folder button.
If the Configurator still refuses to accept your directories as valid then post the issue here and I will try to help you.
Assuming there were no problems locating your POL and UO installations the next thing is to review the current settings. Click on the eCompile tab and verify that the directory settings are correct in the eCompile CFG Directory Setting group box. They should be, but if they are not, browse to the appropriate folders. If you need to do that use the following examples, assuming your POL installation is D:\pol
Module Directory
D:\pol\scripts\modules
Include Directory
D:\pol\scripts
POL Script Root Directory
D:\pol\scripts
Package Root Directory(ies)
D:\pol\pkg
The /devpkg directory is optional. You will not have a directory by that name in the Distro and no error will occur if it does not exist. It is intended for packages that are in development but not ready to be implemented.
As of this writing, 2018-12-27, if you are using a client version in the 7+ range the other default settings will work fine. If your version is below 7 then you may have to adjust certain settings to meet your client’s requirements. See the Expansion Settings group on the Server Settings page if you need to set your server for an earlier expansion.
Feel free to have a look at all the various settings that are available with POL. The Configurator has tooltips for most of the settings that explain, briefly, their function. Just hover the mouse pointer over the check box, text entry box, or drop-down box to see the tooltip. Once you have reviewed your settings and are satisfied with them, click the Save Settings button. You will now be presented with a dialog box informing you that you are missing accounts.txt and pol.txt files. This is normal when setting up one of the Distro versions. We do not include either of those files in the Distro or Core downloads. Check the Clear Game Data check box. Do not worry. As this is a new installation you have no game data. The text entry boxes for a username and password will be enabled. The username and password are used to create the shard developer account. Please note that the password is not masked in the text box with asterisks. Once you have entered a username and password click the Yes button. You will be presented with a message informing you of the creation of accounts.txt and pol.txt. Click the OK button.
It is time to create POL’s internal representation of the world maps and a few configuration files related to art tiles, landtiles, and multis. Go to the Facet Generation page. Note that the only enabled group is Copy UO Files. Again we are going to assume you are using a version 7 or later client. If you are using an earlier client version then uncheck the Copy only UOP, statics, and tiledata check box. Now click the Copy Required Files button.
Once the file copy process is complete, the other groups will be enabled.
If you are using the POL 099.1 stable release, which you should be for this tutorial and you are using a version 7 or higher client, then you must extract the *.mul files from the newer *.uop files that version 7 and higher clients use. At the upper right corner of the Facets Generation page, you will see the UOP/MUL Unpack and Repack group. Click the Unpack the MUL files from the UOP files button. This will open a command line window and run an external programme to perform the extraction. Once it is finished press any key to close the window.
I should mention that POL 100, which is currently in beta, does not require you to extract the *.mul files but there are other reasons, such as editing maps, where the MUL files need to be extracted. We will not be editing maps in this tutorial.
Now back to the left side of the page… Just below the Copy UO Files group there is the Tiles, Multis, and Landtiles group. The three check boxes in that group should be checked. If they are not all checked, please check them. Then click the Build the selected cfg files button. This will open another command window and run the uoconvert.exe programme that will generate the three cfg files. Again, once that is done press a key to close the window.
It is now time to generate the facets. POL uses the term realm instead of facet. I do not know why that was chosen but it was. So in eScript programmes, we use the term realm but here we will call the different maps by their official designation, facets.
In the Map Generation Settings group select your map size. For clients before Mondain’s Legacy choose Third Dawn Map Size. Otherwise, you can leave it set to Mondain’s Legacy Map Size. Below the map size selector, you may choose the facets you want to generate. I recommend selecting them all but at least select Felucca. You may also choose to use the additional *.Dif files when generating the facets. I am not exactly certain what the Dif files are but it is my understanding they are used to patch the main map files. If anyone knows more about their purpose I welcome your input.
Once you have made your facet selections click the Build the Selected Facets button. This will open a command window and run uoconvert.exe to generate the internal map files for POL.
We are almost finished. I know reading this makes it seem like a long process but it goes pretty fast once you are actually doing it.
The last step.
Click on the eCompile tab. At about the middle of the page, you will see three wide buttons. I like to see the programmes, usually called scripts, being compiled. So click on the Compile modified Scripts. Send output to the console button. A command window will open and you will see eCompile’s output as it compiles each eScript programme. Once the compilation is finished press any key.
I said that was the last step. I lied. You have one more thing to do. At the far right of the Configurator window, you will see two large buttons near the bottom, Test Launch POL and Run POL. The very last step is to choose one of those buttons. I suggest using Test Launch POL since this is the first time you are running POL. The tooltips for each button will explain the difference between them. A new command window will open and you should see POL loading the realms (facets), packages, and various other things it needs to do to start. When you want to shut the server down there are several ways to do that. One way is to press <ctrl>-c when the server command window is in focus. You can enter a question mark (?) when the server window is in focus to see a list of console commands available to you. Before POL will accept any of those commands you must first unlock the console for input by pressing <shift>-s. You can re-lock the console by pressing <shift>-s again.
Now all you need to do is set your client to log in. There is a default localhost IP already set in the configuration files. Set your client to use IP 127.0.0.1, port 5003, and no encryption. Now login and enjoy.
P.S. I suggested using the Classic Distro with this tutorial because I know for certain that there are no issues with its programmes (scripts). However, this same process can be used with the Modern Distro, and should work with any complete world shard that is POL 099.1 compliant.