Log in

View Full Version : Faction not working on new mobs


iggi
03-25-2011, 08:45 PM
I have the latest server with the latest DB and latest SQL updates.

I first cleared the entire "freporte" zone by dropping all entries in the spawn2 table with freporte as their zone. I then created two factions, assigned them to two mobs, but both con indifferent and give no faction hits when killed.

Here is the entries in faction_list:


| id | name | base | (mod rows)|
| 4000 | Justicars_of_Rodcet_Nife | -750 | 0 |
| 4001 | The_Unholy_Bertox_Guard | 250 | 0 |


Entries in npc_faction:


+------+--------------------------+----------------+-----------------------+
| id | name | primaryfaction | ignore_primary_assist |
+------+--------------------------+----------------+-----------------------+
| 5000 | The_Unholy_Bertox_Guard | 4001 | 0 |
| 5001 | Justicars_of_Rodcet_Nife | 4000 | 0 |
+------+--------------------------+----------------+-----------------------+


Entries in npc_faction_entries:


+----------------+------------+-------+-----------+
| npc_faction_id | faction_id | value | npc_value |
+----------------+------------+-------+-----------+
| 5000 | 4000 | 100 | -1 |
| 5000 | 4001 | -1000 | 1 |
| 5001 | 4000 | -10 | 1 |
| 5001 | 4001 | 10 | -1 |
+----------------+------------+-------+-----------+
4 rows in set (0.00 sec)



Section from npc_type (the faction numbers are wrong probably because I was changing numbers):


| id | name | lastname | level | race | class | bodytype | hp | gender | texture | helmtexture | size | hp_regen_rate | mana_regen_rate | loottable_id | merchant_id | npc_spells_id | npc_faction_id |
--
| 999147 | good | NULL | 1 | 1 | 1 | NULL | 1000 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5000 |
--
| 999148 | bad | NULL | 1 | 1 | 1 | NULL | 1000 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5001 |
--
| 999151 | good | NULL | 1 | 1 | 1 | NULL | 10000 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5000 |


Any ideas?

joligario
03-25-2011, 10:00 PM
You wan them to aggro each other? Did you set npc_aggro to 1 in the npc_types table?

iggi
03-25-2011, 11:00 PM
Agro each other or me, right now they both con indifferent and do nothing. They don't even give a faction hit for killing them.

iggi
03-25-2011, 11:16 PM
Just tried editing an existing faction and it worked fine, still no go on custom factions.

iggi
03-26-2011, 12:00 AM
Just tried editing an existing faction, I thought it worked, but it did not. I tell it to use faction 1070 and it shows 1070 when I do #showstats, but the faction hits are that of faction #843. There is definitely something wrong here.

iggi
03-27-2011, 02:52 PM
So, I tried dropping the entire contents of factions_list, factions_values, npc_faction, npc_faction_entries and what I get from it is that the factions do not update even after a world reboot. I created a faction of id 2, with a default of -100, yet the mob is still apprehensively with an empty faction_values? Even when you kill the mob, there is not faction hit even when npc_faction_entries is populated?

I'm at a loss for why this would not update after a world restart.

iggi
03-27-2011, 03:00 PM
Shortly after editing the factions in real time, zone crashed with this:

[Debug] [ZONE__INIT] Loading npc faction lists
SharedMemory->datasize(409360) != iSize(200656), or 0x7f684da72000==-1, We can rebuild him faster better STRONGER!
Or not.. restart all servers on this machine

I also checked the logs I see errors from when I initially setup, but nothing since then.

Every time a zone boots up I see "[Debug] [ZONE__INIT] Loading npc faction lists" but even with -2500 faction rating faction 1 shows indiff and faction 2 apprehensively

iggi
03-27-2011, 05:47 PM
Fixed it, needed to compile cleanipc and run it.