Rules vs Variables?
Moderator: Team Members
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Rules vs Variables?
Which should we use? Are they meant to live together and if so how should we decide where to put a new rule/variable? I would assume that global stuff that should change should be in variables, so the irc stuff should be moved from rules to variable? What about other global values, like Heroic Op time or trade skill success/failure chances?
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Rules vs Variables?
Rules System is the "new way". Variables was the "old way". However, there are some variables that do still exist, which is why the table was left there.
General "rule" (snicker), if the server needs to store data for some global reason (game time, lotto #'s) then use the `variables` table for that.
Rules system stuff is just for static settings of things you want to be able to switch quickly without recompiling. Eg., giving players a 10% bonus to their spell damage in a particular zone (or world-wide). Btw, there are Zone rules, not just World (global) rules
Rules system kicks ass. Know why? I designed it that way.
General "rule" (snicker), if the server needs to store data for some global reason (game time, lotto #'s) then use the `variables` table for that.
Rules system stuff is just for static settings of things you want to be able to switch quickly without recompiling. Eg., giving players a 10% bonus to their spell damage in a particular zone (or world-wide). Btw, there are Zone rules, not just World (global) rules
Rules system kicks ass. Know why? I designed it that way.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Rules vs Variables?
I had a thought the other day, what if we expose the variable system to lua so lua can save values over server restarts, an example from live would be some live events needed a quest completed x number of time before the event would progress, could also add a lot of options for custom content too.
Also, if you give a zone a special ruleset (in the zone table) will it just use the zone rules or the entire ruleset within that zone?
Also, if you give a zone a special ruleset (in the zone table) will it just use the zone rules or the entire ruleset within that zone?
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Rules vs Variables?
Hmm, isn't that what `character_quest_progress` is for? You probably do not want to over-load the simple Variables table with stuff. There's also the `statistics` table, which once upon a time was going to keep track of various states the world was in, but we never got to expanding it. And of course, `character_history`.Jabantiz wrote:I had a thought the other day, what if we expose the variable system to lua so lua can save values over server restarts, an example from live would be some live events needed a quest completed x number of time before the event would progress, could also add a lot of options for custom content too.
I believe if you make a brand new ruleset (2), and create a ruleset_detail for R_Player::XPMultiplier = 2.0, then go to Antonica zone and set it's ruleset to 2, players in that zone will receive 2.0 modifier to their XP gains... as well as all Global rules that were not overridden by a Zone (local) rule. At least, that was the design.Jabantiz wrote:Also, if you give a zone a special ruleset (in the zone table) will it just use the zone rules or the entire ruleset within that zone?
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Rules vs Variables?
What I am thinking is a few live events had quests that needed to be completed x number of times globally by all players before the story would advance for any one, was usually an insanely high number of completions. I do not believe we can check how many times a player has completed a repeatable quest, not to mention grabbing how many times the quest has completed on the server, thought of this as a quick way to do it.John Adams wrote:Hmm, isn't that what `character_quest_progress` is for? You probably do not want to over-load the simple Variables table with stuff. There's also the `statistics` table, which once upon a time was going to keep track of various states the world was in, but we never got to expanding it. And of course, `character_history`.
As for custom content I was thinking of needing to save the state of a zone, say you have qeynos capture the crossroads in commonlands, you would need a way to save that so it persists through a zone/server restart, in the zone script you could grab the state and spawn guards accordingly.
Of course this was just random thought I had and the variables table looked like the easiest way to implement it, might be a better way.
Note: I am not implementing any of this just ideas.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Rules vs Variables?
Oh, yeah then in this case, that makes sense. You mean like unlocking the Froglok raceJabantiz wrote:What I am thinking is a few live events had quests that needed to be completed x number of times globally by all players before the story would advance for any one, was usually an insanely high number of completions.
Who is online
Users browsing this forum: No registered users and 0 guests