PDA

View Full Version : Rules question


Theeper
09-25-2007, 08:13 AM
Since the #rules load command seems broken (haven't tried JA's fix yet), it's not clear to me how the default ruleset is stored.

I know that in the rule_sets table there is one entry and it's value is 'default'. When I tried to switch rulesets by adding in a "my_rules" row and corresponding rules in the rule_values table, I got odd results, so I changed the 'default' ruleset ID to 1, which matches my custom ruleset_id and left only one row in the rule_sets table. I am sure this isn't how it's supposed to be done, but I cannot find in the code where the default is set queried for.

Is there supposed to be a row matching each 'ruleset_value' set in the rule_sets table and the server picks the one called 'default' when booting, or is there only supposed to be one row in the rule_sets table and you change the ruleset_id to match the set you want to define as 'default' ?

Either way, I modified the rules.html script in the worldui to allow me to tweak and define rule sets, but this last issue is confusing me. Once I figure it out, I will post the script in case anyone is interested.

Lalolyen
09-25-2007, 10:48 AM
Default will be automatically used until specified otherwise..

*if you wan to use a diffrent ruleset until its fixed, create a new set (set 1) and name it Default2. When you want to use that set rename Default (set 0) to DefaultBK, and rename Default2 to Default. After the server restart it will start using the new ruleset.

Theeper
09-25-2007, 01:49 PM
Yep, that's what I did basically.

Do you have any idea how it will function when it's working properly ?

It seems like there needs to be another field or table to specify the currently selected ruleset.

Lalolyen
09-25-2007, 07:18 PM
Just guessing from the #help command it will be something like #rulesadd varname value or something... then #rules 2 to set the 2nd rule set as active.

Theeper
09-26-2007, 02:35 AM
I understand how the commands work, or should work. I just don't think the DB is complete in this respect. There has to be a method to store the currently selected ruleset. Otherwise, you will have to manually set the rules each time the server starts unless you use the default set.

Lalolyen
09-26-2007, 10:41 AM
I understand how the commands work, or should work. I just don't think the DB is complete in this respect. There has to be a method to store the currently selected ruleset. Otherwise, you will have to manually set the rules each time the server starts unless you use the default set.

Most likely the default rule set will be saved in the variables/config table.

Theeper
09-27-2007, 12:27 AM
In fact, the active ruleset is stored in the variables table. I deleted the one from mine somehow, so I missed it. After playing around with it last night, I see the variable in there now.

Lalolyen
09-27-2007, 02:14 AM
he he I've done stuff like that too he he.