Pagina de start a forumului eG-ClanS.Zapto.Org
Inregistrare • Cautare • FAQ • Membri • Grupuri • Autentificare
How To Create Your Own Mobs + Spawns

 
Raspunde la subiect    Pagina de start a forumului eG-ClanS.Zapto.Org » Kal Online Subiectul anterior
Subiectul urmator
How To Create Your Own Mobs + Spawns
Autor Mesaj
ki!!z0r
Administrator *eG*
Administrator *eG*
ki!!z0r

Data inscrierii: 06/Mar/2009
Mesaje: 51
Localitate: Satu Mare

Mesaj How To Produse Your Own Mobs + Spawns Raspunde cu citat (quote)
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 fabricate 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:
Cod:
(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 natural 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 :o
- 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.
Cod:
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:
Cod:
(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)
Citat:
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 ;>
Cod:
(genmonster (index 500) (map 0) (area 110) (max 10) (cycle 1) (rect 8058 8145 8091 8177))

Send a message via ICQ to puppi

[Guide] How to realizate your own mobs + spawns
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 :o
- 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)
Quote:
Originally Posted by Bodonko
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)
Cod:
( 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 ^^:
Cod:
( 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
Cod:
( 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

_________________
How To Create Your Own Mobs + Spawns How To Produse Your Own Mobs + Spawns
How To Create Your Own Mobs + Spawns How To Produse Your Own Mobs + Spawns
How To Create Your Own Mobs + Spawns How To Produse Your Own Mobs + Spawns
How To Create Your Own Mobs + Spawns How To Produse Your Own Mobs + Spawns
[url=http://www.userbars.be]How To Create Your Own Mobs + Spawns How To Produse Your Own Mobs + Spawns[/url]
____________________________________

^_^De NeOpRiT^_^
11/03/2009 16:29 Vezi profilul utilizatorului Trimite mesaj privat
Afiseaza mesajele pentru a le previzualiza:    
Raspunde la subiect    Pagina de start a forumului eG-ClanS.Zapto.Org » Kal Online Ora este GMT + 2 ore
Pagina 1 din 1

 
Mergi direct la: 
Nu puteti crea un subiect nou in acest forum
Nu puteti raspunde in subiectele acestui forum
Nu puteti modifica mesajele proprii din acest forum
Nu puteti sterge mesajele proprii din acest forum
Nu puteti vota in chestionarele din acest forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro