Adding Our New Skills to POL 095 and 096
Overview
Firstly, you will need to open the
uoclient.cfg file for editing. Make sure you count the amount of skills you have in your skills.xml file for the new mul file. You will need to make, or edit, the MaxSkillID entry ("General" section of file. Default 51 if not found). You must have skills.cfg entires for each skillid up to your MaxSkillID setting. We will discuss those also.
Attributes.cfg
First file we will edit, is the Attributes.cfg file. This file defines Attribute names and aliases. Attributes, being skills and stats. You will want to leave the Strength, Dexterity, and Intelligence intact. Even if your skill does not have an alias you want POL to use, you will still need it in this file. The best format, is keeping it in the same order as your skills in the skills.XML file you made.
At the LEAST, these attributes must be defined: 'Strength', 'Intelligence', 'Dexterity', 'Parry', and 'Tactics' for use in internal calculations. Below is an example from the Distro's file:
Code: Select all
Attribute ForensicEvaluation
{
Alias ForensicEval
Alias Forensics
}
If you notice, it has the names WITHOUT spaces. Remember, do not use spaces in names, or the aliases. That is important.
UOSkills.cfg
This file will link your "Attributes" to skill ID numbers. It is important to remember that the order you had skills in the Skills.XML file, will be the same here! The first from the XML is skill ID 0, second is skill ID 1, and so on. You should always use the Attribute name from Attributes.cfg for the Attribute entry in this file. Skill ID must be an integer between 0 and 500, though any entries past the maximum UO skill id will not be sent to the UO client, as er the MaxSkillID setting explained earlier. Below is an example from the Distro's file:
Skills.cfg
This file defines the details for each UO skill. You can have just 1 in the /config directory with all the skills, or have a skills.cfg in the package directory for the skill's package. You can have some skills in the main one, with others in their own package. But remember, you CANNOT have the skill defined in BOTH. It can only reside in 1 or the other. The distro doesn't use this file, it uses pkg/foundations/hooks/skillsdef.cfg instead, with the same structure. So if you are using POL Distro scripts, be sure to edit that one also, just like this one. Below is an example from the Distro's file:
Code: Select all
Skill 21
{
Name Hiding
SkillId 21
Script hiding
Delay 10
DexAdv 100 1d4+20
default_points 50
title Rogue
DropStat str int
}
Now, let's examine this config entry. The name is the string name for your skill. Remember, do NOT use spaces in the Name for your skill entry!
The SkillID (and Skill name in the heading of the entry), are the Skill ID number you gave the skill in the UOSkills.cfg file above.
Script is NOT required. It is the name (use :pkgname:script for packages scripts that link to your skill) of the script for your skill, IF it has a blue button on the skill window in the client. When the player presses the skill's button, this is the script that will be fired on your server.
Delay is number of seconds before the user can use another skill. Remember, this is for skills with buttons. The core will not run a check for a skill not being used by the button. If a skill can be used directly in other means, be sure you add some way to check timers in it.
If UnHides is 1, using the skill unhides the character if hidden when they try to use the skill via the skill's button. Again, if this skill can be directly used in other means, be sure you add a way to do this is the script. The core will not unhide them otherwise.
If you are using Distro, the default_points entry will list the minimum points to give for advancement in this skill. The core itself does not use this entry.
Title is a Distro entry. If you use Distro, that is the title of the skill for the Paperdoll of the character, if that is their highest skill. The core does not use this entry.
DropStat is Distro used. It let's Distro know which specific stats you would like dropped by Distro, if required.
Below, is the Stat Advancement entries for skills. These are used to help specify how your stats will increase when using this skill.
Code: Select all
[StrAdv (percent chance to advance) (die-string amount to advance)]
[IntAdv (percent chance to advance) (die-string amount to advance)]
[DexAdv (percent chance to advance) (die-string amount to advance)]
Using Distro
If you are using Distro POL, be sure to check all the files for other editing. Such as the /scripts/include/attributes.inc file. In that one, for example, it defines new CONST settings for each Attribute ID and Skill ID. You will want to edit those, to add your custom skills to distro.
Do not forget to create your scripts for your skills! Especially the ones that have buttons in the skill window!
Adding New Combat Skills
If you want to make a new combat skill, be sure you add it's Attribute name to weapons you want to use it. Otherwise, just adding it, does you no good. If you are using Distro, be sure to find /pkg/foundations/hooks/newCombat.sr. You will need to edit this file also, for skill gains in your new combat skills. The only thing to edit in the file, is the FindSkillidByIdentifier(skid) function. Just set it up case uses all your combat Attribute names, and skill id numbers.