Thursday, June 28, 2012

Poll: What Feature Do You Want?

If you've been following the comments on the Skyrim Nexus page for Way of the Monk, then you probably read me talking about a poll for new features. The gist of that discussion is this: Because I only have a limited amount of time to focus on modding, and because I want to please as many of my players as possible, I have been gathering a list of requested features to be added to the next version. Feel free to continue suggesting additions. Each of you get 3 votes for what you want to see in the next version. You can spend all of those votes on one feature, or spread them out. Post below in the comments with your 3 votes, along with any areas that you want me to work on (they will be added to the list).


  • Chi system (needs a minimum of 20 votes) [4 votes]
  • Improved aesthetics
  • More perks [3 votes]
  • More enchantments
  • Perk transparency/improvement (making it easier for you to know the requirements) [2 votes]
  • Improve unarmed stealth combat [3 votes]
  • Food/alchemicy buffs for unarmed combat
  • More armor (only I only have spellweaver armor approved so far)
The five features with the most votes will be added to the next version of the mod, as long a they have a minimum of 2 votes each. Feel free to suggest more!

Suggestions can include having specific mods incorporated into this one, but you MUST have gained permission from the mod author beforehand. I won't add a mod unless I have permission from the author.

Skyrim Monk Let's Play #1 - Intro



I have uploaded a new video for the Way of the Monk mod to Youtube. This video describes how the mod works, and introduces my upcoming Let's Play series for it.

If you'd like to be notified when I post more videos, then feel free to subscribe to the channel.

Friday, June 22, 2012

Tutorial: Creating A Skill

Object: To create a new skill using Papyrus scritps

Difficulty: Very complicated and difficult

Time Needed: A great deal. If you are an unexperienced modder, it will take you even longer. For experienced modders, while actually writing the scripts might not take much time, designing the system, implementing it, and perfecting it until it plays well can still take a long time.

An extended version of this tutorial, along with a fully-functional example woodcutting skill mod are available on the Skyrim Nexus for free.

Things you will need:



  • Creation Kit.
  • A plan for how the skill will work mathematically
  • Scripting and general Skyrim modding experience

Note: You cannot create a new skill that uses the vanilla interface without editing most of the base code of the game. This tutorial explains a workaround tactic for create a system of scripts that let you track the how much the player does a certain item so that you can add perks, quests, or other features that depend on the player reaching a certain level in that skill. This tutorial is not going to follow the normal format (a list of buttons that you need to click and actions that you need to do). Rather, it is going to explain the concept of the skill workaround, and how to design/implement it. The actual implementation and the specific equations will be left to you to develop. In this tutorial, we will be using a Woodcutting skill as an example.

Setting up the XP: You first need to plan out the math of your skill. How you gain XP, how much XP you need to level, whether each level requires more XP, what higher levels give you, etc. These decisions will decide how the skill actually works mathematically and are extremely subject to change. I can't tell you how many times I have tweaked and changed my Unarmed leveling system in Way of the Monk. Once you being testing the skill you will inevitably find ways in which it can be improved or tweaked. What sounds good  in theory may not play well in the real game.

The first thing that you need to determine is the XP system. Even though Skyrim tries to take away the numbers as much as possible so that the game feels more immersive, it does actually use XP. Every time you use one of the skills (by casting a spell, hitting an enemy with a weapon, creating a potion, etc.) your XP is raised by a certain amount. Once it hits a cap, the skill level is then increased and the amount of XP needed to reach the next level is raised. You can study the XP system in Skyrim on the UESP wiki. I would highly recomend that you study the vanilla skills to gain a grasp of how they work. In the Woodcutting skill that I will be using as an example I used the following Papyrus Code:
if WoodcuttingXP.GetValue() >= 100
    WoodcuttingLevel.SetValue()WoodcuttingLevel.GetValue() + 1)
    WoodcuttingXP.SetValue(WoodcuttingXP - 100)
endif
Each time you activate the Woodcutting block, your XP will be raised. In the above code, the IF statement determines that when your XP reaches 100, your skill level is raised by one and your XP is reset.

If you want to have the amount of XP required to level increased every time, then you can do one of two things. 1) Instead of increasing the XP by a set amount every time the Woodcutting Block is activated, you should use a variable that can be decreased every time you level. So, say the variable starts out at a value of 10 and you must use the Woodcutting block 10 times to reach level 2. You should add to the above code a line that decreases that variable from 10 to (for instance) 8. Next time, it will take 12.5 (rounded to 13) uses of the Woodcutting Block to raise your level to 3. You can continue that process as long as you want to make it harder to level each time. Keep in mind, though, that if you simply subtract from the variable each time then the variable will eventually hit 0 and the level will never increase. So I would advise you to either write an IF statement to make sure that it never hits 0, or make sure that it hits 0 at just the right time if you want to have a level cap.

2) The other possibility is to have the amount of XP required to level set as a variable and increase it each time you gain a level. So, say at level 1 you gain 10 XP each time you use the Woodcutting Block and must acquire 100 XP to reach level 2. You can write the code so that when you hit level 2, the amount required to level is raised to (for example) 130. That way, it will take 13 uses of the Woodcutting Block to reach Level 3.

So, which of those methods should you use? It's really up to you. The second method is much more natural and runs much smoother than the first. But the first one makes it easier to modify the speed at which you raise your level with perks/abilities, and can be set up so that it stops level progression after a while.

Rewards: A skill is useless without rewards. You can give the player as fancy of an XP system as you want, but if it doesn't change the gameplay for them, then there is no point in downloading your mod. The vanilla game uses a perk system and a scaling system to reward the player for using a skill. The manner of your rewards depends entirely upon the skill that you are creating. For a Woodcutting Skill, the player might expect to be able to get a perk that increases the amount of firewood that they get each time they use the Woodcutting Block. Another good reward might be the ability to create items with your wood (arrows, bows, Forsworn items, etc.). Decide what type of reward you would like to give to the player.

Perks are the standard method of rewarding the player for raising their level. They are also an incredibly versatile way of giving bonuses to the player. I won't discuss perks in detail, since that's another discussion for another time. I will add, though, that one of the conditions that you can add to perks and their effects is the GetGlobalValue condition. This condition is extremely useful when using a skill system based upon Global Variables. If (for example), you want to specify that a Perk Entry only works when your Woodcutting Level is over 10, you can choose the S GetGlobalValue(WoodcuttingLevel) >= 10 condition information. This condition can also be used on Magic Effects in Spells.

Perk points are a good way of giving the player a choice in how they level. There is a reason why the game developers of Skyrim gave the player the choice of choosing their perks, rather than making the perk rewards mandatory like in Oblivion. It adds replay value and makes the player feel more invested in their character. If you're going to give the player that option, you will most likely end up having to create more perks so that they have some to choose from. While that means more work, it also means a more enjoyable playing experience.

The other type of reward that I mentioned was scaling. Scaling is when your ability to use the skill is improved as your level is increased. In the case of weapons, it means that your damage is increases when your level in that type of weapon is raised. The best way to set this up is to use an equation or perk that includes the skill level divided by a certain amount (e.g. effectiveness = 1 + Level*.01). You can also increase the effectiveness by a finite amount each time you level.

Example, using the equation:

        WoodcuttingEffectiveness.SetValue(1 + (WoodcuttingLevel.GetValue()*0.01))

OR by increasing it by a finite amount:

      WoodcuttingEffectiveness.SetValueInt(WoodCuttingEffectiveness.GetVaueInt() + 1)
This can be done with perks or by code in the leveling script. In the case of the example Woodcutting skill, the player can gain perks that increase the amount of wood that you gain each time you chop at the Chopping Block.



Another standard way of rewarding the player for raising their level is with new abilities or spells. New powers can be hard to make if you are trying to create a new type of effect that suits your skill, but they are a great way of making the player feel like they have accomplished something.

The other standard way of rewarding the player is with items. If you are a 3d artist, know someone who is, or have the permission of a mod author to use their models, you can add new items to reward the player with. Otherwise, you can add new enchantments or allow the crafting of vanilla items that you previously could not craft. Now, to fit the rest of the game, you probably don't want to simply add the item to their inventory once they reach a certain skill level. That breaks immersion and seems totally unnatural or special. It is best to either have a quest or a leveled list to give the item to the player. You can either make a quest for them to find it that you can only start once your skill reaches a certain level, or you can create a leveled list that has a chance to give you the item determined by a global variable. You can learn more about using globals in leveled lists by reading the "Chance None" entry on the wiki page, or by studying the Golden Touch perk in the Creation Kit.

The Coding Process: Now that you have finished the planning process, you need to actually write the code.

First, you need to find an Event that will run the code. This can actually be more challenging than it sounds. In my Way of the Monk mod, the Unarmed leveling script actually used the OnEffectStart Event because it was implemented as a script on a Magic Effect. Why? Because it was the only way to make sure that the script ran when the player successfully hit the enemy. Finding the right event can be tricky, and will likely take some testing. The Event that you use is totally dependent upon the nature of your skill, and it will probably take a lot of testing and inventive designing to find the right one.

For the Woodcutting example skill, finding the event was a bit difficult. I tried creating a unique script that ran on the OnActivate Event, but that ended up only running it whenever the player pressed 'e', rather than each time that they chopped wood. It would also run whenever NPCs used the Chop Block. So, instead, I edited the woodchoppingscript (not the vanilla script for the process) and added in my calculations as a function that ran when the played chopped a piece of wood.


        if WoodCuttingLevel.GetValueInt() <= 3
                WoodcuttingXP.SetValueInt(WoodcuttingXP.GetValueInt() + 1)
                if WoodcuttingXP.GetValueInt() >= 10
                        WoodcuttingLevel.SetValueInt(WoodcuttingLevel.GetValueInt() + 1)               
                        WoodcuttingXP.SetValueInt(WoodcuttingXP.GetValueInt() - 10)        
                        Debug.Notification("Your Woodcutting level has been raised to " + WoodcuttingLevel.GetValueInt())
                        PerkPointsAvailable.SetValueInt(PerkPointsAvailable.GetValueInt() + 1)
                        PerkPointsEarned.SetValueInt(PerkPointsSpent.GetValueInt() + PerkPointsAvailable.GetValueInt())
                endif
        endif

 After this, I created some perks, created a power to let you choose your perks and check your stats, and some notifications to let the player know that they are leveling as they use the Chop Block.

After you have found the Event to use, and have implemented the code, you need to test your mod. Creating the code is the easy part. Refining it takes time. I would highly suggest finding a group of modders to beta-test your skill once you have finished it. A system that seems to work well in the code and in your own testing might not work as pleasantly when others are using it.

Testing: After you have finished your planning, your coding, and your implementation, you must test your mod. I would highly suggest gathering a group of beta testers. You can do this by uploading your mod as a BETA version online. Let players know that what they are downloading is still in beta-mode, and give them an invitation to report any bugs or areas which could be improved.


Example: If you want to see an example of this tutorial in action, then feel free to download the Woodcutting Skill mod. You can also download an extended tutorial for creating a skill in PDF format.

Wednesday, June 20, 2012

Video Updates

If you've been reading the comment sections of either the Steam Workshop page or the Nexus page, you might have noticed me posting about video updates.

In fact, I have created a new Youtube channel for my modding projects. So far, I have created three videos to provide you with news. These videos will be coming out fairly regularly. I expect to be making at least one a week, and will also upload them whenever I have important information to give to ya'll.

The latest one can be watched below, which talks about the damage bug with the Unarmed weapon. In it, I also talk about how to fix the issue and discuss what will be in the next update. Feel free to subscribe to the channel if you would like to recieve notifications when I post modding updates and the occasional gameplay footage of Skyrim or other games that I run across.




Tuesday, June 12, 2012

Character Profile: Glosthiem

 Character Profile
Character profiles are introductions to characters that will be added by Way of the Monk


Name: Glosthiem
Race: Nord
Gender: Male
Class: Commoner
Age: 42
Skills: Unarmed, Unarmored, Archery, Restoration, Alteration
Associated Factions: Cult of the Way
Rank: Wanderer
Background: Born in Helgen to a Talos worshipper, he heard of the Cult of the Way when he was young. When he was 22 years of age, his father gave his hard-earned wages to send his son to the Temple of the Cult to train and study their way. Though Glosthiem was two years older than the normal age, the Elders decided to accept him as an Initiate due to his aptitude and knowlege of Talos. It was there that he trained for 20 years under the Elders until the time came for him to choose his Path. He was given the choice of becoming either a Wanderer or an Elder, as all Initiates are. He choose the Path of the Wanderers in order that he might bring justice and the enlightenment of Talos to those that he encountered. It was also his wish to return to his family and to take them to the Temple to live in safety from the Empire and the Thalmor. When he arrived at Helgen, however, he found the town in flames and his family dead. Above, he could still hear the shouts of a dragon flying from the ruins. In despair, he passed through the town and came to the Pillars of the Way. The Pillars were a sacred place for the Cult, and it was there that he planned to meditate and consider his next steps. Until he saw a battle-wearied adventurer accompanied by an officer of one of Skyrim's armies coming down the road, that is...

Voice Acting Samples
The voice acting samples are lines of dialog that you the character will have in the game. If you want to try your hand at voice acting for this character, then contact me with recordings of these lines. The files should be in the WAV of XMW formats.

Filename: WoM01MeetingGlosthiemIntro                                                                      Mood: Surprised
Text: "Are you from Helgen? What did you see? What happened there?"

Filename: WoM01MeetingGlosthiemIntroYes                                                                Mood: Surprised
Text: "A dragon? Gods save us! I arrived after the town had been torched. I thought that I heard the cry of some monster in the distance."

Filename: WoM01MeetingGlosthiem02Why                                                                  Mood: Sad
Text: "I was born in Helgen, and sent to the Cult of the Way at their Temple to train. But I recently completed my training and was returning to my family."

Filename: WoMGlosthiemCombatInjured01                                                           Mood: Hurt, Excited
Text: "Gah! Justice will prevail!"

Filename: WoMGlosthiemCombatCryApostate01                                                  Mood: Angry, Excited
Text: "Heathen Apostate!"

Monday, June 4, 2012

Version 1.3 Changelog

I have completed most of the work on the next update and will post the final version as soon as I can on the Nexus and the Workshop. I am also going to release a temporary beta version tonight for those aching to play it. That way, some of ya'll get to go ahead and play it, and the others get to play a more polished version when it is released tomorrow or the day after.

As for the changes, there are quite a lot. Most of these changes required numerous other changes to code and systems that I do not even mention. If I make any more for found bugs by beta-testers, or if I add something new, then I will add that work to the list below. The most important changes are listed in the Highlights section.

Highlights:



  • Savegame bloat issue has been eliminated. It might still bloat a little more than without any mods, but no more than is expected. I have not done extensive testing on this, but it appears that you might even be able to use a character from a bloated save. Load the save with the new version and create a new save when you are done playing. Basic testing seemed to indicate that the fix eliminated or at least reduced existing bloat.
  • A level cap of 100 on both skills has been added
  • A large set of ingame help and troubleshooting files has been added to the Pillar of the Way
  • You can now disable either of the skills at the Pillar of Rewalking
  • Many of the menus have been either improved or mostly recreated to be easier to use and less buggy
  • The perks have been rebalanced so that you can specialize in using the "Unarmed" weapon or using the monk weapons (more details to come in a blog post)


Efficiency/Coding-improvements:

  • Removed some calculations from leveling scripts to improve speed
  • Changed a number of debug notifications to use message notifications with flags to insert variables
  • Perk Points Earned is only calculated when neccesary to reduce the amount of math on each Event, changed the Pillars' scripts to account for that
  • Changed some variables to integers rather than floats
  • Changed the way that the Level progress is calculated to use integers and be more efficient
  • Eliminated some redundant Objects that are not used by the mod, but were added during creation
  • Eliminated Unarmored scaling script (got rid of the savegame bloating)
  • Eliminated the non-functioning Unarmed scaling scripts
  • Elemental perks are now removed when you choose a new Path
  • Corrected the conditions for a number of perks and messages that were not working


Gameplay:



  • A level cap of 100 has been added to both skills
  • Both skills take more time to level
  • The teleportation ability and a number of spell have been removed from Apostate Elders
  • Savegame bloat issue has been eliminated
  • Removed Unarmed and Unarmored scaling scripts. They weren't working properly and were causing the bloat
Menus:

  • Help menus added to the Pillar of the Way for the Pillars, Monk weapons, Leveling system, equipment, and Player Guides
  • Troubleshooting menus added to the Pillar of the Way
  • A 'Give Unarmed' Button has been added to the Pillar of the Way so that you can get another "Unarmed" weapon if you need one
  • A Settings menu has been added to the Pillar of Rewalking that lets you disable either of the skills
  • The 'Update' option has been removed from the menus
  • The Stats menu has been improved and the Level Progress is now displayed as a whole number
  • Changed the perk system so that the categories are broken down into branches
  • Eradicated the bug where clicking 'Ok' when there were not perks available would take you to a message for a perk
  • Added some 'Return' and 'Close' buttons to various menus for navigation ease
  • Cleaned up the text for some menus to improve their appearance and readability
  • Changed the content of a number of menus to be updated to the current system and be more informative
Perks:

  • Damage bonus for The Shadow Pillar now properly works and adds an extra 20% chance to crit when sneaking and using either the "Unarmed" weapon or the
  • Perk names now follow a format. Those with "Fists" in the name work for the "Unarmed" weapon. Those with "Strikes" in the name work for the Monk weapon. And those with "Blows" in the name work for both.
  • Bleeding Hands renamed to Rending Strikes
  • Renamed Quick Blows to Rapid Fists
  • Renamed Tiring Blows to Draining Fists
  • Renamed Critical Blows to Iron Fists
  • Renamed Weak Points to Penetrating Blows
  • Renamed Vitals Shot to Critical Blows
  • Renamed Fist Stabber to Puncturing Strikes
  • Changed weapon requirement of Rapid Fists to only work with the "Unarmed" weapon
  • Rending Strikes now only works on Monk weapons and the effect does not stack
  • Fixed the conditions of Critical Blows so that it now works properly
  • Draining Fists now only works with "Unarmed" weapon
  • Unencumbered perks do not stack
  • Puncturing Strikes no only works on Monk weapons
  • Changes Unarmored Stance so that you need at least the second level of one of the previous perks, rather than the final level
Thanks to Kibaken on the Nexus for helping me rebalance the perks!

Friday, June 1, 2012

Savegame bloat is gone!

Preliminary tests show that the save bloat has been eliminated! Testing results below:

I was trying a playthrough of my mod with Mojarq the kitty a while back. I compared the times and file sizes of that save with a new test character.

Mojarq the Kitty:

Save 1 - Time: 00.42.50 Filesize: 4209 KB
Save 2 - Time: 01.00.34 Filesize: 4847 KB

Test character:

Save 1 - Time: 00.37.37 Filesize: 3165 KB
Save 2 - Time: 01.03.57 Filesize: 3347 KB

I will continue to test it, but it looks like the problem has been eradicated. Or, at least, hugely reduced. Huzzah! :-D

If test results hold steady, then this fix will be included in the next update along with many other improvements.