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

Rhexis

Knight
Wonderful concept and useful for roleplay shards in that the date is configurable. Ill be using this, thanks a bunch. <3

edit- Only thing I can think to suggest is more formatting options. I see in the script where to change the output from [time, but Im not familiar with the best way to change it. For example, from 'The time is 5:11 on day 10 of month 2 of year 300.' to 'It is 5:11am on the 10th of february, 300.' The only problem I see with this would be the need to have options for am/pm and a value for when to switch between the two, 12 or 24 hour formatting..or a way to decide if using more/less than 24 hours per day, detecting the day and displaying the proper th/rd/st/nd..and custom months if not using realtime. o_. I think Im rambling now.
 

Morxeton

Sorceror
I will add that to the TODO list. You are able to actually customize how many hours you would like per day, so I will need to take the hours per day / 2 to get the AM/PM.
 

Rhexis

Knight
Well, thats only really useful if you're using a 12 hour format. 24 hour format is just obvious as any hour above 12 is pm. What comes to mind as far as being able to format is like with php on forums where you can do mm/dd/yy or dd-mm-yyyy or how my forums are now as M, jS yyyy (Feb, 13th 2006)

Thanks for listening all the same. Looking forward to updates. :3
 

Greystar

Wanderer
Heh, I just downloaded this and took a look at it and all I have to say is THANKS Morexton. I've been throwing around an Idea of how to do this for a long time. I though on OSI they used to have something like this that would control lights all over the world when it would get dark they would turn on and when it gets light they would turn off. I was going to write a mobile to do this, but I figured pathing would be difficult without setting actual wp in every city to every light. Light the old City Torch lighters or later GasLamp lighters of the middle/dark ages This will be a useable substitute so now the lights wont always be on :).

PS: Small request add the installation text from the forum into a text file in the zip so people can install later without having to go back to the forum.
 

Morxeton

Sorceror
Greystar said:
Heh, I just downloaded this and took a look at it and all I have to say is THANKS Morexton. I've been throwing around an Idea of how to do this for a long time. I though on OSI they used to have something like this that would control lights all over the world when it would get dark they would turn on and when it gets light they would turn off. I was going to write a mobile to do this, but I figured pathing would be difficult without setting actual wp in every city to every light. Light the old City Torch lighters or later GasLamp lighters of the middle/dark ages This will be a useable substitute so now the lights wont always be on :).

PS: Small request add the installation text from the forum into a text file in the zip so people can install later without having to go back to the forum.
No problem. :D

Thanks for the suggestion for including an installation text. I will do that going forward.
 

Morxeton

Sorceror
A bit of information I had forgotten to disclose:

The only lights that will be toggled on/off are BaseLight types LampPost1, LampPost2, and LampPost3. You can add/remove types by changing the Type array m_ItemLightTypes.

If any lights are deleted from the world, they will not be removed from the m_LightsList array unless the PerformRandomLightOutage() method just so happens to come across a deleted light. I will look into another method for handling this without modifying BaseLight.cs and without being a resource hog.

If any lights are added to the world, they will not be controlled by the system unless the system wipes and repopulates the m_LightsList which only happens when toggling off then back on the UseItemLighting value. I will add a command that will allow you to force this list to repopulate. There is no other good/easy way of doing this without modifying BaseLight.cs.
 

Morxeton

Sorceror
v1.0.3 released:
  • Fixed a bug when a managed light was deleted from the world and it was selected in PerformRandomLightOutage(), it would not check to see if it was deleted first.
  • Made it so when the managed lights list was repopulated, it would check to see if the item was deleted or not before adding it to the list.
  • Added a command called [TS REPOPLIGHTSLIST to force the list to be repopulated. Use this command after adding/removing lights that are of the type that will be managed by the system (i.e. LampPost1, LampPost2, LampPost3).
  • Typing [TS by itself will show a list of commands that can be used.
 

Morxeton

Sorceror
okyzan said:
can i set the date like 14. 02 .2006?
Not at the moment. I have received a request to allow special formatting such as that. I will release it in a future version (fairly soon).
 

Morxeton

Sorceror
I have implemented "time zones" and am doing further testing/optimizing of code. I will be adding a few more features and changing some things around slightly before releasing a new version. Expect a new version to be released tonight (well maybe, since it's V-day my wife might kill me). If not, I'll release a new version tomorrow.:D
 

Morxeton

Sorceror
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.
 
Top