RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Time System

Kamron

Knight
Morxeton said:
I will be releasing the new version by this weekend. I am going to be adding a lot of things to it and will be doing some additional testing before releasing.

Take your time, its not like runuo will blow up and everyone will switch to Sphere :O
 

Dian

Sorceror
What an excelent system ! I am absolutly amazed how much a difference this system makes to the realism of the shard, the light changes are so subtle you dont really even notice them either. Well Done!

Now, off to see about how to sync the wrist watch, and clocks to the given time system :)

**Edit**

Are static lamp posts, and other luminated items (frozen to the static files) adjustable at all for different light circles? ie; making LampPosts have a wider light circle... or would a guy need to adjust that via scripts, and place them as items in game, for adjustability?
 

Morxeton

Sorceror
Dian said:
What an excelent system ! I am absolutly amazed how much a difference this system makes to the realism of the shard, the light changes are so subtle you dont really even notice them either. Well Done!

Now, off to see about how to sync the wrist watch, and clocks to the given time system :)
Thanks:D

I have updated the Clocks.cs and Spyglass.cs for the system already. I will be posting how to make the changes in the next version release.

Dian said:
Are static lamp posts, and other luminated items (frozen to the static files) adjustable at all for different light circles? ie; making LampPosts have a wider light circle... or would a guy need to adjust that via scripts, and place them as items in game, for adjustability?
The system does not control static lampposts, as they are a static and cannot be controlled. The light circles depend on each item's light circle radius that you set. The system will not override those settings.

You can create your own BaseLights and update the script to manage them. Be sure to set Protected = true so that players can't tamper with the lights.

I will be releasing the new version quite possibly tomorrow. It's a big update, which will include custom formatting support for the way the [time, [basetime, and double clicking any clock item will display the date/time.
 

okyzan

Wanderer
i am waiting the new version about 3 days ,tomorrow will be very good :) in new version custom date format is going to be right ? (like 12 08 2006)
 

Aeolus

Sorceror
Not sure if you're taking suggestions for mods or not, but I think it would be cool if it got just noticeably darker when it rains... just a thought. I am using the system and love it. Thanks for the submission. I too am looking forward to the updates!
 

Morxeton

Sorceror
v1.1.0 released:
  • Fixed a bug that when specifying a number without a decimal point for the timerspeed, it would reject the attempt due to it being an int instead of a double.
  • Added a [TS STOP, [TS START, and [TS RESTART commands which will stop, start, and restart the time system. When stopping the system, it does not perform the calculations for light level and time. It will display the day level until the system is started again.
  • Added instructions for how to modify Spyclass.cs and Clocks.cs to reflect the moonphase and time.
  • Added time zones with ability to configure them yourself based on how many location.X is considered 1 minute. This was a huge overhaul to the system to be able to do this. The default is 16 X is 1 minute and can be changed via [TS SET TIMEZONEXDIVISOR <number>
  • You can disable using time zones by typing [TS SET USETIMEZONES false, in which the system will perform calculations on each tick of the timer only, and not each and every time a player moves.
  • Added [BASETIME command that gamemaster's and above can use to check the system's base time, which is the time the system keeps track of basing it's time zones from. Using [TIME will display the time in the current time zone.
  • Changed the variable name m_UseItemLighting to m_UseAutoLighting which means you will type UseAutoLighting instead of UseItemLighting using [TS SET.
  • Fixed a bug where changing the moonphaseday would not recalculate the light levels until the next timer tick.
  • Added a [TS SETTIME <hh:mm> command to allow you to set the time a bit easier.
  • Added a [TS QUERY command to query the time system to see if it is running, and if it is, how fast is it calculating time.
  • Added a Support.cs script to assist the system as well as help move some methods out of the Time System.cs so that the file is not too big.
  • Added custom formatting. This was a huge update. You will type [TS SET TIMEFORMAT <format> to set the formatting for the [TIME and [BASETIME commands. You will type [TS SET CLOCKTIMEFORMAT <format> to set the format for when double clicking on clock items. There are six presets you can choose from.

For formatting help, please view Formatting.txt located in the zip file.
 

Rhexis

Knight
Uber update. You're my hero, seriously. Taking something 'simple' like displaying an ingame time and making it a fully customizable system.

As for formatting, $nth$ = <3

Gonna go install it now and poke at formatting x3 (-is a dork-)


Question, could I in theory bump up the month count to 13 and just add a new month name to the list of months?
 

Morxeton

Sorceror
Rhexis said:
Uber update. You're my hero, seriously. Taking something 'simple' like displaying an ingame time and making it a fully customizable system.

As for formatting, $nth$ = <3

Gonna go install it now and poke at formatting x3 (-is a dork-)


Question, could I in theory bump up the month count to 13 and just add a new month name to the list of months?
Thanks:D

That's a great idea. I just fixed it so that is possible and am going to be uploading here shortly.
 

Morxeton

Sorceror
v1.1.01 released:
  • Changed some code in the Support.cs to allow customizing the names of your months in the m_MonthsList.

Thanks to Rhexis for the idea!
 

Rhexis

Knight
Fwee.

Noticed two things. Clock.cs gives assembly refference errors. Just copied and pasted from spyglass.cs

..and the [TS SET TIMEFORMAT command doesnt work so well because of the clients limited characters

For example I tried:
[TS SET TIMEFORMAT The time is $hr-ap$:$mn-2$$ap$ on the $da$$nth$ of the $mo$$nth$ month of year $yr$. The moon is $mp$.
and the client cuts off "onth of year $yr$. The moon is $mp$."
 

Morxeton

Sorceror
Rhexis said:
Fwee.

Noticed two things. Clock.cs gives assembly refference errors. Just copied and pasted from spyglass.cs

..and the [TS SET TIMEFORMAT command doesnt work so well because of the clients limited characters

For example I tried:
[TS SET TIMEFORMAT The time is $hr-ap$:$mn-2$$ap$ on the $da$$nth$ of the $mo$$nth$ month of year $yr$. The moon is $mp$.
and the client cuts off "onth of year $yr$. The moon is $mp$."
Please post the errors you are receiving from modifying Clocks.cs.:eek:

If you edit Time System.cs and go under the Constant Variables region, you will see towards the bottom of that region a list of presets. For now, change one of the presets to match what you want. I will fix this issue by allowing to "append" to the time format.
 

Rhexis

Knight
RunUO - [www.runuo.com] Version 1.0.0, Build 26098
Scripts: Compiling C# scripts...failed (3 errors, 1 warnings)
- Warning: Scripts\Custom\Time System.cs: CS0168: (line 554, column 21) The var
iable 'e' is declared but never used
- Error: Scripts\Items\Skill Items\Tinkering\Clocks.cs: CS0246: (line 156, colu
mn 9) The type or namespace name 'NetState' could not be found (are you missing
a using directive or an assembly reference?)
- Error: Scripts\Items\Skill Items\Tinkering\Clocks.cs: CS0246: (line 158, colu
mn 9) The type or namespace name 'MessageType' could not be found (are you missi
ng a using directive or an assembly reference?)
- Error: Scripts\Items\Skill Items\Tinkering\Clocks.cs: CS0246: (line 162, colu
mn 24) The type or namespace name 'UnicodeMessage' could not be found (are you m
issing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Which is solved when I add the same things that are in spyglass.cs:
using System.Collections;
using Server.Gumps;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Engines.Quests;
using Server.Engines.Quests.Hag;

..and the warning only appears when I get errors with /any/ script..but goes away once I solve the errors.

..and I realized the editting presets just as you posted that x3
 

Rhexis

Knight
Just set my month to 13 with a 13th month added to Support.cs, $mo-0$ works like a charm displaying my custom month.

n_n
 

Morxeton

Sorceror
Rhexis said:
RunUO - [www.runuo.com] Version 1.0.0, Build 26098
Scripts: Compiling C# scripts...failed (3 errors, 1 warnings)
- Warning: Scripts\Custom\Time System.cs: CS0168: (line 554, column 21) The var
iable 'e' is declared but never used
- Error: Scripts\Items\Skill Items\Tinkering\Clocks.cs: CS0246: (line 156, colu
mn 9) The type or namespace name 'NetState' could not be found (are you missing
a using directive or an assembly reference?)
- Error: Scripts\Items\Skill Items\Tinkering\Clocks.cs: CS0246: (line 158, colu
mn 9) The type or namespace name 'MessageType' could not be found (are you missi
ng a using directive or an assembly reference?)
- Error: Scripts\Items\Skill Items\Tinkering\Clocks.cs: CS0246: (line 162, colu
mn 24) The type or namespace name 'UnicodeMessage' could not be found (are you m
issing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Which is solved when I add the same things that are in spyglass.cs:
using System.Collections;
using Server.Gumps;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Engines.Quests;
using Server.Engines.Quests.Hag;

..and the warning only appears when I get errors with /any/ script..but goes away once I solve the errors.

..and I realized the editting presets just as you posted that x3
Doh! I forgot about adding that to the top of the Clocks.cs. I will update the instructions:D
 

Morxeton

Sorceror
v1.1.1 released:
  • Added a [TS APPEND command for appending to string variables. If you use the command for non-string variables, it just sets them as it would with [TS SET.
  • Fixed a bug when specifying a variable that does not exist, it would not notify you.
 

Lord_Shaka

Wanderer
You could make a GUMP for the TS command,

And you could add a system that saves the time into a HTML page, so, we could display the time in our page !!!

The work is really GREAT !!!

Thank you!
 

Morxeton

Sorceror
Lord_Shaka said:
You could make a GUMP for the TS command,

And you could add a system that saves the time into a HTML page, so, we could display the time in our page !!!

The work is really GREAT !!!

Thank you!
You're welcome.

The plan is to create a gump based plug-in system that all my scripts will plug into. I am working on that now, then this system will be configurable via gumps.

I'll look into the HTML page suggestion.
 

Morxeton

Sorceror
Aeolus said:
Not sure if you're taking suggestions for mods or not, but I think it would be cool if it got just noticeably darker when it rains... just a thought. I am using the system and love it. Thanks for the submission. I too am looking forward to the updates!
I'll look into this. I had planned on working on a weather system. I may integrate the two.

Thanks for the suggestion.
 
Top