Author Topic: Day And Night Cyles Mod?  (Read 1956 times)

Legacy_qwert_44643

  • Full Member
  • ***
  • Posts: 147
  • Karma: +0/-0
Day And Night Cyles Mod?
« on: November 04, 2011, 03:13:02 pm »


               Hello everyone,
I was wondering if there is a mod that cycles the day and night cyles by time.
It got dark and i camped and it was still dark,so i camped again and it was still dark.
Does anyone know if the day and night cyle is based on time in the OC?
If there is such a mod can you kindly link me to it,please.
qwert
               
               

               
            

Legacy_qwert_44643

  • Full Member
  • ***
  • Posts: 147
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #1 on: November 04, 2011, 03:14:33 pm »


               When i Played D&D years ago when we would camp it would be morning when we woke up unless attacked.So when you sleep in nwn dont you sleep for 8 hours?
qwert
               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #2 on: November 04, 2011, 03:26:41 pm »


               No, this must be scripted in NWN. With the OC, you just rest and time remains the same.

FP!
               
               

               
            

Legacy_qwert_44643

  • Full Member
  • ***
  • Posts: 147
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #3 on: November 04, 2011, 03:48:06 pm »


               thanks fp
               
               

               
            

Legacy_jmlzemaggo

  • Hero Member
  • *****
  • Posts: 1869
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #4 on: November 04, 2011, 04:38:03 pm »


               Isn't it a way to work around through console commands? It rings a bell somehow... 
(Console commands in my "Tips" list in my signature...)
               
               

               
            

Legacy_werelynx

  • Hero Member
  • *****
  • Posts: 1110
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #5 on: November 04, 2011, 04:49:23 pm »


               There are some modules that forward time while resting. Look for all HCR(hardcore) ones. At the moment I can't recall any particular module.
If you meant "modification", then probably you could alter basic resting scripts in your override, but I honestly do not know the exact specifics.
               
               

               
            

Legacy_qwert_44643

  • Full Member
  • ***
  • Posts: 147
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #6 on: November 04, 2011, 05:50:06 pm »


               i looked for hcr and didnt find anything i was asking about.
qwert
               
               

               
            

Legacy_jmlzemaggo

  • Hero Member
  • *****
  • Posts: 1869
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #7 on: November 04, 2011, 07:34:44 pm »


                I found this through console debugging: 
dm_settime <h> <m> <s> <ms>
Here.
               
               

               
            

Legacy_Elhanan

  • Hero Member
  • *****
  • Posts: 842
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #8 on: November 05, 2011, 01:20:53 am »


               Been a while, but I believe the Tales of Arterra series has day/ night cycles:

Tales of Arterra series, by Kevin Chan aka toa_lost
               
               

               
            

Legacy_qwert_44643

  • Full Member
  • ***
  • Posts: 147
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #9 on: November 05, 2011, 10:15:45 am »


               I was wanting something that affected the OC...but thanks everyone for your help.
qwert
               
               

               
            

Legacy_werelynx

  • Hero Member
  • *****
  • Posts: 1110
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #10 on: November 05, 2011, 11:07:55 am »


               You should go for changing the resting scripts provided by the Bioware, ask about it in the builders scripting section of these forums.
               
               

               
            

Legacy_jmlzemaggo

  • Hero Member
  • *****
  • Posts: 1869
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #11 on: November 05, 2011, 12:15:28 pm »


               Could anyone tell me why the debugging code wouldn't work in the OC? I used it fine in some modules...
Well...
               
               

               


                     Modifié par jmlzemaggo, 05 novembre 2011 - 12:51 .
                     
                  


            

Legacy_beirutnwn

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #12 on: November 05, 2011, 03:19:32 pm »


               The following is the onplayerrest script I use  in Age Of Mortals and it gives resting a realistic feeling. Log in to my roleplay server and press rest to test it out.

//::///////////////////////////////////////////////
//:: Custom Module OnPlayerRest Script
//:: Copyright © 2003
//:://////////////////////////////////////////////
//
//  Purpose: To limit resting by a configurable amount of time. Provides ability to allow
//          unlimited resting for users under a certain level, or allow unlimited resting
//          in certain areas.
//
//:://////////////////////////////////////////////
//:: Created By:   Diabolist
//:: Created On:   June, 2003
//:://////////////////////////////////////////////

void main()
{
   object oPC = GetLastPCRested();
   // eBad is used to cycle through effects on the user, and remove the blind and deaf effects from resting
   // I'm uncertain why I can't just do a RemoveEffect(oPC, EffectBlindness())...
   effect eBad = GetFirstEffect(oPC);
   // get the hour and day the user last rested
   int nLastRestedHour = GetLocalInt(oPC, "LastRestedHour");
   int nLastRestedDay = GetLocalInt(oPC, "LastRestedDay");
   // Since nLastRestedHour will return 0 if it's NOT set, and 0 is a valid hour, we need another variable to check if the user has ever rested
   int nHasRested = GetLocalInt(oPC, "HasRested");
   // Time difference between last rest and last rest attempt
   int nRestDelta;
   // change nRestTimer to increase/decrease the wait time between resting (with default NWN game time, 5 equates to 10 minutes real-time)
   int nRestTimer = 5;
   int nHour = GetTimeHour();
   int nDay = GetCalendarDay();
   int bCanRest = FALSE;
   // Get the area the PC is in, this can be used to allow unlimited resting in certain areas
   string sArea = GetTag(GetAreaFromLocation(GetLocation(oPC)));
   // change nPCMinLevel to allow users equal to, or less than, this value to rest without waiting
   int nPCMinLevel = 5;
   int nPCLevel = GetLevelByPosition(1, oPC) + GetLevelByPosition(2, oPC) + GetLevelByPosition(3, oPC);
   // Used in output to change the word "hour" to "hours"
   string sPlural = "";
   // String to save the location of the player (so they can restart where they left off)
   string sLocKey = "lLoc_" + GetPCPlayerName(oPC) + "_" + GetName(oPC);
   location lLoc = GetLocation(oPC);

   switch (GetLastRestEventType()) {
       case REST_EVENTTYPE_REST_STARTED:
           // Check if the player has rested this session and that the player is over nPCMinLevel
           // If you want unlimited resting in certain areas, add them to this if statement, example:
           // if ((!nHasRested && nPCLevel > nPCMinLevel)
           //      || sArea != "Flen"
           //      || sArea != "CITY_CORE"
           //      || sArea != "FOREST_REFUGEE_CAMP") {
           // local variables will still be updated, but it will allow players a safe area they can flee to '<img'>
           if ((nHasRested == 1 && nPCLevel > nPCMinLevel)) {
               // Some simple calculation here to determine if we can rest, but we need to account for the "wrapping" effect of time
               // if nHour is less than the last rest attempt, then we've moved into the next day...
               if (nHour < nLastRestedHour) {
                   nRestDelta = 24 - nLastRestedHour + nHour;
               // This check is a little more simple, since the rest attempt is larger than the last rest event, we just need to
               // calculate the difference, we'll check later if it's the next day
               } else if (nHour > nLastRestedHour) {
                   nRestDelta = nHour - nLastRestedHour;
               // looks like they tried to rest in the same hour (same day or next day)
               } else {
                   nRestDelta = 0;
               }
               // These next checks which allow the user to rest look a bit conveluted, but it's necessary to catch everything
               // 1. Check if rest time is greater than the rest timer
               // 2. Check if the last successfull rest day is two days earlier
               // 3. Check if the user waited over 23 hours to rest
               // 4. Check for day 28 anomoly (special situation of check #3)
               if (nRestDelta >= nRestTimer
                   || nLastRestedDay < nDay - 1
                   || (nHour >= nLastRestedHour && nLastRestedDay < nDay)
                   || (nHour >= nLastRestedHour && nLastRestedDay == 28 && nDay == 1)) {
                   bCanRest = TRUE;
               }
           // The player hasn't rested yet this session, they're a low level, or they're in a safe area... so set the rest flag to TRUE
           } else {
               bCanRest = TRUE;
           }

           if (!bCanRest) {
               // can't rest yet, so let's tell the user how long to wait
               nRestDelta = 5 - nRestDelta;
               // quick trick to change the word "hour" to plural: "hours"
               if (nLastRestedHour > 1) { sPlural = "s"; }
               FloatingTextStringOnCreature("You must wait " + IntToString(nRestDelta) + " hour" + sPlural + " before resting again (" + IntToString(FloatToInt(HoursToSeconds(nRestDelta)/60)) + " minutes realtime)...", oPC, FALSE);
               AssignCommand(oPC,ClearAllActions());
           } else {
               // user can rest, so set local int, and apply blind/deaf effects
               SetLocalInt(oPC, "LastRestedHour", nHour);
               SetLocalInt(oPC, "LastRestedDay", nDay);
               SetLocalInt(oPC, "HasRested", 1);
               PlayVoiceChat(VOICE_CHAT_REST, oPC);
               ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectBlindness(), oPC);
               ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDeaf(), oPC);
               SetLocalLocation(GetModule(), sLocKey, lLoc);
           }
           break;
       case REST_EVENTTYPE_REST_CANCELLED:
           // rest cancelled, remove effects... again, wish I could just use a simple RemoveEffect(oPC, EffectBlindness())...
           while (GetIsEffectValid(eBad)) {
               if (GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
                  GetEffectType(eBad) == EFFECT_TYPE_DEAF) {
                   RemoveEffect(oPC, eBad);
              }
               eBad = GetNextEffect(oPC);
           }
           break;
       case REST_EVENTTYPE_REST_FINISHED:
           // Status quo...
           while (GetIsEffectValid(eBad)) {
               if (GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
                  GetEffectType(eBad) == EFFECT_TYPE_DEAF) {
                   RemoveEffect(oPC, eBad);
              }
               eBad = GetNextEffect(oPC);
           }
           break;
   }
}
               
               

               


                     Modifié par beirutnwn, 05 novembre 2011 - 03:30 .
                     
                  


            

Legacy_qwert_44643

  • Full Member
  • ***
  • Posts: 147
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #13 on: November 06, 2011, 06:29:47 pm »


               I dont know how to add that into my game.....could you make that into an over ride and email it to me?
 Does that affect the visual effects of day and night(u know if you rest at night it will be morning and daylight outside?
qwert

qwert_44643@yahoo.com

thanks everyone for all your helpfull responses
               
               

               
            

Legacy_qwert_44643

  • Full Member
  • ***
  • Posts: 147
  • Karma: +0/-0
Day And Night Cyles Mod?
« Reply #14 on: November 09, 2011, 10:08:49 pm »


               why wouldnt bioware have made it so time passes when you rest in the oc........i  think that destroys some of the immersiveness of the game.