Jump to content

Manage NPC / Monster spawn on your maps


Recommended Posts

  • Distinguished Member
Posted (edited)

Hello,

This tutorial is intended to help beginner who don’t know how to configure regeneration files for specific maps.
It may seem obvious to some but some don’t know how it works completely.
That is, choose the correct location of your Monsters, Metins, Bosses and NPC’s as well as their coordinates, direction and spawn time.

 

Information. The tutorial presents the 4 files (regen.txt, boss.txt, stone.txt, npc.txt) at the same time because they work particular the same way. These files are located in your server files at “share/locale/country/map/name_of_your_map/”

 

How to get started?

 

  • First, you need access to your server file directory. We recommend using WinSCP as it open source as in globally used among everyone.
  • The map folder which you will configure. 

 

I. How to configure spawns?

Révélation

 

Information
  • By default, boss.txt spawns Bosses, stone.txt spawns Metins, npc.txt spawns NPC’s and regen.txt spawns monsters. Sounds obvious, right? 
  • Each regen file works per line. That is: a line configures a spawn.
  • Make sure each value is separated with a tab or 4 spaces.
  • Below we will see the meaning of each parameter, one by one, in order they are presented in the file.

 

1.  Type

There are in total 6 types of spawns but only 5 of them are which we will use.

 

Warning ! It is not the waiting time between when the monster is killed and when it respawns.
m	REGEN_TYPE_MOB						Monster Spawn.
g	REGEN_TYPE_GROUP					Group Spawn.
ga	REGEN_TYPE_GROUP (Agressive)				Agressive Group Spawn. (This token will only apply to "g")
e	REGEN_TYPE_EXCEPTION					Exception Spawn. (Not used)
r	REGEN_TYPE_GROUP_GROUP					Group's Group Spawn.
s	REGEN_TYPE_ANYWHERE					Monster Spawn Anywhere.

 

2. Coordinates

These parameters specify the position where your monster should appear.
You can find these coordinates in the atlas (mini) map of your client by hovering the mouse of your player's arrow.

sx         MODE_SX             Sectree X (Current X)
sy         MODE_SY             Sectree Y (Current Y)
ex         MODE_EX             Exception X (This is used for x range)
ey         MODE_EY             Exception Y (This is used for y range)
z          MODE_Z_SECTION      Z Section (Not used)
                               The "z" is for height but the mobs don't spawn in the clouds. I assume Ymir just added that for axis math logic.

Here are some examples.

//       type    sx     sy     ex     ey     z    dir    time    percent    count    vnum
Example: m       300    300    300    300    0    0      1m      100        1        101    FIXED (X, Y) (300, 300)
Example: m       300    300    0      0      0    0      1m      100        1        101    FIXED (X, Y) (300, 300)

Let's say you want to spawn a monster at x(300), y(300) but also want a range with 10 pixels of difference.

//       type    sx     sy     ex     ey     z    dir    time    percent    count    vnum
Example:   m     300    300    10     10     0    0      1m      100          1       101    RANDOM (X, Y) (290~310, 290~310)

As you can see we used 10 on "ex" and 10 on "ey".
This means:

sx(300) - ex(10) = 290
sx(300) + ex(10) = 310

sy(300) - ey(10) = 290
sy(300) + ey(10) = 310

Result = x(290~310), y(290~310)
The monster could spawn for example at x(299), y(305)

 

3. Direction

dir		MODE_DIRECTION		Direction (N, NE, E, SE, S, SW, W, NW)

 

This parameter is mainly used for NPC's and it set's the it's orientation.
Basically it will choose where your NPC will look when it spawns.
It is useful to avoid having a merchant who turns her back on us!

 

Here are the 9 possible values in which the NPC can look :

  • 1. South direction
  • 2. South-East direction
  • 3. East direction
  • 4. North-East direction
  • 5. North direction
  • 6. North-West direction
  • 7. West direction
  • 8. Southwest direction
  • 0. Random direction (among the 8 previous ones)

 

Here are some useful images to guide you:

102959unknown.png

 

4. Spawn time

time		MODE_REGEN_TIME		Regen time (m, s) example: 1m, 60s

There are 3 formats to configure the respawn time, for example:

  • 17s : the respawn time is 17 seconds
  • 3m : respawn time is 3 minutes
  • 5h : respawn time is 5 hours

 

Warning ! The monster will respawn based on the time set, regardless if you have killed him seconds before the respawn time.


For example : 

 

  • A monster with a respawn time of 1m appears at 9:20 a.m., it is killed at 9:20:18 a.m., it will reappear at 9:21 a.m.
  • A monster with a respawn time of 1m appears at 9:20 a.m., it is killed at 9:36:45 a.m., it will reappear at 9:37 a.m.

 

5. Probability of Spawn

percent		MODE_REGEN_PERCENT		Regen percent (Not used)

101104unknown.png

This parameter is actually unused from the game.
As we can see from the regen source files it is beeing skiped to the next token "MODE_MAX_COUNT".
Simply add the value 100 for it's consistency.

 

6.  Spawn Amount

count		MODE_MAX_COUNT		Spawn count

This parameter set's how many Monsters or NPC's will spawn at the location.

Warning ! They will all appear at the same coordinates (regardless of the random coordinates generated).

 

7. VNUM / ID

vnum		MODE_VNUM		Spawn VNUM

This number depends on the first parameter you have chosen.

 

  • m : You have to put the VNUM of the Monster, NPC, Metin Stone or Boss.
  • g or ga : You must put a monster group number (which must be defined in group.txt)
  • r : You must put a monster group group number (which must be defined in group_group .txt)

 

What have we learned so far? 

We know now what each parameter signified so it's time to build are own line.

 

Example :

//                      type     sx        sy        ex      ey       z    dir    time     percent    count    vnum
Example:            m     865      809     200    150     0     0     1850s     100             1        8003


One monster of vnum 8003, will appear at coordinates between (665, 659) and (1065, 959) with the respawn time of 1850 secondes

 

Success! You now know how a regen.txt works on Metin2!

 

 

II. Manage group.txt and group_group.txt

Spoiler

1. Group.txt

Information. We can define a precise and non-random group and presented like this :

091910group.png

 

  • Green : Name of the group, you can put whatever you want, it doesn't matter
  • Red : Vnum of the group, the ID must be unique !
  • Blue : Mob leader of the group, you can give it whatever name you want + vnum mob
  • Orange : ID of you mob in the group, name of your mob + vnum mob

 

2. Group_group.txt

Warning ! The group_group must be return on the vnum  of group.txt file, otherwise it won't work.

 

091910group-group.png

 

  • Green : Name of the group, you can put whatever you want, it doesn't matter
  • Red : Vnum of the group, the vnum must be unique !
  • Orange ID , Group Vnum (group.txt), Probability (Unused)

 

Example :

r    506    542    10    10    0    0    10s    100    1    6711


One random group of vnum 6711 (group 8000 and 8001 in our case), will appear at coordinates between (496, 432) and (516, 452) and will spawn every 10 secondes.
100% isnt used.

090638f48bd5cf1772f216e6db7b49657acf84.g

 

Success! You now know how works group.txt and group_group.txt on Metin2!

 

 

Special thanks to @Owsap for his help !

 

A category Questions and Answers is available. If you have a problem or a question, feel free to post a request!

Edited by Veltor88
  • Metin2 Dev 2
  • Love 7
  • Love 2
  • Good 3
Link to comment
  • 2 months later...

Hi and thank you for a new tutorial 🙂

i was searching  for group.txt and Group_group.txt

 

About:

Spoiler

Green : Name of the group, you can put whatever you want, it doesn't matter

try:

  • Hidden Content

      Give reaction to this post to see the hidden content.
      >>>>>>>>>>> there is "ENTER"
  • metin2-dev >>>>>>>>>>> there is " - "
  • hüllogroup >>>>>>>>>>> there is "ü"

you cant put whatever you want.

No Enter between or (-) or Words with (ä,ü etc.)

I don't know if this has been changed yet, but it used to lead to crash.

 

PS:

can i put this tutorial in my tool? :D?

Edited by Ace
  • Metin2 Dev 2
  • Love 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.