View Single Post
  #6  
Old 12-18-2008, 03:00 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

rising the faction bugs issue again. This time tested and tried and 99% sure

Here is whats happening (wipign out all faction table for starters)

The problem exists in handling the "npc_faction_entries" table

Imagine that 2 other tables set up properly. Now lets go to "npc_faction_entries" and ptu soem entries.

Let say:
# -secuence of entry row number (this # of course does nto exist in Db but this ORDER in which faction values are entered)
1 Faction A relation to Faction B
2 Faction A relation to Faction C
3 Faction A relation to Faction D
4 Faction A relation to Faction E
5 Faction A relation to Faction F

run the server- all is fine, now lets add soem more

6 Faction B relation to Faction G
7 Faction B relation to Faction H
8 Faction B relation to Faction I
9 Faction B relation to Faction J
10 Faction B relation to Faction K


run the server- all is fine.

NOW - we sudnely realised we FORGOT to add one more hign to Faction A:

11 Faction A relation to Faction Z

STOP! now lest run the server..what do we see? relation B to G - NO LONGER WORKS!
How come?
I will tell you how come. The server SOMEHOW sorts and reads this faction tables on What is first Faction is (in this case A) - and SORT evtyhgin based on this A value FIRST. which means the list of enteries looks like this:
1,2,3,4,5, 11 , 7,8,9,10

WAIT! Where is 6? Youy rigth- 6 is out! Yeah its still in the DB, but when when server runs it reads entry 11 in its place! teh 6 entries effectvly skipped, and then server reads entry 7 and so on.

The more "forgotten" faction entries you add that woudl become "sorted in order" - the more screw up faction table become


I am 99% confident this is where my problems comign from.
I have wiped and remade my faction tables from teh SCRATCH 3 times now. Once I get to a certain poitn like : "wait I need to put large snakes on separate faction and make Qeynos Guards attack them" - and fine- Q Guards now attack the snakes - BUT then the GNOLLS who were rigth behind Qeynos Guards on entry list - stop giving factions hits


I sugest to take a DEEP look into how this table is read - there is a defebtly screw up somewhere in sorting or ordering or something like that
Reply With Quote