Author Topic: Time Passage In-Game  (Read 321 times)

Legacy_Evelath

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Time Passage In-Game
« on: January 31, 2013, 02:06:00 am »


               Hello Everyone,

I ran a search on this subject but didn't seem to get information on exactly how this might work:

I would like to extend the amount of minutes of RL time that produce an hour in-game. (ideally; 30 minutes RL = 1 hour in-game). However I know this will have an effect on numerous spells in-game and I would like to avoid having this happen.

Since I know this will require scripting knowledge I decided to post here.

Thanks for any assistance anyone can offer '<img'>
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Time Passage In-Game
« Reply #1 on: January 31, 2013, 03:28:44 am »


               Setting the time scale for the module is done in the Toolset, no scripting required. The setting you're looking for is under Edit -> Module Properties -> Advanced -> Minutes/Hour. The default setting is 2, but you can increase this as you wish.

However! This will affect any spells or effects that measure their duration in hours. AFAIK, there is no way around this other than modifying each spell script.
               
               

               


                     Modifié par Squatting Monk, 31 janvier 2013 - 05:07 .
                     
                  


            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Time Passage In-Game
« Reply #2 on: January 31, 2013, 05:05:20 am »


               An example of how to do this editing...

A spell like Bull's Strength lasts for a number of hours equal to the caster's level. We want to keep the time at 2 RL minutes per caster level. So we open nw_s0_bullstr, find the following line:

float fDuration = HoursToSeconds(nCasterLvl);

...and change it to:

float fDuration = IntToFloat(120 * nCasterLvl);

               
               

               


                     Modifié par Squatting Monk, 31 janvier 2013 - 05:05 .
                     
                  


            

Legacy_Evelath

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Time Passage In-Game
« Reply #3 on: January 31, 2013, 08:24:23 am »


               Thank you for your timely response. I will start sifting through all the spell scripts. '<img'> I appreciate your help!