[Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Well hello to everyone, I made this topic .. because I really need some of my friends here in the forum give me a hand with a few problems I'm having trying to add 1 new map on my server and client, I'll try to Specifically explaining be more or less than what I did...
Code:
DWORD MapTextOffset = 0x00402FF0;
DWORD MapJumpOffset = 0x005A4A4C;
DWORD MapReturnOffset = 0x005A476F;
void __declspec(naked) LoadNewTextMapName()
{
_asm
{
CMP ESI,0x22 // Crywolf MapId: 34
JNZ NextMapText1
PUSH 0x73B
MOV ECX, 0x07AAE868
CALL MapTextOffset
JMP MapJumpOffset
// ---
NextMapText1:
// ---
CMP ESI,0x43 // Arkania MapId: 67
JNZ ReturnMapLoad
PUSH 0x741 // Text.bmd number line: 1857
MOV ECX, 0x07AAE868
CALL MapTextOffset
JMP MapJumpOffset
// ---
ReturnMapLoad:
// ---
JMP MapReturnOffset
}
}
char * arkania_map = "Interface\\Arkania_Map.tga";
void __declspec(naked) LoadNewInterfaceMapName()
{
_asm
{
MOV DWORD PTR SS:[EBP-0x0D8],0x40 // 0x40 = 64 duel arena (Hook place)
PUSH 0x008C2BC0 // Arg1 = ASCII "Interface\duelarena.tga"
LEA EDX,[EBP-0x0D8]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0x0DC]
ADD ECX,0x4
CALL InterfaceLoad1
MOV ECX,EAX
CALL InterfaceLoad2
// ---
MOV DWORD PTR SS:[EBP-0x0D8],0x43 // 0x43 = 67 Arkania (custom map)
PUSH arkania_map // Arg1 = ASCII "Interface\Arkania_Map.tga"
LEA EDX,[EBP-0x0D8]
PUSH EDX
MOV ECX,DWORD PTR SS:[EBP-0x0DC]
ADD ECX,0x4
CALL InterfaceLoad1
MOV ECX,EAX
CALL InterfaceLoad2
// ---
MOV EDI, 0x0045F6A1
JMP EDI
// ---
InterfaceLoad1:
MOV EDI, 0x0045FAD0
JMP EDI
// ---
InterfaceLoad2:
MOV EDI, 0x00409F10
JMP EDI
// ---
MOV ESP, EBP
POP EBP
RETN
}
}
void NewMapHooks()
{
// Load new map name to show on new maps hook
Utils.SetNop(0x005A4756,25);
Utils.WriteJmp(0x005A4756,(DWORD)&LoadNewTextMapName);
// ---
// Load new .tga file to show on new maps hook
Utils.SetNop(0x0045F676,43);
Utils.WriteJmp(0x0045F676,(DWORD)&LoadNewInterfaceMapName);
}
This part I made directly on my main.exe with ollydbg:
Code:
// Load new .MAP files hook (0x005E9351)
// Here must be changed value from limit to load .map files from: Data in this case original value is: 005E9351 |. 3B45 98 CMP EAX,DWORD PTR SS:[EBP-0x10] and I change by: [EBP-0x68]
// ----
// Load new .ATT files hook (0x005E95A8)
// Here must be changed value from limit to load .att files from: Data in this case original value is: 005E95A8 |. 3B4D 98 CMP ECX,DWORD PTR SS:[EBP-0x10] and I change by: [EBP-0x68]
// ----
// Load new .OBJ files hook (0x005E964B)
// Here must be changed value from limit to load .att files from: Data in this case original value is: 005E964B |. 3B45 98 CMP EAX,DWORD PTR SS:[EBP-0x10] and I change by: [EBP-0x68]
PS: I make this follow this thread by pinkof I only add .OBJ load part and ready!
http://forum.ragezone.com/f508/addin...client-953281/
Well on server side is more easy.. only add your: TerrainXX.att and fix your GS to load new Terrains.. I work with AI Julia project like base.. then I only make this changes on: Maps.cpp file on Julia Source:
Code:
#include "stdafx.h"
#include "Maps.h"
#include "Utilits.h"
#include "Configs.h"
cMaps Maps;
// changed arrays here 67 to MAX terrain load and 25 is count of
// characters I mean.. "..\\data\\Terrain1.att" = 22 characters.. how I put
// limit on my client from: EBP-0x68 = 104 then I must think on load
// some like this: "..\\data\\Terrain100.att" = 25 characters...
char MapAttrName[67][25] =
{
"..\\data\\Terrain1.att",
"..\\data\\Terrain2.att",
"..\\data\\Terrain3.att",
"..\\data\\Terrain4.att",
"..\\data\\Terrain5.att",
"..\\data\\Terrain6.att",
"..\\data\\Terrain7.att",
"..\\data\\Terrain8.att",
"..\\data\\Terrain9.att",
"..\\data\\Terrain10.att",
"..\\data\\Terrain11.att",
"..\\data\\Terrain12.att",
"..\\data\\Terrain12.att",
"..\\data\\Terrain12.att",
"..\\data\\Terrain12.att",
"..\\data\\Terrain12.att",
"..\\data\\Terrain12.att",
"..\\data\\Terrain12.att",
"..\\data\\Terrain19.att",
"..\\data\\Terrain19.att",
"..\\data\\Terrain19.att",
"..\\data\\Terrain19.att",
"..\\data\\Terrain19.att",
"..\\data\\Terrain19.att",
"..\\data\\Terrain25.att",
"..\\data\\Terrain25.att",
"..\\data\\Terrain25.att",
"..\\data\\Terrain25.att",
"..\\data\\Terrain25.att",
"..\\data\\Terrain25.att",
"..\\data\\Terrain31.att",
"..\\data\\Terrain32.att",
"..\\data\\Terrain33.att",
"..\\data\\Terrain34.att",
"..\\data\\Terrain35.att",
"..\\data\\Terrain36.att",
"..\\data\\Terrain37.att",
"..\\data\\Terrain38.att",
"..\\data\\Terrain39.att",
"..\\data\\Terrain40.att",
"..\\data\\Terrain41.att",
"..\\data\\Terrain42.att",
"..\\data\\Terrain43.att",
"..\\data\\Terrain43.att",
"..\\data\\Terrain43.att",
"..\\data\\Terrain46.att",
"..\\data\\Terrain46.att",
"..\\data\\Terrain46.att",
"..\\data\\Terrain46.att",
"..\\data\\Terrain46.att",
"..\\data\\Terrain46.att",
"..\\data\\Terrain52.att",
"..\\data\\Terrain12.att",
"..\\data\\Terrain19.att",
"..\\data\\Terrain1.att",
"..\\data\\Terrain1.att",
"..\\data\\Terrain57.att",
"..\\data\\Terrain58.att",
"..\\data\\Terrain59.att",
"..\\data\\Terrain59.att",
"..\\data\\Terrain59.att",
"..\\data\\Terrain59.att",
"..\\data\\Terrain63.att",
"..\\data\\Terrain64.att",
"..\\data\\Terrain65.att",
"..\\data\\Terrain66.att",
"..\\data\\Terrain67.att",
};
#ifdef _GS
void cMaps::MapInit()
{
BYTE NumMaps = 67;
Utilits.SetByte(0x0059F133+2,NumMaps);
Utilits.SetByte(0x0050AD29,0xE9);
Utilits.SetByte(0x0050AD2A,0xA2);
Utilits.SetByte(0x0050AD2B,0x01);
Utilits.SetByte(0x0050AD2C,0x00);
Utilits.SetByte(0x0050AD2D,0x00);
Utilits.SetByte(0x0050AD2E,0x90);
Utilits.SetByte(0x005692F3+1,NumMaps);
Utilits.SetByte(0x0056935E+1,NumMaps);
Utilits.SetByte(0x0056A3BB,0xE9);
Utilits.SetByte(0x0056A3BC,0x81);
Utilits.SetByte(0x0056A3BD,0x0D);
Utilits.SetByte(0x0056A3BE,0x00);
Utilits.SetByte(0x0056A3BF,0x00);
Utilits.SetByte(0x0056A3C0,0x89);
Utilits.SetByte(0x0056B153+3,NumMaps);
Utilits.SetByte(0x0056B177,0x81);
Utilits.SetByte(0x0056B178,0xC2);
Utilits.SetByte(0x0056B179,0x24);
Utilits.SetByte(0x0056B17A,0x28);
Utilits.SetByte(0x0056B17B,0x78);
Utilits.SetByte(0x0056B17C,0x00);
Utilits.SetByte(0x0056B17D,0x90);
Utilits.SetByte(0x0056B17E,0x90);
Utilits.SetByte(0x0056B17F,0x90);
Utilits.SetByte(0x0056B180,0x90);
Utilits.SetByte(0x0056B181,0x90);
Utilits.SetByte(0x0056B182,0x90);
Utilits.SetByte(0x0056B183,0x90);
Utilits.SetByte(0x0056B184,0x90);
Utilits.SetByte(0x0056B185,0x90);
Utilits.SetByte(0x0056B186,0x90);
Utilits.SetByte(0x0056B187,0x90);
Utilits.SetByte(0x0056B188,0x90);
Utilits.SetByte(0x0056B189,0x52);
Utilits.SetByte(0x0059F9F9,0xEB);
*(DWORD*)(0x0056B177+2) = (DWORD)&MapAttrName;
Utilits.SetByte(0x0056B174+2,25);
Utilits.SetByte(0x00503282+2,NumMaps);//gObjSetCharacter
Utilits.SetByte(0x004B6C3F+3,NumMaps);
Utilits.SetByte(0x0053A0A7+3,NumMaps);//gObjCheckAttackArea
Utilits.SetByte(0x0053A0D7+3,NumMaps);//gObjCheckAttackArea
Utilits.SetByte(0x0052D011+3,NumMaps);//gObjSetState
Utilits.SetByte(0x00430529+3,NumMaps);
Utilits.SetByte(0x0043D05F+3,NumMaps);
// Fixes by Nemesis (Added but is lacking more work)
Utilits.SetByte(0x0041F6A9,0xEB);//gObjMonsterDieGiveItem (Fix item monster drop)
Utilits.SetByte(0x0043D073,0xEB);//CGItemGetRequest (Fix item pick up)
Utilits.SetByte(0x004B7D8D,0xEB);//MapClass::ItemGive (Fix item pick up)
}
#endif
#ifdef _GS_CS
void cMaps::MapInit()
{
BYTE NumMaps = 65;
Utilits.SetByte(0x005D5FC3+2,NumMaps); // MapServ info max map change
Utilits.SetByte(0x0051C7C9,0xE9);
Utilits.SetByte(0x0051C7CA,0xA2);
Utilits.SetByte(0x0051C7CB,0x01);
Utilits.SetByte(0x0051C7CC,0x00);
Utilits.SetByte(0x0051C7CD,0x00);
Utilits.SetByte(0x0051C7CE,0x90);
Utilits.SetByte(0x0057C223+1,NumMaps);
Utilits.SetByte(0x0057C28E+1,NumMaps);
Utilits.SetByte(0x0057D349,0xE9);
Utilits.SetByte(0x0057D34A,0x81);
Utilits.SetByte(0x0057D34B,0x0D);
Utilits.SetByte(0x0057D34C,0x00);
Utilits.SetByte(0x0057D34D,0x00);
Utilits.SetByte(0x0057D34E,0x89);
Utilits.SetByte(0x0057E0E1+3,NumMaps);
Utilits.SetByte(0x0057E105,0x81);
Utilits.SetByte(0x0057E106,0xC2);
Utilits.SetByte(0x0057E107,0x58);
Utilits.SetByte(0x0057E108,0x6F);
Utilits.SetByte(0x0057E109,0x7D);
Utilits.SetByte(0x0057E10A,0x00);
Utilits.SetByte(0x0057E10B,0x90);
Utilits.SetByte(0x0057E10C,0x90);
Utilits.SetByte(0x0057E10D,0x90);
Utilits.SetByte(0x0057E10E,0x90);
Utilits.SetByte(0x0057E10F,0x90);
Utilits.SetByte(0x0057E110,0x90);
Utilits.SetByte(0x0057E111,0x90);
Utilits.SetByte(0x0057E112,0x90);
Utilits.SetByte(0x0057E113,0x90);
Utilits.SetByte(0x0057E114,0x90);
Utilits.SetByte(0x0057E115,0x90);
Utilits.SetByte(0x0057E116,0x90);
Utilits.SetByte(0x0057E117,0x52);
Utilits.SetByte(0x005D6889,0xEB);
*(DWORD*)(0x0057E105+2) = (DWORD)&MapAttrName;
Utilits.SetByte(0x0057E102+2,24);
Utilits.SetByte(0x00514B52+2,NumMaps);
Utilits.SetByte(0x004C7C5F+3,NumMaps);
Utilits.SetByte(0x0054D007+3,NumMaps);
Utilits.SetByte(0x0054D037+3,NumMaps);
Utilits.SetByte(0x0053F88C+3,NumMaps);
Utilits.SetByte(0x00431E89+3,NumMaps);
Utilits.SetByte(0x0044009F+3,NumMaps);
}
#endif
Results from all this SHIT..
http://i.imgur.com/RKygHX8.jpg
http://i.imgur.com/Kx8rok5.jpg
http://i.imgur.com/MamuMET.jpg
https://www.youtube.com/watch?v=2bdX...ature=youtu.be
PS 2: If some person can help me with this dev.. please contact to me on: Skype -> nemesis thunder
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Nice work Mauro :) (desde tus inicios hasta ahora, tienes 1 muy buena mejora, un saludo) and i hope your video don't say "Hello Ragezone, I'm Maruo, i come here to show bla bla bla bla bla" ^^ u think you make videos for the school?
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Quote:
Originally Posted by
[KeysS]
Nice work Mauro :) (desde tus inicios hasta ahora, tienes 1 muy buena mejora, un saludo) and i hope your video don't say "Hello Ragezone, I'm Maruo, i come here to show bla bla bla bla bla" ^^ u think you make videos for the school?
English:
haha Thanks bro.. and don't worry I don't make a video like anothers.. I understand that I need help from forum like all :D but this is something specially difficult.. on server side I see that: dataserver and gameserver have checks to limit of maps. all this shit is difficult in really
Spanish:
Jaja Gracias viejo... y no te preocupes que no hice un video como otros que hice antes... Entendi que necesito de la ayuda del foro como cualquiera :D pero esto es algo especialmente dificil al menos en el lado del servidor, vi que hay que alterar el dataserver y el gameserver que tienen verificacions del limite maximo de mapas toda esta mierda es dificil en realidad.
Sorry for my very very bad English.
- - - Updated - - -
I forgot this fixes:
Code:
// Fix Check .map files
Utils.SetByte(0x005E9354,0xEB); // Data\%s\EncTerrain%d.map....%s file corrupted. Error Msg Check 1
Utils.SetByte(0x005E935A,0xEB); // Data\%s\EncTerrain%d.map....%s file corrupted. Error Msg Check 2
// Fix Check .att files
Utils.SetByte(0x005E95AB,0xEB); // Data\%s\EncTerrain%d.att....%s file corrupted. Error Msg Check 1
Utils.SetByte(0x005E95B1,0xEB); // Data\%s\EncTerrain%d.att....%s file corrupted. Error Msg Check 2
// Fix Check .obj files
Utils.SetByte(0x005E964E,0xEB); // Data\%s\EncTerrain%d.obj....%s file corrupted. Error Msg Check 1
Utils.SetByte(0x005E9654,0xEB); // Data\%s\EncTerrain%d.obj....%s file corrupted. Error Msg Check 2
Is for that main.exe not show EncTerrainXX.map or .obj or .att file corrupted.
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
First post updated.. added VIDEO
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Quote:
Originally Posted by
VeltonD
Very nice customizations !
Congratulations :)
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Here I leave another fix.. this is for that the GameServer recognize custom added maps:
on: Maps.cpp from (AI Julia)
Code:
#ifdef _GS
void __declspec(naked) CheckMoveMapServer()
{
_asm
{
CMP DWORD PTR DS:[EAX+4],0
JNZ MapServerCheck
MOV EDI,0x0059FA5D
JMP EDI
MapServerCheck:
}
// ---
DWORD Map, NewMap;
NewMap=0;
// ---
_asm
{
MOV EDX,DWORD PTR SS:[EBP+0x0C]
MOV Map,EDX
}
if (Map==67) // ARKANIA
{
NewMap=3;
}
// ---
if (NewMap>0) // Update map number for transfer request
{
_asm
{
MOV EDX, NewMap
MOV DWORD PTR SS: [EBP+0x0C], EDX
}
}
// ---
_asm
{
MOV EDI,0x0059FA68
JMP EDI
}
}
void MapServerManager()
{
Utilits.SetNop(0x0059FA57,6);
Utilits.WriteJmp(0x0059FA57,(DWORD)&CheckMoveMapServer);
}
#endif
Maps.h file:
Code:
void MapServerManager();
on Lite.cpp file:
Code:
#ifdef _GS
OfflineTrade.InitOfflineTrade();
if(DuelSystem.Config.Enabled)
{
DuelSystem.DuelCreateThread();
Utilits.HookThis((DWORD)&HookSetDuelOption,0x004037B5);
Utilits.HookThis((DWORD)&HookIsDuelEnable,0x00404BCE);
Utilits.HookThis((DWORD)&HookIsOnDuel,0x00404B56);
Utilits.HookThis((DWORD)&HookDuelCheck1,0x00403017);
Utilits.HookThis((DWORD)&HookDuelCheck2,0x004012DA);
Utilits.HookThis((DWORD)&GSgObjUserDie,0x0040367A);
}
// ---
MapServerManager();
// ---
Utilits.HookThis((DWORD)&CheckItemType,0x00402E9B);
Utilits.HookThis((DWORD)&ProtocolCore, 0x004038BE);
Utilits.HookThis((DWORD)&gObjGameClose_Func, 0x004034B8);
Utilits.HookThis((DWORD)&ProtocolCoreSend,0x004055BF);
Utilits.HookThis((DWORD)&MyObjCalCharacter,0x004031A7);
Utilits.HookThis((DWORD)&MonsterDie, 0x004184C4);
Utilits.HookThis((DWORD)&GCEquipmentSendHook, 0x00407509);
Utilits.HookThis((DWORD)&GCKillPlayerExpSendHook, 0x00406D11);
Utilits.HookThis((DWORD)&MyItemSerialCreateSend, 0x00407004);
Utilits.HookThis((DWORD)&MygEventMonsterItemDrop, 0x00402AD1);
Utilits.HookThis((DWORD)&gObjLevelUpPointAddEx,0x00406D7F);
Utilits.HookThis((DWORD)&gObjPlayerKiller, 0x0040655F);
Utilits.HookThis((DWORD)&gObjAttack, 0x00403CA6);
Utilits.HookThis((DWORD)&gObjTradeOkButton, 0x00404A93);
Utilits.HookThis((DWORD)&GSItemDurRepaire, 0x00405097);
Utilits.HookThis((DWORD)&gObjInventoryMoveItemEx, 0x004021AD);
Utilits.HookThis((DWORD)&CGItemDropRequestEx, 0x00401163);
Utilits.HookThis((DWORD)&_gObjCheckTeleportArea, 0x0040268A);
Utilits.HookThis((DWORD)&GetRandomOpExe, 0x0049D3BB);
Utilits.HookThis((DWORD)&GCDamageSend, 0x00403BA7); // HP Bar
#endif
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Anyone can share main 1.03.13 version?
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Source 100% Great
Only Season 4.6 Vie:
http://i.imgur.com/gdbOU2K.jpg
thanks Velton D
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Can you share your "Arkania" ozt :) please?
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
I will arrange for written wrong Akania " Arkania "
and share
sorry my english i'm brazilian
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Quote:
Originally Posted by
BladeKnight109
Nemesis shared all code how to add new map so easy for do it.
re: [Development] Trying to add NEW Maps to Server and Client (1.03.13) Season 4.6 (Jpn)
Quote:
Originally Posted by
tomatoes
Nemesis shared all code how to add new map so easy for do it.
maybe, but code Nemesis not using for main 1.04d. and have bug ^_^
Need check (;
Quote:
// Load new .MAP files hook (0x005E9351)
// Here must be changed value from limit to load .map files from: Data in this case original value is: 005E9351 |. 3B45 98 CMP EAX,DWORD PTR SS:[EBP-0x10] and I change by: [EBP-0x68]
// ----
// Load new .ATT files hook (0x005E95A8)
// Here must be changed value from limit to load .att files from: Data in this case original value is: 005E95A8 |. 3B4D 98 CMP ECX,DWORD PTR SS:[EBP-0x10] and I change by: [EBP-0x68]
// ----
// Load new .OBJ files hook (0x005E964B)
// Here must be changed value from limit to load .att files from: Data in this case original value is: 005E964B |. 3B45 98 CMP EAX,DWORD PTR SS:[EBP-0x10] and I change by: [EBP-0x68]