Question about mob_dm 'mode' entry

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
nmaligec
Warrior
Warrior
Posts: 253
Joined: 08 Apr 2010, 01:55

Question about mob_dm 'mode' entry

Post by nmaligec »

I was wondering what the changetarget bit flag does for a mobs ai? I also would like to know what Boss, plant, detector do. I wonder what castsensor even is.

The mode flags are:
canMove: 1
looter: 2
aggresive: 4
assist: 8
castsensor: 16
Boss:32
plant: 64
canAttack: 128
detector: 256
changetarget: 512
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Question about mob_dm 'mode' entry

Post by Crush »

The server we are using was not made for TMW but for another game named Ragnarok Online. That's why you will find a lot of settings which are not really relevant for TMW like castsensor, boss and plant.

CanMove and CanAttack are obvious.
Looter means that the monster picks up items.
Assist means that it attacks players who attack other monsters of the same type.
Changetarget means that when a player is already attacking the monster and a second player joins the attack the monster will start attacking the second player.
Aggressive means that the monster attacks unprovoked.

To combine multiple behaviors you have to add them up. When you want a monster which can move, attack and is aggressive you would set the mode to 133 (1 + 128 + 4).
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Freeyorp101
Archivist Prime
Archivist Prime
Posts: 765
Joined: 04 Nov 2008, 09:17
Location: New Zealand

Re: Question about mob_dm 'mode' entry

Post by Freeyorp101 »

Note that mobs in our current build will change their target (at a constant chance of 25% per attack, damage is irrelevant to this decision, only rate matters) regardless of whether that flag is set (the flags are slightly different than in mainline eAthena)

The plant flag does interesting things like reducing all incoming damage to 1.

The boss flag slightly alters a few calculations in battle.c.

Sensor and detector are irrelevant for our content.



If you look for the specifics, it's generally best that you read through the source yourself - battle.c and mob.c are the most relevant.


---Freeyorp
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: 08 Sep 2004, 19:48
Location: Bern, Switzerland

Re: Question about mob_dm 'mode' entry

Post by Rotonen »

AFAIR castsensor triggers aggro and changes the target to you when you prepare a spell against it even before it actually gets cast.
This message used to be meaningful.
Post Reply