Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[GUIDE]Why doesn't my client connect to my server? - Part 2: Configuration

Status
Not open for further replies.
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Why doesn't my client connect to my server?
Part 2 - Configuration


Tools
To work with these configuration files, you'll need:-
  • a good text editor that can read and display Korean ANSI text.
    For this I'd recommend Notepad ++ or MadEdit.​
  • a good hex editor
    For that I'd recommend either HxD or MadEdit.​
  • A means of reading and editing your Windows system Registry.
    RegEdit is usually sufficient for this job, but RegEdt32 has some advantages on NT 5 based systems. (2K, XP, 2K3) There are 3rd party editors which you can use as you like.​


Okay? Got everything you need? Then lets move on.

Client Configuration
There are several ways official clients are configured to find the game server.
  • hotuk.ini
  • System Registry
  • ptReg.rgx
  • ldata.bmp
Let's look at the system registry first.

All the official clients (I think) use HKEY_LOCAL_MACHINE\SOFTWARE\Triglow Pictures\PristonTale and the value pairs it holds to configure their graphics, sound and network connection to the server.

This is only the second oldest method, but it's still supported by most official clients (at the time of writing) simulating commands that should be found in the clients hotuk.ini. That was the original configuration.

The value pairs supported are:-
  • "Server1" = An IP address in a REG_SZ string
  • "Server2" = An IP address in a REG_SZ string
  • "Server3" = An IP address in a REG_SZ string
  • "Graphic" = a number between 0 and 3 in a REG_SZ string
  • "Network" = a number between 0 and 3 in a REG_SZ string
  • "Sound" = either "off" or anything else is considered on, in a REG_SZ string
  • "ScreenSize" = a number between 0 and 3 in a REG_SZ string
  • "ColorBPP" = either 16 or 32 in a REG_SZ string
  • "Version" = almost anything you like so long as it's a REG_SZ string
  • "MotionBlur" = either "true" or "false" in a REG_SZ string
  • "CameraSight" = either "ON" or "OFF" in a REG_SZ string
  • "CameraInvert" = either "true" or "false" in a REG_SZ string
  • "FullMode" = either "Off" or is considered "on" in a REG_SZ string
  • "MicOption" = either "ON" or "OFF" in a REG_SZ string
  • "Account" = the name of the last user to log in to PT as a REG_SZ string
Notice how the case is different for different options, and how some care about the opposite and others don't. Also note that only those not written in blue are not necessarily supported by all clients.

Modern problems. When Window 98 was released and Visual Studio updated to version 6, Microsoft told developers that they should only store alterations that apply globally to all users including the "System" user that runs before login in "HKEY_LOCAL_MACHINE" anything else should either be added to "HKEY_CURRENT_USER" or "HKEY_USERS\.Default", since you can't play PT before you log in, it's clear that it shouldn't store anything in HKEY_LOCAL_MACHINE, but like many other badly written Windows programs, it does. Why? Because even programmers don't RTFM. >.<

In Windows 95 through the 9x series up until Windows ME this didn't matter very much anyway, because there was no "System" user, and very little "user account management" at all, unless you installed Novel Netware and ran a Netware Workgroup. Microsoft did run Workgroups, and had since Windows 3.2 (otherwise known as Windows for Workgroups) but the "Group Policy" objects that went with them and particularly "user security tokens" couldn't be properly secured on an OS who's kernel ran on top of DOS... simply because it was too easy to bypass any such security from DOS before the Win32 Kernel loaded on top.

If your application had to run properly on NT3 or NT4 workstations, you would have had to take much more notice of this, especially if you utilised "roaming profiles". But PT wouldn't play on NT3 or NT4 workstations, so they didn't care about that.

The NT5 series OS became very popular because they kept all of the Gaming capabilities of the 9x series, and added the speed, stability and security of the NT series into one OS, and with the parallel release of ME and 2K the 9x series and Win32 kernels launched from DOS was dropped. NT5 = Windows 2000, XP and Server 2003.

In order to ensure that Win9x "games" would run on NT5 based systems, using HKEY_LOCAL_MACHINE inappropriately was allowed to slide. You could do it, but it was strongly advised that you didn't, especially if you wanted your program to work under NT Domain network situations... again PT didn't care about Domain networks and so ignored the warnings.
Now in the NT6 series OS (Vista, Server 2008 and Windows 7) the OS will only allow Setup and System Administration programs to write to (in in some instances even read from) HKEY_LOCAL_MACHINE. And this can mean that in order to play, you have to "Run as Administrator", at least the launcher for your game, which may / will try to update these entries, or even the game.exe it's self in order to read these settings.

This isn't good if your planning on distributing to Gamers, who really don't care to go poking around in such things when all they want is to play a game. But there is a very simple way you (as a dev) can fix your client if you are going to use the "system registry" settings method. Just look out for the API calls and switch them from HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER... you can use your setup program, or the launcher to put the IP in "HKEY_USERS\.Default" if you want to ensure every user on the machine gets the same server settings. I'm not going into that any more, because it's off-topic.

If you client uses these configurations as it's primary, or preferred settings, then you should maybe make a "PTSettings.reg" file something like this
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Triglow Pictures\PristonTale]
"Server1"="[COLOR=Blue]127.0.0.1[/COLOR]"
"Server1"="[COLOR=Blue]127.0.0.1[/COLOR]"
"Server1"="[COLOR=Blue]127.0.0.1[/COLOR]"
Remember to update 127.0.0.1 with the IP that your server is listening on.

Okay, let's move on, to "ptReg.rgx". This file is the new System Registry just as the System Registry was the new hotuk.ini, early clients didn't support it, around the 185x 196x KPT clients preference for Registry or the ptReg.rgx file kept switching back and forth which one overrides the other. Especially in non-KPT official clients.

This file is a complete mimic of the registry settings, but stored as a plain text file. It's not quite the same as a .reg file though. Lets have an example:-
Code:
"FullMode" "Off"
"Version" "3124Ä"
"Graphic" "4"
"Network" "1"
"ColorBPP" "32"
"MotionBlur" "false"
"CameraSight" "ON"
"RainMode" "2"
"Sound" "Off"
"CameraInvert" "true"
"MicOption" "OFF"
"ServerName" "Personal-PT"
"Server1" "[COLOR=Blue]127.0.0.1[/COLOR]"
"Server2" "[COLOR=Blue]127.0.0.1[/COLOR]"
"Server3" "[COLOR=Blue]127.0.0.1[/COLOR]"
"Account" "noob"
You can list the options in any order you like. Things like "RainMode" will only work if you have enabled rain, which has been in the clients since the betas, but was never really implemented, except by some "private" servers. (you know which ones I mean :wink:)

"MicOption" has been in both... but only a few official servers ever implemented the voice chat ability.
I can tell you that there is some code in all the clients for using it, but that they require an external executable which shares some communication with the main game.exe. The game.exe will give it a handle to it's primary display DC, and the external program will then display a new UI over the game enabling the player to "push to talk". The system is not as good as TeamSpeak, Ventrillo or other VOIP systems and such, because only after you release the "push to talk" is a .WAV sent back to the server, and it should then send that .WAV file out to the receiving players so they can hear what you said.

Anyway... the option you are interested in is, of course, the "Server1", "Server2" and "Server3" options... again, remember to change the IP to the one your server is listening on.

Moving on to "ldata.bmp". This one is a sneaky version of ptReg.rgx. It seems to be based on the "hotuk.ini" settings (getting to that) but is hidden in a bitmap file, located in the "images" sub-folder of the game folder.

The bitmap it's self is an 8 by 8 pixel 24-bit uncompressed Windows / OS/2 bitmap image where every pixel (normally) is yellow. You can actually make any bitmap image, as the binary data is skipped, but I'll give you the Hex code for the one I have.
Code:
42 4D 38 90 2D 00 00 00 00 00 36 00 00 00 28 00
00 00 08 00 00 00 08 00 00 00 01 00 18 00 00 00
00 00 13 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 FF FF 00 FF FF 00 FF FF 00
FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF
FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF
00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00
FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF
FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF
00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00
FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF
FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF
00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00
FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF
FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF
00 FF FF 00 FF FF
And if you first make a file containing those bytes, you are good to go. Call it anything you like... maybe BMPHeader.BMP.

Next comes the actual configuration. That header is only to make people think you aren't storing any configuration data in there.
Code:
*Graphic 0 
*Network 1 
*ColorBPP 32 
*MotionBlur false 
*CameraSight ON 
*ScreenSize 1 
*MicOption ON 
*Sound Off 
*CameraInvert true 
*Server1 [COLOR=Blue]127.0.0.1[/COLOR]
*Server2 [COLOR=Blue]127.0.0.1[/COLOR]
*Server3 [COLOR=Blue]127.0.0.1[/COLOR]
*ServerName Personal-PT
*Version 3124 
*TestVersion 0 
*FullMode Off
Now you see why it looks like a hotuk.ini... I hope? There are no double quotes, and each command starts with a *. Just remember to set your servers name and the IP of *Server1, *Server2, *Server3 to the IP your server is listening on.

You can save that in another file. Say, "BMPText.txt". Then, you just concatenate them. "Do what now?" Okay, in any *nix that would just be "cat BMPHeader.BMP BMPText.txt > ldata.bmp" but you're probably on Windows machine right? (You could use one of a number of GNU "cat" for Win32 builds if you want, but Windows can do it natively... just with completely different syntax)

So open a command Window (Start -> Run, and "cmd" [or "Command.com" on Windows 9x]), then type "Copy /B BMPHeader.BMP + BMPText.txt ldata.bmp". That should do it. It's not as intuitive as the "cat" syntax IMHO, but it does the same job, and it's not all that bad. There are GUI programs for "concatenation" of files, or "file split & join". Either of those terms in Google will find GUI lovers a program to suit them I'm sure, but for just this one job, I think the built in command line tools are fine. (I mention "cat" because it wouldn't surprise me to find a number of you have "UnixUtils" or "Cygwin" or "GNU Win32" or "Microsofts' NT Services for Unix" installed already, all of which will include "cat" as part of the "BASE" package)

Finally, let's consider hotuk.ini.

Many clients will still accept the *Server commands in "hotuk.ini" however, it has been depreciated since before PT came out of Beta and very much Pre-AOR. If no other configuration is found in any of the other files, some clients may still fall back on these. Many "private" server developers don't like to support "hotuk.ini" at all however, and will disable reading from it in their clients... so watch out for that if you are using a client from a server-repack or one shared on here. (I never do it, as I find there are too many useful features enabled there, and only there. I also know how to enable the feature that "private" server devs fear most from "hotuk.ini", the admin line, even if "hotuk.ini" isn't read. So I don't see the point)

Customised Configuration
Now lets consider "modified clients"... by which I'm thinking of Blood, Sky, Quantumfusion type client releases... or my own even. It's very easy to change the files, registry settings and such that the client reads. Changing the name of a file is the simplest, and I can see good cause to do that. The ZPT client I released didn't read hotuk.ini, ldata.bmp or ptReg.rgx at all, but read all configurations from a "client.cfg" file. The strings which enabled different modes and settings where also changed, and unified so they all looked like they are meant to be in one file... I never got around to unifying the code so that they where all read from the same place though.

If you are looking to make your client easier to manage settings when users have issues and so on, I would recommend you look at this client to see how easy it was to make that change. You can do it in a hex editor, no need for Olly or anything.

A common way of locking a client to a particular server (which "private" devs like to do so people don't steal their client) is to replace the primary function to read "Server1" IP address with a memory lookup which points to a string containing your servers IP in the executable of the game it's self. I'm not sure if it was Frogg or Fusion or SGPT or who, who did this first, but there are variations on this theme in many released "modified" clients here.

This is okay. It's good to keep your custom client private and gets around a lot of problems when players like to play on several "private" servers.

If you are trying to keep your personal client to your self, however, you should really try to hide that IP. Most people blindly trust in some Exe packer and / or encrypt, but again, I don't agree with that. (it's a pain for users, and a pleasure for hackers) A more recent QF based client performed an XOR over the top of the IP string, and some other details, and that's really nice. You can do the same thing with strings that contain the codes for your settings, then people wouldn't even know what codes to include in a configuration file unless they traced at a later date.

You can keep the encrypted versions encrypted, and only store the strings temporarily, on the stack or so, if you want to really make a cracker work.

You can perform similar XOR encryption to individual lines of the file as they are read in... then opening the file in notepad still gives anybody prying no idea of which lines are the server address lines and which are other settings. That's a bit ugly, but not exactly stupid IMHO.

Another idea I had, is that an IP is made up of 4 numbers between 0 and 255. Does that sound familiar? Why keep it as a string at all (except that that is how the Windows APIs will expect you to pass it to them) why not store a 32-bit number, and write a routine to break it down into bytes, turn the bytes into strings and sprintf them together with "%s.%s.%s.%s" or, just turn them into bytes and sprintf "%d.%d.%d.%d". You can still XOR the 32-bit number, or mess with the byte order to your hearts content.

I've not seen people doing these things with their clients, yet, but I see no reason why they couldn't or shouldn't. So if your client is not an official one, look out for these sort of configuration changes. If it's a true "release" of a "modified" client, as ZPT is, there should be some documentation with the release about how you should configure it.

That's all for now. Thanks for reading.
 
Last edited:
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Bobsobol, maybe a kind of rude question, but it did not went succesful for me, so could you try it for me with TeamViewer?
I understand it if you dont want it, but I can atleast ask it ;)
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Not keen on TeamViewer TBH... you're welcome to post a YouTube capture of your attempts to follow this and how unsuccessful the result is. (IE in what way it fails) 720p YouTube vids are finally clear enough to read what's going on on screen now, my experience of TeamViewer is that I'm looking at a very high bandwidth blurry blob I can't read.

I may well see something you don't from that, and I can wind back and re-watch what you did from there too.
 
Last edited:
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Okay. I will make a video of my attempt today ;)
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Okay, here is the video!



It might take a while to upload tho q.q'

Edit:
Its uploaded and its 1080p!:D
That should be enough.
 
Last edited:
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Mercinaries II (World in Flames)Theme; nice XD.

Server Hotuk.ini
Code:
*MODE SERVER
*SERVER_CODE 0
*SERVER_AUTOPLAY
*GAME_SERVER Inferno 83.85.85.97 83.85.85.97 83.85.85.97
[COLOR=Magenta]//*ENABLE_CLAN[/COLOR]
*SERVER_NAME Inferno
[COLOR=Magenta]//*VERSION 1871[/COLOR]
*MAX_USERS 200
[COLOR=Magenta]//*SYSTEMP_IP 127.0.0.1 127.0.0.1 127.0.0.1[/COLOR]
[COLOR=Magenta]//*SERVER_LINK_IP 127.0.0.1 127.0.0.1 127.0.0.1[/COLOR]
*LOGIN_SERVER_IP [COLOR=Magenta]83.85.85.97 83.85.85.97 83.85.85.97[/COLOR]
Make these changes! You can uncomment some one at a time once you are logging in correctly. But I'm pretty sure the *LOGIN_SERVER_IP is transmitted to the client from the server, and the client will use that IP to connect to a game server after the link server (configured in Registry, Client hotuk.ini, ldata.bmp and PtReg.rgx) has confirmed the client is valid... set to 127.0.0.1 the client is trying to log it to it's self. >.<

Commenting out security and Clan is sensible until you can at least log in okay.

Additionally... my server doesn't even have a *LOGIN_SERVER_IP line, so if it doesn't work with the WAN IP as shown above, try just commenting out that line as well.

Here's the equivalent section from my "working" server hotuk.ini
Code:
[B]*MODE                [/B]    SERVER
[B]*SERVER_CODE            [/B][COLOR=Blue]0[/COLOR]
[B]*SERVER_AUTOPLAY        [/B][COLOR=Blue]1[/COLOR]
[B]*GAME_SERVER            [/B]MyPT            [COLOR=Blue]192.168.1.6     192.168.1.6     192.168.1.6[/COLOR]
[COLOR=DarkGreen]//*서버주소                              192.168.1.6     192.168.1.6     192.168.1.6
//*서버포트               10009
//*데이타서버주소                       192.168.1.6     192.168.1.6     192.168.1.6
//*데이타서버포트       10009
//*캐릭터서버주소                       192.168.1.6     192.168.1.6     192.168.1.6
//*캐릭터서버포트       10009
//*연결파일                             192.168.1.6     192.168.1.6     192.168.1.6
//*DB_SERVER_NAME       MyPT
//*DB_CONNECT_URL       http://192.168.1.6/db_connect/connect.asp

//CLAN SYSTEM
//*CLAN_SERVER                          192.168.1.6     80      192.168.1.6     80
//*ENABLE_CLAN                          192.168.1.6     80      192.168.1.6     80[/COLOR]

[B]*SERVER_NAME[/B]            MyPT
[COLOR=DarkGreen]//*VERSION              3096
//*TestVersion          166[/COLOR]
[B]*MAX_USERS[/B]              [COLOR=Blue]200[/COLOR]
(It has all columns lined up in my editor, but I can't make non-proportional text / tabs line up on this forum, so it looks a little scruffy.

Again, I keep a lot of options in my Server hotuk.ini which are turned on or off depending on which executable (server, or client) or feature or security I'm testing on today. XD

Also... check the server name in your PtReg.rgx. The video still shows it as saying "MyPT" (which isn't in the list your login server hosts, so could be a problem) and the version 3xxx (EPT), where that isn't the version of your client, and isn't the version your server is limiting access to. You can delete the "Version" line and it will pick it up from your Registry (which is incomplete in your video, you need all 3 servers, should have "Graphic" "Network" & "Sound" RegRZ fields, and some clients need "Version", where others don't even support it.

The last client you attached only took any notice of PtReg.rgx, unless that didn't exist, in which case it looked at the system registry (HKLM, sadly, so no support for Vista or Seven until you fix that) and created PtReg.rgx from the entries there. (It can't do that on the system you created the Video on, unless that's one hell of a WindowBlinds pack you are running on XP or you always Right Click the executable and "Run As Administrator". XD)

I can't tell from theme alone if a system is Vista or Seven... (you can configure either to look like the other, and they run very similarly) on Vista, unless you disable UAC (shame on you, go back to XP you backward heathen) it will throw up UAC warnings which (unless you go window mode working) you won't see, and because you don't respond to the UAC messages that the game has covered up (because it isn't XP compliant, let alone compatible with Vista or Seven) the Kernel will ultimately terminate this illegally operating process (the game crashes). On Seven, you have some options as to how much "nagging" it does... but the end result is the same. Drop the bar to nothing and you are running with XPs complete lack of system security, raise it by one, and you wouldn't see the UAC warnings even in Window Mode, but UAC will still shut down this rogue application, raise it again and you will see the UAC warnings in Window Mode, but full-screen will cover them up. The only cure (other than rewriting the code to meet with XP logo compliance for Registry usage in Olly) is to authenticate a full Administrator token with UAC for the program before launching it. ("Run as Administrator")

Why does something that doesn't comply to XP guidelines work fine on XP and fail on Vista or Seven? Because XP automatically went into backward compatibility mode for Win9x when programs broke it's new guidelines... that level of backward compatibility in Vista and Seven is limited to XP compatibility so developers who ignored the XP guidelines and relied on the fact that it still supported 9x programming style got pwned when the next release finally arrived. (Unfortunately, the press blamed MS for third party developers lack of ability to put their hearing-aid in and listen to what the MS Development Support teams where telling them. XD)
If (like me) you followed the Longhorn beta program before Vista was released, you would have seen that all the functions that PT uses marked fuctionA() instead of functionW() where going to be dropped from Vista too, but this broke too many programs, as very few people have adopted the Unicode system on Windows, even though it was first introduced with NT3 and Win32s for Win3.1. >.< So we are still relying on Unicows.dll to translate old ANSI API calls to WideChar calls. :(:)

This is what Microsoft are fighting, all the time. This is why DOS lived on as the booter for Windows long after Microsoft wanted to stop supporting it, it's why Microsoft have a bad name in security, it's why there are so many compromises in the Windows system... not because Microsoft suck, but because developers don't want to read the documentation they produce and follow their design and development guidelines, and (at the end of the day) users don't care whose fault it is, they just want their PC to run all their old programs flawlessly and still be the greatest supercomputer on earth.

Linux wins this battle, not because it's a better system, but because it has a more educated user base who are prepared to put some "effort" into updating the old programs they still want to use on newer hardware and newer OS versions, and are (usually) empowered to do so by the widespread use of FOSS for their OS.

Microsofts' "market" is those users who don't know, don't care and really don't want to put any effort in. It's not Microsofts' fault their users, and the people who develop for their OS are idiots, and if Mircosoft didn't support those users, IT wouldn't be where it is today. In every home, used by everyone from the ages of 3 to 73 enabling our digital life. Without MS, Home, and Personal computing would still be a pass-time for the few "geeks" of the world... but they have a heck of a job to do, and their customers and partners make it so much more difficult.

I can't blame users, I don't understand how my car works, but I still want to drive it. I can blame developers who release "current" software which doesn't comply to the development guidelines of the "current" OS its designed for... and I will do that.

I will do it as vehemently as Jeremy Clarkson will slag off 4x4 vehicles which aren't designed to be used off-road or outside city limits, and are so cumbersome you can't get them into a multi-story car-park, or park them on city streets.

Designer rubbish like this equates to an expensive waste of time, effort and materials, and a lot of frustrated customers / users.

Jeremy Clarkson may have cultivated a persona of being an obnoxious, sexist, bigot, but that enables him to honestly tell it as it is, and hold no punches. He can say, "Fantastic engineering! Beautiful engine! Very high tech. Pointless design and application of all this gorgeous technology. Absolutely useless car. Don't EVER buy this unless you really want a big, expensive, black shiny four wheeled garden gnome."

I like Windows NT. I liked DOS. I wasn't so keen on Windows versions that ran on top of DOS.

I accept the reasons for the limitations in the OS... far more than I accept the reasons for the limitations in Linux.

X-Windows needed to die and be replaced with a "real" WIMP system back in 1994, not have GTK, Qt and WxWidgets built on top of it and then have CompizFusion "fake" real-time updating... yea, it came before DWM on Windows or even Quartz Extreme compositioning on Mac OS X, but X-Windows really needed it to cover it's flaws, in Windows, it's just "nice" and MacOS doesn't really need it at all... in fact, if you don't install your graphics KEXTs in OS X right [so compositioning doesn't get enabled] you don't really notice until you try to run a game or watch a video in a window on the desktop.

MS will always be constrained by the third party developers which draw in their user base. Fact of life. Live with it.

And since you are now in a "developer" forum... please, do all you can to fix it. Even if that means programming in the dreaded MSIL .NET managed code I hate so much... that issue, is mine. It goes against my education, and where I see a need for "some" intermediate language (to support multiple processors and untie the OS from specific giant CPU manufacturers) *I* was happy with Java for that. It's unfortunate (from my point of view) that Microsoft and Sun had to fall out so badly over the development of that intermediate bytecode format. :(:
 
Last edited:
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Mercinaries II (World in Flames)Theme; nice XD.

Server Hotuk.ini
Code:
*MODE SERVER
*SERVER_CODE 0
*SERVER_AUTOPLAY
*GAME_SERVER Inferno 83.85.85.97 83.85.85.97 83.85.85.97
[COLOR=Magenta]//*ENABLE_CLAN[/COLOR]
*SERVER_NAME Inferno
[COLOR=Magenta]//*VERSION 1871[/COLOR]
*MAX_USERS 200
[COLOR=Magenta]//*SYSTEMP_IP 127.0.0.1 127.0.0.1 127.0.0.1[/COLOR]
[COLOR=Magenta]//*SERVER_LINK_IP 127.0.0.1 127.0.0.1 127.0.0.1[/COLOR]
*LOGIN_SERVER_IP [COLOR=Magenta]83.85.85.97 83.85.85.97 83.85.85.97[/COLOR]
Make these changes! You can uncomment some one at a time once you are logging in correctly. But I'm pretty sure the *LOGIN_SERVER_IP is transmitted to the client from the server, and the client will use that IP to connect to a game server after the link server (configured in Registry, Client hotuk.ini, ldata.bmp and PtReg.rgx) has confirmed the client is valid... set to 127.0.0.1 the client is trying to log it to it's self. >.<

Commenting out security and Clan is sensible until you can at least log in okay.

Additionally... my server doesn't even have a *LOGIN_SERVER_IP line, so if it doesn't work with the WAN IP as shown above, try just commenting out that line as well.

Here's the equivalent section from my "working" server hotuk.ini
Code:
[B]*MODE                [/B]    SERVER
[B]*SERVER_CODE            [/B][COLOR=Blue]0[/COLOR]
[B]*SERVER_AUTOPLAY        [/B][COLOR=Blue]1[/COLOR]
[B]*GAME_SERVER            [/B]MyPT            [COLOR=Blue]192.168.1.6     192.168.1.6     192.168.1.6[/COLOR]
[COLOR=DarkGreen]//*서버주소                              192.168.1.6     192.168.1.6     192.168.1.6
//*서버포트               10009
//*데이타서버주소                       192.168.1.6     192.168.1.6     192.168.1.6
//*데이타서버포트       10009
//*캐릭터서버주소                       192.168.1.6     192.168.1.6     192.168.1.6
//*캐릭터서버포트       10009
//*연결파일                             192.168.1.6     192.168.1.6     192.168.1.6
//*DB_SERVER_NAME       MyPT
//*DB_CONNECT_URL       http://192.168.1.6/db_connect/connect.asp

//CLAN SYSTEM
//*CLAN_SERVER                          192.168.1.6     80      192.168.1.6     80
//*ENABLE_CLAN                          192.168.1.6     80      192.168.1.6     80[/COLOR]

[B]*SERVER_NAME[/B]            MyPT
[COLOR=DarkGreen]//*VERSION              3096
//*TestVersion          166[/COLOR]
[B]*MAX_USERS[/B]              [COLOR=Blue]200[/COLOR]
(It has all columns lined up in my editor, but I can't make non-proportional text / tabs line up on this forum, so it looks a little scruffy.

Again, I keep a lot of options in my Server hotuk.ini which are turned on or off depending on which executable (server, or client) or feature or security I'm testing on today. XD

Also... check the server name in your PtReg.rgx. The video still shows it as saying "MyPT" (which isn't in the list your login server hosts, so could be a problem) and the version 3xxx (EPT), where that isn't the version of your client, and isn't the version your server is limiting access to. You can delete the "Version" line and it will pick it up from your Registry (which is incomplete in your video, you need all 3 servers, should have "Graphic" "Network" & "Sound" RegRZ fields, and some clients need "Version", where others don't even support it.

The last client you attached only took any notice of PtReg.rgx, unless that didn't exist, in which case it looked at the system registry (HKLM, sadly, so no support for Vista or Seven until you fix that) and created PtReg.rgx from the entries there. (It can't do that on the system you created the Video on, unless that's one hell of a WindowBlinds pack you are running on XP or you always Right Click the executable and "Run As Administrator". XD)

I can't tell from theme alone if a system is Vista or Seven... (you can configure either to look like the other, and they run very similarly) on Vista, unless you disable UAC (shame on you, go back to XP you backward heathen) it will throw up UAC warnings which (unless you go window mode working) you won't see, and because you don't respond to the UAC messages that the game has covered up (because it isn't XP compliant, let alone compatible with Vista or Seven) the Kernel will ultimately terminate this illegally operating process (the game crashes). On Seven, you have some options as to how much "nagging" it does... but the end result is the same. Drop the bar to nothing and you are running with XPs complete lack of system security, raise it by one, and you wouldn't see the UAC warnings even in Window Mode, but UAC will still shut down this rogue application, raise it again and you will see the UAC warnings in Window Mode, but full-screen will cover them up. The only cure (other than rewriting the code to meet with XP logo compliance for Registry usage in Olly) is to authenticate a full Administrator token with UAC for the program before launching it. ("Run as Administrator")

Why does something that doesn't comply to XP guidelines work fine on XP and fail on Vista or Seven? Because XP automatically went into backward compatibility mode for Win9x when programs broke it's new guidelines... that level of backward compatibility in Vista and Seven is limited to XP compatibility so developers who ignored the XP guidelines and relied on the fact that it still supported 9x programming style got pwned when the next release finally arrived. (Unfortunately, the press blamed MS for third party developers lack of ability to put their heading-aid in and listen to what the MS Development Support teams where telling them. XD)
If (like me) you followed the Longhorn beta program before Vista was released, you would have seen that all the functions that PT uses marked fuctionA() instead of functionW() where going to be dropped from Vista too, but this broke too many programs, as very few people have adopted the Unicode system on Windows, even though it was first introduced with NT3 and Win32s for Win3.1. >.< So we are still relying on Unicows.dll to translate old ANSI API calls to WideChar calls. :(:)

This is what Microsoft are fighting, all the time. This is why DOS lived on as the booter for Windows long after Microsoft wanted to stop supporting it, it's why Microsoft have a bad name in security, it's why there are so many compromises in the Windows system... not because Microsoft suck, but because developers don't want to read the documentation they produce and follow their design and development guidelines, and (at the end of the day) users don't care whose fault it is, they just want their PC to run all their old programs flawlessly and still be the greatest supercomputer on earth.

Linux wins this battle, not because it's a better system, but because it has a more educated user base who are prepared to put some "effort" into updating the old programs they still want to use on newer hardware and newer OS versions, and are (usually) empowered to do so by the widespread use of FOSS for their OS.

Microsofts' "market" is those users who don't know, don't care and really don't want to put any effort in. It's not Microsofts' fault their users, and the people who develop for their OS are idiots, and if Mircosoft didn't support those users, IT wouldn't be where it is today. In every home, used by everyone from the ages of 3 to 73 enabling our digital life. Without MS, Home, and Personal computing would still be a pass-time for the few "geeks" of the world... but they have a heck of a job to do, and their customers and partners make it so much more difficult.

I can't blame users, I don't understand how my car works, but I still want to drive it. I can blame developers who release "current" software which doesn't comply to the development guidelines of the "current" OS its designed for... and I will do that.

I will do it as vehemently as Jeremy Clarkson will slag off 4x4 vehicles which aren't designed to be used off-road or outside city limits, and are so cumbersome you can't get them into a multi-story car-park, or park them on city streets.

Designer rubbish like this equates to an expensive waste of time, effort and materials, and a lot of frustrated customers / users.

Jeremy Clarkson may have cultivated a persona of being an obnoxious, sexist, bigot, but that enables him to honestly tell it as it is, and hold no punches. He can say, "Fantastic engineering! Beautiful engine! Very high tech. Pointless design and application of all this gorgeous technology. Absolutely useless car. Don't EVER buy this unless you really want a big, expensive, black shiny four wheeled garden gnome."

I like Windows NT. I liked DOS. I wasn't so keen on Windows versions that ran on top of DOS.

I accept the reasons for the limitations in the OS... far more than I accept the reasons for the limitations in Linux.

X-Windows needed to die and be replaced with a "real" WIMP system back in 1994, not have GTK, Qt and WxWidgets built on top of it and then have CompizFusion "fake" real-time updating... yea, it came before DWM on Windows or even Quartz Extreme compositioning on Mac OS X, but X-Windows really needed it to cover it's flaws, in Windows, it's just "nice" and MacOS doesn't really need it at all... in fact, if you don't install your graphics KEXTs in OS X right [so compositioning doesn't get enabled] you don't really notice until you try to run a game or watch a video in a window on the desktop.

MS will always be constrained by the third party developers which draw in their user base. Fact of life. Live with it.

And since you are now in a "developer" forum... please, do all you can to fix it. Even if that means programming in the dreaded MSIL .NET managed code I hate so much... that issue, is mine. It goes against my education, and where I see a need for "some" intermediate language (to support multiple processors and untie the OS from specific giant CPU manufacturers) *I* was happy with Java for that. It's unfortunate (from my point of view) that Microsoft and Sun had to fall out so badly over the development of that intermediate bytecode format. :(:

Gotta love the song ;)

And, yep, I have Vista q.q'
Im used to 'Run as admin' tho
Anyways, is it possible that I have to change all my IP's to my internal one? That is 192.168.0.1
But tells me that my external IP is 83.85.85.97

So wich one?
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
The "Which IP Address do I use" question is very common. The answer depends on who you want to access your server. I've answered it before, and I know others have too, but this thread is a logical place to find that answer so I shall re-iterate.

  1. Use 127.0.0.1 if you only intend to access your server from the same machine you run it on.
  2. Use 192.168.x.x (usual for NAT routers) if you intend to allow access within your Local Area Network (Workgroup, Home or for LAN parties).
  3. Use your WAN IP (you've already suggested a good way to look that up, there are many such sites) if you intend to play with other people using different internet providers in your area our anywhere else around the globe. (A true "Private" AKA "Pirate" server.)
(facetiously)
This will also apply if you want to play with friends who currently reside on the International Space Station... I wouldn't be too surprised to find that Martians and Lunar Colonists (if such exist, or happen to exist in the near future) will also qualify under the term "around the globe" in this sense. XD​
Use only one IP, and use it for every field. The exception to that rule (and the reason why there are multiple IP fields) is when you want to distribute the processing of your PT server across multiple machines. IE If you want to run a single login server, and 3 game servers with a shared (and fifth) database server machine.

However; for the purpose of this topic, I must assume you are struggling to get one client logged in to one server. Expanding to using multiple machines to host your game is something you do when you have too many players in game at once.

Start small, and if you are not yet worldly wise enough to get a PT client to connect to a PT server, I have to assume you are attempting one or the other of the first two options.

Once you can successfully log in from the same PC, or from another PC on the same LAN (your home or small office) then you can consider opening ports on your Router to allow access to players across the internet, or to move your files and database to a Dedicated Server (Dedi) or VPS (Virtual Private Server) hosted externally from your LAN.

If (as I have frequently recommended to people attempting this for the first time do) you have installed your PT server on a Virtual Machine, the VM Software Environment will (should have, or be configured to) present a virtual LAN. So your configuration should follow method 2 from the list.

P.S. Don't q.q at running Vista (or Seven), I couldn't put a pin between them in terms of advantages and features, but they are both miles better than the previous generations of Windows (XP, 2K & 2K3) which in turn where a considerable improvement on their predecessors simply by combining most of the flexibility of the 9x series with the security of the NT4 series. As I said in the spoiler, the problem is not the OS... it's the fact that the version of the client you are using does not comply with the regulations recommended for use with XP which are now a requirement in Vista and Seven. Official distributors are just now getting close (with the 197x series KPT clients) to complying with XP recommendations... and still don't come close to meeting the logo requirements to conform to "Made for Vista" or "Made for Windows 7" logo certification. They don't (even now) come close to passing the self-test before submission for "Made for XP" certification, and your client is now 5 or 6 years old.

I've detailed (elsewhere and in general discussion) a number of modifications you can make to your client which will help that situation. However, I do not know of anything we can do to correct the undocumented API access PT makes to DirectDraw and DirectX APIs which make it so unsuitable for logo conformity (and impossible to run under a VM, even with hardware 2D and 3D acceleration support enabled, or under Win32 environment wrappers / simulators like Wine or ReactOS) without access to the C++ source code, or writing a PT client emulator from scratch.
 
Last edited:
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Thanks for helping. Funny enough I have a LAN-Party today, so I will try my internal IP and see if they can reach the server. I will post the result later today .
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Did not work q.q'
Only I could connect...
Is there a IP inside the game.exe that needs to be changed?
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
As I say, there is in some of them, but not the one you posted as being the one you where using IMS.

The norm is for it to appear some 64 bytes from the end of the file, or, at the very least from the end of the Translation section.

In any case, the first part thread (this threads predecessor) tells you how to see what the client and server are seeing in terms of IP and Port... if it's not what you think you configured, then it's reading a different configuration to the one you have set.
 
Last edited:
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
I dont get why it wont work...
Are there certain ports that need to be opened?
 
Experienced Elementalist
Joined
Apr 29, 2006
Messages
279
Reaction score
90
I dont get why it wont work...
Are there certain ports that need to be opened?

Try using tcp view ;)
it's handy, free and a great tool for watching your connections.
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
That would be the Part 1 guide, and nothing to do with this one.

I assume you have completed part 1 before attempting this, and already KNOW that your client is connecting to your server on the correct port and IP. Or, at least, how to check where it is trying to connect to... since that's all explained in part 1.
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
sorry, have been ill last days, i opened all the ports and did everything, but it stille fails ;(
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
sorry, have been ill last days, i opened all the ports and did everything, but it stille fails ;(
Why?

The information gained by following these two guides should tell you, not only that don't need to "open all the ports" but exactly what is going on. When you can tell us what the results of these tests are, we can give you a better idea as to what to do check and do to fix the problem.

"It doesn't work" is the most common, and the least useful bug report in the world. :eek:tt1:
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
I am sorry ;) I will write a detailed report later today.
 
Newbie Spellweaver
Joined
May 20, 2011
Messages
12
Reaction score
0
Hi guys. I downloaded the latest ePT client and put the ZPT exe and config file in the root folder. I also set up the endless tower server based on the 2 part server files found in most posts. I changed the config for ZPT to local ip. It starts PT, but after 30 or so seconds of trying to log in says can't connect. I also tried editing the hotuk, the idata.bmp (which the new ept client does not use), and the registry (also did not have ip info). I did both Triglow Pictures and Subagames (the new company) in the registry. Nothing worked so far. What am I doing wrong? (I know my client is probably too new, but shouldn't I at least get to wrong version instead of can't connect?)
 
Status
Not open for further replies.
Back
Top