Additional thoughts from IRC w/Scat --
Purpose:
"Rules" are how we will allow extreme customization of the World and the player experience. Example would be to set your combat multipliers via the rule system on a global (world) level, or local (zone) level. Players in those areas will experience different outcomes to combat (or any other EQ2Emu system) based on the current active ruleset.
Defaults Requirement:
In this, every rule must have a default hard-coded in code, in case that rule does not exist in the Database, the World still needs to know how to handle it. Otherwise, calculations will certainly fail.
Usage:
As stated above, a Rule Set can be loaded for the entire World (ie., timers, triggers, level caps, etc), or to a specific Zone... and the two shall not conflict with one another. The World's ruleset will be stored (by ID or name) in the existing `variables` table. A Zone's ruleset, stored in a new 'rule_set' column in our Zones table.
Commands:
There will be in-game commands:
- /reloadrules - reloads all rules from the DB
/unloadrules
/reloadworldrules
/reloadzonerules {zone_id}
Commands for manipulating ruleset configurations from in-game:
- /rules - the command
/rules list - List available rule sets
/rules current - Show name of rule set currently applied to zone
/rules reload - Reload the selected ruleset in this zone
/rules switch {ruleset name} Change the selected ruleset and load it
/rules load {ruleset name} Load a ruleset in the current zone without applying
/rules store {ruleset name} Store the running ruleset as the specified name
Commands for manipulating running rulesets:
- /rules reset - Reset all rules to their default values
/rules get [rule] - Get the specified rule's local value
/rules set (rule) (value) - Set the specified fule to the specified value locally only
/rules setdb (rule) (value) - Set the specified fule to the specified value locally and in the Database
/rules list (catname) - List all rules in the specified category (or all catagories if omitted)
/rules values (catname) - List the values of all rules in a specified category
These commands are directly from EQEmu's command list,
and should be modified to suit our own needs. But reviewing how their rules work, it would appear there are some "non-destructive" commands (load, set, etc) that we should consider keeping.
Eg., /rules load [ruleset name] loads the set into memory but does not apply it. This gives the admin/GM a chance to review the settings (/rules list {catname}, /rules values {catname}) before applying them destructively to the current zone (/rules switch [ruleset name]). Does that make sense?
Data Tables:
Preliminary Table layout (not committed til we get started)
`rulesets`
Code: Select all
CREATE TABLE `rulesets` (
`id` int(10) unsigned NOT NULL auto_increment,
`ruleset_id` int(10) unsigned NOT NULL default '0',
`ruleset_name` varchar(64) collate latin1_general_ci NOT NULL default 'default_ruleset',
`ruleset_active` tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (`id`),
UNIQUE KEY `RuleNameIDX` (`ruleset_name`),
KEY `RulesIDX` (`ruleset_id`)
) ENGINE=InnoDB;
`ruleset_details`
Code: Select all
CREATE TABLE `ruleset_details` (
`id` int(10) unsigned NOT NULL auto_increment,
`ruleset_id` int(10) unsigned NOT NULL default '0',
`rule_category` varchar(64) collate latin1_general_ci NOT NULL default '',
`rule_type` varchar(64) collate latin1_general_ci NOT NULL default '',
`rule_value` varchar(64) collate latin1_general_ci NOT NULL default '',
`description` text collate latin1_general_ci,
PRIMARY KEY (`id`),
UNIQUE KEY `RuleCatTypeIDX` (`ruleset_id`,`rule_category`,`rule_type`),
CONSTRAINT `FK_ruleset_details` FOREIGN KEY (`ruleset_id`) REFERENCES `rulesets` (`ruleset_id`) ON UPDATE CASCADE
) ENGINE=InnoDB;
Conclusion:
The primary goal is to implement at least the basic Rules System, and these in-game data modification commands are secondary but important to the completion of the system.
I think that's enough to consider for now. Scat, any questions? Soon as you get a framework in place, I will begin expanding it so you don't have to worry about doing everything yourself

Thanks for the kick-off.