Map Database  •  FAQ  •  RSS  •  Login

Kam Source??? Probably not

<<

link

Woodcutter

Posts: 16

Joined: 20 Jan 2008, 23:00

Post 22 Jan 2008, 17:48

it's a bug in the script, it worked until i noticed some thing in the !SET_CURR_PLAYER 0 // On the bottom of the script was incorrect
<<

link

Woodcutter

Posts: 16

Joined: 20 Jan 2008, 23:00

Post 24 Jan 2008, 20:45

Strings?

Info about the "Imports" from all .dlls (note diffrent from the dependencies)
  Code:
; Imports from fmod.dll ;     extrn _FSOUND_SetVolumeAbsolute@8     extrn _FSOUND_IsPlaying@4     extrn _FSOUND_Sample_Load@16     extrn _FSOUND_PlaySound@8     extrn _FSOUND_Sample_SetDefaults@20     extrn _FSOUND_SetVolume@8     extrn _FSOUND_Sample_Unlock@20     extrn _FSOUND_Sample_Lock@28     extrn _FSOUND_Sample_Alloc@28     extrn _FSOUND_StopSound@4     extrn _FSOUND_SetDriver@4     extrn _FSOUND_SetMixer@4     extrn _FSOUND_Init@12     extrn _FSOUND_SetOutput@4     extrn _FSOUND_Sample_Free@4     extrn _FSOUND_Stream_Close@4     extrn _FSOUND_Stream_OpenFile@12     extrn _FSOUND_Stream_SetEndCallback@12     extrn _FSOUND_Stream_Play@8     extrn _FSOUND_SetPan@8 ; ; Imports from binkw32.dll ;     extrn _BinkClose@4     extrn _BinkNextFrame@4     extrn _BinkCopyToBuffer@28     extrn _BinkDoFrame@4     extrn _BinkOpen@8 ; ; Imports from fsgs.dll ;     extrn Fsgs_Cleanup     extrn Fsgs_QueryInterfaceVersion     extrn Fsgs_QueryInterface     extrn Fsgs_QueryInterfaceName     extrn Fsgs_Startup ; ; Imports from AVIFIL32.dll ;     extrn AVIStreamReadFormat     extrn AVIStreamRead     extrn AVIStreamInfoA     extrn AVIFileGetStream     extrn AVIFileOpenA     extrn AVIFileInit     extrn AVIFileRelease     extrn AVIFileExit     extrn AVIStreamRelease     extrn AVIStreamBeginStreaming ; ; Imports from MSVFW32.dll ;     extrn ICSendMessage     extrn ICLocate ; ; Imports from DPLAYX.dll ;     extrn DPLAYX.1     extrn DPLAYX.2     extrn DPLAYX.4 ; ; Imports from DDRAW.dll ;     extrn DirectDrawCreate ; ; Imports from DINPUT8.dll ;     extrn DirectInput8Create ; ; Imports from KERNEL32.dll ;     extrn VirtualAlloc     extrn HeapReAlloc     extrn IsBadWritePtr     extrn FatalAppExitA     extrn SetUnhandledExceptionFilter     extrn IsBadReadPtr     extrn IsBadCodePtr     extrn UnhandledExceptionFilter     extrn InterlockedDecrement     extrn GetCurrentProcess     extrn InterlockedIncrement     extrn TerminateProcess     extrn SetFilePointer     extrn GetTimeZoneInformation     extrn GetCPInfo     extrn GetACP     extrn GetOEMCP     extrn LoadLibraryA     extrn SetConsoleCtrlHandler     extrn MultiByteToWideChar     extrn GetTickCount     extrn SetCurrentDirectoryA     extrn GetCurrentDirectoryA     extrn Sleep     extrn GetStringTypeA     extrn EnterCriticalSection     extrn InitializeCriticalSection     extrn CreateThread     extrn DeleteCriticalSection     extrn CloseHandle     extrn GetExitCodeThread     extrn lstrlenA     extrn GetVolumeInformationA     extrn FindClose     extrn FindFirstFileA     extrn GetDriveTypeA     extrn CreateFileA     extrn DeleteFileA     extrn GetFileSize     extrn WriteFile     extrn ReadFile     extrn GetProcAddress     extrn GetModuleFileNameA     extrn GetCurrentThread     extrn TlsGetValue     extrn SetLastError     extrn TlsFree     extrn TlsAlloc     extrn TlsSetValue     extrn GetCurrentThreadId     extrn HeapAlloc     extrn HeapFree     extrn ExitProcess     extrn GetVersion     extrn GetCommandLineA     extrn GetStartupInfoA     extrn GetModuleHandleA     extrn FileTimeToLocalFileTime     extrn FileTimeToSystemTime     extrn FindNextFileA     extrn GetLastError     extrn RtlUnwind     extrn FreeEnvironmentStringsA     extrn FreeEnvironmentStringsW     extrn WideCharToMultiByte     extrn GetEnvironmentStrings     extrn GetEnvironmentStringsW     extrn GetStringTypeW     extrn LCMapStringA     extrn LCMapStringW     extrn RaiseException     extrn SetStdHandle     extrn IsValidLocale     extrn IsValidCodePage     extrn GetLocaleInfoA     extrn EnumSystemLocalesA     extrn GetUserDefaultLCID     extrn FlushFileBuffers     extrn CompareStringA     extrn CompareStringW     extrn SetEnvironmentVariableA     extrn LeaveCriticalSection     extrn GetLocaleInfoW     extrn VirtualFree     extrn HeapCreate     extrn HeapDestroy     extrn GetVersionExA     extrn GetEnvironmentVariableA     extrn GetFileType     extrn GetStdHandle     extrn SetHandleCount ; ; Imports from USER32.dll ;     extrn GetClientRect     extrn GetSysColor     extrn FillRect     extrn LoadIconA     extrn LoadCursorA     extrn RegisterClassA     extrn CreateWindowExA     extrn UpdateWindow     extrn PeekMessageA     extrn GetMessageA     extrn BeginPaint     extrn DispatchMessageA     extrn DestroyWindow     extrn PostQuitMessage     extrn DefWindowProcA     extrn ReleaseDC     extrn GetWindowDC     extrn GetDC     extrn LoadImageA     extrn GetAsyncKeyState     extrn SetCursor     extrn PtInRect     extrn MessageBoxA     extrn TranslateMessage     extrn wsprintfA ; ; Imports from GDI32.dll ;     extrn SelectObject     extrn GetPixel     extrn GetObjectA     extrn DeleteObject     extrn CreateSolidBrush     extrn DeleteDC     extrn CreateDIBSection     extrn CreateCompatibleDC     extrn SelectPalette     extrn CreatePalette     extrn GetSystemPaletteEntries     extrn BitBlt     extrn StretchBlt     extrn SetDIBColorTable     extrn RealizePalette ; ; Imports from ole32.dll ;     extrn CoInitialize     extrn CoCreateInstance ; ; Imports from WINMM.dll ;     extrn mixerGetNumDevs     extrn mixerOpen     extrn mixerGetLineInfoA     extrn mixerGetLineControlsA     extrn mixerGetControlDetailsA     extrn mixerSetControlDetails     extrn mciSendStringA     extrn mciSendCommandA     extrn mixerClose  [/quote]
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 17 Feb 2008, 00:20

Getting net games going again

Hi Everyone,
I've had an idea. Surely somewhere in the EXE would be the host name of the netplay server. If we could somehow change this to another server (that we control) then we could start up the whole net play thing again!
Of course, we would need to work out how the protocol works. (how the server and clients communicate)
By using a program called Current Ports (very useful) I discovered that it tries to connect to 212.78.110.19:6112 when I click net games. The reverse look up of 212.78.110.19 is netserver.earthnet.de and by searching through the EXE I found netserver.earthnet.de was there! I then changed this to lewin.namsys.com.au and saved it. This time when I ran kam it tried to connect to 203.26.16.137:6112! (that's the IP address of my web server) It still failed as my web server is not listening on that port, but it did say "connected to server" first. (it normal just fails)
You cannot enter an IP address for the server name, it doesn't open the connection properly, as I think it first does a reverse look up on it and that doesn't work for an IP address.
I was about to give up when I thought of trying my computers windows network name. (Lewin) To my surprise it then tried to connect to my own computer. Suddenly the mission editor seamed unimportant compared to this. By using an example program for networking I hosted a server and was delighted to find that KaM connected to me! It then sent me 2 packets, the first one was one character hex code 19 and the second was 3 characters FE FE 08. The protocol seam to work with codes, which is rather annoying as I can't workout what it is expecting back from me.
I tried saying: "Hi! I'm a nice KaM master server!" but that didn't work, :( it did not send anything back. KaM continued to say "Connecting to server" so it must be waiting on some kind of response, maybe the server listing.
If anyone would like to play with this then you can download the network testing program (to use as the fake master server) from here:
http://lewin.namsys.com.au/kam/downloads/testnet.exe
You will need to open the kam tpr EXE and change netserver.earthnet.de to your computers name. (right click on my computer -> computer name then click change at the bottom. Use the name it displays) If the name is shorter than the original thing then fill all the spare spaces with hex code 00, and kam will ignore them. Then start the network test program. Click host. (you don't need to change the settings) Start KaM and click multiplayer -> net games. Then kam should establish a connection with the program. Try sending it stuff and see if it replies.
Lewin.
<<

link

Woodcutter

Posts: 16

Joined: 20 Jan 2008, 23:00

Post 17 Feb 2008, 02:50

Good job lewin maybe with some tinkering we can get kam back online
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 17 Feb 2008, 08:31

According to the official website, at least TSK uses DirectPlay, is that any help? (so they should be UDP packets .. ?) (TPR probably uses DirectPlay as well but I'm not sure)
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 17 Feb 2008, 09:33

According to the official website, at least TSK uses DirectPlay, is that any help? (so they should be UDP packets .. ?) (TPR probably uses DirectPlay as well but I'm not sure)
That is talking about how the multiplayer works, this is how the master server works. It uses TCP not UDP when it connects to the master server. I think it will then establish a UDP connection to the other clients, or maybe the master server forwards packets. (that would be very slow)
My guess would be that the master server sends you a list of all the servers running via the TCP connection. (one of the packets it sent me are probably a request for this) Then both the clients (the one serving and the one joining) connect to the master server with UDP. With the same connection they start talking to each other. This tricks the firewall into thinking that it is still the master server they are talking to and it allows the packets through. This is the same way Himachi and LogMeIn work, it's very clever. If anyone can workout the protocol that KaM uses with the master server then I will be willing to program a new master server, and maybe, host it.
Good job lewin maybe with some tinkering we can get kam back online
Thanks. Please remember that this is TPR so the 'out of sync' bug will still occur, possibly even more as the link will be slower. Still, it would be great to get it working again.
Has anyone ever played it using net games? (before it went offline)
Lewin.
P.S. @Harold: Have the invalid sessions gone away now? I've noticed that you have been posting a bit recently.
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 17 Feb 2008, 12:50

I haven't seen the "invalid session" for a while now :D

Anyway: ok so it uses TCP first, are they using a home-build server system or a known one?
<<

link

Woodcutter

Posts: 16

Joined: 20 Jan 2008, 23:00

Post 26 Feb 2008, 03:38

I have gathered all the information about houses.dat and added in my own including all houses grid values (when you click to build) where there located and how to edit them and the B values of all buildings

all on the front page
<<

Danjb

Sword Fighter

Posts: 288

Joined: 14 May 2007, 22:00

Post 26 Feb 2008, 16:15

Impressive!
Not that I understand much of it...

On the topic of settings (they were mentioned, sorry if it's a little irrelevant), does anyone else have the problem of super-fast scrolling on XP?

And is this fixable?
<<

link

Woodcutter

Posts: 16

Joined: 20 Jan 2008, 23:00

Post 27 Feb 2008, 01:11

I never had that problem but i think i can help
First
keyboard scrolling or mouse ?

Second
In the saving menu of the game theres a settings sub menu, and in there is a fast scrolling button, it may just be that (tpr)

also if you open setup.cfg (with notepad) in the folder kams installed in theres a:

!SCROLLING
it should have a 0 after it

last thing if your on a low game resolution (800x600) if you make it larger (1024x768, or 1280x960 ect) it will take longer to scroll

if you still have the problem i can look in to it more for you :D
<<

Danjb

Sword Fighter

Posts: 288

Joined: 14 May 2007, 22:00

Post 27 Feb 2008, 07:27

Both keyboard and mouse. Checked the settings and the config file and it's set to 0, and the resolution is the highest :(

But thanks for the reply all the same :D

I've always had this problem, as have my bros and my friend, _however_, my friend installed TPR the other day and the scrolling was fine on that...

Return to “Other Creations”

Who is online

Users browsing this forum: Amazon [Bot] and 11 guests