Jump to content

Schmoozerd

Members
  • Posts

    1078
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Schmoozerd

  1. "(my approach sacrifices space for simplicity):"

    infact the basic conditions (has-aura) will be less in your version -- which is kind of a good thing, because this might be the place where we can keep things easier between the different projects.

    But you might require more "link-conditions" (with which I mean the conditions of type -1, -2)

    With this system, you need to check the numbers of your conditions, and then how they are used within the "link-conditions"

  2. The converting tool for initial fill is now quite powerfull, even if it still won't give an optimal result.

    Version: http://paste2.org/p/1967856

    I compared the different databases (zero-db, tbc-db, udb, ytdb).

    The results you can see below.

    Processing database zero_db (1 vector conditions)

    Processing database tbcdb (1 vector conditions)

    Processing database udb_clean (1 vector conditions)

    Processing database ytdb (1 vector conditions)

    Processing database zero_db (2 vector conditions)

    Processing database tbcdb (2 vector conditions)

    Processing database udb_clean (2 vector conditions)

    Processing database ytdb (2 vector conditions)

    Processing database zero_db (3 vector conditions)

    Processing database tbcdb (3 vector conditions)

    Processing database udb_clean (3 vector conditions)

    Processing database ytdb (3 vector conditions)

    Inserted rows from start 1406

    Processed database(s): [['zero_db', 0], ['tbcdb', 1], ['udb_clean', 2], ['ytdb', 2]]

    >>>

    Processing database zero_db (1 vector conditions)

    Processing database zero_db (2 vector conditions)

    Processing database zero_db (3 vector conditions)

    Inserted 32 rows for database zero_db

    Processing database tbcdb (1 vector conditions)

    Processing database tbcdb (2 vector conditions)

    Processing database tbcdb (3 vector conditions)

    Inserted 163 rows for database tbcdb

    Processing database udb_clean (1 vector conditions)

    Processing database udb_clean (2 vector conditions)

    Processing database udb_clean (3 vector conditions)

    Inserted 365 rows for database udb_clean

    Processing database ytdb (1 vector conditions)

    Processing database ytdb (2 vector conditions)

    Processing database ytdb (3 vector conditions)

    Inserted 846 rows for database ytdb

    Processed database(s): [['zero_db', 0], ['tbcdb', 1], ['udb_clean', 2], ['ytdb', 2]]

    => Sum of entries is 32+163+365+846 = 1406 (so no real disadvantage in doing the databases in such an incremental work)

    But:

    Inserted 1237 rows from start

    Processed database(s): [['ytdb', 2], ['udb_clean', 2], ['zero_db', 0], ['tbcdb', 1]]

    So depending on order of processing, and how they are processed the size of the initial fill can become very small.

    On a large scale it will be impossible to use the udb or ytdb condtitions for tbc-db or zero-db, because some conditions will throw errors (like for non existing items)

    So it will become very difficult to create a merged version of the conditions, but there is no big disadvantage to at least built tbcdb's conditions table on the table of zero, and the ones for udb and ytdb on the on tbcdb.

    But - actually this is mostly up to the db-guys to decide how they want to approach this, and how they want to work with it.

    (For contributors the best clearly would be a conditions table shared between the projects! - but this is much more effort to maintain!)

    Up to you guys to decide how to proceed :)

  3. Updated the helper tool for conversion.

    Seems to be fully working.

    http://paste2.org/p/1965468

    A whole dump for all conditions (for both udb and ytdb) here: http://paste2.org/p/1965470

    @Vladimir yes indeed, it can be expected that over time this table will be filled with bad data - but I don't expect this to happen very fast.

    But only if there will be a neat tool for optimized inserting..

    Edit: Well, simple conditions are easy to insert, so there should be for most case no real requirement.

    But I think that it is well worth the additional effort when changing/ inserting new conditions because of more power and more flexibility.

  4. pushed the stuff in a rebased version to my github repo:

    https://github.com/Schmoozerd/mangos/commits/condition_system

    Should be easy to ie add other tables, clean a bit stuff, etc :)

    For the initial fill I have already started to write a python script, see http://paste2.org/p/1964566

    But I have never used python before, so this is not running yet, and only very basic.

    But the initial fill is not as complicated as the later check for already existing condition-lists. see:

    if you want to know if (A && B) || C is included in the conditions system, you must check for

    (A && B) || C or (B && A) || C or C || (A && B) or C || (B && A)

    rougly the number of required possible chains is m! (faculty of m, where m is the length of the conditions list)

    Even more complicated it gets if you want to insert a new conditions list, because you might want to check, if already parts of this list are inside the system (and optimize for this)

  5. ATM, conditions are stored in columns of the style

    (condtion-type, value-1, value-2)

    for *loot_template this is one such 3-column, for gossip_menu it two such 3-column, and for gossip_menu_option it is three such 3-column.

    They all will be replaced by one column named "condition_id"

    This new condition_id points to an condition-entry of the (new) `conditions` table.

    The conditions table has the format

    (condition-entry, condition-type, value-1, value-2, link-entry)

    And it is possible to link multiple lines of `conditions` together by using the link-entry (depending on sign AND or OR link)

    From now on I will write big letters (A, B, C) instead of (condition-type, value-1, value-2).

    then a logical line in conditions would be entry, A, link-entry.

    So for example, assume you had

    (1, A, 0)

    (2, B, 1)

    (3, C, -2)

    (4, D, 3)

    as entry in conditions.

    Then if gossip_menu_option.condition_id was 4, this menu would point to conditions 4, which evaluates as

    (D && C) || (B && A)

    Btw - if you want to do some work related to this patch (which would be very welcome).

    In the code I only added actual support for the gossip_menu_option table.

    You could add for other tables as well (should be relatively straight forward to do so)

    I can push the stuff with some logical commits to my repo over the day, so it should be easier to understand which part of what is required for what.

    Edit: https://github.com/Schmoozerd/mangos/commits/condition_system

  6. " The actual list of conditions and its links is treated in the form of a http://en.wikipedia.org/wiki/Disjunctive_normal_form "

    so your example 1=1 || 2=2 && 3=3

    would be treated as (1=1) || (2=2 && 3=3)

    Edit: After some thinking, he use (adding new conditions) of this system for people is really difficult.

    A program interface (probably best GUI) would be really helpfull.

    I would help with the required algorithms to check if a "conditon-list" is already in the conditions table, and also with optimezed ways to insert a new "conditon-list"

  7. And some more Updates:

    Condition system

    http://paste2.org/p/1963271

    This system allows to add conditions to a `conditions` table.

    These conditions can link to each other.

    Negative link-entry is interpreted as "OR", positive link-entry is interpreted as "AND"

    The actual list of conditions and its links is treated in the form of a http://en.wikipedia.org/wiki/Disjunctive_normal_form

    Currently added support for gossip_menu_option - the rest is rather time consuming.

    Troublesome Good ideas for converting current conditions to the new condition system. If possible MySQL only solutions, but it might be that this is impossible.

    Edit: Might be an idea to create a small GUI tool for this system (display/ modify/ create conditions) for DB guys

  8. Little bump :)

    Fresh version: http://paste2.org/p/1963058

    (need to add #include "GridNotifiers.h" #include "Cell.h" into ScriptMgr.cpp for non-pch compile, thx to neatelves for testing)

    Features:

    * Except outdated flag commands, all commands support the buddy concept

    * Unified and improved a lot of debug and error output

    * Engine moved to ScriptMgr.cpp, in Map only the code calling is still located

    Please test Especially, but not only the old-script to new system conversion!

  9. Just to clarify:

    I think that the core changes itself are ok (though ofc can have still issues).

    BUT I most likely (still) destroy some old scripts because of missing/ bad sql UPDATE statements.

    So I would appreciate feedback and serious review of actual changes that happen with the statements, and which commands have problems.

  10. well, the problem is, that many GOs had bad dataz in the rotation fields before (however they were unused)

    a good solution was an UPDATE statement, that took the old angle and converted this to (proper) quaternion rotation. this statement can be found on github, in the comments related to one of the quaternion commit. (by zergtmn)

    However the big databases udb and ytdb have updated their values in large since quite some time, so in an updated database there shouldn't be problems remaining.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use