What my update does\fixes.
1. Vanishing AM\PM textures. (They randomly vanished and appeared.)
2. Several wrapping issues, it would for example list the time as "00:00am", and I believe the original showed "01:60", instead of wrapping on 59.
3. I eliminated tons of stuff, and condensed it into one script. (Though, the setup menu could stand to be rebuilt now that the mod is updated.)
4. The code should be pretty flexible, so it could easily be made more customizable, as far as positioning the GUI, etc,. (ie, a few variables can move the whole display around, and it automatically adjust based on screen size. You shouldn't need to mess with the formulas, they should be correct, and scale properly across all resolutions.)
Note: It still needs a limiter of some sort, it runs every frame, so a check for minutes changed would probably be good, since it only needs to change once per minute anyways. (Game time minutes, mind you.)
Time Display Download
http://yacoby.silgrad.com/MW/Mods/timedisplay.htm
Install the mod, and you're ready to start editing it.
1. Download and install MWEdit. Link: http://sourceforge.net/projects/mwedit/
2. Download MWSE v0.94a, unzip it. Link: http://sourceforge.net/projects/mwse/
3. Install the updated function list from the MWSE v0.94a package into your MWEdit directory. ("customfunctions.dat" is what you are after.)
4. Load Morrowind.esm, and the Time Display .esp into MWEdit.
5. In MWEdit navigate to the "view" toolbar, and click "View Changed", that will hide everything but changes made by Yacoby's mod.
6. Delete everything(select, then right click, you'll see the option "Delete") except the following:
Globals: "CharGenState", "YAC_ScreenX", "YAC_ScreenY"
Script: "YAC_ST_Render"
7. Clean all the deleted items, select then right click. (You'll see the option "Clean".)
8. Go to startscripts, and right click the right panel, and add "YAC_ST_Render" as the startscript.
9. Replace the contents of "YAC_ST_Render" with the following. (If you go to the section of code that says "Initial Resolution" you can edit that to match whatever resolution you play in.)
Spoiler
begin YAC_ST_Render; Note: PM: -1, AM: -2; Note: This needs limited to one tick per game minute to avoid wasting FPS.; Temp Stringlong Temp; PositionXfloat PosX; Bordershort BorderSize ; This is the border, it's positioned in the top right, so: 800x600 -> X: 800 - BorderSize, Y: 0 + BorderSize; Paddingshort Padding; ImageWidthshort ImageWidth ; Width of the numeric textures; Hud Name (Temporary Storage)long HudName; Hud Element (Current Element to Draw)short HudElement; Texture Storage (Used to Free Resources)short HudCur0short HudLast0short HudCur1short HudLast1short HudCur2short HudLast2short LastHudshort LoadHud; Time Varsshort Hourfloat Minuteshort AMPM; Startupshort DoOnce; Stop Processing (Chargen In Progress?)if ( CharGenState != -1 ) returnendif; Set Initial Resolutionif ( DoOnce == 0 ) set BorderSize to 15 set Padding to 5 set ImageWidth to 25 set YAC_ScreenX to 800 set YAC_ScreenY to 600 set DoOnce to -1endif; Stop Processing (ScreenX Invalid)if ( YAC_ScreenX < 640 ) returnendif; Stop Processing (ScreenY Invalid)if ( YAC_ScreenY < 480 ) returnendif; Get Current Timeset Hour to ( GameHour )set Minute to ( GameHour - Hour) ; (float)GameHour: 12.5 - (short)Hour: 12 = 0.5 <- Minutesset Minute to ( Minute * 100 / 10 * 6 ) ; Converts float "0.5" to 30(min) for display.; Set PM (Do before other time fixes.)if ( Hour >= 12 ) set AMPM to -1 ; PMendif; Set AM (Do before other time fixes.)if ( Hour < 12 ) set AMPM to -2 ; AMendif; Hour Correction (00:00am Fix)if ( Hour < 1 ) ; ie, no 00:00am, render as 12:00am set Hour to 12endif; Hour Correction (12 Hour Format)if ( Hour > 12 ) set Hour to ( Hour - 12 )endif; Minute Correctionsif ( Minute >= 60 ) set Minute to 0endif; Loop Through Hud Elements Rendering Each Oneif ( HudElement > 2 ) set HudElement to 0endif; Store Last Time Settingsif ( HudElement == 0 ) set HudLast0 to ( HudCur0 ) set HudCur0 to Hour set LastHud to ( HudLast0 ) set LoadHud to ( Hour ) set PosX to ( YAC_ScreenX - BorderSize - (ImageWidth * 3 + Padding) )elseif ( HudElement == 1 ) set HudLast1 to ( HudCur1 ) set HudCur1 to Minute set LastHud to ( HudLast1 ) set LoadHud to ( Minute ) set PosX to ( YAC_ScreenX - BorderSize - (ImageWidth * 2) )elseif ( HudElement == 2 ) set HudLast2 to ( HudCur2 ) set HudCur2 to AMPM set LastHud to ( HudLast2 ) set LoadHud to ( AMPM ) set PosX to ( YAC_ScreenX - BorderSize - ImageWidth )else return endif;== Draw Numeric Elements ============================== ; Create Hud Element setx HudName to xStringBuild, "YAC_ST_HUD_%d", HudElement xFileWriteText, "|MGEpipe", "HW%" xFileWriteText, "|MGEpipe", HudName ; Remove Existing (Matching Hud Elements) xFileWriteText, "|MGEpipe", "Hf%" ; Free Last Hud Element Texture setx Temp to xStringBuild, "Yacoby\Time\%d.tga", LastHud xFileWriteText, "|MGEpipe", "tf%" xFileWriteString, "|MGEpipe", Temp ; Load New Hud Element Texture xFileWriteText, "|MGEpipe", "Hl%" setx Temp to xStringBuild, "Yacoby\Time\%d.tga", LoadHud ; Enable Hud Element xFileWriteText, "|MGEpipe", Temp xFileWriteText, "|MGEpipe", "He%" xFileWriteText, "|MGEpipe", "Hp%" ; Position Hud Element xFileWriteFloat, "|MGEpipe", PosX xFileWriteFloat, "|MGEpipe", BorderSize xFileWriteText, "|MGEpipe", "Hc%"; == End Draw Numeric Elements ====================================================== ; Increase HudElement Counter set HudElement to ( HudElement + 1 );== Draw Dot Element ====================================== ; Dot Positioning set PosX to ( YAC_ScreenX - BorderSize - (ImageWidth * 3) + Padding + 12.5 ) ; 12.5 is half of 25(numeric image width) so this should center the dot, roughly.. (Or perhaps approximately, hard to tell... ) ; Create Hud Element setx Temp to xStringBuild, "YAC_ST_HUD_dot" xFileWriteText, "|MGEpipe", "HW%" xFileWriteText, "|MGEpipe", Temp ; Remove Existing (Matching Hud Elements) xFileWriteText, "|MGEpipe", "Hf%" ; Free Last Hud Element Texture setx Temp to xStringBuild, "Yacoby\Time\dot.tga" xFileWriteText, "|MGEpipe", "tf%" xFileWriteString, "|MGEpipe", Temp ; Load New Hud Element Texture xFileWriteText, "|MGEpipe", "Hl%" setx Temp to xStringBuild, "Yacoby\Time\dot.tga" xFileWriteText, "|MGEpipe", Temp ; Enable Hud Element xFileWriteText, "|MGEpipe", "He%" xFileWriteText, "|MGEpipe", "Hp%" ; Position Hud Element xFileWriteFloat, "|MGEpipe", PosX xFileWriteFloat, "|MGEpipe", BorderSize xFileWriteText, "|MGEpipe", "Hc%"end
10, Save the mod, and try it out.
Yacoby gave permission on his site to make updates, so if someone want's to package this up, etc, go ahead, a credit to me for my work would be nice, and of course credit Yacoby. (I may package it up eventually if no one else does.)
------------
Edit:
Despite needing a setup menu, and a limiter to save FPS, it runs fine, even on my relatively slow computer, so it should work great as is for pretty much everyone. (During testing I had the timescale set to 4000, which is WAY faster than normal, so it should run fine at normal speeds.)
Also, the screenshot on Yacoby's site doesn't represent the current GUI, it uses MW style fonts now, the format is this (ie, 01:00pm), and it goes really well with the MW GUI, I think. (All credits to Yacoby for the design, etc,. I just fixed some code.)
I wouldn't mind seeing the graphics updated so it displays like this "1:00pm", but it's nice as is.