Thread: Item constraint database modeling

Results 1 to 4 of 4
  1. #1 Item constraint database modeling 
    Registered Member
    Join Date
    Jun 2012
    Posts
    55
    Thanks given
    3
    Thanks received
    5
    Rep Power
    11
    Hello, I'm currently designing the relational table for `Item Usage Constraints` (Issue Key [FAL-236], Confluence Page [Item Usage Constraints])

    I'm trying to come up with the most logical method of being able to dynamically define constraints to use Game-Items.
    The table structure will have the primary field: `entry` int(10) unsigned PRI, non-nullable, default 0, foreign_key referencing entry on `fallian_world`.`item_template`.`entry` (Cascade on delete, no action on update (Should never be edited))


    One idea is to have a composite primary key for (`entry`, `constraint_id`).
    The `constraint_id` field would be an ID referencing the type of constraint. Ie. Skill level, Quest, Entity variable, etc...
    The third field would be `constraint_key`which might need to be a varchar(255) and contain the entity variable name, questID, Skill ID, etc...
    * The `constraint_key` could be an INT if I assigned an ID to every entity variable (Which I think I will do now or eventually).
    Fourth, a field named `constraint_value` which would define the minimum criteria for which the player must meet in order to utilize any subsequent actions with the locally defined item. Ie. Skill level, quest progression step, region to have discovered, variable value minimum/exact, etc...

    The result of this proposal would yield the following examples:

    entry
    constraint_id
    constraint_key
    constraint_value
    1305 (Dragon longsword) 1 (Skill Requirement) 1 (Attack Level) 60 (This item will require 60 attack to equip)
    1305 (Dragon longsword) 2 (Quest Progression Requirement) 42 (Lost City) 6 (Quest Completed)
    9747 (Attack Cape) 1 (Skill Requirement) 1 (Attack Level) 99 (This item will require 99 attack to equip)
    9813 (Quest point cape) 2 (Quest Progression Requirement) -1 (All Quests) -1 (Final Step (Alias for quest completed))




    I'm looking for input on this to be able to minimize the chance of needing to re-design this system later on down the road. Looking forward to your comments, and thanks.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Nov 2015
    Posts
    239
    Thanks given
    61
    Thanks received
    61
    Rep Power
    0
    Good luck man
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2012
    Posts
    55
    Thanks given
    3
    Thanks received
    5
    Rep Power
    11
    Quote Originally Posted by Mystery Angel View Post
    Good luck man
    Thanks, I've written up almost everything I need to be able to strictly work with integers to avoid sluggish string comparison. So, this should be done within the next hour or so.
    Reply With Quote  
     

  4. #4  
    Registered Member
    The Reverse's Avatar
    Join Date
    Nov 2014
    Posts
    936
    Thanks given
    168
    Thanks received
    289
    Rep Power
    520
    Wrong section buddy but Gl with this.

    Darkness cannot drive out darkness; only light can do that. Hate cannot drive out hate; only love can do that.
    Martin Luther King, Jr.

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Holding Item (Int or Model Problem??)
    By Knightmare in forum Help
    Replies: 8
    Last Post: 02-11-2010, 07:26 AM
  2. Custom Item's With Models And Int's
    By xSelseor in forum Downloads
    Replies: 4
    Last Post: 11-17-2009, 11:57 PM
  3. God Items [Working] [INTS+MODELS]
    By Godly Z in forum Models
    Replies: 13
    Last Post: 11-01-2009, 08:03 AM
  4. Item + [377]Object Model Dumps!
    By Luke in forum Configuration
    Replies: 2
    Last Post: 08-13-2008, 01:32 PM
  5. Rs item id database
    By A2 Alex in forum Application Development
    Replies: 5
    Last Post: 06-19-2008, 09:05 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •