Jump to content

Manage NPC / Monster spawn on your maps


Recommended Posts

  • Contributor

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 29
  • Good 11
  • Love 5
  • Love 28
Link to comment
Share on other sites

  • 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:

  • metin2 dev  >>>>>>>>>>> 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 6
  • Dislove 1
  • Good 1
  • Love 4
Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2004. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
  • 5 months later...
  • 5 months later...
On 9/22/2023 at 2:34 PM, Crow said:

Hello.

I would like to change the respawn time on all map1 but boss.txt doesn't include boss Lykos etc. Where does the game load them from then?

Thanks in advance for your answers!

Sincerely, Crow

You can't see the single monster like that because Lykos comes inside a group.

As you already know a group is defined with a g.

In the /locale/country path you see a file called group.txt and when you search for Lykos ID (191) you can see the group of Lykos. The ID of the group is 139 and in the boss.txt file you can see that a group is spawned with the vnum of 139 which is your desired Lykos-Group.

Hope it helped!

  • Love 1
Link to comment
Share on other sites

Announcements



×
×
  • 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.