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!

New Monsters / NPCs

Newbie Spellweaver
Joined
Aug 14, 2006
Messages
33
Reaction score
37
Storage allocation
Each model has its main'e Index (ResInx) that is passed to the function HLoadBMDModel, this Index for each model is constant and points to a certain array of structures or classes of models. Initially, I added new monsters Index reaching the last standard mob, but as it turned out, these indices could be used by other models, and therefore not to touch other people's space, I used the codes from the end of the array, which is not likely to be used. But because of the strange array of this implementation has constantly variable size (~ 10k-11k), so I had to write some of what calculations to vylazit not beyond the memory block. It seems such an implementation failures so far and did not give the idea should work without problems, but there is no 100% certainty, and therefore food.
Not this way :D. Think about it more abstract. Mu has dynamic allocation of this array, and... one function to get pointer for model class! xD. All you have to do is allocate your own memory for model class in memory, and then bypass original function. Then set your model index at far position, for example 0x7000, and write something like this:

CMuModel* gMuArray = 0xYYYYYYYY; // old mu address
CMuModel* gMyCustomArray = new CMuModel[100];

CMuModel* GetPointer(int index) // Your bypass
{
if(index <0x7000)
return &gMuArray[index];
else
return &gMyCustomArray[index-0x7000];
}

and ofcourse:
LoadMonsterModel(0x7000+x, "bmd_file.bmd");

I did it two years ago in IGCN silver edition. Mu always use same function to get pointer so in one bypass you can add as much models as you want.

If you have any questions, just PM me.

PS. you can apply glow for monsters. Just check how it creates glow for golden monsters, and use the same function from item glow, to set your custom color (pink worms invasion :D).
 
Junior Spellweaver
Joined
Jan 11, 2007
Messages
137
Reaction score
2
// Offsets and structures for Main ZClient dll (S6ep3 source)
Code:
[COLOR=#ff0000]#define OFFST_MODELRES_SIZEOF 0x00616103[/COLOR]
[COLOR=#ff0000]#define OFFST_MODELRES_COUNT 0x00616101[/COLOR]
#define OFFST_MODELRES_MOBS_ID 0x0061FDE9
//+
#define HPROC_OPENMONSTERMODEL_BULL 0x0058377D
#define HARGS_BULL_PUSH HPROC_OPENMONSTERMODEL_BULL - 2
#define HPROC_CONSTMONSTERMODEL_BULL 0x0058379A
#define HPROC_LOADBMDMODEL 0x0061FE3F
#define HPROC_LOADPLAYERBMD 0x00614E8F
#define HPROC_SETMOBNAMESTYLE 0x00586859
//+
#define HOpenMonsterModel ((void (__cdecl *)(DWORD dwMobNumber)) 0x0061FDE0)
#define HConstructMonsterModel ((DWORD (__cdecl *)(DWORD Arg1, DWORD dwResInx, DWORD dwResOffst, DWORD Arg4, DWORD Arg5)) 0x0057EEC0/*0x005148C8*/)
#define HLoadBMDModel ((DWORD (__cdecl *)(DWORD Arg1, LPSTR Arg2, LPSTR Arg3, DWORD Arg4)) 0x00614D10)
#define HSetMonsterNameStyle ((DWORD (__cdecl *)(DWORD dwMemAddr, DWORD dwMobID, DWORD Arg3, DWORD Arg4)) 0x00580BB0)


[COLOR=#ff0000]static DWORD *lpModelResBase = (DWORD *)0x6B3A010;[/COLOR]
[COLOR=#ff0000]static DWORD *lpModelResArray = (DWORD *)0x59DF090;[/COLOR]


wrong offsets

mb someone can find true offsets?
without this offsets all new monsters invisible =-(
 
Joined
Oct 29, 2007
Messages
1,289
Reaction score
1,308
// Offsets and structures for Main ZClient dll (S6ep3 source)
Code:
[COLOR=#ff0000]#define OFFST_MODELRES_SIZEOF 0x00616103[/COLOR]
[COLOR=#ff0000]#define OFFST_MODELRES_COUNT 0x00616101[/COLOR]
#define OFFST_MODELRES_MOBS_ID 0x0061FDE9
//+
#define HPROC_OPENMONSTERMODEL_BULL 0x0058377D
#define HARGS_BULL_PUSH HPROC_OPENMONSTERMODEL_BULL - 2
#define HPROC_CONSTMONSTERMODEL_BULL 0x0058379A
#define HPROC_LOADBMDMODEL 0x0061FE3F
#define HPROC_LOADPLAYERBMD 0x00614E8F
#define HPROC_SETMOBNAMESTYLE 0x00586859
//+
#define HOpenMonsterModel ((void (__cdecl *)(DWORD dwMobNumber)) 0x0061FDE0)
#define HConstructMonsterModel ((DWORD (__cdecl *)(DWORD Arg1, DWORD dwResInx, DWORD dwResOffst, DWORD Arg4, DWORD Arg5)) 0x0057EEC0/*0x005148C8*/)
#define HLoadBMDModel ((DWORD (__cdecl *)(DWORD Arg1, LPSTR Arg2, LPSTR Arg3, DWORD Arg4)) 0x00614D10)
#define HSetMonsterNameStyle ((DWORD (__cdecl *)(DWORD dwMemAddr, DWORD dwMobID, DWORD Arg3, DWORD Arg4)) 0x00580BB0)


[COLOR=#ff0000]static DWORD *lpModelResBase = (DWORD *)0x6B3A010;[/COLOR]
[COLOR=#ff0000]static DWORD *lpModelResArray = (DWORD *)0x59DF090;[/COLOR]


wrong offsets

mb someone can find true offsets?
without this offsets all new monsters invisible =-(

DragonMU for 1.04d GMO Season 6.3 main.exe I have this:

Code:
static DWORD *lpModelResArray = (DWORD *)[COLOR=#ff0000]0x0E8C200[/COLOR];[B][COLOR=#ff0000]
[/COLOR][/B]

I found this offset on this call:

a6rB0wX - New Monsters / NPCs - RaGEZONE Forums

 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jun 8, 2014
Messages
84
Reaction score
1
Need Offsets and structures for Main ZClient dll (S6ep3 source). Thx!!!
#define OFFST_MODELRES_SIZEOF 0x00616103
#define OFFST_MODELRES_COUNT 0x00616101
static DWORD *lpModelResBase = (DWORD *)0x6B3A010;
 
Newbie Spellweaver
Joined
Dec 12, 2008
Messages
89
Reaction score
6
Release full code for 1.04d zteam main plz :)
 
Experienced Elementalist
Joined
Jun 17, 2014
Messages
242
Reaction score
107
Need Offsets and structures for Main ZClient dll (S6ep3 source). Thx!!!
#define OFFST_MODELRES_SIZEOF 0x00616103
#define OFFST_MODELRES_COUNT 0x00616101
static DWORD *lpModelResBase = (DWORD *)0x6B3A010;

static DWORD *lpModelResBase = (DWORD *)0xE8C540; //1.04D GMO
static DWORD *lpModelResArray = (DWORD *)0xE8C200; //1.04D GMO
 
Skilled Illusionist
Joined
Feb 17, 2008
Messages
349
Reaction score
190
First Sorry my english :)
I'm putting in my many custom server, I saw this and thought cool .... Put new monsters or NPCs on the server is pretty cool
Source is not mine however I searched the offsets [those of 1.03.11]


Adding and bleeding monsters in MuOnline client


It has long been observed that many wonder how it is possible to add new monsters in the game? but the answer to it in most cases is not given, and if it is given in the course are just an alternative, allegedly used a mob does not replace, etc. But on the server side everything just added a line in the Monster.txt and the trick, but the customer is not a ride. That does not do what you do not substitute one hell instead of the desired mob will goby) As a long time ago and I was interested in this question, I was still really fumble with the debugger, but still useful with the hope to find and change the download limit mobs how it's done with a limit of things. Accordingly, nothing I did not work and I scored) Then after a while I gathered some knowledge and climbed again, as it turned out the loading mechanism mobs was much harder than I thought. But add new mobs I had after all turned protyuningovat and not only them, but I lost interest and left again scored dusts raw code. But only recently returned to me the incentive and I finished the code that now and will post. (At this point, imagine a drum roll)

VeltonD - New Monsters / NPCs - RaGEZONE Forums

In the following source code implementation:
1. Add your own monsters
2. Changing the monsters (size, type, color, etc.)


There is an important point, which I throw out the code in its original form will most likely not work on all versions main'ov because the structure of the mobs (Unit_Struct) in memory at different main'ah may be different. It applies only to changes in the parameters of the monsters, the addition of this structure is not affected. But do not worry, how to adjust the structure of a main surface I will explain further.


MonsLib.h -
MonsLib.cpp -
Hook.h -
Hook.cpp -

In the source code offsets and structure for main'ov 1.03.25 (1.03y) JPN and 1.05.50 (1.05x +) KOR. And the code is tested only at 1.03, offsets and structure for 1.05 I took from an old source, where they worked, but I'm not a test of the new code, there is no reason to think they did not work.


How does this work
* The function names are taken from the source


Adding monsters works quite simply, the main'e there is a function, we call it LoadMonster (id), it is called when you see the mob, the argument gets its id, then performs some action and decide how to ship a monster. This is the function decides which model will be loaded and throws instead of a new model of a bull. It caught 2 loading procedure bull (zero-bull), substituted the desired values ​​and the new mob successfully loaded. The first procedure HOpenMonsterModel (id) opens the model loads bmd, textures, sounds, choose which specific parameters need to be done for the model etc. Then it calls the second procedure HConstructMonsterModel () as I understand it is already configures the model to display. Offsets are these 2 procedures is in the source.


Changing the monsters a bit more complicated, there are already some of what pitfalls parameters mobs represented in memory as a kind of structure (in the code Unit_Struct), this structure contains all as to render the model: the type, color, name, size, animation, effects, additional . weapons and a lot of other things, this structure is used for both mobs and for the player models. As I said, these individual parameters mobs are broadcast in the procedure HOpenMonsterModel, but the change in the parameters of a particular creature it would be very inconvenient, because there describes the parameters for the different mobs Tipo if else. So I decided to change the mobs after this function and found a suitable place in the bottom of the LoadMonster (). There was caused by a certain procedure HSetMonsterNameStyle that established the model for the style name, and most importantly, as an argument to the ID of the mob, and a pointer to the structure Unit_Struct.


Pitfalls


The problem of portability
The fact that the structure of Unit_Struct in different main'ah may be different, for example, 1.03.25 (1.03y) JPN and 1.05.50 (1.05x +) KOR it different. Therefore, adjust the structure under its main way to the very appearance of the mobs will not be changed or partly not. I do it through Olga, get the function pointer HSetMonsterNameStyle, move on to the memory and the method of substitution (at random) find the desired values. It's that simple.


Storage allocation
Each model has its main'e Index (ResInx) that is passed to the function HLoadBMDModel, this Index for each model is constant and points to a certain array of structures or classes of models. Initially, I added new monsters Index reaching the last standard mob, but as it turned out, these indices could be used by other models, and therefore not to touch other people's space, I used the codes from the end of the array, which is not likely to be used. But because of the strange array of this implementation has constantly variable size (~ 10k-11k), so I had to write some of what calculations to vylazit not beyond the memory block. It seems such an implementation failures so far and did not give the idea should work without problems, but there is no 100% certainty, and therefore food.


Configuration


Add a monster
Well, then I think everything is clear, the structure MonsterAdd_Struct:
dwMobID - id monster from Monster.txt
lpDir - directory where is the mob
lpFile - the name of the model file monster, no. bmd


Changing the monster
Modify any monsters, both new and standard. Structure MonsterParam_Struct:
dwMobID - id of the unit Monster.txt
lpName - unit name, NULL if it does not change
bMobType-unit type (0,1-unit, 2-monster, 3-can't select, 4-NPC), NONE if you do not change
bPKStatus - PC unit status (0-7) if it does not change NONE
bMoveOut - effect, the unit runs forward (0-1) if it does not change NONE
sItem1ResID - id of the resource model, if it does not change NONE
bItem1IsExcl-transfused to the model as excellent, if it does not change NONE
bItem1JoinID - join the model unit to which prekreplena model sItem1ResID, NONE if you do not change
sItem2ResID - id of the resource model, if it does not change NONE
bItem2IsExcl - poured a model as excellent, if it does not change NONE
bItem2JoinID - join the model unit to which prekreplena model sItem1ResID, NONE if you do not change
float fSize - model size (standard 1.0), NULL if it does not change


I brought in a config sItem1ResID sItem2ResID and the parameters used to insert into the hands of mobs weapons, but resources are models of things to look for in main'e himself, the same as selecting the desired join'a in the model, because in different models of different join'y. By the way resource ID of things can be found in the same place where Fix count of downloading them.


A small demonstration

Yeti разных размеров

Yeti с разными PC статусами и типом unit

Модифицированные собачки

Новый NPC

Новый моб Тиранозавр

Еще Тиранозавр

Изменённое оружие и щит у Hommerd'a

Изменённое оружие у Tantalos'a



conclusion


I just gave an example of how to use the most basic, if found to scratch the procedure, it can be much more hung on mobs, sounds, reflections, effects, transparent textures, etc. If poizuchat structure Unit_Struct, so it is possible mobs to give light weight armor, equip their effects, auras, animations, change the color, make them unusual units, converted into characters. It's all just rested in your fantizii and desire to learn.


In general kastomiziruyte their clients and amaze players, I hope my achievements will be useful to someone.

Credit:
Way of the ninja-researcher




Offsets 1.03.11
//Offsets Main 1.03K by ~ Vetlon D.
#define OFFST_MODELRES_SIZEOF 0x005D5F44
#define OFFST_MODELRES_COUNT 0x005D5F3F
#define OFFST_MODELRES_MOBS_ID 0x005DD7C5

#define HPROC_OPENMONSTERMODEL_BULL 0x005004A8
#define HARGS_BULL_PUSH HPROC_OPENMONSTERMODEL_BULL - 2
#define HPROC_CONSTMONSTERMODEL_BULL 0x005004C3
#define HPROC_LOADBMDMODEL 0x005DD811
#define HPROC_LOADPLAYERBMD 0x005D5FCA
#define HPROC_SETMOBNAMESTYLE 0x00503ED6

#define HOpenMonsterModel ((void (__cdecl *)(DWORD dwMobNumber)) 0x005DD7BC)
#define HConstructMonsterModel ((DWORD (__cdecl *)(DWORD Arg1, DWORD dwResInx, DWORD dwResOffst, DWORD Arg4, DWORD Arg5)) 0x004FEDE)
#define HLoadBMDModel ((DWORD (__cdecl *)(DWORD Arg1, LPSTR Arg2, LPSTR Arg3, DWORD Arg4)) 0x005D5DC3)
#define HSetMonsterNameStyle ((DWORD (__cdecl *)(DWORD dwMemAddr, DWORD dwMobID, DWORD Arg3, DWORD Arg4)) 0x004FEDE7)

static DWORD *lpModelResBase = (DWORD *)0x6AC7AA8;
static DWORD *lpModelResArray = (DWORD *)0x596CB28;

PS:I had trouble not know if offset is wrong or know it.Appears the name Monster Matalo and drop to Normal however not appear to Monster skins I wanted
View attachment 129788

Excellent work, I test this source on my 1.05x KOR main, and works, but not for add mobs, only for edit other mobs.. when I try to add a new mob, i go into the server and when mob appears main crash... it's the source tested on 1.05X? Thanks...
 
Newbie Spellweaver
Joined
May 22, 2012
Messages
12
Reaction score
1
COULD HELP ME HELP FIND MAIN 1.03B



#define OFFST_MODELRES_SIZEOF 0x005D0624 //1.03B
#define OFFST_MODELRES_COUNT 0x005D061F //1.03B
#define OFFST_MODELRES_MOBS_ID 0x005D7B58 //1.03B

#define HPROC_OPENMONSTERMODEL_BULL 0x005012C5 //1.03B
#define HARGS_BULL_PUSH HPROC_OPENMONSTERMODEL_BULL - 2 //1.03B
#define HPROC_CONSTMONSTERMODEL_BULL 0x0050132F //1.03B
#define HPROC_LOADBMDMODEL 0x005D7BA4 //1.03B
#define HPROC_LOADPLAYERBMD 0x005D06AA //1.03B
#define HPROC_SETMOBNAMESTYLE 0x005020F9 //1.03B

#define HOpenMonsterModel ((void (__cdecl *)(DWORD dwMobNumber)) 0x005D7B39) //1.03B
#define HConstructMonsterModel ((DWORD (__cdecl *)(DWORD Arg1, DWORD dwResInx, DWORD dwResOffst, DWORD Arg4, DWORD Arg5)) 0x004FCFFF) //indefinido
#define HLoadBMDModel ((DWORD (__cdecl *)(DWORD Arg1, LPSTR Arg2, LPSTR Arg3, DWORD Arg4)) 0x005D04A3) //1.03B
#define HSetMonsterNameStyle ((DWORD (__cdecl *)(DWORD dwMemAddr, DWORD dwMobID, DWORD Arg3, DWORD Arg4)) 0x004FEA1C) //1.03B INDEFINIDO

static DWORD *lpModelResBase = (DWORD *)0x6AC1760; //1.03B Full
static DWORD *lpModelResArray = (DWORD *)0x59667E0; //1.03B Full
 
Back
Top