A DSA to Add Experience


This DSA receives a message which tells it which character(s) is to receive added experience.  It looks at Parameter A to determine the skill that is to receive the added experience.  It uses Parameter B to determine the numerical amout of experience to be added..

A little discussion about skills might be valuable now.  There are a total of 20 skills.  They are numbered as:
0 - Basic Fighter Skill
1 - Basic Ninja Skill
2 - Basic Priest Skill
3 - Basic Wizard Skill
4 through 7 - Individual Fighter Skills
8 through 11 - Individual Ninja Skills
12 through 15 - Individual Priest Skills
16 through 19 - Individual Wizard Skills

A character's proficiency level in any of the four skill types (Fighter, Ninja, Priest, or Wizard) is based on the number of experience points gained in the 'Basic Skill' of that skill type.  For example, a character's Ninja level is based on the accumulation of experience in skill number 1.

Experience can be gained in the 'Basic Skill' or in one of the 'Individual Skills'.  Any experience added to an 'Individual Skill' is also added to the 'Basic Skill' and therefore contributes to the character's level development.

The DSA:

You send a message to this DSA.  The message tells which character(s) is to receive the skill  experience.
Character 0
Character 1
Character 2
Character 3
C0 The Lead Character
All Living Characters
The experience will not be added to any character with zero hitpoints (ie. Dead).

Parameter A of the DSA tells which skill is to be increased.  Don't forget that if you specify skill number 4 through 19 that it will also be added to the Basic Skill of the same type.

Parameter B of the DSA tells the amount of the increase.

If you examine the code of the DSA you will see that state 1S0 is used to determine a 'Multiplier'.  Parameter B is multiplied by this number before being added to the character's skill experience.  The code included here (in 1S0) fetches the Party's dungeon level and then uses that to fetch the level's 'Difficulty Multiplier'.  If you don't want to use the difficulty multiplier then you can easily replace state 1S0 to load a constant multiplier.  For example 'L1'  would provide a constant multiplier of one.

Here is the DSA code.  You should be able to cut/paste this into a text file (using Notepad or any text editor) and 'Import' it into a DSA in your dungeon. Or get the Text File Here.

Description = Add experience (B) times 'Level Difficulty' to skill (A)
State = 0
StateLocation = 0
GroupID = 0
Number of States = 2
First Displayed State = 1
Number of non-empty states = 2
State Number = 0
Number of Actions = 6
# S0 Adds experience to character 0
S0 = L0 G1S1
# S1 Adds experience to character 1
S1 = L1 G1S1
# S2 Adds experience to character 2
S2 = L2 G1S1
# S3 Adds experience to character 3
S3 = L3 G1S1
#C0 adds experience to the Lead Character
C0 = L0 L9 &PARTY@ L8 &@ G1S1
# C1 adds experience all living characters
C1 = G GS1 GS2 GS3
State Number = 1
Number of Actions = 2
#1S0 ( . . . multiplier) Fetches the difficulty multiplier for the party's current dungeon level.
#1S1 (char# . . . ) Adds experience (B) times Difficulty Multiplier to skill number (A)
signature = 4049D79ABD3763F95CF9BEC2E69CA57F