Page 1 of 2
How to make Mobs Aggro?!?
Posted: Tue Sep 02, 2014 1:11 pm
by R3P0
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!
Re: How to make Mobs Aggro?!?
Posted: Tue Sep 02, 2014 2:25 pm
by kjLotus
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
Re: How to make Mobs Aggro?!?
Posted: Tue Sep 02, 2014 2:30 pm
by R3P0
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.
Re: How to make Mobs Aggro?!?
Posted: Tue Sep 02, 2014 7:22 pm
by R3P0
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
Re: How to make Mobs Aggro?!?
Posted: Tue Sep 02, 2014 7:32 pm
by kjLotus
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
Re: How to make Mobs Aggro?!?
Posted: Sat Sep 06, 2014 9:33 am
by R3P0
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?
Re: How to make Mobs Aggro?!?
Posted: Sat Sep 06, 2014 2:48 pm
by kjLotus
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?
Re: How to make Mobs Aggro?!?
Posted: Sat Sep 06, 2014 10:19 pm
by R3P0
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;
Re: How to make Mobs Aggro?!?
Posted: Sat Sep 06, 2014 10:27 pm
by kjLotus
R3P0 wrote:mob:addMod(MOBMOD_SIGHT_RANGE,50)
should be setMobMod
Re: How to make Mobs Aggro?!?
Posted: Sat Sep 06, 2014 10:37 pm
by R3P0
kjLotus wrote:R3P0 wrote:mob:addMod(MOBMOD_SIGHT_RANGE,50)
should be setMobMod
Worked like a charm thank you