Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 14:25

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: lpatcher to play custom maps on ranked servers for cod4
PostPosted: 24 Feb 2011 12:32 

Joined: 28 Sep 2009 21:30
Posts: 39
This may even work for CoD5, but anyhow I was looking at iw_00.iwd and was thinking how it could be possible to run as many custom maps as you wanted on a ranked server without modifying the game out of unranked mode by editing the server_map.cfg as well as server_tdm.cfg by placing the names of the actual maps in those configs. However, I did notice that its not exactly that easy since when you start up a server then select a custom map that isn't on the iw3mp.exe's list of ranked server maps it prompts you with "a mod is needed to run custom maps".

aLuigi any chance you may know of the code for lpatcher to overide the check of custom maps so ranked servers can run custom maps? There is a ton of great custom maps made by great mappers and would be nice to play a few more maps for a change. Thanks again! :)


Top
 Profile  
 
 
 Post subject: Re: lpatcher to play custom maps on ranked servers for cod4
PostPosted: 24 Feb 2011 16:24 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
I have seen the function where is used that message (but please be precise when reporting these strings otherwise it takes more time to find them!) but is not much clear.

the following is the function:
Code:
00527670   . A1 08344301    MOV EAX,DWORD PTR DS:[1433408]
00527675   . 83EC 40        SUB ESP,40
00527678   . 833C85 4C34430>CMP DWORD PTR DS:[EAX*4+143344C],1
00527680   . 0F8E 97010000  JLE iw3mp.0052781D
00527686   . 8B0485 6C34430>MOV EAX,DWORD PTR DS:[EAX*4+143346C]
0052768D   . 56             PUSH ESI
0052768E   . 8B70 04        MOV ESI,DWORD PTR DS:[EAX+4]
00527691   . 803E 00        CMP BYTE PTR DS:[ESI],0
00527694   . 0F84 82010000  JE iw3mp.0052781C
0052769A   . 8B0D 1C5D4301  MOV ECX,DWORD PTR DS:[1435D1C]
005276A0   . 8B51 0C        MOV EDX,DWORD PTR DS:[ECX+C]
005276A3   . 803A 00        CMP BYTE PTR DS:[EDX],0
005276A6   . C705 3C5D4301 >MOV DWORD PTR DS:[1435D3C],0
005276B0   . 75 1F          JNZ SHORT iw3mp.005276D1
005276B2   . A1 EC24B20C    MOV EAX,DWORD PTR DS:[CB224EC]
005276B7   . 8078 0C 00     CMP BYTE PTR DS:[EAX+C],0
005276BB   . 75 14          JNZ SHORT iw3mp.005276D1
005276BD   . 68 3C206D00    PUSH iw3mp.006D203C                    ;  ASCII "PLATFORM_NOTSIGNEDINTOPROFILE"
005276C2   . 6A 01          PUSH 1
005276C4   . E8 675CFDFF    CALL iw3mp.004FD330
005276C9   . 83C4 08        ADD ESP,8
005276CC   . 5E             POP ESI
005276CD   . 83C4 40        ADD ESP,40
005276D0   . C3             RETN
005276D1   > 68 8C046D00    PUSH iw3mp.006D048C                    ;  ASCII "selectStringTableEntryInDvar mp/didyouknow.csv 0 didyouknow"
005276D6   . 6A 00          PUSH 0
005276D8   . 6A 00          PUSH 0
005276DA   . E8 E11AFDFF    CALL iw3mp.004F91C0
005276DF   . A1 EC24B20C    MOV EAX,DWORD PTR DS:[CB224EC]
005276E4   . 8B48 1C        MOV ECX,DWORD PTR DS:[EAX+1C]
005276E7   . 83C4 0C        ADD ESP,0C
005276EA   . 3B48 0C        CMP ECX,DWORD PTR DS:[EAX+C]
005276ED   . 74 53          JE SHORT iw3mp.00527742
005276EF   . 8B0D 08344301  MOV ECX,DWORD PTR DS:[1433408]
005276F5   . 8B048D 4C34430>MOV EAX,DWORD PTR DS:[ECX*4+143344C]
005276FC   . 83F8 01        CMP EAX,1
005276FF   . 7E 0C          JLE SHORT iw3mp.0052770D
00527701   . 8B148D 6C34430>MOV EDX,DWORD PTR DS:[ECX*4+143346C]
00527708   . 8B52 04        MOV EDX,DWORD PTR DS:[EDX+4]
0052770B   . EB 05          JMP SHORT iw3mp.00527712
0052770D   > BA A7FE6B00    MOV EDX,iw3mp.006BFEA7
00527712   > 85C0           TEST EAX,EAX
00527714   . 7E 0B          JLE SHORT iw3mp.00527721
00527716   . 8B048D 6C34430>MOV EAX,DWORD PTR DS:[ECX*4+143346C]
0052771D   . 8B00           MOV EAX,DWORD PTR DS:[EAX]
0052771F   . EB 05          JMP SHORT iw3mp.00527726
00527721   > B8 A7FE6B00    MOV EAX,iw3mp.006BFEA7
00527726   > 52             PUSH EDX
00527727   . 50             PUSH EAX
00527728   . 68 90586E00    PUSH iw3mp.006E5890                    ;  ASCII "wait; wait; %s %s;"
0052772D   . E8 FEA60400    CALL iw3mp.00571E30
00527732   . 50             PUSH EAX
00527733   . 33C0           XOR EAX,EAX
00527735   . E8 1617FDFF    CALL iw3mp.004F8E50
0052773A   . 83C4 10        ADD ESP,10
0052773D   . 5E             POP ESI
0052773E   . 83C4 40        ADD ESP,40
00527741   . C3             RETN
00527742   > 8BC6           MOV EAX,ESI
00527744   . E8 27D4FDFF    CALL iw3mp.00504B70
00527749   . 6A 3F          PUSH 3F
0052774B   . 50             PUSH EAX
0052774C   . 8D4C24 0C      LEA ECX,DWORD PTR SS:[ESP+C]
00527750   . 51             PUSH ECX
00527751   . E8 9A921400    CALL iw3mp.006709F0
00527756   . 83C4 0C        ADD ESP,0C
00527759   . 8D4424 04      LEA EAX,DWORD PTR SS:[ESP+4]
0052775D   . C64424 43 00   MOV BYTE PTR SS:[ESP+43],0
00527762   . E8 F9A40400    CALL iw3mp.00571C60
00527767   . 8B15 785D4301  MOV EDX,DWORD PTR DS:[1435D78]
0052776D   . 807A 0C 00     CMP BYTE PTR DS:[EDX+C],0
00527771   . 75 3D          JNZ SHORT iw3mp.005277B0
00527773   . E8 A8FCFFFF    CALL iw3mp.00527420
00527778   . 84C0           TEST AL,AL
0052777A   . 0F84 9C000000  JE iw3mp.0052781C
00527780   > 8D4424 04      LEA EAX,DWORD PTR SS:[ESP+4]
00527784   . E8 475C0300    CALL iw3mp.0055D3D0
00527789   . 8D4424 04      LEA EAX,DWORD PTR SS:[ESP+4]
0052778D   . 50             PUSH EAX
0052778E   . E8 7D7A0000    CALL iw3mp.0052F210
00527793   . A1 08344301    MOV EAX,DWORD PTR DS:[1433408]
00527798   . 83C4 04        ADD ESP,4
0052779B   . 833C85 4C34430>CMP DWORD PTR DS:[EAX*4+143344C],0
005277A3   . 7E 51          JLE SHORT iw3mp.005277F6
005277A5   . 8B0C85 6C34430>MOV ECX,DWORD PTR DS:[EAX*4+143346C]
005277AC   . 8B11           MOV EDX,DWORD PTR DS:[ECX]
005277AE   . EB 4B          JMP SHORT iw3mp.005277FB
005277B0   > 6A 00          PUSH 0
005277B2   . E8 F941F6FF    CALL iw3mp.0048B9B0
005277B7   . 83C4 04        ADD ESP,4
005277BA   . 84C0           TEST AL,AL
005277BC   .^75 C2          JNZ SHORT iw3mp.00527780
005277BE   . A1 A499B10C    MOV EAX,DWORD PTR DS:[CB199A4]
005277C3   . 8B48 0C        MOV ECX,DWORD PTR DS:[EAX+C]
005277C6   . 8039 00        CMP BYTE PTR DS:[ECX],0
005277C9   . 74 12          JE SHORT iw3mp.005277DD
005277CB   . 6A 02          PUSH 2
005277CD   . 8D4424 08      LEA EAX,DWORD PTR SS:[ESP+8]
005277D1   . E8 DA41F6FF    CALL iw3mp.0048B9B0
005277D6   . 83C4 04        ADD ESP,4
005277D9   . 84C0           TEST AL,AL
005277DB   .^75 A3          JNZ SHORT iw3mp.00527780
005277DD   > 8D5424 04      LEA EDX,DWORD PTR SS:[ESP+4]
005277E1   . 52             PUSH EDX                               ; /Arg3
005277E2   . 68 A4586E00    PUSH iw3mp.006E58A4                    ; |Arg2 = 006E58A4 ASCII "Can't find map "%s".
A mod is required for custom maps
"
005277E7   . 6A 01          PUSH 1                                 ; |Arg1 = 00000001
005277E9   . E8 9254FDFF    CALL iw3mp.004FCC80                    ; \iw3mp.004FCC80
005277EE   . 83C4 0C        ADD ESP,0C
005277F1   . 5E             POP ESI
005277F2   . 83C4 40        ADD ESP,40
005277F5   . C3             RETN
005277F6   > BA A7FE6B00    MOV EDX,iw3mp.006BFEA7
005277FB   > 68 DC586E00    PUSH iw3mp.006E58DC                    ;  ASCII "devmap"
00527800   . B8 FFFFFF7F    MOV EAX,7FFFFFFF
00527805   . E8 86A20400    CALL iw3mp.00571A90
0052780A   . 83C4 04        ADD ESP,4
0052780D   . 85C0           TEST EAX,EAX
0052780F   . A1 60C48501    MOV EAX,DWORD PTR DS:[185C460]
00527814   . 0F94C1         SETE CL
00527817   . E8 64550400    CALL iw3mp.0056CD80
0052781C   > 5E             POP ESI
0052781D   > 83C4 40        ADD ESP,40
00527820   . C3             RETN
it looks like if the map is found in a list then it calls the command "devmap map" but mine is only a simple guess so I'm sure of nothing and I can't replicate the problem.

anyway if you want a test try the following, it will not work for sure:
Code:
====================================================================================

TITLE
    doesn't work

FILE
    *mp.exe

BYTES_ORIGINAL
    52              ; PUSH EDX
    68 ?? ?? ?? ??  ; PUSH iw3mp.006E58A4
    6A 01           ; PUSH 1
    E8 ?? ?? ?? ??  ; CALL iw3mp.004FCC80
    83 C4 0C        ; ADD ESP,0C
    5E              ; POP ESI
    83 C4 40        ; ADD ESP,40
    C3              ; RETN
    BA ?? ?? ?? ??  ; MOV EDX,iw3mp.006BFEA7

BYTES_PATCH
    90
    90 90 90 90 90
    90 90
    90 90 90 90 90
    90 90 90
    90
    90 90 90
    90
    90 90 90 90 90

====================================================================================


Top
 Profile  
 
 Post subject: Re: lpatcher to play custom maps on ranked servers for cod4
PostPosted: 24 Feb 2011 18:22 

Joined: 28 Sep 2009 21:30
Posts: 39
Yea your right it doesn't seem to work. I will have to work on this more. Thanks for your help though aLuigi.


Top
 Profile  
 
 Post subject: Re: lpatcher to play custom maps on ranked servers for cod4
PostPosted: 25 Feb 2011 12:37 

Joined: 28 Sep 2009 21:30
Posts: 39
I found out that in the iw_00.iwd that there is server_map.cfg. When looking in iw3mp.exe I noticed this:

loadArenas createserver_maps loadGameInfo LoadMods voteTypeMap callvote typemap %s %s

aLuigi maybe if LoadMods was turned off and server_map.cfg had other maps listed inside itself other than the default ones that maybe this will work?


Top
 Profile  
 
 Post subject: Re: lpatcher to play custom maps on ranked servers for cod4
PostPosted: 25 Feb 2011 13:22 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
remember that you are asking these things to a person who has never played or administered cod4 :)
and my experience with the other q3 based games isn't better


Top
 Profile  
 
 Post subject: Re: lpatcher to play custom maps on ranked servers for cod4
PostPosted: 02 Mar 2011 10:13 

Joined: 28 Sep 2009 21:30
Posts: 39
Its okay aLuigi. The way I look at it is you still no way more than people who have administered CoD games since they were released! Something has got to be telling the iw3mp.exe that there is a certain set list of approved maps. I wonder what that list is and what it says because it seems like it would be possible to simply hex edit the approved map list to whatever list we want.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: