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!

[Tutorial] How to create your own mobs + spawns

Newbie Spellweaver
Joined
Jan 4, 2006
Messages
46
Reaction score
8
So, for our next guide, let's see how we can make our own monsters and monster spawns. A minor problem may be, that we can use only the models of monsters, that are already implemented in the game (maybe this will change in some time ;]). But we know there are some unused monsters in the game - the golden doggebi with a moon around him for example - so we'll use this one, although it is already defined... But we'll just use it as a reference.

Step 1 : Server side setup

Ok, first let's see what we need to create on the server. All monsters are stored in InitMonster.txt, so we'll open that. The golden doggebi is also stored here as monster with the index 51 (you can find that name in the message-e.dat in the client as Elder Doggebi. Let's copy that out:
Code:
(monster (name 51) (index 51) (country 0 2) (race 1) (level 72) (ai 2) (range 28) (sight 200 320) (exp 9960) (itemgroup 1 1)
		(str 150) (hth 129) (int 10) (wis 10) (dex 85) (hp 3000) (mp 70) (aspeed 1500) (hit 121) (dodge 78)
		(attack 0 400 520) (magic 0 0) (defense 164 139) (absorb 23) (mspeed 1600 500) (resist 38 38 38 40 40)
		(quest ))
This is the definition of a monster (particularly the Elder Doggebi in this case). We will now look at the parameters:

- name: index of the name in message-e.dat
- index: unique number of the monster. Would be nice if you keep name and index the same :>
- country: for which version of the client the monster is available
- race: not sure what this means o_O
- level: level of course :>
- ai: 1 = not aggressive, 2 = aggressive, 3 = bosses have this, 4 = uses magical skills (like demon workers), 5 = like managers probably (magic + physical attacks)... But you won't be needing more imho, 1 and 2 are enough for normal mobs ;>
- range: attack range (how close a mob must come to hit you ;]).
- sight: how far can the monster spot you. The second number defines how close you need to be when hitting the mob for it to start following you.
- exp: how much exp the mob will give you if you kill it when it's yellow without exp stone and event
- itemgroup: itemgroups from ItemGroup.txt that are added to this mob. 1 word: drops. You can add more itemgroups for 1 mob. The second number means how many times this itemgroup will be called (eg Queen drops 20x it's itemgroup)
- str, hth, int, wis, dex, hp, mp: mobs stats
- aspeed: attack speed
- hit: otp
- dodge: evasion
- attack: first number: dunno, it's always 0... second: min attack, third: max attack
- magic: magical attack of the mob. Probably. No mob has it o_O (only hermits have 0 1)
- defense: mobs defense. don't know why 2 numbers :eek:
- absorb: absorbtion rate
- mspeed: move speed. First is running, second walking (probably =P)
- resist: elemental resistances
- quest: links to Quest.txt... Not sure about this so we'll skip it xD

So let's make a mob that is something different.
Code:
(monster (name 500) (index 500) (country 0 2) (race 1) (level 80) (ai 2) (range 28) (sight 200 10) (exp 500000) (itemgroup 199 20)
		(str 200) (hth 430) (int 10) (wis 10) (dex 150) (hp 30000) (mp 70) (aspeed 1500) (hit 180) (dodge 120)
		(attack 0 1000 2000) (magic 0 0) (defense 180 100) (absorb 50) (mspeed 1600 20) (resist 80 80 80 80 80)
		(quest ))
Really tough mob hmm ^^ now we put it in the InitMonster.txt and save it.

Next we want it to spawn somewhere right? So we'll open GenMonster.txt where the spawns are defined. Here we can see something like this:
Code:
(genmonster (index 4) (map 0) (area 17) (max 10) (cycle 1) (rect 8171 8010 8208 8114))
- index: the index we gave the mob in InitMonster.
- map: the map where it will spawn (0 is outside)
- area: unique index for the spawn
- max: max number of mobs spawned at a time
- cycle: how long will it take to respawn when 1 mob is killed. 1 is instant, higher number -> longer wait
- rect: this is a rectangle that defines the spawn area. The numbers are coordinates of the corners of the rectangle (x,y, x2,y2). The coordinates are calculated like this: (thnx to Bodonko for explanation)
Bodonko said:
You need 2 points (coordinates) to define a spawn rectangle.
Go to the south/west corner of the (virtual) rectangle type /coordinates and write them down, now do thes ame with the north/east corner and write the coordinates down.

Lets say s/w = (257925 276013 16966) and n/e = (258648 276331 16811)

Now how to get (rect x y x2 y2) out of this coordinates?
Easy, take the first number of s/w coord. and divide it by 32 = x
Second number of s/w divided by 32 = y
First number of n/e divided by 32 = x2
Second number of n/e divided by 32 = y2

So the coordinates for the spawn rectangle would be:
(rect 8060 8625 8082 8635)

So let's make our mob spawn in some area, maybe something we can easily test. So we'll use the narooth vulgar spawn as reference for coordinates ;>
Code:
(genmonster (index 500) (map 0) (area 110) (max 10) (cycle 1) (rect 8058 8145 8091 8177))
Now our new mob is defined and has a spawn. On to the client :]

Step 2: Client setup

We will need just a few things. First we decrypt and open macro.dat from config.pk. Here we will find rows that say monsterinfo and find our golden doggebi (key 51)
Code:
( monsterinfo ( key 51) ( bone 8 ) (level 72) ( scale 2.0 8) ( motion "GGGAAGAAGG" ) (mspeed 1600 500) (attheight 18))
This defines how the client shows the monster.
- key: the mobs index on the server.
- bone: index of the 'bone'... this is defined in macro.dat too and it has something to do with the monster model.
- level: what level is the mob - make it the same as on the server, so you can see the right mob colour.
- scale: size of the mob in comparison to something (maybe the player char as 1.0). The second number looks maybe like the height in which the name of the mob should fly :>

So we'll make our own row, to make it interesting ^^:
Code:
( monsterinfo ( key 500) ( bone 8 ) (level 80) ( scale 3.0 8) ( motion "GGGAAGAAGG" ) (mspeed 1600 20) (attheight 18))

The last thing we need to edit in config files is the mobs name. That is of course in message-e.txt. So we add something like
Code:
( monstername 500 "Stupid Doggebi")

Now if we would leave it like this, we would get the monster but we still can't see it's model. So we go into Data/Monster/Clothes and we copy M050_B1.gb,M050_B2.gb and M050_B2.gb as M500_B1.gb,M500_B2.gb and M500_B2.gb. Every mob has it's own model here. Now in Tex we also need it's texture, so we copy M051.GTX as M500.GTX.

Finished, done ^^
 
Last edited:
Initiate Mage
Joined
Jan 4, 2006
Messages
1
Reaction score
1
Step 1 : Server side setup
- mspeed: move speed. First is running, second walking (probably =P)

Instead of run and walk, it's more like when the monster is aggressed onto a player and when it's just walking around normally (non-aggressed). He is running when he's aggressed so your still right.

Step 1 : Server side setup

- quest: links to Quest.txt... Not sure about this so we'll skip it xD

(quest (2 1 901 1) (3 1 902 1) (54 1 1025 1) (8001 1 933 1)))

1st Number - Main Quest ID
2nd Number - Secondary Quest ID
3rd Number - Quest's Main Group for item drops
4th Number - number of times the Main Group will be called

The reason there is a secondary Quest ID is so the server knows which part of the quest you are on, so you don't skip ahead or repeat a part you already did. Example: Like step one would be talk to the main NPC, second would be talk to NPC #2, next would be to go get the drop, then back to NPC #2, then back to the main NPC.
 
Last edited:
Newbie Spellweaver
Joined
Jan 4, 2006
Messages
46
Reaction score
8
hehe well I skipped the quest part mainly because I haven't looked into it yet and because the guide isn't about quests. But thnx for the info anyway ;] maybe I'll do a "make your own quest" guide next time.
 
Newbie Spellweaver
Joined
Sep 10, 2006
Messages
19
Reaction score
0
- rect: this is a rectangle that defines the spawn area. The coordinates are weird, just like by the teleports in Etc.txt so I'm not really sure how they work.

This is easy to explain:

You need 2 points (coordinates) to define a spawn rectangle.
Go to the south/west corner of the (virtual) rectangle type /coordinates and write them down, now do thes ame with the north/east corner and write the coordinates down.

Lets say s/w = (257925 276013 16966) and n/e = (258648 276331 16811)

Now how to get (rect x y x2 y2) out of this coordinates?
Easy, take the first number of s/w coord. and divide it by 32 = x
Second number of s/w divided by 32 = y
First number of n/e divided by 32 = x2
Second number of n/e divided by 32 = y2

So the coordinates for the spawn rectangle would be:
(rect 8060 8625 8082 8635)
 
Newbie Spellweaver
Joined
May 29, 2006
Messages
34
Reaction score
0
Too bad we cant make mobs spawn in the closed area near narootuh & the guildwar castle, I wanted to do some kind of "event island" there. :/
 
Initiate Mage
Joined
Jun 16, 2006
Messages
1
Reaction score
0
can someone tell me e.pk PW? darn maybe im 100 years behind of that lol but i still dont know PW

so please anyone?
 
Newbie Spellweaver
Joined
Jan 4, 2006
Messages
46
Reaction score
8
This is easy to explain:

You need 2 points (coordinates) to define a spawn rectangle.
Go to the south/west corner of the (virtual) rectangle type /coordinates and write them down, now do thes ame with the north/east corner and write the coordinates down.

Lets say s/w = (257925 276013 16966) and n/e = (258648 276331 16811)

Now how to get (rect x y x2 y2) out of this coordinates?
Easy, take the first number of s/w coord. and divide it by 32 = x
Second number of s/w divided by 32 = y
First number of n/e divided by 32 = x2
Second number of n/e divided by 32 = y2

So the coordinates for the spawn rectangle would be:
(rect 8060 8625 8082 8635)
thnx for this, I have problems thinking in maths so can't figure out stuff that includes multiplication, division and similar stuff xD (hate numbers). I'll add it to the guide
 
Newbie Spellweaver
Joined
Sep 25, 2006
Messages
19
Reaction score
4
have some probs with the skeleton boss somthing i forget but dont know what
if someone has a ready one show me ur entrys to the config plz
 
Initiate Mage
Joined
Jan 8, 2007
Messages
1
Reaction score
0
How open M050_B1.gb M051.GTX . What implement does use?
 
Last edited:
Newbie Spellweaver
Joined
Oct 12, 2006
Messages
8
Reaction score
0
anyone have a tool to edit the safe zones by chance? i would apreciate it ^^

thanks
 
Initiate Mage
Joined
Oct 2, 2006
Messages
1
Reaction score
0
Re: [Guide] How to create your own mobs + spawns

- defense: mobs defense. don't know why 2 numbers :eek:
cause there is a short-range defense and long-range defense.
 
Newbie Spellweaver
Joined
May 29, 2006
Messages
34
Reaction score
0
Re: [Guide] How to create your own mobs + spawns

cause there is a short-range defense and long-range defense.

Actually I'm pretty sure one is the normal defense and the other is EB Defense. I'd have to test it but thats how I see it.
 
Newbie Spellweaver
Joined
Feb 27, 2007
Messages
47
Reaction score
0
Re: [Guide] How to create your own mobs + spawns

hi guys,
anyone knows how to link .gb files to the corresponding monster?i am trying to find what gb concernes the second commander .
thx
 
Last edited:
Legendary Battlemage
Loyal Member
Joined
Feb 6, 2007
Messages
684
Reaction score
3
Re: [Guide] How to create your own mobs + spawns

i've been tring to do this with the lord but it's not working keep getting error's
 
Newbie Spellweaver
Joined
Sep 15, 2006
Messages
27
Reaction score
0
Re: [Guide] How to create your own mobs + spawns

my question that I would like to ask is simple to most.

1. How do you increase the size of the monsters you are facing? I've seen youtube videos of other servers which have hugely increased the size of small mobs as big as the dog cheif. How is this done?

2. I've also seen different effects on the monsters, such as fire around their heads and things, and even the cloud effect on npc's that the hermits have.

If anyone can tell me how this is done, then the guide is complete! :D
 
Back
Top