Good luck man
|
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_value1305 (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.
Good luck man
Wrong section buddy but Gl with this.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |