• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

New Monsters / NPCs

Junior Spellweaver
Joined
Feb 13, 2013
Messages
193
Reaction score
70
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 - link
MonsLib.cpp - link
Hook.h - link
Hook.cpp - link

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

VeltonD - New Monsters / NPCs - RaGEZONE Forums
Yeti разных размеров

VeltonD - New Monsters / NPCs - RaGEZONE Forums
Yeti с разными PC статусами и типом unit

VeltonD - New Monsters / NPCs - RaGEZONE Forums
Модифицированные собачки

VeltonD - New Monsters / NPCs - RaGEZONE Forums
Новый NPC

VeltonD - New Monsters / NPCs - RaGEZONE Forums
Новый моб Тиранозавр

VeltonD - New Monsters / NPCs - RaGEZONE Forums
Еще Тиранозавр

VeltonD - New Monsters / NPCs - RaGEZONE Forums
Изменённое оружие и щит у Hommerd'a

VeltonD - New Monsters / NPCs - RaGEZONE Forums
Изменённое оружие у 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
Screen(05_10-22_50)-0001 - New Monsters / NPCs - RaGEZONE Forums
 
Elite Diviner
Joined
Jan 20, 2009
Messages
420
Reaction score
77
Thanks you man!!! Maybe the offsets are wrong i will research later and tell you when i have time :)!

Here Was your problem wrong offset :)

#define HConstructMonsterModel ((DWORD (__cdecl *)(DWORD Arg1, DWORD dwResInx, DWORD dwResOffst, DWORD Arg4, DWORD Arg5)) 0x005148C8) //1.03.11 004FD3A4

change to mine and test should be fine and btw i have some to check in here not sure!

#define HPROC_OPENMONSTERMODEL_BULL 0x00518DAD //1.03.11 005004A8 <- here maybe some problems
#define HPROC_CONSTMONSTERMODEL_BULL 0x00518DC8 //1.03.11 005004C3 <- here so

if you can test with them and if its working no need to research so check :p

i think its this ones :)

#define HPROC_OPENMONSTERMODEL_BULL 0x00518DAD //1.03.11 i think its this one 00501696
#define HPROC_CONSTMONSTERMODEL_BULL 0x00518DC8 //1.03.11 i think its this one 005016B1

but i can test later :)!
 
Last edited:
Newbie Spellweaver
Joined
Jul 30, 2008
Messages
44
Reaction score
14
how about credits?
original post
and i think this man is developer.

I found all correct (i think) offset but... when i see new mob, main crashed and in Ollydbg jump here

newmob - New Monsters / NPCs - RaGEZONE Forums

Unit_Struct 100% is wrong for 1.03k :)

and I found another difference
see screen

newmobs_1 - New Monsters / NPCs - RaGEZONE Forums
 
Last edited:
Newbie Spellweaver
Joined
May 11, 2013
Messages
31
Reaction score
49
VeltonD for porting this mod to another main's you must check Unit_Struct too, because this structure may be different than 1.03y. How research it, you reposted in this article)
 
Elite Diviner
Joined
Jan 20, 2009
Messages
420
Reaction score
77
i will show you some Screens i am testing in 10 min ;)!
 
Newbie Spellweaver
Joined
May 11, 2013
Messages
31
Reaction score
49
ATJIAHT try to find Unit_Struct pointer from HSetMonsterNameStyle call, then u can research current structure. It was difficult for newbie, but i don't know another way how to make it work :D:
 
Elite Diviner
Joined
Jan 20, 2009
Messages
420
Reaction score
77
hmm i test it same as your test offsets are correct the struct is diffrent thats why isnt load the model you can ask darksim to help with this i am sure he will know what to do i recheck the offsets are correct :)! that were posted for 1.03.11 i think
 
Junior Spellweaver
Joined
Feb 13, 2013
Messages
193
Reaction score
70
zasmqniq DarkSim will tera time to help? , Yes by the way the offsets then practically certain.
Struct is certain that 1.03Y is different from 1.03K
 
Elite Diviner
Joined
Jan 20, 2009
Messages
420
Reaction score
77
yeah i see its diffrent maybe 1 - 2 things need to be removed :)! its same just 1 or 2 things need to be removed i cant test now but later if i do it i will tell you ;)!
 
Elite Diviner
Joined
Jan 20, 2009
Messages
420
Reaction score
77
Velton i check all i tryed to make the 1.03K same as 1.03Y add all missing things but same result i really cant find what is missing...
 
Last edited:
Newbie Spellweaver
Joined
Jun 12, 2012
Messages
30
Reaction score
0
hmmm nice! it will really be handy for me next time. but i had a problem that all the mobs and npc are not showing when im playing with client. literally, not showing..
 
Newbie Spellweaver
Joined
Jan 11, 2013
Messages
38
Reaction score
83
this source not Finished if Load new Monster model and kill Monster Lagged and Bull Model Corrupt This Tree xD and can't Kill this monster... :D

normal work only Change Monsters parameters or add npc's if fix this tree bug :D

VeltonD - New Monsters / NPCs - RaGEZONE Forums
 
Newbie Spellweaver
Joined
May 16, 2013
Messages
7
Reaction score
2
this source not Finished if Load new Monster model and kill Monster Lagged and Bull Model Corrupt This Tree xD and can't Kill this monster... :D

normal work only Change Monsters parameters or add npc's if fix this tree bug :D

VeltonD - New Monsters / NPCs - RaGEZONE Forums

you need change the mob type(0 ~ 4) like he say

Code:
[COLOR=#333333]Changing the monster[/COLOR]
[COLOR=#333333]Modify any monsters, both new and standard. Structure MonsterParam_Struct:[/COLOR]
[COLOR=#333333]dwMobID - id of the unit Monster.txt[/COLOR]
[COLOR=#333333]lpName - unit name, NULL if it does not change[/COLOR]
[COLOR=#333333][B]bMobType-unit type (0,1-unit, 2-monster, 3-can't select, 4-NPC), NONE if you do not change[/B][/COLOR]
[COLOR=#333333]bPKStatus - PC unit status (0-7) if it does not change NONE[/COLOR]
[COLOR=#333333]bMoveOut - effect, the unit runs forward (0-1) if it does not change NONE[/COLOR]
[COLOR=#333333]sItem1ResID - id of the resource model, if it does not change NONE[/COLOR]
[COLOR=#333333]bItem1IsExcl-transfused to the model as excellent, if it does not change NONE[/COLOR]
[COLOR=#333333]bItem1JoinID - join the model unit to which prekreplena model sItem1ResID, NONE if you do not change[/COLOR]
[COLOR=#333333]sItem2ResID - id of the resource model, if it does not change NONE[/COLOR]
[COLOR=#333333]bItem2IsExcl - poured a model as excellent, if it does not change NONE[/COLOR]
[COLOR=#333333]bItem2JoinID - join the model unit to which prekreplena model sItem1ResID, NONE if you do not change[/COLOR]
[COLOR=#333333]float fSize - model size (standard 1.0), NULL if it does not change
[/COLOR]
 
Newbie Spellweaver
Joined
Jan 11, 2013
Messages
38
Reaction score
83
MuAgeNew change parameters not Fix This Bug try to fix need recode this funtion void ModifMonsParams(DWORD lpUnit, DWORD dwMobID)

the most unpleasant bug when Load New Monster Model when Kill Monster Visual Monster Lag https://www.youtube.com/watch?v=LRTHDQenPnE

i'm added Midusa in Season 4 Client
 
Newbie Spellweaver
Joined
May 16, 2013
Messages
7
Reaction score
2
Hybrid
Loyal Member
Joined
Mar 15, 2006
Messages
451
Reaction score
285
Storage allocation

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.

array of models has constant size, but it is allocated dynamically, it's just has strange code.
something like this:

PHP:
Model* g_ModelAllocation;
Model* g_Models;

g_ModelAllocation = new Model[TOTAL_MODEL_COUNT+1024];
g_Models = (Model*)( g_ModelAllocation + (rand() % 1024) );

and yes, you have to change it, to allocate more models. it's easy, since it's allocated dynamically, also you will have to change all references of TOTAL_MODEL_COUNT.


also
- you lack of custom animation speed
- you lack of sounds

:8:
 
Last edited:
Newbie Spellweaver
Joined
May 11, 2013
Messages
31
Reaction score
49
Different main's has different Unit_Struct. This source code written and tested for main 1.03.25 (1.03y) JPN. So for using it on other mains you must research correct Unit_Struct
 
Back
Top