[Guide] Understanding MSB.txt and Monster.txt

Apeli

New Member
Joined
Oct 5, 2008
Messages
40
Reaction score
2
Understanding the Monster Set Base

Well first off, lets break down the code of a spawn thats in every server, the Lorencia Wizard Shop spawn.

Code:

254 0 0 118 113 3 // Wizard Pasi => Lorencia


254 - This number represents the monster ID number in the monster.txt. If you open the monster.txt, you'll find Pasi indexed as number 254.Code:

253 1 "PotionGirl" 2 50 0 15 30 70 20 10 30 0 0 0 5 400 1500 10 0 200 10 0 0 0 0 0 0
254 1 "WizardPasi" 2 50 0 15 30 70 20 10 30 0 0 0 5 400 1500 10 0 200 10 0 0 0 0 0 0
255 1 "BarmaidLiaman" 2 50 0 15 30 70 20 10 30 0 0 0 5 400 1500 10 0 200 10 0 0 0 0 0 0

This is how you find out which number you should put here.

---

The next number, 0, tells us which map we are going to spawn the monster in. Since we're spawning Wizard Pasi in Lorencia, we should use the number "0". Here is a list of all the map numbers (excluding the newer maps).
Code:

0 = lorencia
1 = dungeon
2 = devias
3 = noria
4 = losttower
6 = Arena
7 = Atlans
8 = Tarkan
9 = Devil Square
10 = Icarus
11 = Blood Castle I
12 = Blood Castle II
13 = Blood Castle III
14 = Blood Castle IV
15 = Blood Castle V
16 = Blood Castle VI

So, if we wanted to spawn our little Pasi in Devias, we would use the number 2 instead of 0.

---

The third number, 0, tells us how the monster is going to move. Since we don't want Pasi to move, we put 0 here. If we wanted him to move around, we would put a 20 or 30 here.

--

The fourth number, 118, tells us the X coordinate of where on the map he is going to spawn. To find out this number, look in the bottom left part of the screen while in-game. The first number is the X, and the second number is the Y.

--

The fifth number, 113, tells us the Y coordinate of where on the map Pasi is going to spawn. Again, to find out this number, look in the bottom left part of the screen. The second number is the Y coordinate.

--

The sixth and last number, 3, tells us which direction the monster is going to face. Here is a diagram of which numbers make the monsters face which direction.
Code:
7-NorthWest
6-North
5-NorthEast
8-West
4-East
9-SouthWest
2-South
3-SouthEast

So if we wanted to make Pasi face North instead of south, we would put a 6 instead of a 2.

--

Adding even more spawns.

Now when adding spawns, what happens when we add a lot of lines to the monster set base? Oops! We get a 4200 (255) error. It means that there are too many lines in the monster set base for the GameServer to load. How do we fix this? Well we do it like this;

Code:

125 6 20 21 116 23 110 -1 20

What does this line mean exactly? Well once again lets break it down!

125 - This is the index number for the Blood Castle 6 Orc Warrior. If you look in the monster.txt, you'll find this;
Code:

124 1 "SpiritSorcerer5" 90 32000 0 400 460 450 0 720 260 4 150 4 6 400 1800 10 2 150 50 4 0 8 8 8 8
125 1 "OrcWarrior6" 76 17000 0 260 290 210 0 460 150 3 0 1 3 400 2000 10 2 300 200 3 0 6 6 6 6
126 1 "OrcArcher6" 81 20000 0 320 350 270 0 520 160 3 0 5 7 400 1600 10 2 300 200 3 0 6 6 6 6

--

6 - This is the map number we're spawning the orcs on. Since we spawning the orcs in the stadium, we use the number 6.

--

20 - This is how the orcs are going to move. Since they are monsters and we want them to move around, we put a 20 here.

--

21 - This is the first X coordinate. What do I mean by the first X coordinate? We'll get to that in a second.

--

116 - This is the first Y coordinate.

--

23 - This is the second X coordinate. Now heres where the trick comes in. We use two sets of coordinates because we're going to spawn the orcs in a set range of coordinates. This spreads the orcs out and allows us to add more in one area so they won't stack on top of each other and be unable to move.

--

110 - This is the second Y coordinate.

--

-1 - Heres a new number type, a negative. What does this mean? It means when the monster spawns, it will be facing in a random direction instead of a set direction.

--

20 - Heres the last new value on the line. This number tells us how many orcs are going to spawn in the area. We are spawning 20 orcs, so we put 20 here. If we wanted to spawn 50 orcs, we would put a 50 here.


Example;
Code:

1
3 0 30 180 90 226 244 -1 45 // Spider => Lorencia
2 0 30 180 90 226 244 -1 40 // Budge Dragon => Lorencia
2 0 30 135 20 240 88 -1 20 // Budge Dragon => Lorencia
0 0 30 135 20 240 88 -1 45 // Bull Fighter => Lorencia
6 0 30 95 168 175 244 -1 20 // Lich => Lorencia
14 0 30 95 168 175 244 -1 15 // Skeleton Warrior => Lorencia
14 0 30 134 212 144 224 -1 30// Skeleton Warrior => Lorencia
1 0 30 8 11 94 244 -1 45 // Hound => Lorencia
4 0 30 8 11 94 244 -1 45 // Elite Bull Fighter => Lorencia
7 0 30 8 11 60 80 -1 15 // Giant => Lorencia
end

The number at the top tells the GameServer how the line is going to be handled, and the END statement at the end of the list tells the GameServer that the line is over and gets the GameServer ready to load the next line.
Understanding the Monster.txt

So you open up the monster.txt and all you see is a bunch of numbers. What do these mean? Lets break it down! I'll only be telling you what the first few numbers are.

Code:

1 1 "Hound" 9 140

1 - The first number, as we went over earlier, tells us the ID number of the monster. This is the number we need to use when adding the spawns to the monster set base.

--

1 - This next number I have no clue what it means. Every line in the monster.txt has a one here, so theres nothing much to edit here.

--

"Hound" - This is the name of the monster on the line.

--

9 - This is the monster's level. The reason you would want to edit this is to edit how much experience the monster will give. The higher level the monster, the more experience you'll get. The level doesn't affect the other stats in any way.

--

140 - This is how much hit points the monster will have.

Credits: ppsito80, enXio, iod & Ron
 
Last edited by a moderator:
  • Like
Reactions: pesosza
Съществува подобна тема. Няма да я заключвам. Все пак добра работа :yes:
 
Guide edited and credits added. I looked for guide like this one in DarksTeam but i didn't find so that's why I posted this one.