PDA

View Full Version : Attribute overload - How should I manage this?


maybesomethingdunno
9th Jan 2012, 04:03 AM
Beyond Real Life issues, one of my major setbacks for a project is a design conundrum. Before my hiatus, I was working on a set of effect objects. I don't think I want the effects to be playing constantly 24/7. Since they are atmospheric effects, I believe some of them would be better if the time of their appearance could be customized.

I intend to use attributes to determine when the effect would be played.

Hour-related Attributes : At what part(s) of the day should the effect play?

Attribute, Attribute Value, Meaning
H00, [on/off], Hour 00
H01, [on/off], Hour 01
H02, [on/off], Hour 02
H03, [on/off], Hour 03
H04, [on/off], Hour 04
H05, [on/off], Hour 05
H06, [on/off], Hour 06
H07, [on/off], Hour 07
H08, [on/off], Hour 08
H09, [on/off], Hour 09
H10, [on/off], Hour 10
H11, [on/off], Hour 11

H12, [on/off], Hour 12
H13, [on/off], Hour 13
H14, [on/off], Hour 14
H15, [on/off], Hour 15
H16, [on/off], Hour 16
H17, [on/off], Hour 17
H18, [on/off], Hour 18
H19, [on/off], Hour 19
H20, [on/off], Hour 20
H21, [on/off], Hour 21
H22, [on/off], Hour 22
H23, [on/off], Hour 23

Hour_Special, 0, Every hour. Overrides other hour-related options.
Hour_Special, 1, Day hours (7:00AM-6:59PM) only. Overrides other hour-related options.
Hour_Special, 2, Random throughout day only. Overrides other hour-related options.
Hour_Special, 3, Night hours (7:00PM-6:59AM) only. Overrides other hour-related options.
Hour_Special, 4, Random throughout night only. Overrides other hour-related options.
Hour_Special, 5, Random anytime (Day or Night). Overrides other hour-related options.

(^ Originally, these were all one attribute with different values, but having them as separate flags allows for greater customization.)

Day-related Attribute : On what day(s) should the effect play?

Attribute, Attribute Value, Meaning
Sun, [on/off], Sunday
Mon, [on/off], Monday
Tues, [on/off], Tuesday
Wed, [on/off], Wednesday
Thurs, [on/off], Thursday
Fri, [on/off], Friday
Sat, [on/off], Saturday
Day_Special, 0, Everyday (Sunday-Saturday). Overrides other day-related options.
Day_Special, 1, Weekdays (Monday-Friday only). Overrides other day-related options.
Day_Special, 2, Weekends (Saturday and Sunday only). Overrides other day-related options.



Season-related Attributes : At what part(s) of the year should the effect play?
(I think I'm going overboard with this now! :jest: )

Attribute, Attribute Value, Meaning
SSN1, [on/off], 1st Season
SSN2, [on/off], 2nd Season
SSN3, [on/off], 3rd Season
SSN4, [on/off], 4th Season



So, with all that said, here's the problem. The easiest way I know to set such values while working on an unoccupied lot would be to create a "Setter" object with slots. For example, if you place the effect object into Slot #5 of the Setter, then pick up and drop the Setter, the effect object's "Hour-related Attribute" would get a value of 5AM. You could then take the effect object from the slot and place it wherever you like. But, um, yeah, look back up at all those attributes and options.

For boolean attributes, I would only need one slot; the value would toggle between True/False or On/Off. For attributes with numerical values, I would need one slot per possible value. Or I could have one slot and let it cycle through values (e.g. 1 to 2, 2 to 3, 3 to 4, 4 back to 1). Either way, I plan on having some kind of text notification that says what the current values are for the effect object. This may be with each and every value change or it may be done all at once via a special pick-up-and-drop slot in the Setter.

Right now I'm thinking of spreading them out over several Setters.

-Three Setters for the Hour-related Attribute: one with 12 slots for hours 0-11, one with 12 slots for hours 12-23, and another with 6 slots for the remaining options.
-One or two Setter objects for the other attributes.

I don't know if this is the best or most efficient way to do this, but I'm curious what others think.


I'd like to minimize the number of objects since I will need to register more GUIDs. It would take a significant number of GUIDs to have a separate object for each effect. So I may group the effects by theme and, once again, use attribute(s) to control what effect is played using more Setters. :wtf: