Re: Last Chaos
Hmm, seems like mobALL.lod isnt the biggest handler here.
Adding the mobs to the database and to mobALL.lod doesnt do much.
The place it really reads from are the mob0_c.lod - mob8_c.lod.
I tryd adding records to that but it just doesnt read that sadly.
the newer clients also dont use those files, tho the malaysian client does.
The file structure is completely the same, but still when i try to summon them, some of the new mobs, maybe 4 or 5 will appear, but in the GM console i can see that most data is handled wrong and show up as the default model.
Maybe someone can help me look into the .lod files and try to unveil secrets in the structure. Making an editor for it is not a problem for me
it's a really easy format:
You must be registered to see links
it's easy to add more monsters,
but your wrong, the old client has a hardcoded limit, it's a combination of hardcoded values and memory allocation,
example:
Code:
.text:102609C8 call ?StringDuplicate@@YAPADPBD@Z ; StringDuplicate(char const *)
.text:102609CD mov [ebp+var_10], eax
.text:102609D0 mov ebx, 2
.text:102609D5 push 8 ; unsigned int
.text:102609D7 mov byte ptr [ebp+var_4], bl
.text:102609DA call ??2@YAPAXI@Z ; operator new(uint)
.text:102609DF add esp, 10h
.text:102609E2 mov [esi+8], eax
.text:102609E5
.text:102609E5 loc_102609E5: ; CODE XREF: sub_10260980+F2
.text:102609E5 push edi
.text:102609E6 lea eax, [ebp+var_10]
.text:102609E9 push offset aItembtnD_tex ; "ItemBtn%d.tex"
.text:102609EE push eax
.text:102609EF call ?PrintF@CTString@@QAAJPBDZZ ; CTString::PrintF(char const *,...)
.text:102609F4 add esp, 0Ch
...
this is a the loading part from ItemBtn%d.tex and if you know a bit about ASM you can see why some
of the new items will crash your client,
this is the memory allocation part:
Code:
.text:102609D5 push 8 ; unsigned int
.text:102609D7 mov byte ptr [ebp+var_4], bl
.text:102609DA call ??2@YAPAXI@Z ; operator new(uint)
in C it would be something like this:
Code:
&varX = operator new(8u);
(8u = 2 * 4 UByte)
Code:
.text:102609D0 mov ebx, 2
this is the File limit, it's like
if you translate some more parts of the code.
so changing the 2 into 11 will load ItemBtn0.tex till ItemBtn10.tex
and changing 8 to 44 will allocate 11 * 4 Byte Pointer to load them
this should fix some of the items, but still it's not enough work texture will not load
correctly (don't know why, some other mem allocation problems...)
the client will crash if an item has a 2 or higher in it's texID and only 0 & 1 are loaded
(example: lvl 41 Weapons)
after fixing it:
You must be registered to see links
lvl 41 Weapons work without problems (except the corrupt inventory texture)
it's not easy to update the client if you have no knowledge about asm editing.