Creating a New Skill

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
User avatar
Ordos
Neophyte Poster
Posts: 31
Joined: Sat Feb 28, 2009 7:20 am

Creating a New Skill

Post by Ordos »

Environment: POL099 - Zulu Hotel (old ZHParadiso scripts)

I am trying to create a new skill: Quarrying (attached zip)

I am receiving some errors whilst compiling.

To create Quarrying I copied the pre-existing Mining package. The compiling errors occur when I change some (but not all) calls to SKILLID_MINING to the new SKILLID_QUARRYING. I receive this error message when compiling:
Variable SKILLID_QUARRYING has not been declared on line 159.
Error compiling statement at C:\zh\pkg\std\quarrying\quarrying.src, Line 159
Error in function 'MineForOre', File: C:\zh\pkg\std\quarrying\quarrying.src, Line 159

Error in function 'MineForOre' .
File: C:\zh\pkg\std\quarrying\quarrying.src, Line 159
Compilation Summary:
Compiled 1 script in 227 ms.
1 of those script had errors.
Three calls to SKILLID_QUARRYING must be changed back to SKILLID_MINING (on lines 159, 175 and 120) otherwise I continue to receive these compiling errors. A single call to SKILLID_QUARRYING remains on Line 192.

Note: I am unsure of the exact method for creating new skills. It's possible there are some global settings I have overlooked?

It's been many years since I operated Zulu Hotel Factions and Paradiso, but I'm just getting back into the game again! Thanks in advance.
Attachments
quarrying.zip
\pkg\std\quarrying
(7.13 KiB) Downloaded 240 times
b0ris
New User
Posts: 14
Joined: Wed Apr 19, 2017 12:20 am

Re: Creating a New Skill

Post by b0ris »

Hey, my english is weak and I'm using a translator.

On distro99 example:
Pkg \ systems \ attributes \ config
Look at the attributes.cfg - there are declared all the skills and are described.
Look also at uoclient.cfg in it you will find:
MaxSkillID 48

Also look at uoskills.cfg

Pkg \ systems \ attributes \ include attributeConstants.inc. There are also declared skills as well as their maximum amount.
That's probably not all, but I think I've thrown some light on the matter

The case looks a little simpler when you change the existing one to the new one.
User avatar
Ordos
Neophyte Poster
Posts: 31
Joined: Sat Feb 28, 2009 7:20 am

Re: Creating a New Skill

Post by Ordos »

Thanks b0ris! I took your advice and kept searching!

Using Notepad++ "Find in Files" I continued searching all my POL directories for all instances of several different skill names and adding as many instances of Quarrying as I can!

I no longer receive those compile errors thankfully, but Quarrying still does not appear on the list of Skills in the in-game gump. I've been searching and editing again for several hours now and not really got any further on that front >_<
b0ris
New User
Posts: 14
Joined: Wed Apr 19, 2017 12:20 am

Re: Creating a New Skill

Post by b0ris »

just do your personal skillwin.
do you have command dropSkill ? look it, if not, try to do gump with
function AP_ListAttributesByType( type:="" ) your type is "Skill"

so AP_ListAttributesByType( "Skill" )
var skills_list := AP_ListAttributesByType( "Skill" ),
foreach skill in ( skills_list )

If I do not know how to do something, I'm looking for similar ready-made scripts and I'm trying to get what I need. This basic skillwin is probably (I think) hard coded. I've always used my own
User avatar
Ordos
Neophyte Poster
Posts: 31
Joined: Sat Feb 28, 2009 7:20 am

Re: Creating a New Skill

Post by Ordos »

b0ris wrote: Fri Apr 21, 2017 1:01 am just do your personal skillwin.
do you have command dropSkill ? look it, if not, try to do gump with
function AP_ListAttributesByType( type:="" ) your type is "Skill"

so AP_ListAttributesByType( "Skill" )
var skills_list := AP_ListAttributesByType( "Skill" ),
foreach skill in ( skills_list )

If I do not know how to do something, I'm looking for similar ready-made scripts and I'm trying to get what I need. This basic skillwin is probably (I think) hard coded. I've always used my own
Damn I saw those coming up when searching and hoped I wouldn't have to manually edit them! Thanks again b0ris! I hope it works after I edit those.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Creating a New Skill

Post by Yukiko »

Another alternative to a custom skillwin.src is to look through existing skills and see if there is one which you are not uning or you don't want. Some people don't find begging a useful skill for example. Using UO Fiddler you can edit the sill list in the client and change a skill name. So if you don't use begging you can change it to quarrying. Remember to uncheck or check the "is Action" check box depending on whether the skill ian active skill like begging or a passive skill like mining. I assume quarrying is stone mining basically. Great idea for a skill. Does it also involve sculpting to make statues?

If you use this idea your players will need a copy of your customised client in order to see the new skill.
User avatar
Ordos
Neophyte Poster
Posts: 31
Joined: Sat Feb 28, 2009 7:20 am

Re: Creating a New Skill

Post by Ordos »

Yukiko wrote: Sun Apr 23, 2017 9:19 pm Another alternative to a custom skillwin.src is to look through existing skills and see if there is one which you are not uning or you don't want. Some people don't find begging a useful skill for example. Using UO Fiddler you can edit the sill list in the client and change a skill name. So if you don't use begging you can change it to quarrying. Remember to uncheck or check the "is Action" check box depending on whether the skill ian active skill like begging or a passive skill like mining. I assume quarrying is stone mining basically. Great idea for a skill. Does it also involve sculpting to make statues?

If you use this idea your players will need a copy of your customised client in order to see the new skill.
Thanks Yukiko I'll give this a try.

Quarrying will mine different types of stone depending upon where you are mining on the world map. The stone is then used to build houses.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Creating a New Skill

Post by Yukiko »

Ah. Great way to implement it. Stone houses need stone :)
Post Reply