Jump to content

24 hour day and skies


PaytonPITA
 Share

You are about to reply to a thread that has been inactive for 251 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi everyone.  I have changed my day cycle to 24 hr days and adjusted the time so it is my central time zone.  The skies don't really work well at the shared environment setting.  In the evening its purplish.   Can they be changed to what I would prefer?  morning and throughout the day I like the annan optimal skin, evening i would like sunset blue and night i'd like the night brighter one.  If this is possible, please tell me how.  If I could only have 2 choices I could eliminate sunset blue.  Thanks for any help.  Have a great day.

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

As far as I'm aware this could be achieved with an Experience and scripting.  The script would have to change the EEP settings for each agent on the land that has accepted the Experience at the time when it is supposed to change.

Edited by Gabriele Graves
Removed incorrect statement of belief
  • Like 2
Link to comment
Share on other sites

You need to create a new day cycle, rather than a new sky. When you right click an inventory folder, go to new setting, and then new day cycle. Then right click and open the day cycle it creates to get the edit window. You'll see it has a timeline for the day set up. You can add and remove points, change the values for each point, or import a sky to a point. So if there are library skies you like, you can add those where needed. You can have whatever colours you want. It just takes some fiddling.

  • Like 3
Link to comment
Share on other sites

10 hours ago, Polenth Yue said:

You need to create a new day cycle, rather than a new sky. When you right click an inventory folder, go to new setting, and then new day cycle. Then right click and open the day cycle it creates to get the edit window. You'll see it has a timeline for the day set up. You can add and remove points, change the values for each point, or import a sky to a point. So if there are library skies you like, you can add those where needed. You can have whatever colours you want. It just takes some fiddling.

Thank you for your response, @Polenth Yue.  What inventory folder should I be clicking that allows me to make these changes? Thank you.

Link to comment
Share on other sites

  • Moles
22 hours ago, Gabriele Graves said:

As far as I'm aware this could be achieved with an Experience and scripting.  The script would have to change the EEP settings for each agent on the land that has accepted the Experience at the time when it is supposed to change.

I don't think you need an Experience to use llSetEnvironment.    According to the Wiki, 

Quote

This function overrides the environmental settings for a region or a parcel. The owner of the script must have permission to modify the environment on the parcel or be an estate manager to change the entire region.

An override for a given parameter can be set at the region scope or parcel scope. It can also be set for a single sky track, all sky tracks, or both. If an override of a given parameter is specified for both an individual track and all tracks, the individual track's override takes priority.

You do, though, need an experience to use llSetAgentEnvironment, which is what you describe, but I don't think you'd need that function for this particular use case.

Edited by Quartz Mole
  • Like 1
  • Thanks 4
Link to comment
Share on other sites

  • Moles
1 minute ago, Rowan Amore said:

That will only change it temporarily?  To save one, don't you need to create an asset (setting) from your inventory?

I'm not an expert, but when I've changed the parcel setting on my alt's Linden Homes parcel it seems to persist.

  • Thanks 1
Link to comment
Share on other sites

13 minutes ago, Quartz Mole said:

I'm not an expert, but when I've changed the parcel setting on my alt's Linden Homes parcel it seems to persist.

I've done so at my home as well.  I've started with an existing asset as you did.  The difference being, unless you edit the original Setting and Save, if you change to another and go back to that original you chose, the changes aren't there.  It is much easier to start with an existing EEP setting.  Just make sure to Save the edit.  

Creating your very own Day Cycle would require the creation of a new Setting Asset.  

Screenshot(12).thumb.png.6d8bb1fd0834b816b4a7e5f01a0ea6b3.png

 

Edited by Rowan Amore
  • Like 1
Link to comment
Share on other sites

1 hour ago, Quartz Mole said:

I don't think you need an Experience to use llSetEnvironment.    According to the Wiki, 

You do, though, need an experience to use llSetAgentEnvironment, which is what you describe, but I don't think you'd need that function for this particular use case.

Thanks Quartz.  I did consider llSetEnvironment() but it doesn't use an environment asset, it only works from the environment parameters and so while it can be done that way I felt that it would be much more complex to change the environment than just applying various assets at different times.

I was actually thinking of llReplaceAgentEnvironment().

Horses for courses really though.  Thanks again for your reply.

EDIT: And now I see there is an llReplaceEnvironment() too.  That would have been a better choice for me to pick.

Edited by Gabriele Graves
  • Like 1
Link to comment
Share on other sites

Here is a script to make EEP transitions based on a RL time of day cycle.  It's just one way of doing it and I'm sure there are improvements that could be made but it does work.
It's all my own work and anyone is free to use this as they desire.

//==============================================
// Don't change
//==============================================
integer WHOLE_REGION = 0;
integer THIS_PARCEL = 1;
//==============================================

//==============================================
// Change these settings according to your needs
//==============================================

// Central US Summer Time (CDT)
integer TimezoneOffset = -5;

// First parameter is the hour, second parameter is the EEP asset name.
// Note: EEP asset must be in object inventory.
list transitions = [
0, "A-12AM",
3, "A-3AM",
6, "A-6AM",
9, "A-9AM",
12, "A-12PM",
15, "A-3PM",
21, "A-9PM"
];

// Determines whether the changes affect the whole region or
// just the parcel the object is on.
integer _applyTo = WHOLE_REGION;
//integer _applyTo = THIS_PARCEL;

//==============================================

// Don't change these
float _hourInSeconds = 3600.0;
integer _active = FALSE;

ChangeEnvironment()
{
    integer lastHour = -1;
    string lastTransitionName;
    integer count = llGetListLength(transitions);
    integer index;
    integer quitLoop = FALSE;
    
    vector applyTo = <-1.0, -1.0, -1.0>;
    if (_applyTo == THIS_PARCEL)
        applyTo = llGetPos();
    
    integer hourOfDay = (integer)((llGetGMTclock() + ((float)TimezoneOffset * _hourInSeconds)) / _hourInSeconds);

    for (index = 0; index < count && !quitLoop; index += 2)
    {
        integer hour = llList2Integer(transitions, index);
        string transitionName = llList2String(transitions, index + 1);
        
        if (lastHour == -1)
        {
            lastHour = hour;
            lastTransitionName = transitionName;
        }

        if (hourOfDay >= lastHour && hourOfDay <= hour)
        {
            string name = lastTransitionName;
            if (hourOfDay >= hour)
                name = transitionName;

            llReplaceEnvironment(applyTo, name, -1, -1, -1);
            quitLoop = TRUE;
        }
        else
        {
            lastHour = hour;
            lastTransitionName = transitionName;
        }
    }
    
    if (!quitLoop)
        llReplaceEnvironment(applyTo, lastTransitionName, -1, -1, -1);
}

default
{
    state_entry()
    {
        llOwnerSay("Ready, touch to activate.");
    }
    
    touch_start(integer numDetected)
    {
        if (!_active)
        {
            integer minsLeftInHour = 60 - ((integer)llGetGMTclock() % 3600) / 60;

            ChangeEnvironment();
            llSetTimerEvent(minsLeftInHour);
            llOwnerSay("Timed transitions activated.");
        }
        else
        {
            llSetTimerEvent(0.0);
            llOwnerSay("Timed transitions deactivated.");
        }
        
        _active = !_active;
    }
    
    timer()
    {
        ChangeEnvironment();
 
        llSetTimerEvent(_hourInSeconds);
    }
}

 

Edited by Gabriele Graves
Slight change to timer to make it wait initially for just the remainder of the hour
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, AshleighRiley said:

Thank you for your response, @Polenth Yue.  What inventory folder should I be clicking that allows me to make these changes? Thank you.

Doesn't matter where you create a new setting. They're items in your inventory, so you can move them around, take copies, and all the usual things you can do with things in your inventory.

  • Like 1
Link to comment
Share on other sites

20 hours ago, Gabriele Graves said:

Here is a script to make EEP transitions based on a RL time of day cycle.  It's just one way of doing it and I'm sure there are improvements that could be made but it does work.
It's all my own work and anyone is free to use this as they desire.

//==============================================
// Don't change
//==============================================
integer WHOLE_REGION = 0;
integer THIS_PARCEL = 1;
//==============================================

//==============================================
// Change these settings according to your needs
//==============================================

// Central US Summer Time (CDT)
integer TimezoneOffset = -5;

// First parameter is the hour, second parameter is the EEP asset name.
// Note: EEP asset must be in object inventory.
list transitions = [
0, "A-12AM",
3, "A-3AM",
6, "A-6AM",
9, "A-9AM",
12, "A-12PM",
15, "A-3PM",
21, "A-9PM"
];

// Determines whether the changes affect the whole region or
// just the parcel the object is on.
integer _applyTo = WHOLE_REGION;
//integer _applyTo = THIS_PARCEL;

//==============================================

// Don't change these
float _hourInSeconds = 3600.0;
integer _active = FALSE;

ChangeEnvironment()
{
    integer lastHour = -1;
    string lastTransitionName;
    integer count = llGetListLength(transitions);
    integer index;
    integer quitLoop = FALSE;
    
    vector applyTo = <-1.0, -1.0, -1.0>;
    if (_applyTo == THIS_PARCEL)
        applyTo = llGetPos();
    
    integer hourOfDay = (integer)((llGetGMTclock() + ((float)TimezoneOffset * _hourInSeconds)) / _hourInSeconds);

    for (index = 0; index < count && !quitLoop; index += 2)
    {
        integer hour = llList2Integer(transitions, index);
        string transitionName = llList2String(transitions, index + 1);
        
        if (lastHour == -1)
        {
            lastHour = hour;
            lastTransitionName = transitionName;
        }

        if (hourOfDay >= lastHour && hourOfDay <= hour)
        {
            string name = lastTransitionName;
            if (hourOfDay >= hour)
                name = transitionName;

            llReplaceEnvironment(applyTo, name, -1, -1, -1);
            quitLoop = TRUE;
        }
        else
        {
            lastHour = hour;
            lastTransitionName = transitionName;
        }
    }
    
    if (!quitLoop)
        llReplaceEnvironment(applyTo, lastTransitionName, -1, -1, -1);
}

default
{
    state_entry()
    {
        llOwnerSay("Ready, touch to activate.");
    }
    
    touch_start(integer numDetected)
    {
        if (!_active)
        {
            integer minsLeftInHour = 60 - ((integer)llGetGMTclock() % 3600) / 60;

            ChangeEnvironment();
            llSetTimerEvent(minsLeftInHour);
            llOwnerSay("Timed transitions activated.");
        }
        else
        {
            llSetTimerEvent(0.0);
            llOwnerSay("Timed transitions deactivated.");
        }
        
        _active = !_active;
    }
    
    timer()
    {
        ChangeEnvironment();
 
        llSetTimerEvent(_hourInSeconds);
    }
}

 

Thanks Gabriele. How does one use this script? do we rez a box on the parcel and put the script and the EEP assets in the box?

 

  • Like 1
Link to comment
Share on other sites

1 minute ago, Teresa Firelight said:

Thanks Gabriele. How does one use this script? do we rez a box on the parcel and put the script and the EEP assets in the box?

 

My pleasure.  Yes, that's all you need to do.  You touch the box to start it up and touch again to stop it - should you want to.

  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 251 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...