How to make Mobs Aggro?!?

R3P0
Posts: 10
Joined: Fri Jan 04, 2013 10:46 am

How to make Mobs Aggro?!?

Post by R3P0 » Tue Sep 02, 2014 1:11 pm

Little lost here, I opened Mob_Pools.sql and am trying to make mobs aggro on my server. According to what I saw 11 spaces down should be the Aggro toggle switch and 12 should be links. I tested this with 2 mobs on a level 1 character, Orcish Fodder which aggros by sight to a level 1 and Wild Rabbit which does not aggro. Slot 11 was set as 257 on Fodder and 256 on Rabbit. When I saved the changes to rabbit making it 257 and bounced the server Rabbits still will not aggro. I found the following settings.

0 - passive
1 - agros to sight
2 - agros to sound
4 - low hp aggro
8 - true Sight
16 - true hearing
32 - magic agro
64 - unknown
128 - unknown
256 - unknown

In another thread but it also did not work, I am lost as to what I am missing here. As theoretically making the same change should work. Help please!

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: How to make Mobs Aggro?!?

Post by kjLotus » Tue Sep 02, 2014 2:25 pm

all the static data in the database is only read on startup (so you have to restart the server), and if you edit a .sql file you have to reimport it into the database

R3P0
Posts: 10
Joined: Fri Jan 04, 2013 10:46 am

Re: How to make Mobs Aggro?!?

Post by R3P0 » Tue Sep 02, 2014 2:30 pm

kjLotus wrote:all the static data in the database is only read on startup (so you have to restart the server), and if you edit a .sql file you have to reimport it into the database
OMG I feel so stupid right now I just realized I totally forgot that step lol wow do I feel like a dumbass. that worked perfect Kj I just really cant believe i forgot that step here at work, guess triyng to program a game and working dont really mix when you should be doing other shit lol.

R3P0
Posts: 10
Joined: Fri Jan 04, 2013 10:46 am

Re: How to make Mobs Aggro?!?

Post by R3P0 » Tue Sep 02, 2014 7:22 pm

I made my modifications here and the mobs now aggro as they should, is there any way to extend the aggro range? As of right now you have to be practically on top of them for aggro. I used mod 24 which should be True Sight and True Sound

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: How to make Mobs Aggro?!?

Post by kjLotus » Tue Sep 02, 2014 7:32 pm

there's a mob modifier called MOBMOD_SIGHT_RANGE that controls that, you can either modify the default in mobentity.h::41 or add that modifier to specific mobs to overwrite the default

R3P0
Posts: 10
Joined: Fri Jan 04, 2013 10:46 am

Re: How to make Mobs Aggro?!?

Post by R3P0 » Sat Sep 06, 2014 9:33 am

kjLotus wrote:there's a mob modifier called MOBMOD_SIGHT_RANGE that controls that, you can either modify the default in mobentity.h::41 or add that modifier to specific mobs to overwrite the default
Kj I added MobMod_Sight_Range to the initialize portion of the mob scripts sometimes it seems to work other times it does not. True sound definitely does not seem to work, is the modifier actually 16 or is it something else?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: How to make Mobs Aggro?!?

Post by kjLotus » Sat Sep 06, 2014 2:48 pm

R3P0 wrote:
kjLotus wrote:there's a mob modifier called MOBMOD_SIGHT_RANGE that controls that, you can either modify the default in mobentity.h::41 or add that modifier to specific mobs to overwrite the default
Kj I added MobMod_Sight_Range to the initialize portion of the mob scripts sometimes it seems to work other times it does not. True sound definitely does not seem to work, is the modifier actually 16 or is it something else?
what's the script look like?

R3P0
Posts: 10
Joined: Fri Jan 04, 2013 10:46 am

Re: How to make Mobs Aggro?!?

Post by R3P0 » Sat Sep 06, 2014 10:19 pm

kjLotus wrote:
R3P0 wrote:
kjLotus wrote:there's a mob modifier called MOBMOD_SIGHT_RANGE that controls that, you can either modify the default in mobentity.h::41 or add that modifier to specific mobs to overwrite the default
Kj I added MobMod_Sight_Range to the initialize portion of the mob scripts sometimes it seems to work other times it does not. True sound definitely does not seem to work, is the modifier actually 16 or is it something else?
what's the script look like?
Mob Pools

Code: Select all

INSERT INTO `mob_pools` VALUES (3092,'Pantokrator',54,0x0000370400000000000000000000000000000000,4,5,12,240,100,0,16,1,2,0,0,7,159,0,0,2,1);
Pantokrator.lua

Code: Select all

-----------------------------------
--  Area: Abyssea - Uleguerand (253)
--   Mob: Pantokrator
-----------------------------------
require("scripts/zones/Abyssea-Uleguerand/MobIDs");
package.loaded["scripts/zones/Abyssea-Uleguerand/TextIDs"] = nil;
require("scripts/globals/status");
require("scripts/globals/magic");
require("scripts/globals/monstertpmoves");
-----------------------------------
-- onMobInitialize
-----------------------------------

function onMobInitialize(mob)
	mob:addMod(MOBMOD_SIGHT_RANGE,50)
end;

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: How to make Mobs Aggro?!?

Post by kjLotus » Sat Sep 06, 2014 10:27 pm

R3P0 wrote:mob:addMod(MOBMOD_SIGHT_RANGE,50)
should be setMobMod

R3P0
Posts: 10
Joined: Fri Jan 04, 2013 10:46 am

Re: How to make Mobs Aggro?!?

Post by R3P0 » Sat Sep 06, 2014 10:37 pm

kjLotus wrote:
R3P0 wrote:mob:addMod(MOBMOD_SIGHT_RANGE,50)
should be setMobMod
Worked like a charm thank you

Post Reply