Custom skills?

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Custom skills?

Post by stranf »

I'm attempting to create a new category in the skills menu for social skills that will be useful for GMed quests.

Skills such as persuation, intimidation, lying, bluffing, etc..

My question:

How do I get the skills to display properly in the skills menu, attach scripts to the skill, and put that nice little blue gem next to the skill so when clicked on it runs the script.

Basically what I envision these skills doing is rolling a d20, adding a modifier based on the skill, and printing the result to the screen via global text. Should be fairly simple to code once I know how to attach and implement the skill.


This brings me to the second question. Which function displays global text? (So that all clients recieve the displayed text.)
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

To edit the default UO skillgump you have to use an editor and edit skills.mul/idx by hand. And as far as I know, you can only exchange skills with new ones (i.e. rename) and not add new ones.

If, however, you use the onSkillGump JS event, you can override the client's request to open the skillgump, and instead send a custom one with as many or as few skills as you'd like =)

Note that any new skills you add would have to be scripted entirely, including skillchecks, skillgain, etc, since the source is hardcoded with a specific number of skills and only supports skillchecks and whatnot for those, I believe.
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Hmm....that seems more work then it is worth.

Perhaphs I will bypass the gump entirely. How do I store global variables on the PC?

If I can store the skill on the PC, I can do the check/gain/etc. locally in my JS script, and forgo the gump portion.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

**bump**

Is there anyway to store variables on objects/npcs/pcs so that I could store unique custom skill values?
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

To set a custom tag on an object (which is saved along with the object), use myChar.SetTag( "tagname", value );

To get a custom tag from an object, use something like var myVar = myChar.GetTag( "tagname" );
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Thanks.
Post Reply