~hristoast/ncgdMW

1f1e47b9e0847fe6c68c8aded32ebe4e380cb0fa — Hristos N. Triantafillou 2 years ago 3.1
Initial commit.
A  => .gitignore +1 -0
@@ 1,1 @@
*.omwaddon

A  => Makefile +14 -0
@@ 1,14 @@
proj_dir := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

.DEFAULT_GOAL:= build

.PHONY: build
build:
	delta_plugin convert ncgdMW.yaml

.PHONY: clean
clean:
	cd $(proj_dir) && rm -fv ncgdMW.omwaddon ncgdMW.zip

pkg: clean build
	cd $(proj_dir) && zip -r ncgdMW.zip doc ncgdMW.omwaddon

A  => README.md +14 -0
@@ 1,14 @@
# ncgdMW

Source for the Natural Character Growth and Decay - MW mod by Greywander.

## Building

[Delta Plugin](https://gitlab.com/bmwinger/delta-plugin) is required:

```
delta_plugin convert ncgdMW.yaml
```

This will produce a `ncgdMW.omwaddon` file.


A  => docs/ncgd skills.ods +0 -0
A  => docs/ncgdMW Readme.txt +363 -0
@@ 1,363 @@
======================================================
Natural Character Growth and Decay - Morrowind Edition 
======================================================

Created by Greywander May 2017

* Also Try These Mods *
=======================

Better Regen - Slowly regenerate health and magicka, if your Endurance/Willpower is over 50.  Not OP like some
               regen mods.
http://www.nexusmods.com/morrowind/mods/44969/?

CarryOn - Doubles your carry weight and increases your running speed, but the effects of fatigue and encumbrance
          are more potent.
http://www.nexusmods.com/morrowind/mods/44972/?

Magicka Based Skill Progression - ncgdMW Compatibility Version
        - Makes magical skill progression based on the amount of magicka used, instead of number of spells cast.
          Original by HotFusion4, edited by me to work with ncgdMW.
http://www.nexusmods.com/morrowind/mods/44973/?

* New in Version 3.1 *
======================

This small update brings a few new things.  First of all I just want to remind everyone that there are now two
different versions: the regular version and the "alt start" version.  Only activate one of these, depending on if
you are using an Alternate Start mod (or TES3MP) or not.  If you're using the Alt Start version, just drink the
potion to start ncgdMW whenever you're ready.

The major new thing in 3.1 is that you can now install ncgdMW on an existing save file, including allowing you to
update from an older version.  While the mod is initializing, choose the "existing save" option and you'll be
prompted to input your initial attributes after character creation.  If using vanilla races and birthsigns, you
can look those up on the wiki, or consult the readme for any race or birthsign mod you are using.  Don't forget to
account for your class's favored attributes!

Due to scripting limitations, or perhaps my own lack of experience, I had to use a rather circuitous method to allow
the player to input their initial attributes.  For each attribute, you'll need to select the value of the TENS place
first, then the value of the ONES place.  For example, if your initial Strength was 47, you would first choose "4x"
then "x7", and these combine to make 47.  If you've had permanent modifications to your attributes, such as from
using the Bittercup, you should figure those in, too, but double their effect (as attributes are cut in half during
chargen).

* New in Version 3.0 *
======================

I've had a previously unreleased "version 2.2" that included some improvements to the decay system.  I've since
forgotten the details of the improvements, but they are included in 3.0.

A number of compatibility fixes have been made.  Previously, while initializing NGCD would subtract 25 from your
vanilla attributes.  This wasn't a problem for vanilla races, none of which start with less than 30 in any
attribute, but custom races could start with less than 0 in attributes.  Now NGCD just cuts your vanilla
attributes in half, so it should be compatible with custom races.  As a side effect of this, attributes will
generally start a bit higher than they used to, and will cluster closer to an average than they used to (which is
to say that very high or very low vanilla values won't have as much of an effect on your recalculated attribute
values).

The second compatibility fix has to do with effects that modify your attributes.  One such effect is the Bittercup,
an item that raises your highest attribute while lowering the lowest, permanently.  Previously, NCGD would show an
error informing you that it had detected the unexpected value, and then automatically revert to the expected value,
essentially overriding the effect.  NCGD now gives you the option to either keep the unexpected value (making the
effect stick) or revert to the expected value (as it previously did).

I've also fixed a bug that would prevent skills from decaying below 150, and would have stopped a skill from
decaying at all if you raised it to 200.  This had to do with not allowing a skill to decay below half of the
highest rank you've raised it to, and not taking the mastery fortify effects into consideration.  So a skill rank
of 150 was looking like 75 when it made the check, which is half of 150.  Skill mastery is now properly accounted
for.

- For those using Alternate Start mods or TES3MP -

There is now a modified version of this mod available for download.  Rather than starting automatically, this mod
places a potion in your inventory.  Drink the potion when you are ready for the mod to start.  This still needs
testing, so please let me know if you still have issues with this mod.

- Known Issues -

When a skill at 100 or any increment of 25 above that (125, 150, 175, etc) decays, it will briefly appear to be 25
points higher than it really is before correcting itself.  I'm not sure exactly what's causing this, but it appears
that a skill mastery effect is being applied when it shouldn't be, raising the skill by an extra 25 points.  Since
the issue seems to fix itself, I've decided not to worry about it.  Let me know if this causes you any serious
bugs.


* New in Version 2.0 *
======================

The decay system has been reworked to incorporate your Intelligence and Level.  As your Level increases, your
skills will decay faster.  As your Intelligence increases, it will slow down the rate at which skills decay.
I've also added information to the tooltips for both skills and attributes, the attributes moreso just to inform
you of some of the changes (e.g. Willpower gives health, Intelligence slows decay), while the skills now tell you
which attributes they influence.  They're always listed in order starting with the primary attribute.  Also new is
that you will now be notified when attributes increase, and when skills and attributes decay.

As always, I'm looking for feedback regarding this mod.  I plan on using this in my own playthrough, but the more
playtesters the better we'll be able to check for bugs or balance issues.  Enjoy!

* New in Version 1.1 *
======================

I don't know why I didn't do this earlier, but I looked at the skills in Oblivion and how they relate to attributes
and some of their connections made more sense than mine.  For example, Acrobatics, as a mobility skill, makes more
sense to have Speed as a primary attribute than Short Blade or Hand To Hand does.  All I've done is update which
skills influence which attributes and by how much.

0. Introduction
===============

We've all said it before: the leveling system in vanilla Morrowind sucks.  Having to micromanage your skill gains
in order to make sure you get those juicy x5 multipliers at a level up, only to end up with straight 100's across
all your attributes (with the possible exception of Luck) when you're just at a moderate level.

And so there were a number of leveling mods that sought to alleviate this burden and make playing the game more fun.
Mods like Linora's Leveling Mod keep things straightforward and retain the flavor of the original, simply reducing
the micromanagement needed to get a good multiplier.  Mods like Galsiah's Character Development instead chose to
take a radical departure from the original and instead try something new, a "Natural Grow" system that distributes
points to your attributes automatically based on your playstyle.

It is this second vein that I've chosen to take for this mod.  GCD had its own issues, notably that it didn't seem
to allow attributes to grow past 95 when playing on OpenMW, when it had initially been designed to allow the player
to break the caps on skills and attributes.  At first, I lamented that a mod I felt like I couldn't live without
didn't work quite as it should on OpenMW.  Then, an amazing discovery about how OpenMW handles Get/Mod/SetStat
script commands lead me to develop my own interpretation of a Natural Grow leveling mod.

This mod is not to be confused with a Skyrim mod by the same name.  That was a mod I created a while ago and, due
to differences in the gameplay and engine, had a different albeit related set of goals and requirements.

1. Requirements
===============

* This mod REQUIRES OpenMW *

This mod not only breaks the limits of the original Morrowind scripting engine with an impressive 5000+ lines of
code in the main script, it also relies on OpenMW's implementation of the SetAttribute and SetSkill scripting
commands, which differs from that of the original Morrowind.

This mod will never and can never be compatible with the original Morrowind.

As of version 3.1 it's now possible to install ncgdMW on an existing save file.  Follow the on-screen instructions
to input your starting attributes as they were immediately after chargen.  You can look up your race and birthsign
info on the wiki if you need to, and don't forget to figure in your class's favored attributes!

Removing ncgdMW from an existing save may be difficult, and will likely have permanent effects on your attributes.
If you're updating from an old version, make sure to clean your save and then install the new version as if you
where installing it on an existing save.

2. Installation
===============

1. Download ncgdMW.7z and place it wherever you keep your mods.
2. Unzip it to it's own folder.  If it unzips into your main mod directory, create a folder and place it inside.
3. Find openmw.cfg and add a line that says 'data="[path to your mod directory]/ncgdMW"'

You should be able to find the config file in one of these locations:
    Linux: $HOME/.config/openmw
    Windows: C:\Users\Username\Documents\my games\openmw (username will vary, as may drive and language)
    Mac: /Users/Username/Library/Preferences/openmw

If you're having trouble understanding any of that, you can just unzip the file and drop ncgdMW.omwaddon into your
data directory.  There are no other assets other than the .omwaddon, so you don't need to worry too much about
keeping it separated from other mods.  You can also check here for more information on how to install mods in
OpenMW:

https://wiki.openmw.org/index.php?title=Mod_installation

If you're using an Alternate Start mod or TES3MP, then you may run into some bugs.  If you're having issues, try
using ncgdMW_alt_start.omwaddon INSTEAD OF ncgdMW.omwaddon.  Drink the potion that appears in your inventory to
start the mod when it is safe.

3. Uninstallation
=================

Open openmw.cfg and comment out the line pointing to the ncgdMW directory.  Just put a '#' in front and it will
disable that entire line.  Or you can just disable the .omwaddon in the launcher.

Continuing a playthrough after you've removed the mod will most likely have unexpected and permanent effects.

4. Updating
===========

Make sure to clean your save to insure that the old version of ncgdMW has been removed.  Then install the new
version and choose "existing save" during the initialization prompt.  Follow the instructions to input your initial
attributes as they were immediately after chargen BEFORE ncgdMW started messing with them.  You can look up the
starting values for races and birthsigns on the wiki, or if you are using custom races or birthsigns you can consult
the readme for that mod.  Don't forget to account for your class's favored attributes.

5. Compatiblity
===============

As previously stated, this mod requires OpenMW, and is not compatible with the original Morrowind engine.

This mod should, in theory, be compatible with all other mods except for those that alter the leveling system or
how the player gains Health.  Galsiah's Character Development is of course incompatible.  A mod such as Talrivian's
State Based HP would conflict with ncgdMW's own system for determining Health.

Another mod that seems less obvious is Magicka Based Skill Progression, which uses a (limited) number of skill
books to increase magic skills in a way that the game recognizes for level up purposes (which is important for
vanilla leveling, but not for ncgdMW).  It should work, but as ncgdMW allows skills to increase beyond 100 you
would eventually run out of skill books and be unable to raise your magic skills.  There is a workaround that
involves cleaning your save, so that might be an option.  There's a link to an edited version of this mod that is
compatible with ncgdMW at the top of this readme.

6. Features
===========

 * Your attributes grow automatically as your skills increase.
 * Your skills and attributes can grow past 100, but...
 * It becomes increasingly difficult to increase your skills the farther past 100 you go.
 * Your skills will also decay over time.  (Optional)
 * Finally, since vanilla levelups are disable, I've implemented my own system of determining the player's Health.

~ Attribute Growth ~
--------------------

Each skill contributes points to three attributes, plus Luck.  Skills have a primary attribute (4 points), a
secondary attribute (2 points), and a tertiary attribute (1 point), with Luck acting as a second tertiary
attribute.  I've changed some the primary attribute of some skills, sometimes for balance, sometimes for realism
(Long Blade is now an Agility skill with Strength as a secondary, while Marksman is now a Strength skill with
Agility as a secondary).

See the included spreadsheet for how skills are related to attributes, or see the ASCII chart further down.

The amount of points a skill contributes to attributes is proportional to the skill squared.  This means a skill
of 10 will contribute 4 times as many points as a skill of 5 (5 * 5 = 25, 10 * 10 = 100).  Generally, you'll grow
faster by increasing your skills that are highest, while increasing lower skills will give less of a benefit.  This
doesn't mean you have to specialize, quite the contrary.  You'll get higher attributes overall by raising, say,
Axe and Destruction (which don't share any attributes) than you will by raising Axe and Spear (which are linked to
the same attributes).  Conversely, Raising your Axe and Spear together will result in a higher Strength score than
raising a multitude of Strength skills to minor levels.

~ Skill Growth ~
----------------

When a skill reaches 100, it is reset back to 75 but you are granted a +25 Fortify Skill bonus.  (This will show up
in your current magic effects as 'Skill Mastery'.)  If your skill drops below 75, it will be raised back up and you
will lose the bonus.  You shouldn't even notice the difference.  When a skill increases, the vanilla message
showing the new value of your base skill (1-100) will appear, along with an identical scripted message showing your
'real' skill (base skill + mastery bonus).

When you have 'Skill Mastery', that skill becomes much harder to raise, requiring you to increase the skill twice
before it will actually increase.  Once your skill reaches 125 (with the bonus), you'll need three skillups for
each one, and every 25 skill ranks beyond will require one additional skillup to each the next skill rank.  A
message will appear notifying you that your skill increase isn't enough and how many more you need.

There is a new skill cap of 475.  I could have made it higher, but I didn't see much of a point.  Good luck
reaching the cap.

~ Skill Decay ~
---------------

Skills can optionally decay, with three possible speeds.  Intelligence is now important for slowing down the decay
of skills.  As your level rises, your skills will decay faster, but Intelligence can slow it down somewhat.  Skills
decay independently from one another, with the exact time of decay being randomized within limits determined by
your level and your Intelligence.  When a skill decays, you lose an entire skill rank (I couldn't see a way to only
remove skill progress, so this is what we have).

Fortunately, there are some things that soften the effects of decay.  The first, of course, being the relatively
slow speed of decay, even at the fasted speed.  Second is that skills will not decay below certain values.  A skill
will never decay below 15, ever.  ncgdMW also remembers the highest rank you've ever reached with a skill, and will
not let a skill decay below half your highest rank.  Third, when a skill is below its highest rank, you get double
skill increases until you've caught back up.  Finally, regardless of your chosen decay speed, your first skill
decays will happen between 15 and 30 days* after you've started play, giving you plenty of time to figure out your
character build.

*As your level rises, skills will decay faster, which can cause skills to decay before 15 days if you raise your
level high enough.

~ Starting Out ~
----------------

Speaking of, your choices at character creation will have a much larger impact on your starting abilities, with
attributes theoretically starting as low as 12 or higher than 80 (on standard growth).  If you pick a race/class
combination that complement one another, you might even start at a level higher than 1 (a breton mage starts at
level 4).  That said, if you don't like your initial choices, you can just start training different skills.  Your
choices of Major and Minor skills, as well as your specialization, have no effect except for the starting leve of
your skills.  Your favored attributes do stick, however, so choose those carefully.

~ Health Formula ~
------------------

Lastly, because the level menu is disable I've had to implement my own system for determining the player's Health.
I've decided to divorce Health gains entirely from level ups (which are used solely for leveled lists now), instead
simply setting the player's Health to Endurance + half your Strength + a quarter of your Willpower.  The inclusion
of Willpower here is partly to make Willpower appealing to physical characters, and partly to help mages be not so
squishy.  If you have all three at 100 then you'll have a modest 175 Health (100 + 50 + 25).  Remember that you can
increase attributes beyond 100, though.

7. Skill Chart
==============

A '4' indicates a primary attribute, a '2' indicates a secondary attribute, and a 1 indicates a tertiary attribute.
Each skill distributes a total of 8 points, and each attribute receives a total of 27 points.

See also the included spreadsheet if you want to play around with the values yourself.

===========|========|=======|=========|=====|============|=========|===========|====|
           |Strength|Agility|Endurance|Speed|Intelligence|Willpower|Personality|Luck|
===========|========|=======|=========|=====|============|=========|===========|====|
LongBlade  |    2   |   4   |         |  1  |            |         |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
BluntWeapon|    4   |       |    1    |     |            |    2    |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Axe        |    4   |   2   |         |     |            |    1    |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Armorer    |    1   |       |    4    |     |            |         |     2     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
MediumArmor|        |       |    4    |  2  |            |    1    |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
HeavyArmor |    1   |       |    4    |  2  |            |         |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Spear      |    4   |       |    2    |  1  |            |         |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Block      |    2   |   1   |    4    |     |            |         |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Athletics  |        |       |    2    |  4  |            |    1    |           |  1 |
===========|========|=======|=========|=====|============|=========|===========|====|
           |Strength|Agility|Endurance|Speed|Intelligence|Willpower|Personality|Luck|
===========|========|=======|=========|=====|============|=========|===========|====|
Alchemy    |        |       |    1    |     |      4     |         |     2     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Enchant    |        |       |         |     |      4     |    2    |     1     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Conjuration|        |       |         |     |      4     |    1    |     2     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Alteration |        |       |         |  1  |      2     |    4    |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Destruction|        |       |         |     |      2     |    4    |     1     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Mysticism  |        |       |         |     |      4     |    2    |     1     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Restoration|        |       |    1    |     |            |    4    |     2     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Illusion   |        |   1   |         |     |      2     |         |     4     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Unarmored  |        |       |    2    |  4  |            |    1    |           |  1 |
===========|========|=======|=========|=====|============|=========|===========|====|
           |Strength|Agility|Endurance|Speed|Intelligence|Willpower|Personality|Luck|
===========|========|=======|=========|=====|============|=========|===========|====|
Acrobatics |    1   |   2   |         |  4  |            |         |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Security   |        |   4   |         |     |      2     |         |     1     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Sneak      |        |   4   |         |  1  |            |         |     2     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
LightArmor |        |   1   |    2    |  4  |            |         |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Marksman   |    4   |   2   |         |  1  |            |         |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
ShortBlade |        |   4   |         |  2  |            |         |     1     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
HandToHand |    4   |   2   |    1    |     |            |         |           |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Mercantile |        |       |         |     |      2     |    1    |     4     |  1 |
-----------|--------|-------|---------|-----|------------|---------|-----------|----|
Speechcraft|        |       |         |     |      1     |    2    |     4     |  1 |
===========|========|=======|=========|=====|============|=========|===========|====|
           |Strength|Agility|Endurance|Speed|Intelligence|Willpower|Personality|Luck|
===========|========|=======|=========|=====|============|=========|===========|====|

8. Legal
========

Feel free to modify and distribute this file, just remember to give me credit.

A  => ncgdMW.yaml +1575 -0
@@ 1,1575 @@
---
__esp_version__: 1.3
__plugin_type__: 0
transpiler_version: 0.11.1
version: 0.0.0
author: ""
desc: ""
masters:
  - name: Morrowind.esm
    size: 79837557
    version: 0.0.0
  - name: Tribunal.esm
    size: 4565686
    version: 0.0.0
  - name: Bloodmoon.esm
    size: 9631798
    version: 0.0.0
records:
  sStrDesc:
    type: GameSetting
    string: "Moderately affects your Health, and influences how much you can carry, your maximum Fatigue, and how much damage you do in combat."
  sIntDesc:
    type: GameSetting
    string: Determines your maximum amount of Magicka.  Increases your memory and slows the decay of skills.
  sWilDesc:
    type: GameSetting
    string: "Slightly affects your Health, affects your ability to resist magic, and your maximum Fatigue."
  sEndDesc:
    type: GameSetting
    string: "Greatly affects your Health, and affects your maximum Fatigue."
  sHealthDesc:
    type: GameSetting
    string: "The amount of damage you can take before you die. Increases greatly with Endurance, moderately with Strength, and slightly with Willpower."
  fLevelUpHealthEndMult:
    type: GameSetting
    float: 0.0
  iLevelupMajorMult:
    type: GameSetting
    integer: 0
  iLevelupMinorMult:
    type: GameSetting
    integer: 0
  fSpecialSkillBonus:
    type: GameSetting
    float: 1.0
  fMajorSkillBonus:
    type: GameSetting
    float: 1.0
  fMiscSkillBonus:
    type: GameSetting
    float: 1.0
  "skill::Block":
    type: DeltaSkill
    attribute: Endurance
    desc: "Block skill allows one to use shields to block any melee attack. A successful block removes all damage from the attack.\n\nInfluences Endurance, Strength, and Agility.  All skills influence Luck a small amount."
  "skill::Armorer":
    type: DeltaSkill
    attribute: Endurance
    desc: "Armorer skill is used to maintain weapons and armor at top effectiveness. Worn weapons do less damage. Worn armor provides less protection against attacks. As wear increases, the diminishing effectiveness of weapons and armor is dramatic.\n\nInfluences Endurance, Personality, and Strength.  All skills influence Luck a small amount."
  "skill::MediumArmor":
    type: DeltaSkill
    desc: "Medium Armor skill lets one move and defend while wearing durable but flexible armors like chain, scale, bonemold, and Orcish armor. To use any style of armor effectively, the wearer must be trained, conditioned, and skilled in its use.\n\nInfluences Endurance, Speed, and Willpower.  All skills influence Luck a small amount."
  "skill::HeavyArmor":
    type: DeltaSkill
    desc: "Heavy Armor skill is used to move and defend while wearing massive and rigid armors like iron, steel, silver, Dwemer, ebony, and Daedric armor. To use any style of armor effectively, the wearer must be trained, conditioned, and skilled in its use.\n\nInfluences Endurance, Speed, and Strength.  All skills influence Luck a small amount."
  "skill::BluntWeapon":
    type: DeltaSkill
    desc: "Blunt Weapon skill makes you more effective when using heavy bashing weapons like maces, hammers, clubs, or staves.\n\nInfluences Strength, Willpower, and Endurance.  All skills influence Luck a small amount."
  "skill::LongBlade":
    type: DeltaSkill
    attribute: Agility
    desc: "Long Blade skill lets one use broadswords, sabers, longswords, claymores, katanas, and dai-katanas effectively.\n\nInfluences Agility, Strength, and Speed.  All skills influence Luck a small amount."
  "skill::Axe":
    type: DeltaSkill
    desc: "Axe skill helps a user wield heavy chopping weapons like war axes and battleaxes more effectively.\n\nInfluences Strength, Agility, and Willpower.  All skills influence Luck a small amount."
  "skill::Spear":
    type: DeltaSkill
    attribute: Strength
    desc: "Spear skill permits effective use of long-hafted thrusting weapons like spears and halberds.\n\nInfluences Strength, Endurance, and Speed.  All skills influence Luck a small amount."
  "skill::Athletics":
    type: DeltaSkill
    desc: "Athletics skill trains and conditions one for running and swimming. Skilled athletes move short and long distances over land with speed and efficiency, and they also swim swiftly underwater.\n\nInfluences Speed, Endurance, and Willpower.  All skills influence Luck a small amount."
  "skill::Enchant":
    type: DeltaSkill
    desc: "This skill governs the creation, use, and recharging of enchanted items. Skilled enchanters are more successful at creating new items. Enchanted items burn less power, and are recharged more efficiently from soul gems, for a trained user.\n\nInfluences Intelligence, Willpower, and Personality.  All skills influence Luck a small amount."
  "skill::Destruction":
    type: DeltaSkill
    desc: "The destruction skill is the mastery of the spell effects of the College of Destruction. Their spells harm living and unliving things, and include elemental damage, draining, damaging, vulnerability, and disintegration magical effects.\n\nInfluences Willpower, Intelligence, and Personality.  All skills influence Luck a small amount."
  "skill::Alteration":
    type: DeltaSkill
    desc: "Students of the College of Alteration manipulate the physical world and its natural properties. Alteration effects include water breathing and walking, jumping, levitating, burdening, opening and locking, and creating shield barriers against physical damage.\n\nInfluences Willpower, Intelligence, and Speed.  All skills influence Luck a small amount."
  "skill::Illusion":
    type: DeltaSkill
    desc: "Spell effects of the College of Illusion alter the perceptions and thoughts of living subjects. Illusion effects blind, illuminate, paralyze, and silence, calm or enrage, charm, distract and camouflage, and render invisible.\n\nInfluences Personality, Intelligence, and Agility.  All skills influence Luck a small amount."
  "skill::Conjuration":
    type: DeltaSkill
    desc: "The spell effects of the College of Conjuration include the mental domination of mundane and magical creatures, summonation of otherworldly weapons and armor, and summonation of Daedric or undead servants and powers to serve and protect the caster.\n\nInfluences Intelligence, Personality, and Willpower.  All skills influence Luck a small amount."
  "skill::Mysticism":
    type: DeltaSkill
    attribute: Intelligence
    desc: "The spells of the College of Mysticism shape and focus otherworldly forces to bind souls in gems, or teleport the caster's body, or manipulate the world with telekinesis, or absorb or reflect magical energies, or sense unseen objects at a distance.\n\nInfluences Intelligence, Willpower, and Personality.  All skills influence Luck a small amount."
  "skill::Restoration":
    type: DeltaSkill
    desc: "Adepts of the College of Restoration heal, restore, and fortify the body's attributes and abilities, cure disease, and protect it from other malign influences. Restoration spells can also augment or absorb strength, endurance, intelligence, agility, and other bodily attributes.\n\nInfluences Willpower, Personality, and Endurance.  All skills influence Luck a small amount."
  "skill::Alchemy":
    type: DeltaSkill
    desc: "Alchemy identifies magical properties in mundane substances. Substances are consumed directly, or prepared as potions to provide long-lasting benefits like healing and curing disease, water-walking, magical shielding, and fortifying bodily attributes.\n\nInfluences Intelligence, Personality, and Endurance.  All skills influence Luck a small amount."
  "skill::Unarmored":
    type: DeltaSkill
    desc: "Unarmored skill lets one avoid or reduce injury during combat while not wearing any armor by evading, deflecting, or absorbing blows. Those versed in this skill are better defended wearing no armor at all than they are when wearing armor.\n\nInfluences Speed, Willpower, and Endurance.  All skills influence Luck a small amount."
  "skill::Security":
    type: DeltaSkill
    attribute: Agility
    desc: "Security skill lets one open locked doors and containers with lock-picks or disarm traps with probes. This skill is essential for agents and thieves alike.\n\nInfluences Agility, Intelligence, and Personality.  All skills influence Luck a small amount."
  "skill::Sneak":
    type: DeltaSkill
    desc: "The Sneak discipline is the art of moving unseen and unheard. Skilled sneaks are also adept pickpockets.\n\nInfluences Agility, Personality, and Speed.  All skills influence Luck a small amount."
  "skill::Acrobatics":
    type: DeltaSkill
    attribute: Speed
    desc: "Acrobatics skill enables one to jump long distances and to avoid damage when falling from great heights. Nimble acrobats can reach areas others cannot get to and can direct their paths while falling.\n\nInfluences Speed, Agility, and Strength.  All skills influence Luck a small amount."
  "skill::LightArmor":
    type: DeltaSkill
    attribute: Speed
    desc: "Light armor skill lets one move and defend while wearing light-weight, flexible armors like leather, boiled leather, fur, chitin, and glass armor. To use any style of armor effectively, the wearer must be trained, conditioned, and skilled in its use.\n\nInfluences Speed, Endurance, and Agility.  All skills influence Luck a small amount."
  "skill::ShortBlade":
    type: DeltaSkill
    attribute: Agility
    desc: "Characters with great short-blade skill are more effective with short, quick, thrusting weapons like daggers, tantos, short swords, and wakazashis.\n\nInfluences Agility, Speed, and Personality.  All skills influence Luck a small amount."
  "skill::Marksman":
    type: DeltaSkill
    attribute: Strength
    desc: "With the marksman skill, one is more effective with ranged weapons like the short bow, long bow, crossbow, throwing star, and throwing knife.\n\nInfluences Strength, Agility, and Speed.  All skills influence Luck a small amount."
  "skill::Mercantile":
    type: DeltaSkill
    desc: "Mercantile skill is the art of buying low and selling high. This skill guarantees lower initial prices for goods, equipment, and services, and improves chances of getting better deals by bargaining.\n\nInfluences Personality, Intelligence, and Willpower.  All skills influence Luck a small amount."
  "skill::Speechcraft":
    type: DeltaSkill
    desc: "Those skilled in speechcraft influence others by admiring, intimidating, and taunting them. Listeners are more willing to divulge information or to entrust important tasks to the skilled speaker.\n\nInfluences Personality, Willpower, and Intelligence.  All skills influence Luck a small amount."
  "skill::HandToHand":
    type: DeltaSkill
    attribute: Strength
    desc: "Hand-to-hand skill is the martial art of unarmed combat. Hand-to-hand attacks damage only the fatigue of a standing opponent, but hand-to-hand attacks damage health when a target has been knocked unconscious by fatigue loss.\n\nInfluences Strength, Agility, and Endurance.  All skills influence Luck a small amount."
  NCGD_Main:
    type: Script
    script: !include_str "scripts/NCGD_Main.mwscript"
    preserved:
      shorts: 0
      longs: 0
      floats: 0
      data_size: 0
      var_size: 0
      variables: []
      compiled: ""
  NCGD_Health:
    type: Script
    script: !include_str "scripts/NCGD_Health.mwscript"
    preserved:
      shorts: 0
      longs: 0
      floats: 0
      data_size: 0
      var_size: 0
      variables: []
      compiled: ""
  NCGD_alchemy25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Alchemy
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_alchemy50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Alchemy
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_alchemy100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Alchemy
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_alchemy200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Alchemy
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_block25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Block
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_block50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Block
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_block100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Block
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_block200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Block
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_armorer25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Armorer
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_armorer50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Armorer
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_armorer100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Armorer
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_armorer200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Armorer
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_mediumarmor25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: MediumArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_mediumarmor50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: MediumArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_mediumarmor100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: MediumArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_mediumarmor200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: MediumArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_heavyarmor25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: HeavyArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_heavyarmor50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: HeavyArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_heavyarmor100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: HeavyArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_heavyarmor200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: HeavyArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_bluntweapon25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: BluntWeapon
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_bluntweapon50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: BluntWeapon
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_bluntweapon100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: BluntWeapon
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_bluntweapon200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: BluntWeapon
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_longblade25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: LongBlade
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_longblade50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: LongBlade
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_longblade100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: LongBlade
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_longblade200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: LongBlade
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_axe25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Axe
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_axe50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Axe
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_axe100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Axe
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_axe200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Axe
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_spear25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Spear
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_spear50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Spear
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_spear100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Spear
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_spear200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Spear
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_athletics25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Athletics
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_athletics50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Athletics
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_athletics100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Athletics
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_athletics200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Athletics
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_enchant25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Enchant
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_enchant50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Enchant
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_enchant100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Enchant
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_enchant200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Enchant
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_destruction25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Destruction
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_destruction50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Destruction
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_destruction100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Destruction
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_destruction200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Destruction
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_alteration25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Alteration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_alteration50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Alteration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_alteration100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Alteration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_alteration200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Alteration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_illusion25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Illusion
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_illusion100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Illusion
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_illusion200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Illusion
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_conjuration25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Conjuration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_conjuration50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Conjuration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_conjuration100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Conjuration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_conjuration200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Conjuration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_mysticism25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Mysticism
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_mysticism50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Mysticism
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_mysticism100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Mysticism
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_mysticism200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Mysticism
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_restoration25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Restoration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_restoration50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Restoration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_restoration100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Restoration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_restoration200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Restoration
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_unarmored25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Unarmored
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_unarmored50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Unarmored
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_unarmored100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Unarmored
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_unarmored200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Unarmored
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_security25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Security
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_security50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Security
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_security100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Security
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_security200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Security
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_sneak25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Sneak
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_sneak50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Sneak
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_sneak100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Sneak
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_sneak200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Sneak
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_acrobatics25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Acrobatics
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_acrobatics50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Acrobatics
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_acrobatics100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Acrobatics
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_acrobatics200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Acrobatics
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_lightarmor25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: LightArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_lightarmor50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: LightArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_lightarmor100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: LightArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_lightarmor200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: LightArmor
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_shortblade25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: ShortBlade
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_shortblade50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: ShortBlade
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_shortblade100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: ShortBlade
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_shortblade200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: ShortBlade
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_marksman25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Marksman
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_marksman50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Marksman
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_marksman100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Marksman
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_marksman200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Marksman
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_mercantile25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Mercantile
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_mercantile50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Mercantile
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_mercantile100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Mercantile
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_mercantile200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Mercantile
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_speechcraft25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Speechcraft
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_speechcraft50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Speechcraft
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_speechcraft100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Speechcraft
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_speechcraft200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Speechcraft
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_handtohand25:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: HandToHand
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 25
        max_magnitude: 25
  NCGD_handtohand50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: HandToHand
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  NCGD_handtohand100:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: HandToHand
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 100
        max_magnitude: 100
  NCGD_handtohand200:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: HandToHand
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 200
        max_magnitude: 200
  NCGD_illusion50:
    type: Spell
    name: Skill Mastery
    spell_type: Ability
    cost: 0
    effects:
      - effect_type: FortifySkill
        skill: Illusion
        range: SelfType
        area: 0
        duration: 0
        min_magnitude: 50
        max_magnitude: 50
  "startup::NCGD_Main":
    type: Startup
    data: ""
  "startup::NCGD_Health":
    type: Startup
    data: ""

A  => scripts/NCGD_Health.mwscript +84 -0
@@ 1,84 @@
Begin NCGD_Health

short doOnce
long temp
long ncgdEndurance
long ncgdStrength
long ncgdWillpower
float currentHP
float maxHP
float fortifiedHP
float hpRatio

if (player->getHealthGetRatio == 0)
	return
elseif (ncgdEndurance == player->getEndurance)
	if (ncgdStrength == player->getStrength)
		if (ncgdWillpower == player->getWillpower)
			return
		endif
	endif
elseif (CharGenState != -1)
	return
endif

if (doOnce == 0)
	set ncgdEndurance to player->getEndurance
	set ncgdStrength to player->getStrength
	set ncgdWillpower to player->getWillpower
	set doOnce to 1
endif

if (Player->GetEffect sEffectFortifyHealth == 1)
	set hpRatio to player->getHealthGetRatio
	
	set currentHP to player->getHealth
	set currentHP to currentHP / hpRatio
	
	set maxHP to ncgdEndurance
	set temp to ncgdStrength / 2
	set maxHP to maxHP + temp
	set temp to ncgdWillpower / 4
	set maxHP to maxHP + temp
	
	set fortifiedHP to currentHP - maxHP
	
	set ncgdEndurance to player->getEndurance
	set ncgdStrength to player->getStrength
	set ncgdWillpower to player->getWillpower
	
	set maxHP to ncgdEndurance
	set temp to ncgdStrength / 2
	set maxHP to maxHP + temp
	set temp to ncgdWillpower / 4
	set maxHP to maxHP + temp
	set maxHP to maxHP + fortifiedHP
	
	player->setHealth maxHP
	
	set currentHP to maxHP * hpRatio
	set temp to currentHP - maxHP
	
	player->modCurrentHealth temp
else
	set ncgdEndurance to player->getEndurance
	set ncgdStrength to player->getStrength
	set ncgdWillpower to player->getWillpower
	
	set hpRatio to player->getHealthGetRatio
	
	set maxHP to ncgdEndurance
	set temp to ncgdStrength / 2
	set maxHP to maxHP + temp
	set temp to ncgdWillpower / 4
	set maxHP to maxHP + temp
	
	player->setHealth maxHP
	
	set currentHP to maxHP * hpRatio
	set temp to currentHP - maxHP
	
	player->modCurrentHealth temp
endif

End NCGD_Health

A  => scripts/NCGD_Main.mwscript +5521 -0
@@ 1,5521 @@
Begin NCGD_Main

short doOnce
short counter
long temp
long temp2

short attributeMult
short decayRate
short startSTR		; Starting attributes, to be added on top of gains
short startINT
short startWIL
short startAGI
short startSPE
short startEND
short startPER
short startLUK

long baseSTR			; Base attributes, for error checking
long baseINT
long baseWIL
long baseAGI
long baseSPE
long baseEND
long basePER
long baseLUK

short recalcSTR		; Boolean, does attribute need to be recalculated?  1 = Yes
short recalcINT
short recalcWIL
short recalcAGI
short recalcSPE
short recalcEND
short recalcPER
short recalcLUK

long skillBlock		; Current skill, for checking if attributes need to be recalculate
long skillArmorer
long skillMediumArmor
long skillHeavyArmor
long skillBluntWeapon
long skillLongBlade
long skillAxe
long skillSpear
long skillAthletics

long skillEnchant
long skillDestruction
long skillAlteration
long skillIllusion
long skillConjuration
long skillMysticism
long skillRestoration
long skillAlchemy
long skillUnarmored

long skillSecurity
long skillSneak
long skillAcrobatics
long skillLightArmor
long skillShortBlade
long skillMarksman
long skillMercantile
long skillSpeechcraft
long skillHandToHand

short baseBlock		; Base skill, for measuring when skills increase
short baseArmorer
short baseMediumArmor
short baseHeavyArmor
short baseBluntWeapon
short baseLongBlade
short baseAxe
short baseSpear
short baseAthletics

short baseEnchant
short baseDestruction
short baseAlteration
short baseIllusion
short baseConjuration
short baseMysticism
short baseRestoration
short baseAlchemy
short baseUnarmored

short baseSecurity
short baseSneak
short baseAcrobatics
short baseLightArmor
short baseShortBlade
short baseMarksman
short baseMercantile
short baseSpeechcraft
short baseHandToHand

short maxBlock			; Highest skill level, for speeding up growth and halting decay
short maxArmorer
short maxMediumArmor
short maxHeavyArmor
short maxBluntWeapon
short maxLongBlade
short maxAxe
short maxSpear
short maxAthletics

short maxEnchant
short maxDestruction
short maxAlteration
short maxIllusion
short maxConjuration
short maxMysticism
short maxRestoration
short maxAlchemy
short maxUnarmored

short maxSecurity
short maxSneak
short maxAcrobatics
short maxLightArmor
short maxShortBlade
short maxMarksman
short maxMercantile
short maxSpeechcraft
short maxHandToHand

short masteryBlock		; Level of mastery, for growth past 100.  Each point is 25 skill ranks
short masteryArmorer
short masteryMediumArmor
short masteryHeavyArmor
short masteryBluntWeapon
short masteryLongBlade
short masteryAxe
short masterySpear
short masteryAthletics

short masteryEnchant
short masteryDestruction
short masteryAlteration
short masteryIllusion
short masteryConjuration
short masteryMysticism
short masteryRestoration
short masteryAlchemy
short masteryUnarmored

short masterySecurity
short masterySneak
short masteryAcrobatics
short masteryLightArmor
short masteryShortBlade
short masteryMarksman
short masteryMercantile
short masterySpeechcraft
short masteryHandToHand

short progressBlock	; For slowing down skill growth after 100
short progressArmorer
short progressMediumArmor
short progressHeavyArmor
short progressBluntWeapon
short progressLongBlade
short progressAxe
short progressSpear
short progressAthletics

short progressEnchant
short progressDestruction
short progressAlteration
short progressIllusion
short progressConjuration
short progressMysticism
short progressRestoration
short progressAlchemy
short progressUnarmored

short progressSecurity
short progressSneak
short progressAcrobatics
short progressLightArmor
short progressShortBlade
short progressMarksman
short progressMercantile
short progressSpeechcraft
short progressHandToHand

short oldDay
float oldHour
float timePassed
float decayMemory	; How many hours it takes for a skill to decay

float decayBlock		; How long until this skill decays?
float decayArmorer
float decayMediumArmor
float decayHeavyArmor
float decayBluntWeapon
float decayLongBlade
float decayAxe
float decaySpear
float decayAthletics

float decayEnchant
float decayDestruction
float decayAlteration
float decayIllusion
float decayConjuration
float decayMysticism
float decayRestoration
float decayAlchemy
float decayUnarmored

float decaySecurity
float decaySneak
float decayAcrobatics
float decayLightArmor
float decayShortBlade
float decayMarksman
float decayMercantile
float decaySpeechcraft
float decayHandToHand

if (doOnce == 0)
	if (CharGenState == -1)
		set counter to counter + 1
		if (counter < 10)
			return
		endif
		
		if (temp2 <= 0)
			MessageBox "Welcome to Natural Character Growth and Decay!  How fast would you like your attributes to grow?", "Fast", "Standard", "Slow"
			set temp2 to 1
		elseif (temp2 == 1)
			set temp to getButtonPressed
			if (temp == -1)
				return
			elseif (temp == 0)
				set attributeMult to 3	; Fast attribute growth
			elseif (temp == 1)
				set attributeMult to 2	; Standard attribute growth
			else
				set attributeMult to 1	; Slow attribute growth
			endif
			set temp2 to 2
		elseif (temp2 == 2)
			MessageBox "Excellent!  How quickly would you like skills to decay?", "Fast", "Standard", "Slow", "Off"
			set temp2 to 3
		elseif (temp2 == 3)
			set temp to getButtonPressed
			if (temp == -1)
				return
			elseif (temp == 0)
				set decayRate to 3	; Fast skill decay
			elseif (temp == 1)
				set decayRate to 2	; Standard skill decay
			elseif (temp == 2)
				set decayRate to 1	; Slow skill decay
			else
				set decayRate to 0	; No skill decay
			endif
			set temp2 to 4
		elseif (temp2 == 4)
			MessageBox "Is this a new game, or are you installing NCGD on an existing save?", "New Game", "Existing Save"
			set temp2 to 5
			return
		elseif (temp2 == 5)
			set temp to getButtonPressed
			if (temp == -1)
				return
			elseif (temp == 0)
				set temp2 to 6		; New Game
			else
				set temp2 to 11		; Existing Save
			endif
		elseif (temp2 == 6)
			MessageBox "Natural Character Growth and Decay is good to go!\nIt may take a few seconds to adjust your Attributes.", "Okay"
			set temp2 to 10
			
		elseif (temp2 == 10)
			
		    ; Record the player's starting base attributes
		    set temp to player->getStrength			; Records current Strength
		    player->setStrength 1000					; Sets base Strength to a known value
		    set temp2 to player->getStrength - 1000	; Find's the amount of fortification
		    set startSTR to temp - temp2				; Subtracts fortification to get base value
		    set startSTR to startSTR / 2				; Reduces Strength to account for gain from skills
		    player->setStrength startSTR				; Restores Strength to new value
		
		    set temp to player->getIntelligence
		    player->setIntelligence 1000
		    set temp2 to player->getIntelligence - 1000
		    set startINT to temp - temp2
		    set startINT to startINT / 2
		    player->setIntelligence startINT
		
		    set temp to player->getWillpower
		    player->setWillpower 1000
		    set temp2 to player->getWillpower - 1000
		    set startWIL to temp - temp2
		    set startWIL to startWIL / 2
		    player->setWillpower startWIL
		
		    set temp to player->getAgility
		    player->setAgility 1000
		    set temp2 to player->getAgility - 1000
		    set startAGI to temp - temp2
		    set startAGI to startAGI / 2
		    player->setAgility startAGI
		
		    set temp to player->getSpeed
		    player->setSpeed 1000
		    set temp2 to player->getSpeed - 1000
		    set startSPE to temp - temp2
		    set startSPE to startSPE / 2
		    player->setSpeed startSPE
		
		    set temp to player->getEndurance
		    player->setEndurance 1000
		    set temp2 to player->getEndurance - 1000
		    set startEND to temp - temp2
		    set startEND to startEND / 2
		    player->setEndurance startEND
		
		    set temp to player->getPersonality
		    player->setPersonality 1000
		    set temp2 to player->getPersonality - 1000
		    set startPER to temp - temp2
		    set startPER to startPER / 2
		    player->setPersonality startPER
		
		    set temp to player->getLuck
		    player->setLuck 1000
		    set temp2 to player->getLuck - 1000
		    set startLUK to temp - temp2
		    set startLUK to startLUK / 2
		    player->setLuck startLUK
			
			set temp2 to 50
			
		elseif (temp2 == 11)
			MessageBox "Please take a moment to input what your starting attributes were at character creation.  Be sure to take into account your racial attributes, favored attributes, and any bonus you may have gained from birthsigns.  You can look up these values on the wiki if you need to.", "Okay"
			set temp2 to 12
			return
		elseif (temp2 == 12)
			set temp to getButtonPressed
			if (temp == -1)
				return
			endif
			set temp2 to 13
		elseif (temp2 == 13)		; Set starting Strength when using existing save
			MessageBox "What is the TENS value of your starting Strength?  For example, if your starting Strength was 45 you would choose 4x.", "0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x"
			set temp2 to 14
		elseif (temp2 == 14)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startSTR to 10 * temp
			endif
			set temp2 to 15
		elseif (temp2 == 15)
			MessageBox "What is the ONES value of your starting Strength?  For example, if your starting Strength was 45 you would choose x5.", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"
			set temp2 to 16
		elseif (temp2 == 16)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startSTR to startSTR + temp
				set startSTR to startSTR / 2
				player->setStrength startSTR
			endif
			set temp2 to 17
		elseif (temp2 == 17)		; Set starting Intelligence when using existing save
			MessageBox "What is the TENS value of your starting Intelligence?  For example, if your starting Intelligence was 45 you would choose 4x.", "0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x"
			set temp2 to 18
		elseif (temp2 == 18)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startINT to 10 * temp
			endif
			set temp2 to 19
		elseif (temp2 == 19)
			MessageBox "What is the ONES value of your starting Intelligence?  For example, if your starting Intelligence was 45 you would choose x5.", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"
			set temp2 to 20
		elseif (temp2 == 20)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startINT to startINT + temp
				set startINT to startINT / 2
				player->setIntelligence startINT
			endif
			set temp2 to 21
		elseif (temp2 == 21)		; Set starting Willpower when using existing save
			MessageBox "What is the TENS value of your starting Willpower?  For example, if your starting Willpower was 45 you would choose 4x.", "0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x"
			set temp2 to 22
		elseif (temp2 == 22)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startWIL to 10 * temp
			endif
			set temp2 to 23
		elseif (temp2 == 23)
			MessageBox "What is the ONES value of your starting Willpower?  For example, if your starting Willpower was 45 you would choose x5.", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"
			set temp2 to 24
		elseif (temp2 == 24)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startWIL to startWIL + temp
				set startWIL to startWIL / 2
				player->setWillpower startWIL
			endif
			set temp2 to 25
		elseif (temp2 == 25)		; Set starting Agility when using existing save
			MessageBox "What is the TENS value of your starting Agility?  For example, if your starting Agility was 45 you would choose 4x.", "0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x"
			set temp2 to 26
		elseif (temp2 == 26)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startAGI to 10 * temp
			endif
			set temp2 to 27
		elseif (temp2 == 27)
			MessageBox "What is the ONES value of your starting Agility?  For example, if your starting Agility was 45 you would choose x5.", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"
			set temp2 to 28
		elseif (temp2 == 28)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startAGI to startAGI + temp
				set startAGI to startAGI / 2
				player->setAgility startAGI
			endif
			set temp2 to 29
		elseif (temp2 == 29)		; Set starting Speed when using existing save
			MessageBox "What is the TENS value of your starting Speed?  For example, if your starting Speed was 45 you would choose 4x.", "0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x"
			set temp2 to 30
		elseif (temp2 == 30)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startSPE to 10 * temp
			endif
			set temp2 to 31
		elseif (temp2 == 31)
			MessageBox "What is the ONES value of your starting Speed?  For example, if your starting Speed was 45 you would choose x5.", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"
			set temp2 to 32
		elseif (temp2 == 32)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startSPE to startSPE + temp
				set startSPE to startSPE / 2
				player->setSpeed startSPE
			endif
			set temp2 to 33
		elseif (temp2 == 33)		; Set starting Endurance when using existing save
			MessageBox "What is the TENS value of your starting Endurance?  For example, if your starting Endurance was 45 you would choose 4x.", "0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x"
			set temp2 to 34
		elseif (temp2 == 34)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startEND to 10 * temp
			endif
			set temp2 to 35
		elseif (temp2 == 35)
			MessageBox "What is the ONES value of your starting Endurance?  For example, if your starting Endurance was 45 you would choose x5.", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"
			set temp2 to 36
		elseif (temp2 == 36)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startEND to startEND + temp
				set startEND to startEND / 2
				player->setEndurance startEND
			endif
			set temp2 to 37
		elseif (temp2 == 37)		; Set starting Personality when using existing save
			MessageBox "What is the TENS value of your starting Personality?  For example, if your starting Personality was 45 you would choose 4x.", "0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x"
			set temp2 to 38
		elseif (temp2 == 38)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startPER to 10 * temp
			endif
			set temp2 to 39
		elseif (temp2 == 39)
			MessageBox "What is the ONES value of your starting Personality?  For example, if your starting Personality was 45 you would choose x5.", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"
			set temp2 to 40
		elseif (temp2 == 40)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startPER to startPER + temp
				set startPER to startPER / 2
				player->setPersonality startPER
			endif
			set temp2 to 41
		elseif (temp2 == 41)		; Set starting Luck when using existing save
			MessageBox "What is the TENS value of your starting Luck?  For example, if your starting Luck was 45 you would choose 4x.", "0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x"
			set temp2 to 42
		elseif (temp2 == 42)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startLUK to 10 * temp
			endif
			set temp2 to 43
		elseif (temp2 == 43)
			MessageBox "What is the ONES value of your starting Luck?  For example, if your starting Luck was 45 you would choose x5.", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"
			set temp2 to 44
		elseif (temp2 == 44)
			set temp to getButtonPressed
			if (temp == -1)
				return
			else
				set startLUK to startLUK + temp
				set startLUK to startLUK / 2
				player->setLuck startLUK
			endif
			set temp2 to 50
		endif
		
		if (temp2 != 50)
			return
		endif
		
		; Base attributes recorded for future error checking
		set baseSTR to startSTR
		set baseINT to startINT
		set baseWIL to startWIL
		set baseAGI to startAGI
		set baseSPE to startSPE
		set baseEND to startEND
		set basePER to startPER
		set baseLUK to startLUK
		
		; Initialize first skill decay
		set decayBlock to Random 360
		set decayBlock to decayBlock / 30
		set decayArmorer to Random 360
		set decayArmorer to decayArmorer / 30
		set decayMediumArmor to Random 360
		set decayMediumArmor to decayMediumArmor / 30
		set decayHeavyArmor to Random 360
		set decayHeavyArmor to decayHeavyArmor / 30
		set decayBluntWeapon to Random 360
		set decayBluntWeapon to decayBluntWeapon / 30
		set decayLongBlade to Random 360
		set decayLongBlade to decayLongBlade / 30
		set decayAxe to Random 360
		set decayAxe to decayAxe / 30
		set decaySpear to Random 360
		set decaySpear to decaySpear / 30
		set decayAthletics to Random 360
		set decayAthletics to decayAthletics / 30
		
		set decayEnchant to Random 360
		set decayEnchant to decayEnchant / 30
		set decayDestruction to Random 360
		set decayDestruction to decayDestruction / 30
		set decayAlteration to Random 360
		set decayAlteration to decayAlteration / 30
		set decayIllusion to Random 360
		set decayIllusion to decayIllusion / 30
		set decayConjuration to Random 360
		set decayConjuration to decayConjuration / 30
		set decayMysticism to Random 360
		set decayMysticism to decayMysticism / 30
		set decayRestoration to Random 360
		set decayRestoration to decayRestoration / 30
		set decayAlchemy to Random 360
		set decayAlchemy to decayAlchemy / 30
		set decayUnarmored to Random 360
		set decayUnarmored to decayUnarmored / 30
		
		set decaySecurity to Random 360
		set decaySecurity to decaySecurity / 30
		set decaySneak to Random 360
		set decaySneak to decaySneak / 30
		set decayAcrobatics to Random 360
		set decayAcrobatics to decayAcrobatics / 30
		set decayLightArmor to Random 360
		set decayLightArmor to decayLightArmor / 30
		set decayShortBlade to Random 360
		set decayShortBlade to decayShortBlade / 30
		set decayMarksman to Random 360
		set decayMarksman to decayMarksman / 30
		set decayMercantile to Random 360
		set decayMercantile to decayMercantile / 30
		set decaySpeechcraft to Random 360
		set decaySpeechcraft to decaySpeechcraft / 30
		set decayHandToHand to Random 360
		set decayHandToHand to decayHandToHand / 30
		
		set oldHour to 0
		set oldDay to 0
		set timePassed to 0
		set decayMemory to 100
		
		; Initialize other variables
		set counter to 0
		set doOnce to 1
	else
		return
	endif
endif

if (counter >= 3)
	set counter to 0
	set temp to 0
	set temp2 to 0
	; Combat skill check
	if (skillBlock != player->getBlock)
		set skillBlock to player->getBlock
		player->setBlock 1000
		set temp2 to player->getBlock - 1000
		set skillBlock to skillBlock - temp2
		
		if (skillBlock != baseBlock) ; If Block skill has changed, recalculate attributes
			set recalcSTR to 1
			set recalcAGI to 1
			set recalcEND to 1
		endif
		
		if (skillBlock > baseBlock)
			set temp to skillBlock
			set temp2 to 25 * masteryBlock
			set temp to temp + temp2
			
			if (temp < maxBlock)
				if (progressBlock < masteryBlock)
					set progressBlock to progressBlock + 1
				else
					set temp to temp + 1
					set skillBlock to skillBlock + 1
					set progressBlock to 0
					MessageBox "Your Block skill increased to %.0g.", temp
					set decayBlock to decayBlock / 2
				endif
			elseif (progressBlock >= masteryBlock)
				set maxBlock to temp
			endif
			
			if (progressBlock < masteryBlock)
				set skillBlock to skillBlock - 1
				player->setBlock skillBlock
				set progressBlock to progressBlock + 1
				set skillBlock to player->getBlock
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressBlock, (masteryBlock+1)
			elseif (skillBlock < 100)
				if (masteryBlock > 0)
					MessageBox "Your Block skill increased to %.0g.", temp
				endif
				set baseBlock to skillBlock
				player->setBlock skillBlock
				set progressBlock to 0
				set skillBlock to player->getBlock
				set decayBlock to decayBlock / 2
			else
				if (masteryBlock > 0)
					MessageBox "Your Block skill increased to %.0g.", temp
				endif
				set masteryBlock to masteryBlock + 1
				set baseBlock to skillBlock - 25
				player->setBlock baseBlock
				set progressBlock to 0
				set skillBlock to player->getBlock
				set decayBlock to decayBlock / 2

				set temp2 to masteryBlock
				
				player->removeSpell "NCGD_block25"
				player->removeSpell "NCGD_block50"
				player->removeSpell "NCGD_block100"
				player->removeSpell "NCGD_block200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_block200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_block100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_block50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_block25"
				endif
			endif
		elseif (masteryBlock > 0)
			if(skillBlock < 75)
				set masteryBlock to masteryBlock - 1
				set baseBlock to skillBlock + 25
				player->setBlock baseBlock
				set skillBlock to player->getBlock

				set temp2 to masteryBlock
				
				player->removeSpell "NCGD_block25"
				player->removeSpell "NCGD_block50"
				player->removeSpell "NCGD_block100"
				player->removeSpell "NCGD_block200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_block200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_block100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_block50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_block25"
				endif
			else
				set baseBlock to skillBlock
				player->setBlock skillBlock
				set skillBlock to player->getBlock
			endif
		else
			set baseBlock to skillBlock
			player->setBlock skillBlock
			set skillBlock to player->getBlock
		endif
	elseif (skillArmorer != player->getArmorer)
		set skillArmorer to player->getArmorer
		player->setArmorer 1000
		set temp2 to player->getArmorer - 1000
		set skillArmorer to skillArmorer - temp2
		
		if (skillArmorer != baseArmorer) ; If Armorer skill has changed, recalculate attributes
			set recalcSTR to 1
			set recalcEND to 1
			set recalcPER to 1
		endif
		
		if (skillArmorer > baseArmorer)
			set temp to skillArmorer
			set temp2 to 25 * masteryArmorer
			set temp to temp + temp2
			
			if (temp < maxArmorer)
				if (progressArmorer < masteryArmorer)
					set progressArmorer to progressArmorer + 1
				else
					set temp to temp + 1
					set skillArmorer to skillArmorer + 1
					set progressArmorer to 0
					MessageBox "Your Armorer skill increased to %.0g.", temp
					set decayArmorer to decayArmorer / 2
				endif
			elseif (progressArmorer >= masteryArmorer)
				set maxArmorer to temp
			endif
			
			if (progressArmorer < masteryArmorer)
				set skillArmorer to skillArmorer - 1
				player->setArmorer skillArmorer
				set progressArmorer to progressArmorer + 1
				set skillArmorer to player->getArmorer
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressArmorer, (masteryArmorer+1)
			elseif (skillArmorer < 100)
				if (masteryArmorer > 0)
					MessageBox "Your Armorer skill increased to %.0g.", temp
				endif
				set baseArmorer to skillArmorer
				player->setArmorer skillArmorer
				set progressArmorer to 0
				set skillArmorer to player->getArmorer
				set decayArmorer to decayArmorer / 2
			else
				if (masteryArmorer > 0)
					MessageBox "Your Armorer skill increased to %.0g.", temp
				endif
				set masteryArmorer to masteryArmorer + 1
				set baseArmorer to skillArmorer - 25
				player->setArmorer baseArmorer
				set progressArmorer to 0
				set skillArmorer to player->getArmorer
				set decayArmorer to decayArmorer / 2

				set temp2 to masteryArmorer
				
				player->removeSpell "NCGD_armorer25"
				player->removeSpell "NCGD_armorer50"
				player->removeSpell "NCGD_armorer100"
				player->removeSpell "NCGD_armorer200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_armorer200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_armorer100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_armorer50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_armorer25"
				endif
			endif
		elseif (masteryArmorer > 0)
			if(skillArmorer < 75)
				set masteryArmorer to masteryArmorer - 1
				set baseArmorer to skillArmorer + 25
				player->setArmorer baseArmorer
				set skillArmorer to player->getArmorer

				set temp2 to masteryArmorer
				
				player->removeSpell "NCGD_armorer25"
				player->removeSpell "NCGD_armorer50"
				player->removeSpell "NCGD_armorer100"
				player->removeSpell "NCGD_armorer200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_armorer200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_armorer100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_armorer50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_armorer25"
				endif
			else
				set baseArmorer to skillArmorer
				player->setArmorer skillArmorer
				set skillArmorer to player->getArmorer
			endif
		else
			set baseArmorer to skillArmorer
			player->setArmorer skillArmorer
			set skillArmorer to player->getArmorer
		endif
	elseif (skillMediumArmor != player->getMediumArmor)
		set skillMediumArmor to player->getMediumArmor
		player->setMediumArmor 1000
		set temp2 to player->getMediumArmor - 1000
		set skillMediumArmor to skillMediumArmor - temp2
		
		if (skillMediumArmor != baseMediumArmor) ; If MediumArmor skill has changed, recalculate attributes
			set recalcEND to 1
			set recalcSPE to 1
			set recalcWIL to 1
		endif
		
		if (skillMediumArmor > baseMediumArmor)
			set temp to skillMediumArmor
			set temp2 to 25 * masteryMediumArmor
			set temp to temp + temp2
			
			if (temp < maxMediumArmor)
				if (progressMediumArmor < masteryMediumArmor)
					set progressMediumArmor to progressMediumArmor + 1
				else
					set temp to temp + 1
					set skillMediumArmor to skillMediumArmor + 1
					set progressMediumArmor to 0
					MessageBox "Your Medium Armor skill increased to %.0g.", temp
					set decayMediumArmor to decayMediumArmor / 2
				endif
			elseif (progressMediumArmor >= masteryMediumArmor)
				set maxMediumArmor to temp
			endif
			
			if (progressMediumArmor < masteryMediumArmor)
				set skillMediumArmor to skillMediumArmor - 1
				player->setMediumArmor skillMediumArmor
				set progressMediumArmor to progressMediumArmor + 1
				set skillMediumArmor to player->getMediumArmor
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressMediumArmor, (masteryMediumArmor+1)
			elseif (skillMediumArmor < 100)
				if (masteryMediumArmor > 0)
					MessageBox "Your Medium Armor skill increased to %.0g.", temp
				endif
				set baseMediumArmor to skillMediumArmor
				player->setMediumArmor skillMediumArmor
				set progressMediumArmor to 0
				set skillMediumArmor to player->getMediumArmor
				set decayMediumArmor to decayMediumArmor / 2
			else
				if (masteryMediumArmor > 0)
					MessageBox "Your Medium Armor skill increased to %.0g.", temp
				endif
				set masteryMediumArmor to masteryMediumArmor + 1
				set baseMediumArmor to skillMediumArmor - 25
				player->setMediumArmor baseMediumArmor
				set progressMediumArmor to 0
				set skillMediumArmor to player->getMediumArmor
				set decayMediumArmor to decayMediumArmor / 2

				set temp2 to masteryMediumArmor
				
				player->removeSpell "NCGD_mediumarmor25"
				player->removeSpell "NCGD_mediumarmor50"
				player->removeSpell "NCGD_mediumarmor100"
				player->removeSpell "NCGD_mediumarmor200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_mediumarmor200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_mediumarmor100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_mediumarmor50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_mediumarmor25"
				endif
			endif
		elseif (masteryMediumArmor > 0)
			if(skillMediumArmor < 75)
				set masteryMediumArmor to masteryMediumArmor - 1
				set baseMediumArmor to skillMediumArmor + 25
				player->setMediumArmor baseMediumArmor
				set skillMediumArmor to player->getMediumArmor

				set temp2 to masteryMediumArmor
				
				player->removeSpell "NCGD_mediumarmor25"
				player->removeSpell "NCGD_mediumarmor50"
				player->removeSpell "NCGD_mediumarmor100"
				player->removeSpell "NCGD_mediumarmor200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_mediumarmor200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_mediumarmor100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_mediumarmor50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_mediumarmor25"
				endif
			else
				set baseMediumArmor to skillMediumArmor
				player->setMediumArmor skillMediumArmor
				set skillMediumArmor to player->getMediumArmor
			endif
		else
			set baseMediumArmor to skillMediumArmor
			player->setMediumArmor skillMediumArmor
			set skillMediumArmor to player->getMediumArmor
		endif
	elseif (skillHeavyArmor != player->getHeavyArmor)
		set skillHeavyArmor to player->getHeavyArmor
		player->setHeavyArmor 1000
		set temp2 to player->getHeavyArmor - 1000
		set skillHeavyArmor to skillHeavyArmor - temp2
		
		if (skillHeavyArmor != baseHeavyArmor) ; If HeavyArmor skill has changed, recalculate attributes
			set recalcSTR to 1
			set recalcEND to 1
			set recalcSPE to 1
		endif
		
		if (skillHeavyArmor > baseHeavyArmor)
			set temp to skillHeavyArmor
			set temp2 to 25 * masteryHeavyArmor
			set temp to temp + temp2
			
			if (temp < maxHeavyArmor)
				if (progressHeavyArmor < masteryHeavyArmor)
					set progressHeavyArmor to progressHeavyArmor + 1
				else
					set temp to temp + 1
					set skillHeavyArmor to skillHeavyArmor + 1
					set progressHeavyArmor to 0
					MessageBox "Your Heavy Armor skill increased to %.0g.", temp
					set decayHeavyArmor to decayHeavyArmor / 2
				endif
			elseif (progressHeavyArmor >= masteryHeavyArmor)
				set maxHeavyArmor to temp
			endif
			
			if (progressHeavyArmor < masteryHeavyArmor)
				set skillHeavyArmor to skillHeavyArmor - 1
				player->setHeavyArmor skillHeavyArmor
				set progressHeavyArmor to progressHeavyArmor + 1
				set skillHeavyArmor to player->getHeavyArmor
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressHeavyArmor, (masteryHeavyArmor+1)
			elseif (skillHeavyArmor < 100)
				if (masteryHeavyArmor > 0)
					MessageBox "Your Heavy Armor skill increased to %.0g.", temp
				endif
				set baseHeavyArmor to skillHeavyArmor
				player->setHeavyArmor skillHeavyArmor
				set progressHeavyArmor to 0
				set skillHeavyArmor to player->getHeavyArmor
				set decayHeavyArmor to decayHeavyArmor / 2
			else
				if (masteryHeavyArmor > 0)
					MessageBox "Your Heavy Armor skill increased to %.0g.", temp
				endif
				set masteryHeavyArmor to masteryHeavyArmor + 1
				set baseHeavyArmor to skillHeavyArmor - 25
				player->setHeavyArmor baseHeavyArmor
				set progressHeavyArmor to 0
				set skillHeavyArmor to player->getHeavyArmor
				set decayHeavyArmor to decayHeavyArmor / 2

				set temp2 to masteryHeavyArmor
				
				player->removeSpell "NCGD_heavyarmor25"
				player->removeSpell "NCGD_heavyarmor50"
				player->removeSpell "NCGD_heavyarmor100"
				player->removeSpell "NCGD_heavyarmor200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_heavyarmor200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_heavyarmor100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_heavyarmor50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_heavyarmor25"
				endif
			endif
		elseif (masteryHeavyArmor > 0)
			if(skillHeavyArmor < 75)
				set masteryHeavyArmor to masteryHeavyArmor - 1
				set baseHeavyArmor to skillHeavyArmor + 25
				player->setHeavyArmor baseHeavyArmor
				set skillHeavyArmor to player->getHeavyArmor

				set temp2 to masteryHeavyArmor
				
				player->removeSpell "NCGD_heavyarmor25"
				player->removeSpell "NCGD_heavyarmor50"
				player->removeSpell "NCGD_heavyarmor100"
				player->removeSpell "NCGD_heavyarmor200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_heavyarmor200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_heavyarmor100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_heavyarmor50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_heavyarmor25"
				endif
			else
				set baseHeavyArmor to skillHeavyArmor
				player->setHeavyArmor skillHeavyArmor
				set skillHeavyArmor to player->getHeavyArmor
			endif
		else
			set baseHeavyArmor to skillHeavyArmor
			player->setHeavyArmor skillHeavyArmor
			set skillHeavyArmor to player->getHeavyArmor
		endif
	elseif (skillBluntWeapon != player->getBluntWeapon)
		set skillBluntWeapon to player->getBluntWeapon
		player->setBluntWeapon 1000
		set temp2 to player->getBluntWeapon - 1000
		set skillBluntWeapon to skillBluntWeapon - temp2
		
		if (skillBluntWeapon != baseBluntWeapon) ; If BluntWeapon skill has changed, recalculate attributes
			set recalcSTR to 1
			set recalcEND to 1
			set recalcWIL to 1
		endif
		
		if (skillBluntWeapon > baseBluntWeapon)
			set temp to skillBluntWeapon
			set temp2 to 25 * masteryBluntWeapon
			set temp to temp + temp2
			
			if (temp < maxBluntWeapon)
				if (progressBluntWeapon < masteryBluntWeapon)
					set progressBluntWeapon to progressBluntWeapon + 1
				else
					set temp to temp + 1
					set skillBluntWeapon to skillBluntWeapon + 1
					set progressBluntWeapon to 0
					MessageBox "Your Blunt Weapon skill increased to %.0g.", temp
					set decayBluntWeapon to decayBluntWeapon / 2
				endif
			elseif (progressBluntWeapon >= masteryBluntWeapon)
				set maxBluntWeapon to temp
			endif
			
			if (progressBluntWeapon < masteryBluntWeapon)
				set skillBluntWeapon to skillBluntWeapon - 1
				player->setBluntWeapon skillBluntWeapon
				set progressBluntWeapon to progressBluntWeapon + 1
				set skillBluntWeapon to player->getBluntWeapon
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressBluntWeapon, (masteryBluntWeapon+1)
			elseif (skillBluntWeapon < 100)
				if (masteryBluntWeapon > 0)
					MessageBox "Your Blunt Weapon skill increased to %.0g.", temp
				endif
				set baseBluntWeapon to skillBluntWeapon
				player->setBluntWeapon skillBluntWeapon
				set progressBluntWeapon to 0
				set skillBluntWeapon to player->getBluntWeapon
				set decayBluntWeapon to decayBluntWeapon / 2
			else
				if (masteryBluntWeapon > 0)
					MessageBox "Your Blunt Weapon skill increased to %.0g.", temp
				endif
				set masteryBluntWeapon to masteryBluntWeapon + 1
				set baseBluntWeapon to skillBluntWeapon - 25
				player->setBluntWeapon baseBluntWeapon
				set progressBluntWeapon to 0
				set skillBluntWeapon to player->getBluntWeapon
				set decayBluntWeapon to decayBluntWeapon / 2

				set temp2 to masteryBluntWeapon
				
				player->removeSpell "NCGD_bluntweapon25"
				player->removeSpell "NCGD_bluntweapon50"
				player->removeSpell "NCGD_bluntweapon100"
				player->removeSpell "NCGD_bluntweapon200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_bluntweapon200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_bluntweapon100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_bluntweapon50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_bluntweapon25"
				endif
			endif
		elseif (masteryBluntWeapon > 0)
			if(skillBluntWeapon < 75)
				set masteryBluntWeapon to masteryBluntWeapon - 1
				set baseBluntWeapon to skillBluntWeapon + 25
				player->setBluntWeapon baseBluntWeapon
				set skillBluntWeapon to player->getBluntWeapon

				set temp2 to masteryBluntWeapon
				
				player->removeSpell "NCGD_bluntweapon25"
				player->removeSpell "NCGD_bluntweapon50"
				player->removeSpell "NCGD_bluntweapon100"
				player->removeSpell "NCGD_bluntweapon200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_bluntweapon200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_bluntweapon100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_bluntweapon50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_bluntweapon25"
				endif
			else
				set baseBluntWeapon to skillBluntWeapon
				player->setBluntWeapon skillBluntWeapon
				set skillBluntWeapon to player->getBluntWeapon
			endif
		else
			set baseBluntWeapon to skillBluntWeapon
			player->setBluntWeapon skillBluntWeapon
			set skillBluntWeapon to player->getBluntWeapon
		endif
	elseif (skillLongBlade != player->getLongBlade)
		set skillLongBlade to player->getLongBlade
		player->setLongBlade 1000
		set temp2 to player->getLongBlade - 1000
		set skillLongBlade to skillLongBlade - temp2
		
		if (skillLongBlade != baseLongBlade) ; If LongBlade skill has changed, recalculate attributes
			set recalcSTR to 1
			set recalcAGI to 1
			set recalcSPE to 1
		endif
		
		if (skillLongBlade > baseLongBlade)
			set temp to skillLongBlade
			set temp2 to 25 * masteryLongBlade
			set temp to temp + temp2
			
			if (temp < maxLongBlade)
				if (progressLongBlade < masteryLongBlade)
					set progressLongBlade to progressLongBlade + 1
				else
					set temp to temp + 1
					set skillLongBlade to skillLongBlade + 1
					set progressLongBlade to 0
					MessageBox "Your Long Blade skill increased to %.0g.", temp
					set decayLongBlade to decayLongBlade / 2
				endif
			elseif (progressLongBlade >= masteryLongBlade)
				set maxLongBlade to temp
			endif
			
			if (progressLongBlade < masteryLongBlade)
				set skillLongBlade to skillLongBlade - 1
				player->setLongBlade skillLongBlade
				set progressLongBlade to progressLongBlade + 1
				set skillLongBlade to player->getLongBlade
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressLongBlade, (masteryLongBlade+1)
			elseif (skillLongBlade < 100)
				if (masteryLongBlade > 0)
					MessageBox "Your Long Blade skill increased to %.0g.", temp
				endif
				set baseLongBlade to skillLongBlade
				player->setLongBlade skillLongBlade
				set progressLongBlade to 0
				set skillLongBlade to player->getLongBlade
				set decayLongBlade to decayLongBlade / 2
			else
				if (masteryLongBlade > 0)
					MessageBox "Your Long Blade skill increased to %.0g.", temp
				endif
				set masteryLongBlade to masteryLongBlade + 1
				set baseLongBlade to skillLongBlade - 25
				player->setLongBlade baseLongBlade
				set progressLongBlade to 0
				set skillLongBlade to player->getLongBlade
				set decayLongBlade to decayLongBlade / 2

				set temp2 to masteryLongBlade
				
				player->removeSpell "NCGD_longblade25"
				player->removeSpell "NCGD_longblade50"
				player->removeSpell "NCGD_longblade100"
				player->removeSpell "NCGD_longblade200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_longblade200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_longblade100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_longblade50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_longblade25"
				endif
			endif
		elseif (masteryLongBlade > 0)
			if(skillLongBlade < 75)
				set masteryLongBlade to masteryLongBlade - 1
				set baseLongBlade to skillLongBlade + 25
				player->setLongBlade baseLongBlade
				set skillLongBlade to player->getLongBlade

				set temp2 to masteryLongBlade
				
				player->removeSpell "NCGD_longblade25"
				player->removeSpell "NCGD_longblade50"
				player->removeSpell "NCGD_longblade100"
				player->removeSpell "NCGD_longblade200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_longblade200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_longblade100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_longblade50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_longblade25"
				endif
			else
				set baseLongBlade to skillLongBlade
				player->setLongBlade skillLongBlade
				set skillLongBlade to player->getLongBlade
			endif
		else
			set baseLongBlade to skillLongBlade
			player->setLongBlade skillLongBlade
			set skillLongBlade to player->getLongBlade
		endif
	elseif (skillAxe != player->getAxe)
		set skillAxe to player->getAxe
		player->setAxe 1000
		set temp2 to player->getAxe - 1000
		set skillAxe to skillAxe - temp2
		
		if (skillAxe != baseAxe) ; If Axe skill has changed, recalculate attributes
			set recalcSTR to 1
			set recalcAGI to 1
			set recalcWIL to 1
		endif
		
		if (skillAxe > baseAxe)
			set temp to skillAxe
			set temp2 to 25 * masteryAxe
			set temp to temp + temp2
			
			if (temp < maxAxe)
				if (progressAxe < masteryAxe)
					set progressAxe to progressAxe + 1
				else
					set temp to temp + 1
					set skillAxe to skillAxe + 1
					set progressAxe to 0
					MessageBox "Your Axe skill increased to %.0g.", temp
					set decayAxe to decayAxe / 2
				endif
			elseif (progressAxe >= masteryAxe)
				set maxAxe to temp
			endif
			
			if (progressAxe < masteryAxe)
				set skillAxe to skillAxe - 1
				player->setAxe skillAxe
				set progressAxe to progressAxe + 1
				set skillAxe to player->getAxe
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressAxe, (masteryAxe+1)
			elseif (skillAxe < 100)
				if (masteryAxe > 0)
					MessageBox "Your Axe skill increased to %.0g.", temp
				endif
				set baseAxe to skillAxe
				player->setAxe skillAxe
				set progressAxe to 0
				set skillAxe to player->getAxe
				set decayAxe to decayAxe / 2
			else
				if (masteryAxe > 0)
					MessageBox "Your Axe skill increased to %.0g.", temp
				endif
				set masteryAxe to masteryAxe + 1
				set baseAxe to skillAxe - 25
				player->setAxe baseAxe
				set progressAxe to 0
				set skillAxe to player->getAxe
				set decayAxe to decayAxe / 2

				set temp2 to masteryAxe
				
				player->removeSpell "NCGD_axe25"
				player->removeSpell "NCGD_axe50"
				player->removeSpell "NCGD_axe100"
				player->removeSpell "NCGD_axe200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_axe200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_axe100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_axe50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_axe25"
				endif
			endif
		elseif (masteryAxe > 0)
			if(skillAxe < 75)
				set masteryAxe to masteryAxe - 1
				set baseAxe to skillAxe + 25
				player->setAxe baseAxe
				set skillAxe to player->getAxe

				set temp2 to masteryAxe
				
				player->removeSpell "NCGD_axe25"
				player->removeSpell "NCGD_axe50"
				player->removeSpell "NCGD_axe100"
				player->removeSpell "NCGD_axe200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_axe200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_axe100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_axe50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_axe25"
				endif
			else
				set baseAxe to skillAxe
				player->setAxe skillAxe
				set skillAxe to player->getAxe
			endif
		else
			set baseAxe to skillAxe
			player->setAxe skillAxe
			set skillAxe to player->getAxe
		endif
	elseif (skillSpear != player->getSpear)
		set skillSpear to player->getSpear
		player->setSpear 1000
		set temp2 to player->getSpear - 1000
		set skillSpear to skillSpear - temp2
		
		if (skillSpear != baseSpear) ; If Spear skill has changed, recalculate attributes
			set recalcSTR to 1
			set recalcEND to 1
			set recalcSPE to 1
		endif
		
		if (skillSpear > baseSpear)
			set temp to skillSpear
			set temp2 to 25 * masterySpear
			set temp to temp + temp2
			
			if (temp < maxSpear)
				if (progressSpear < masterySpear)
					set progressSpear to progressSpear + 1
				else
					set temp to temp + 1
					set skillSpear to skillSpear + 1
					set progressSpear to 0
					MessageBox "Your Spear skill increased to %.0g.", temp
					set decaySpear to decaySpear / 2
				endif
			elseif (progressSpear >= masterySpear)
				set maxSpear to temp
			endif
			
			if (progressSpear < masterySpear)
				set skillSpear to skillSpear - 1
				player->setSpear skillSpear
				set progressSpear to progressSpear + 1
				set skillSpear to player->getSpear
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressSpear, (masterySpear+1)
			elseif (skillSpear < 100)
				if (masterySpear > 0)
					MessageBox "Your Spear skill increased to %.0g.", temp
				endif
				set baseSpear to skillSpear
				player->setSpear skillSpear
				set progressSpear to 0
				set skillSpear to player->getSpear
				set decaySpear to decaySpear / 2
			else
				if (masterySpear > 0)
					MessageBox "Your Spear skill increased to %.0g.", temp
				endif
				set masterySpear to masterySpear + 1
				set baseSpear to skillSpear - 25
				player->setSpear baseSpear
				set progressSpear to 0
				set skillSpear to player->getSpear
				set decaySpear to decaySpear / 2

				set temp2 to masterySpear
				
				player->removeSpell "NCGD_spear25"
				player->removeSpell "NCGD_spear50"
				player->removeSpell "NCGD_spear100"
				player->removeSpell "NCGD_spear200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_spear200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_spear100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_spear50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_spear25"
				endif
			endif
		elseif (masterySpear > 0)
			if(skillSpear < 75)
				set masterySpear to masterySpear - 1
				set baseSpear to skillSpear + 25
				player->setSpear baseSpear
				set skillSpear to player->getSpear

				set temp2 to masterySpear
				
				player->removeSpell "NCGD_spear25"
				player->removeSpell "NCGD_spear50"
				player->removeSpell "NCGD_spear100"
				player->removeSpell "NCGD_spear200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_spear200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_spear100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_spear50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_spear25"
				endif
			else
				set baseSpear to skillSpear
				player->setSpear skillSpear
				set skillSpear to player->getSpear
			endif
		else
			set baseSpear to skillSpear
			player->setSpear skillSpear
			set skillSpear to player->getSpear
		endif
	elseif (skillAthletics != player->getAthletics)
		set skillAthletics to player->getAthletics
		player->setAthletics 1000
		set temp2 to player->getAthletics - 1000
		set skillAthletics to skillAthletics - temp2
		
		if (skillAthletics != baseAthletics) ; If Athletics skill has changed, recalculate attributes
			set recalcEND to 1
			set recalcSPE to 1
			set recalcWIL to 1
		endif
		
		if (skillAthletics > baseAthletics)
			set temp to skillAthletics
			set temp2 to 25 * masteryAthletics
			set temp to temp + temp2
			
			if (temp < maxAthletics)
				if (progressAthletics < masteryAthletics)
					set progressAthletics to progressAthletics + 1
				else
					set temp to temp + 1
					set skillAthletics to skillAthletics + 1
					set progressAthletics to 0
					MessageBox "Your Athletics skill increased to %.0g.", temp
					set decayAthletics to decayAthletics / 2
				endif
			elseif (progressAthletics >= masteryAthletics)
				set maxAthletics to temp
			endif
			
			if (progressAthletics < masteryAthletics)
				set skillAthletics to skillAthletics - 1
				player->setAthletics skillAthletics
				set progressAthletics to progressAthletics + 1
				set skillAthletics to player->getAthletics
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressAthletics, (masteryAthletics+1)
			elseif (skillAthletics < 100)
				if (masteryAthletics > 0)
					MessageBox "Your Athletics skill increased to %.0g.", temp
				endif
				set baseAthletics to skillAthletics
				player->setAthletics skillAthletics
				set progressAthletics to 0
				set skillAthletics to player->getAthletics
				set decayAthletics to decayAthletics / 2
			else
				if (masteryAthletics > 0)
					MessageBox "Your Athletics skill increased to %.0g.", temp
				endif
				set masteryAthletics to masteryAthletics + 1
				set baseAthletics to skillAthletics - 25
				player->setAthletics baseAthletics
				set progressAthletics to 0
				set skillAthletics to player->getAthletics
				set decayAthletics to decayAthletics / 2

				set temp2 to masteryAthletics
				
				player->removeSpell "NCGD_athletics25"
				player->removeSpell "NCGD_athletics50"
				player->removeSpell "NCGD_athletics100"
				player->removeSpell "NCGD_athletics200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_athletics200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_athletics100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_athletics50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_athletics25"
				endif
			endif
		elseif (masteryAthletics > 0)
			if(skillAthletics < 75)
				set masteryAthletics to masteryAthletics - 1
				set baseAthletics to skillAthletics + 25
				player->setAthletics baseAthletics
				set skillAthletics to player->getAthletics

				set temp2 to masteryAthletics
				
				player->removeSpell "NCGD_athletics25"
				player->removeSpell "NCGD_athletics50"
				player->removeSpell "NCGD_athletics100"
				player->removeSpell "NCGD_athletics200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_athletics200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_athletics100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_athletics50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_athletics25"
				endif
			else
				set baseAthletics to skillAthletics
				player->setAthletics skillAthletics
				set skillAthletics to player->getAthletics
			endif
		else
			set baseAthletics to skillAthletics
			player->setAthletics skillAthletics
			set skillAthletics to player->getAthletics
		endif
	
	; Magic skill check
	elseif (skillEnchant != player->getEnchant)
		set skillEnchant to player->getEnchant
		player->setEnchant 1000
		set temp2 to player->getEnchant - 1000
		set skillEnchant to skillEnchant - temp2
		
		if (skillEnchant != baseEnchant) ; If Enchant skill has changed, recalculate attributes
			set recalcINT to 1
			set recalcWIL to 1
			set recalcPER to 1
		endif
		
		if (skillEnchant > baseEnchant)
			set temp to skillEnchant
			set temp2 to 25 * masteryEnchant
			set temp to temp + temp2
			
			if (temp < maxEnchant)
				if (progressEnchant < masteryEnchant)
					set progressEnchant to progressEnchant + 1
				else
					set temp to temp + 1
					set skillEnchant to skillEnchant + 1
					set progressEnchant to 0
					MessageBox "Your Enchant skill increased to %.0g.", temp
					set decayEnchant to decayEnchant / 2
				endif
			elseif (progressEnchant >= masteryEnchant)
				set maxEnchant to temp
			endif
			
			if (progressEnchant < masteryEnchant)
				set skillEnchant to skillEnchant - 1
				player->setEnchant skillEnchant
				set progressEnchant to progressEnchant + 1
				set skillEnchant to player->getEnchant
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressEnchant, (masteryEnchant+1)
			elseif (skillEnchant < 100)
				if (masteryEnchant > 0)
					MessageBox "Your Enchant skill increased to %.0g.", temp
				endif
				set baseEnchant to skillEnchant
				player->setEnchant skillEnchant
				set progressEnchant to 0
				set skillEnchant to player->getEnchant
				set decayEnchant to decayEnchant / 2
			else
				if (masteryEnchant > 0)
					MessageBox "Your Enchant skill increased to %.0g.", temp
				endif
				set masteryEnchant to masteryEnchant + 1
				set baseEnchant to skillEnchant - 25
				player->setEnchant baseEnchant
				set progressEnchant to 0
				set skillEnchant to player->getEnchant
				set decayEnchant to decayEnchant / 2

				set temp2 to masteryEnchant
				
				player->removeSpell "NCGD_enchant25"
				player->removeSpell "NCGD_enchant50"
				player->removeSpell "NCGD_enchant100"
				player->removeSpell "NCGD_enchant200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_enchant200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_enchant100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_enchant50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_enchant25"
				endif
			endif
		elseif (masteryEnchant > 0)
			if(skillEnchant < 75)
				set masteryEnchant to masteryEnchant - 1
				set baseEnchant to skillEnchant + 25
				player->setEnchant baseEnchant
				set skillEnchant to player->getEnchant

				set temp2 to masteryEnchant
				
				player->removeSpell "NCGD_enchant25"
				player->removeSpell "NCGD_enchant50"
				player->removeSpell "NCGD_enchant100"
				player->removeSpell "NCGD_enchant200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_enchant200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_enchant100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_enchant50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_enchant25"
				endif
			else
				set baseEnchant to skillEnchant
				player->setEnchant skillEnchant
				set skillEnchant to player->getEnchant
			endif
		else
			set baseEnchant to skillEnchant
			player->setEnchant skillEnchant
			set skillEnchant to player->getEnchant
		endif
	elseif (skillDestruction != player->getDestruction)
		set skillDestruction to player->getDestruction
		player->setDestruction 1000
		set temp2 to player->getDestruction - 1000
		set skillDestruction to skillDestruction - temp2
		
		if (skillDestruction != baseDestruction) ; If Destruction skill has changed, recalculate attributes
			set recalcINT to 1
			set recalcWIL to 1
			set recalcPER to 1
		endif
		
		if (skillDestruction > baseDestruction)
			set temp to skillDestruction
			set temp2 to 25 * masteryDestruction
			set temp to temp + temp2
			
			if (temp < maxDestruction)
				if (progressDestruction < masteryDestruction)
					set progressDestruction to progressDestruction + 1
				else
					set temp to temp + 1
					set skillDestruction to skillDestruction + 1
					set progressDestruction to 0
					MessageBox "Your Destruction skill increased to %.0g.", temp
					set decayDestruction to decayDestruction / 2
				endif
			elseif (progressDestruction >= masteryDestruction)
				set maxDestruction to temp
			endif
			
			if (progressDestruction < masteryDestruction)
				set skillDestruction to skillDestruction - 1
				player->setDestruction skillDestruction
				set progressDestruction to progressDestruction + 1
				set skillDestruction to player->getDestruction
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressDestruction, (masteryDestruction+1)
			elseif (skillDestruction < 100)
				if (masteryDestruction > 0)
					MessageBox "Your Destruction skill increased to %.0g.", temp
				endif
				set baseDestruction to skillDestruction
				player->setDestruction skillDestruction
				set progressDestruction to 0
				set skillDestruction to player->getDestruction
				set decayDestruction to decayDestruction / 2
			else
				if (masteryDestruction > 0)
					MessageBox "Your Destruction skill increased to %.0g.", temp
				endif
				set masteryDestruction to masteryDestruction + 1
				set baseDestruction to skillDestruction - 25
				player->setDestruction baseDestruction
				set progressDestruction to 0
				set skillDestruction to player->getDestruction
				set decayDestruction to decayDestruction / 2

				set temp2 to masteryDestruction
				
				player->removeSpell "NCGD_destruction25"
				player->removeSpell "NCGD_destruction50"
				player->removeSpell "NCGD_destruction100"
				player->removeSpell "NCGD_destruction200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_destruction200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_destruction100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_destruction50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_destruction25"
				endif
			endif
		elseif (masteryDestruction > 0)
			if(skillDestruction < 75)
				set masteryDestruction to masteryDestruction - 1
				set baseDestruction to skillDestruction + 25
				player->setDestruction baseDestruction
				set skillDestruction to player->getDestruction

				set temp2 to masteryDestruction
				
				player->removeSpell "NCGD_destruction25"
				player->removeSpell "NCGD_destruction50"
				player->removeSpell "NCGD_destruction100"
				player->removeSpell "NCGD_destruction200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_destruction200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_destruction100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_destruction50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_destruction25"
				endif
			else
				set baseDestruction to skillDestruction
				player->setDestruction skillDestruction
				set skillDestruction to player->getDestruction
			endif
		else
			set baseDestruction to skillDestruction
			player->setDestruction skillDestruction
			set skillDestruction to player->getDestruction
		endif
	elseif (skillAlteration != player->getAlteration)
		set skillAlteration to player->getAlteration
		player->setAlteration 1000
		set temp2 to player->getAlteration - 1000
		set skillAlteration to skillAlteration - temp2
		
		if (skillAlteration != baseAlteration) ; If Alteration skill has changed, recalculate attributes
			set recalcSPE to 1
			set recalcINT to 1
			set recalcWIL to 1
		endif
		
		if (skillAlteration > baseAlteration)
			set temp to skillAlteration
			set temp2 to 25 * masteryAlteration
			set temp to temp + temp2
			
			if (temp < maxAlteration)
				if (progressAlteration < masteryAlteration)
					set progressAlteration to progressAlteration + 1
				else
					set temp to temp + 1
					set skillAlteration to skillAlteration + 1
					set progressAlteration to 0
					MessageBox "Your Alteration skill increased to %.0g.", temp
					set decayAlteration to decayAlteration / 2
				endif
			elseif (progressAlteration >= masteryAlteration)
				set maxAlteration to temp
			endif
			
			if (progressAlteration < masteryAlteration)
				set skillAlteration to skillAlteration - 1
				player->setAlteration skillAlteration
				set progressAlteration to progressAlteration + 1
				set skillAlteration to player->getAlteration
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressAlteration, (masteryAlteration+1)
			elseif (skillAlteration < 100)
				if (masteryAlteration > 0)
					MessageBox "Your Alteration skill increased to %.0g.", temp
				endif
				set baseAlteration to skillAlteration
				player->setAlteration skillAlteration
				set progressAlteration to 0
				set skillAlteration to player->getAlteration
				set decayAlteration to decayAlteration / 2
			else
				if (masteryAlteration > 0)
					MessageBox "Your Alteration skill increased to %.0g.", temp
				endif
				set masteryAlteration to masteryAlteration + 1
				set baseAlteration to skillAlteration - 25
				player->setAlteration baseAlteration
				set progressAlteration to 0
				set skillAlteration to player->getAlteration
				set decayAlteration to decayAlteration / 2

				set temp2 to masteryAlteration
				
				player->removeSpell "NCGD_alteration25"
				player->removeSpell "NCGD_alteration50"
				player->removeSpell "NCGD_alteration100"
				player->removeSpell "NCGD_alteration200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_alteration200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_alteration100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_alteration50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_alteration25"
				endif
			endif
		elseif (masteryAlteration > 0)
			if(skillAlteration < 75)
				set masteryAlteration to masteryAlteration - 1
				set baseAlteration to skillAlteration + 25
				player->setAlteration baseAlteration
				set skillAlteration to player->getAlteration

				set temp2 to masteryAlteration
				
				player->removeSpell "NCGD_alteration25"
				player->removeSpell "NCGD_alteration50"
				player->removeSpell "NCGD_alteration100"
				player->removeSpell "NCGD_alteration200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_alteration200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_alteration100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_alteration50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_alteration25"
				endif
			else
				set baseAlteration to skillAlteration
				player->setAlteration skillAlteration
				set skillAlteration to player->getAlteration
			endif
		else
			set baseAlteration to skillAlteration
			player->setAlteration skillAlteration
			set skillAlteration to player->getAlteration
		endif
	elseif (skillIllusion != player->getIllusion)
		set skillIllusion to player->getIllusion
		player->setIllusion 1000
		set temp2 to player->getIllusion - 1000
		set skillIllusion to skillIllusion - temp2
		
		if (skillIllusion != baseIllusion) ; If Illusion skill has changed, recalculate attributes
			set recalcAGI to 1
			set recalcINT to 1
			set recalcPER to 1
		endif
		
		if (skillIllusion > baseIllusion)
			set temp to skillIllusion
			set temp2 to 25 * masteryIllusion
			set temp to temp + temp2
			
			if (temp < maxIllusion)
				if (progressIllusion < masteryIllusion)
					set progressIllusion to progressIllusion + 1
				else
					set temp to temp + 1
					set skillIllusion to skillIllusion + 1
					set progressIllusion to 0
					MessageBox "Your Illusion skill increased to %.0g.", temp
					set decayIllusion to decayIllusion / 2
				endif
			elseif (progressIllusion >= masteryIllusion)
				set maxIllusion to temp
			endif
			
			if (progressIllusion < masteryIllusion)
				set skillIllusion to skillIllusion - 1
				player->setIllusion skillIllusion
				set progressIllusion to progressIllusion + 1
				set skillIllusion to player->getIllusion
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressIllusion, (masteryIllusion+1)
			elseif (skillIllusion < 100)
				if (masteryIllusion > 0)
					MessageBox "Your Illusion skill increased to %.0g.", temp
				endif
				set baseIllusion to skillIllusion
				player->setIllusion skillIllusion
				set progressIllusion to 0
				set skillIllusion to player->getIllusion
				set decayIllusion to decayIllusion / 2
			else
				if (masteryIllusion > 0)
					MessageBox "Your Illusion skill increased to %.0g.", temp
				endif
				set masteryIllusion to masteryIllusion + 1
				set baseIllusion to skillIllusion - 25
				player->setIllusion baseIllusion
				set progressIllusion to 0
				set skillIllusion to player->getIllusion
				set decayIllusion to decayIllusion / 2

				set temp2 to masteryIllusion
				
				player->removeSpell "NCGD_illusion25"
				player->removeSpell "NCGD_illusion50"
				player->removeSpell "NCGD_illusion100"
				player->removeSpell "NCGD_illusion200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_illusion200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_illusion100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_illusion50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_illusion25"
				endif
			endif
		elseif (masteryIllusion > 0)
			if(skillIllusion < 75)
				set masteryIllusion to masteryIllusion - 1
				set baseIllusion to skillIllusion + 25
				player->setIllusion baseIllusion
				set skillIllusion to player->getIllusion

				set temp2 to masteryIllusion
				
				player->removeSpell "NCGD_illusion25"
				player->removeSpell "NCGD_illusion50"
				player->removeSpell "NCGD_illusion100"
				player->removeSpell "NCGD_illusion200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_illusion200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_illusion100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_illusion50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_illusion25"
				endif
			else
				set baseIllusion to skillIllusion
				player->setIllusion skillIllusion
				set skillIllusion to player->getIllusion
			endif
		else
			set baseIllusion to skillIllusion
			player->setIllusion skillIllusion
			set skillIllusion to player->getIllusion
		endif
	elseif (skillConjuration != player->getConjuration)
		set skillConjuration to player->getConjuration
		player->setConjuration 1000
		set temp2 to player->getConjuration - 1000
		set skillConjuration to skillConjuration - temp2
		
		if (skillConjuration != baseConjuration) ; If Conjuration skill has changed, recalculate attributes
			set recalcINT to 1
			set recalcWIL to 1
			set recalcPER to 1
		endif
		
		if (skillConjuration > baseConjuration)
			set temp to skillConjuration
			set temp2 to 25 * masteryConjuration
			set temp to temp + temp2
			
			if (temp < maxConjuration)
				if (progressConjuration < masteryConjuration)
					set progressConjuration to progressConjuration + 1
				else
					set temp to temp + 1
					set skillConjuration to skillConjuration + 1
					set progressConjuration to 0
					MessageBox "Your Conjuration skill increased to %.0g.", temp
					set decayConjuration to decayConjuration / 2
				endif
			elseif (progressConjuration >= masteryConjuration)
				set maxConjuration to temp
			endif
			
			if (progressConjuration < masteryConjuration)
				set skillConjuration to skillConjuration - 1
				player->setConjuration skillConjuration
				set progressConjuration to progressConjuration + 1
				set skillConjuration to player->getConjuration
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressConjuration, (masteryConjuration+1)
			elseif (skillConjuration < 100)
				if (masteryConjuration > 0)
					MessageBox "Your Conjuration skill increased to %.0g.", temp
				endif
				set baseConjuration to skillConjuration
				player->setConjuration skillConjuration
				set progressConjuration to 0
				set skillConjuration to player->getConjuration
				set decayConjuration to decayConjuration / 2
			else
				if (masteryConjuration > 0)
					MessageBox "Your Conjuration skill increased to %.0g.", temp
				endif
				set masteryConjuration to masteryConjuration + 1
				set baseConjuration to skillConjuration - 25
				player->setConjuration baseConjuration
				set progressConjuration to 0
				set skillConjuration to player->getConjuration
				set decayConjuration to decayConjuration / 2

				set temp2 to masteryConjuration
				
				player->removeSpell "NCGD_conjuration25"
				player->removeSpell "NCGD_conjuration50"
				player->removeSpell "NCGD_conjuration100"
				player->removeSpell "NCGD_conjuration200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_conjuration200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_conjuration100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_conjuration50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_conjuration25"
				endif
			endif
		elseif (masteryConjuration > 0)
			if(skillConjuration < 75)
				set masteryConjuration to masteryConjuration - 1
				set baseConjuration to skillConjuration + 25
				player->setConjuration baseConjuration
				set skillConjuration to player->getConjuration

				set temp2 to masteryConjuration
				
				player->removeSpell "NCGD_conjuration25"
				player->removeSpell "NCGD_conjuration50"
				player->removeSpell "NCGD_conjuration100"
				player->removeSpell "NCGD_conjuration200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_conjuration200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_conjuration100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_conjuration50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_conjuration25"
				endif
			else
				set baseConjuration to skillConjuration
				player->setConjuration skillConjuration
				set skillConjuration to player->getConjuration
			endif
		else
			set baseConjuration to skillConjuration
			player->setConjuration skillConjuration
			set skillConjuration to player->getConjuration
		endif
	elseif (skillMysticism != player->getMysticism)
		set skillMysticism to player->getMysticism
		player->setMysticism 1000
		set temp2 to player->getMysticism - 1000
		set skillMysticism to skillMysticism - temp2
		
		if (skillMysticism != baseMysticism) ; If Mysticism skill has changed, recalculate attributes
			set recalcINT to 1
			set recalcWIL to 1
			set recalcPER to 1
		endif
		
		if (skillMysticism > baseMysticism)
			set temp to skillMysticism
			set temp2 to 25 * masteryMysticism
			set temp to temp + temp2
			
			if (temp < maxMysticism)
				if (progressMysticism < masteryMysticism)
					set progressMysticism to progressMysticism + 1
				else
					set temp to temp + 1
					set skillMysticism to skillMysticism + 1
					set progressMysticism to 0
					MessageBox "Your Mysticism skill increased to %.0g.", temp
					set decayMysticism to decayMysticism / 2
				endif
			elseif (progressMysticism >= masteryMysticism)
				set maxMysticism to temp
			endif
			
			if (progressMysticism < masteryMysticism)
				set skillMysticism to skillMysticism - 1
				player->setMysticism skillMysticism
				set progressMysticism to progressMysticism + 1
				set skillMysticism to player->getMysticism
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressMysticism, (masteryMysticism+1)
			elseif (skillMysticism < 100)
				if (masteryMysticism > 0)
					MessageBox "Your Mysticism skill increased to %.0g.", temp
				endif
				set baseMysticism to skillMysticism
				player->setMysticism skillMysticism
				set progressMysticism to 0
				set skillMysticism to player->getMysticism
				set decayMysticism to decayMysticism / 2
			else
				if (masteryMysticism > 0)
					MessageBox "Your Mysticism skill increased to %.0g.", temp
				endif
				set masteryMysticism to masteryMysticism + 1
				set baseMysticism to skillMysticism - 25
				player->setMysticism baseMysticism
				set progressMysticism to 0
				set skillMysticism to player->getMysticism
				set decayMysticism to decayMysticism / 2

				set temp2 to masteryMysticism
				
				player->removeSpell "NCGD_mysticism25"
				player->removeSpell "NCGD_mysticism50"
				player->removeSpell "NCGD_mysticism100"
				player->removeSpell "NCGD_mysticism200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_mysticism200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_mysticism100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_mysticism50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_mysticism25"
				endif
			endif
		elseif (masteryMysticism > 0)
			if(skillMysticism < 75)
				set masteryMysticism to masteryMysticism - 1
				set baseMysticism to skillMysticism + 25
				player->setMysticism baseMysticism
				set skillMysticism to player->getMysticism

				set temp2 to masteryMysticism
				
				player->removeSpell "NCGD_mysticism25"
				player->removeSpell "NCGD_mysticism50"
				player->removeSpell "NCGD_mysticism100"
				player->removeSpell "NCGD_mysticism200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_mysticism200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_mysticism100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_mysticism50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_mysticism25"
				endif
			else
				set baseMysticism to skillMysticism
				player->setMysticism skillMysticism
				set skillMysticism to player->getMysticism
			endif
		else
			set baseMysticism to skillMysticism
			player->setMysticism skillMysticism
			set skillMysticism to player->getMysticism
		endif
	elseif (skillRestoration != player->getRestoration)
		set skillRestoration to player->getRestoration
		player->setRestoration 1000
		set temp2 to player->getRestoration - 1000
		set skillRestoration to skillRestoration - temp2
		
		if (skillRestoration != baseRestoration) ; If Restoration skill has changed, recalculate attributes
			set recalcEND to 1
			set recalcWIL to 1
			set recalcPER to 1
		endif
		
		if (skillRestoration > baseRestoration)
			set temp to skillRestoration
			set temp2 to 25 * masteryRestoration
			set temp to temp + temp2
			
			if (temp < maxRestoration)
				if (progressRestoration < masteryRestoration)
					set progressRestoration to progressRestoration + 1
				else
					set temp to temp + 1
					set skillRestoration to skillRestoration + 1
					set progressRestoration to 0
					MessageBox "Your Restoration skill increased to %.0g.", temp
					set decayRestoration to decayRestoration / 2
				endif
			elseif (progressRestoration >= masteryRestoration)
				set maxRestoration to temp
			endif
			
			if (progressRestoration < masteryRestoration)
				set skillRestoration to skillRestoration - 1
				player->setRestoration skillRestoration
				set progressRestoration to progressRestoration + 1
				set skillRestoration to player->getRestoration
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressRestoration, (masteryRestoration+1)
			elseif (skillRestoration < 100)
				if (masteryRestoration > 0)
					MessageBox "Your Restoration skill increased to %.0g.", temp
				endif
				set baseRestoration to skillRestoration
				player->setRestoration skillRestoration
				set progressRestoration to 0
				set skillRestoration to player->getRestoration
				set decayRestoration to decayRestoration / 2
			else
				if (masteryRestoration > 0)
					MessageBox "Your Restoration skill increased to %.0g.", temp
				endif
				set masteryRestoration to masteryRestoration + 1
				set baseRestoration to skillRestoration - 25
				player->setRestoration baseRestoration
				set progressRestoration to 0
				set skillRestoration to player->getRestoration
				set decayRestoration to decayRestoration / 2

				set temp2 to masteryRestoration
				
				player->removeSpell "NCGD_restoration25"
				player->removeSpell "NCGD_restoration50"
				player->removeSpell "NCGD_restoration100"
				player->removeSpell "NCGD_restoration200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_restoration200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_restoration100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_restoration50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_restoration25"
				endif
			endif
		elseif (masteryRestoration > 0)
			if(skillRestoration < 75)
				set masteryRestoration to masteryRestoration - 1
				set baseRestoration to skillRestoration + 25
				player->setRestoration baseRestoration
				set skillRestoration to player->getRestoration

				set temp2 to masteryRestoration
				
				player->removeSpell "NCGD_restoration25"
				player->removeSpell "NCGD_restoration50"
				player->removeSpell "NCGD_restoration100"
				player->removeSpell "NCGD_restoration200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_restoration200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_restoration100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_restoration50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_restoration25"
				endif
			else
				set baseRestoration to skillRestoration
				player->setRestoration skillRestoration
				set skillRestoration to player->getRestoration
			endif
		else
			set baseRestoration to skillRestoration
			player->setRestoration skillRestoration
			set skillRestoration to player->getRestoration
		endif
	elseif (skillAlchemy != player->getAlchemy)
		set skillAlchemy to player->getAlchemy
		player->setAlchemy 1000
		set temp2 to player->getAlchemy - 1000
		set skillAlchemy to skillAlchemy - temp2
		
		if (skillAlchemy != baseAlchemy) ; If Alchemy skill has changed, recalculate attributes
			set recalcEND to 1
			set recalcINT to 1
			set recalcPER to 1
		endif
		
		if (skillAlchemy > baseAlchemy)
			set temp to skillAlchemy
			set temp2 to 25 * masteryAlchemy
			set temp to temp + temp2
			
			if (temp < maxAlchemy)
				if (progressAlchemy < masteryAlchemy)
					set progressAlchemy to progressAlchemy + 1
				else
					set temp to temp + 1
					set skillAlchemy to skillAlchemy + 1
					set progressAlchemy to 0
					MessageBox "Your Alchemy skill increased to %.0g.", temp
					set decayAlchemy to decayAlchemy / 2
				endif
			elseif (progressAlchemy >= masteryAlchemy)
				set maxAlchemy to temp
			endif
			
			if (progressAlchemy < masteryAlchemy)
				set skillAlchemy to skillAlchemy - 1
				player->setAlchemy skillAlchemy
				set progressAlchemy to progressAlchemy + 1
				set skillAlchemy to player->getAlchemy
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressAlchemy, (masteryAlchemy+1)
			elseif (skillAlchemy < 100)
				if (masteryAlchemy > 0)
					MessageBox "Your Alchemy skill increased to %.0g.", temp
				endif
				set baseAlchemy to skillAlchemy
				player->setAlchemy skillAlchemy
				set progressAlchemy to 0
				set skillAlchemy to player->getAlchemy
				set decayAlchemy to decayAlchemy / 2
			else
				if (masteryAlchemy > 0)
					MessageBox "Your Alchemy skill increased to %.0g.", temp
				endif
				set masteryAlchemy to masteryAlchemy + 1
				set baseAlchemy to skillAlchemy - 25
				player->setAlchemy baseAlchemy
				set progressAlchemy to 0
				set skillAlchemy to player->getAlchemy
				set decayAlchemy to decayAlchemy / 2

				set temp2 to masteryAlchemy
				
				player->removeSpell "NCGD_alchemy25"
				player->removeSpell "NCGD_alchemy50"
				player->removeSpell "NCGD_alchemy100"
				player->removeSpell "NCGD_alchemy200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_alchemy200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_alchemy100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_alchemy50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_alchemy25"
				endif
			endif
		elseif (masteryAlchemy > 0)
			if(skillAlchemy < 75)
				set masteryAlchemy to masteryAlchemy - 1
				set baseAlchemy to skillAlchemy + 25
				player->setAlchemy baseAlchemy
				set skillAlchemy to player->getAlchemy

				set temp2 to masteryAlchemy
				
				player->removeSpell "NCGD_alchemy25"
				player->removeSpell "NCGD_alchemy50"
				player->removeSpell "NCGD_alchemy100"
				player->removeSpell "NCGD_alchemy200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_alchemy200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_alchemy100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_alchemy50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_alchemy25"
				endif
			else
				set baseAlchemy to skillAlchemy
				player->setAlchemy skillAlchemy
				set skillAlchemy to player->getAlchemy
			endif
		else
			set baseAlchemy to skillAlchemy
			player->setAlchemy skillAlchemy
			set skillAlchemy to player->getAlchemy
		endif
	elseif (skillUnarmored != player->getUnarmored)
		set skillUnarmored to player->getUnarmored
		player->setUnarmored 1000
		set temp2 to player->getUnarmored - 1000
		set skillUnarmored to skillUnarmored - temp2
		
		if (skillUnarmored != baseUnarmored) ; If Unarmored skill has changed, recalculate attributes
			set recalcEND to 1
			set recalcSPE to 1
			set recalcWIL to 1
		endif
		
		if (skillUnarmored > baseUnarmored)
			set temp to skillUnarmored
			set temp2 to 25 * masteryUnarmored
			set temp to temp + temp2
			
			if (temp < maxUnarmored)
				if (progressUnarmored < masteryUnarmored)
					set progressUnarmored to progressUnarmored + 1
				else
					set temp to temp + 1
					set skillUnarmored to skillUnarmored + 1
					set progressUnarmored to 0
					MessageBox "Your Unarmored skill increased to %.0g.", temp
					set decayUnarmored to decayUnarmored / 2
				endif
			elseif (progressUnarmored >= masteryUnarmored)
				set maxUnarmored to temp
			endif
			
			if (progressUnarmored < masteryUnarmored)
				set skillUnarmored to skillUnarmored - 1
				player->setUnarmored skillUnarmored
				set progressUnarmored to progressUnarmored + 1
				set skillUnarmored to player->getUnarmored
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressUnarmored, (masteryUnarmored+1)
			elseif (skillUnarmored < 100)
				if (masteryUnarmored > 0)
					MessageBox "Your Unarmored skill increased to %.0g.", temp
				endif
				set baseUnarmored to skillUnarmored
				player->setUnarmored skillUnarmored
				set progressUnarmored to 0
				set skillUnarmored to player->getUnarmored
				set decayUnarmored to decayUnarmored / 2
			else
				if (masteryUnarmored > 0)
					MessageBox "Your Unarmored skill increased to %.0g.", temp
				endif
				set masteryUnarmored to masteryUnarmored + 1
				set baseUnarmored to skillUnarmored - 25
				player->setUnarmored baseUnarmored
				set progressUnarmored to 0
				set skillUnarmored to player->getUnarmored
				set decayUnarmored to decayUnarmored / 2

				set temp2 to masteryUnarmored
				
				player->removeSpell "NCGD_unarmored25"
				player->removeSpell "NCGD_unarmored50"
				player->removeSpell "NCGD_unarmored100"
				player->removeSpell "NCGD_unarmored200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_unarmored200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_unarmored100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_unarmored50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_unarmored25"
				endif
			endif
		elseif (masteryUnarmored > 0)
			if(skillUnarmored < 75)
				set masteryUnarmored to masteryUnarmored - 1
				set baseUnarmored to skillUnarmored + 25
				player->setUnarmored baseUnarmored
				set skillUnarmored to player->getUnarmored

				set temp2 to masteryUnarmored
				
				player->removeSpell "NCGD_unarmored25"
				player->removeSpell "NCGD_unarmored50"
				player->removeSpell "NCGD_unarmored100"
				player->removeSpell "NCGD_unarmored200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_unarmored200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_unarmored100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_unarmored50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_unarmored25"
				endif
			else
				set baseUnarmored to skillUnarmored
				player->setUnarmored skillUnarmored
				set skillUnarmored to player->getUnarmored
			endif
		else
			set baseUnarmored to skillUnarmored
			player->setUnarmored skillUnarmored
			set skillUnarmored to player->getUnarmored
		endif
	
	; Thief skill check
	elseif (skillSecurity != player->getSecurity)
		set skillSecurity to player->getSecurity
		player->setSecurity 1000
		set temp2 to player->getSecurity - 1000
		set skillSecurity to skillSecurity - temp2
		
		if (skillSecurity != baseSecurity) ; If Security skill has changed, recalculate attributes
			set recalcAGI to 1
			set recalcINT to 1
			set recalcPER to 1
		endif
		
		if (skillSecurity > baseSecurity)
			set temp to skillSecurity
			set temp2 to 25 * masterySecurity
			set temp to temp + temp2
			
			if (temp < maxSecurity)
				if (progressSecurity < masterySecurity)
					set progressSecurity to progressSecurity + 1
				else
					set temp to temp + 1
					set skillSecurity to skillSecurity + 1
					set progressSecurity to 0
					MessageBox "Your Security skill increased to %.0g.", temp
					set decaySecurity to decaySecurity / 2
				endif
			elseif (progressSecurity >= masterySecurity)
				set maxSecurity to temp
			endif
			
			if (progressSecurity < masterySecurity)
				set skillSecurity to skillSecurity - 1
				player->setSecurity skillSecurity
				set progressSecurity to progressSecurity + 1
				set skillSecurity to player->getSecurity
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressSecurity, (masterySecurity+1)
			elseif (skillSecurity < 100)
				if (masterySecurity > 0)
					MessageBox "Your Security skill increased to %.0g.", temp
				endif
				set baseSecurity to skillSecurity
				player->setSecurity skillSecurity
				set progressSecurity to 0
				set skillSecurity to player->getSecurity
				set decaySecurity to decaySecurity / 2
			else
				if (masterySecurity > 0)
					MessageBox "Your Security skill increased to %.0g.", temp
				endif
				set masterySecurity to masterySecurity + 1
				set baseSecurity to skillSecurity - 25
				player->setSecurity baseSecurity
				set progressSecurity to 0
				set skillSecurity to player->getSecurity
				set decaySecurity to decaySecurity / 2

				set temp2 to masterySecurity
				
				player->removeSpell "NCGD_security25"
				player->removeSpell "NCGD_security50"
				player->removeSpell "NCGD_security100"
				player->removeSpell "NCGD_security200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_security200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_security100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_security50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_security25"
				endif
			endif
		elseif (masterySecurity > 0)
			if(skillSecurity < 75)
				set masterySecurity to masterySecurity - 1
				set baseSecurity to skillSecurity + 25
				player->setSecurity baseSecurity
				set skillSecurity to player->getSecurity

				set temp2 to masterySecurity
				
				player->removeSpell "NCGD_security25"
				player->removeSpell "NCGD_security50"
				player->removeSpell "NCGD_security100"
				player->removeSpell "NCGD_security200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_security200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_security100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_security50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_security25"
				endif
			else
				set baseSecurity to skillSecurity
				player->setSecurity skillSecurity
				set skillSecurity to player->getSecurity
			endif
		else
			set baseSecurity to skillSecurity
			player->setSecurity skillSecurity
			set skillSecurity to player->getSecurity
		endif
	elseif (skillSneak != player->getSneak)
		set skillSneak to player->getSneak
		player->setSneak 1000
		set temp2 to player->getSneak - 1000
		set skillSneak to skillSneak - temp2
		
		if (skillSneak != baseSneak) ; If Sneak skill has changed, recalculate attributes
			set recalcAGI to 1
			set recalcSPE to 1
			set recalcPER to 1
		endif
		
		if (skillSneak > baseSneak)
			set temp to skillSneak
			set temp2 to 25 * masterySneak
			set temp to temp + temp2
			
			if (temp < maxSneak)
				if (progressSneak < masterySneak)
					set progressSneak to progressSneak + 1
				else
					set temp to temp + 1
					set skillSneak to skillSneak + 1
					set progressSneak to 0
					MessageBox "Your Sneak skill increased to %.0g.", temp
					set decaySneak to decaySneak / 2
				endif
			elseif (progressSneak >= masterySneak)
				set maxSneak to temp
			endif
			
			if (progressSneak < masterySneak)
				set skillSneak to skillSneak - 1
				player->setSneak skillSneak
				set progressSneak to progressSneak + 1
				set skillSneak to player->getSneak
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressSneak, (masterySneak+1)
			elseif (skillSneak < 100)
				if (masterySneak > 0)
					MessageBox "Your Sneak skill increased to %.0g.", temp
				endif
				set baseSneak to skillSneak
				player->setSneak skillSneak
				set progressSneak to 0
				set skillSneak to player->getSneak
				set decaySneak to decaySneak / 2
			else
				if (masterySneak > 0)
					MessageBox "Your Sneak skill increased to %.0g.", temp
				endif
				set masterySneak to masterySneak + 1
				set baseSneak to skillSneak - 25
				player->setSneak baseSneak
				set progressSneak to 0
				set skillSneak to player->getSneak
				set decaySneak to decaySneak / 2

				set temp2 to masterySneak
				
				player->removeSpell "NCGD_sneak25"
				player->removeSpell "NCGD_sneak50"
				player->removeSpell "NCGD_sneak100"
				player->removeSpell "NCGD_sneak200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_sneak200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_sneak100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_sneak50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_sneak25"
				endif
			endif
		elseif (masterySneak > 0)
			if(skillSneak < 75)
				set masterySneak to masterySneak - 1
				set baseSneak to skillSneak + 25
				player->setSneak baseSneak
				set skillSneak to player->getSneak

				set temp2 to masterySneak
				
				player->removeSpell "NCGD_sneak25"
				player->removeSpell "NCGD_sneak50"
				player->removeSpell "NCGD_sneak100"
				player->removeSpell "NCGD_sneak200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_sneak200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_sneak100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_sneak50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_sneak25"
				endif
			else
				set baseSneak to skillSneak
				player->setSneak skillSneak
				set skillSneak to player->getSneak
			endif
		else
			set baseSneak to skillSneak
			player->setSneak skillSneak
			set skillSneak to player->getSneak
		endif
	elseif (skillAcrobatics != player->getAcrobatics)
		set skillAcrobatics to player->getAcrobatics
		player->setAcrobatics 1000
		set temp2 to player->getAcrobatics - 1000
		set skillAcrobatics to skillAcrobatics - temp2
		
		if (skillAcrobatics != baseAcrobatics) ; If Acrobatics skill has changed, recalculate attributes
			set recalcSTR to 1
			set recalcAGI to 1
			set recalcSPE to 1
		endif
		
		if (skillAcrobatics > baseAcrobatics)
			set temp to skillAcrobatics
			set temp2 to 25 * masteryAcrobatics
			set temp to temp + temp2
			
			if (temp < maxAcrobatics)
				if (progressAcrobatics < masteryAcrobatics)
					set progressAcrobatics to progressAcrobatics + 1
				else
					set temp to temp + 1
					set skillAcrobatics to skillAcrobatics + 1
					set progressAcrobatics to 0
					MessageBox "Your Acrobatics skill increased to %.0g.", temp
					set decayAcrobatics to decayAcrobatics / 2
				endif
			elseif (progressAcrobatics >= masteryAcrobatics)
				set maxAcrobatics to temp
			endif
			
			if (progressAcrobatics < masteryAcrobatics)
				set skillAcrobatics to skillAcrobatics - 1
				player->setAcrobatics skillAcrobatics
				set progressAcrobatics to progressAcrobatics + 1
				set skillAcrobatics to player->getAcrobatics
				MessageBox "You need more training before your skill will improve.  (%.0g out of %.0g)", progressAcrobatics, (masteryAcrobatics+1)
			elseif (skillAcrobatics < 100)
				if (masteryAcrobatics > 0)
					MessageBox "Your Acrobatics skill increased to %.0g.", temp
				endif
				set baseAcrobatics to skillAcrobatics
				player->setAcrobatics skillAcrobatics
				set progressAcrobatics to 0
				set skillAcrobatics to player->getAcrobatics
				set decayAcrobatics to decayAcrobatics / 2
			else
				if (masteryAcrobatics > 0)
					MessageBox "Your Acrobatics skill increased to %.0g.", temp
				endif
				set masteryAcrobatics to masteryAcrobatics + 1
				set baseAcrobatics to skillAcrobatics - 25
				player->setAcrobatics baseAcrobatics
				set progressAcrobatics to 0
				set skillAcrobatics to player->getAcrobatics
				set decayAcrobatics to decayAcrobatics / 2

				set temp2 to masteryAcrobatics
				
				player->removeSpell "NCGD_acrobatics25"
				player->removeSpell "NCGD_acrobatics50"
				player->removeSpell "NCGD_acrobatics100"
				player->removeSpell "NCGD_acrobatics200"
				
				if (temp2 >= 8)
					player->addSpell "NCGD_acrobatics200"
					set temp2 to temp2 - 8
				endif
				if (temp2 >= 4)
					player->addSpell "NCGD_acrobatics100"
					set temp2 to temp2 - 4
				endif
				if (temp2 >= 2)
					player->addSpell "NCGD_acrobatics50"
					set temp2 to temp2 - 2
				endif
				if (temp2 >= 1)
					player->addSpell "NCGD_acrobatics25"
				endif
			endif
		elseif (masteryAcrobatics > 0)
			if(skillAcrobatics < 75)
				set masteryAcrobatics to masteryAcrobatics - 1
				set baseAcrobatics to skillAcrobatics + 25
				player->setAcrobatics baseAcrobatics
				set skillAcrobatics to player->getAcrobatics

				set temp2 to masteryAcrobatics
				
				player->removeSpell "NCGD_acrobatics25"
				player->removeSpell "NCGD_acrobatics50"
				player->removeSpell "NCGD_acrobatics100"
				player->removeSpell "NCGD_acrobatics200"