- cycle: 191 miles
- run: 72 miles
I took some days off mid-month to travel with some running in other states. Only 8 bicycle rides, but extended the miles by 75 over March.
Lake Tahoe looks pretty in April. Met some heavy fog along the snowy driver over Mt Rose from Reno, and it turned out quite sunny at the lake.
My Earth Day ride took me to see the Provo River
- cycle: 115 miles
- run: 77 miles
I took off an entire week mid-month, but I still managed to beat my February running miles. I’m gradually increasing my distance per outing, and for April I’ll be focusing more on cycling.
This photograph of Utah Valley was taken at the very end of the month during a bike ride.Continue reading...
Article #6 in a 8-part series.
- 1 - Skyrim Special Edition Released
- 2 - Convert Old Skyrim Mods for SE
- 3 - How to Disable Random Dragons in Skyrim
- 4 - Convert Black Sacrament Armor to SE Step-by-Step
- 5 - How to Update Meshes for Skyrim SE
- 6 - this article
- 7 - Skyrim SE - XPMSSE: Modify Weapon Positions
- 8 - Show Your Tail With Campfire Cloak In Skyrim
This article introduces some Papyrus scripting techniques and reviews my scripts for “Werewolf Time Meter” mod for Skyrim Special Edition. In a nutshell, the “Werewolf Time Meter” borrows the blue magicka bar as a countdown meter during beast form transformation. If you have limited experience writing scripts or programs, please see introduction and tutorials on Papyrus Reference.
This mod and script examples also work perfectly with the original 32-bit Skyrim.
- Werewolf Time Meter on nexusmods.com includes script sources (psc) in archive (BSA)
- Creation Kit Papyrus Reference on creationkit.com
- Setup for Script Work with Creation Kit and Notepad++
- BSA-Manager by ousnious to extract a BSA-file.
Instead of focusing on learning Papyrus, I go over technique and the workings of the two scripts making up “Werewolf Time Meter.” See “Creation Kit Papyrus Reference” for brief examples and tutorials.
The mod includes two scripts, the first allows the player to enable and disable the meter and the second polls OnUpdate Event every X seconds to determine if should display the meter or remove it. In the plugin there exists a spell effect to disable (damage) magicka regeneration preventing the time meter bar growing until beast form ends. This means upon detecting the player’s character has become a beast, the spell effect must be added. Remove if exists when not in beast form.
The main script polls infrequently since a speedy refresh isn’t necessary and to reduce overhead for a player with a heavy-scripted mod setup. Since checking the player’s condition is very fast, we could probably get away with more frequent updates. In beast form, the script polls every 3-7 seconds to update the meter else it checks every 30 seconds. If player is not a werewolf, I decided to set the next update event to 600 seconds to cover when player becomes a lycanthrope later in game. Of course, the player may disable to turn the main script off completely.
Since the player cannot normally use power spells in beast form, we could probably forget the case of enable/disable toggle during beast form. However, mods may exist allowing it so we should at least consider the possibility. We should also consider odd scenarios and try to make the script as robust as possible.Continue reading...
Article #9 in a 9-part series.
- 1 - Programming Problem: Determine if Two Strings Are Anagrams
- 2 - Programming Problem: Sum-Zero Triplet
- 3 - Programming Problem: Palindromes
- 4 - Problem: Validate a Phone Number
- 5 - Programming Problem: Single-Edit Difference
- 6 - Prime Factors Problem 1: LCM
- 7 - Prime Factors Problem 2: Largest Prime Factor
- 8 - How-To: Substrings in Swift
- 9 - this article
Goal: write a method to determine if a string is a pangram.
A pangram is a phrase using all the letters of the alphabet.
- The quick brown fox jumps over the lazy dog.
- The five boxing wizards jump quickly.
- Bright vixens jump; dozy fowl quack.
For this problem let the alphabet consist of only letters ignoring case, and let’s assume our input may include punctuation, digits, or spaces.
Give it a try in your programming language of choice, and try to be brief. Test negative case by removing words from the pangram. Below I share my solutions in Swift and C#.Continue reading...