The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Skill Name
Author Message
Nachtmusique
Journeyman
*

Posts: 89
Likes Given: 0
Likes Received: 6 in 6 posts
Joined: Mar 2012
Reputation: 0



Post: #1
Skill Name
After changing the Key and defname of a skill, now neither the original nor the new are recognized by sphere.

I copied the meditation skill script file into my custom folder (which loads last in the spheretables)

I changed the def and key to Channeling rather than Meditation

Now, if I try to set or show Channeling i get the message that it is not a valid command or format. I get the same message if I use meditation. I get the same message if I use the DEFNAMEs or the Keys. ANy ideas?
(This post was last modified: 03-05-2015 03:50 AM by Nachtmusique.)
03-05-2015 03:49 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Skill Name
It's better to not touch the key and the defname of a skill.
Use the name property
Example:

PHP Code:
[SKILL 1]
DEFNAME=SKILL_ANATOMY
KEY
=Anatomy
TITLE
=Biologist
PROMPT_MSG
=Whom shall I examine?
NAME Medicine 

Then create a small a function like this one, for implementing the ".skillname value" behaviour

PHP Code:
//example .medicine 250
[FUNCTION medicine]
<
serv.lookupskill medicine> <argn1>

//You can also block the relative skill command for managing the skill
//Example
[FUNCTION anatomy]
return 


Last step, change the name of the skill in the skill.mul file.
(This post was last modified: 03-05-2015 04:27 AM by darksun84.)
03-05-2015 04:23 AM
Find all posts by this user Like Post Quote this message in a reply
Nachtmusique
Journeyman
*

Posts: 89
Likes Given: 0
Likes Received: 6 in 6 posts
Joined: Mar 2012
Reputation: 0



Post: #3
RE: Skill Name
Thanks
03-05-2015 05:59 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #4
RE: Skill Name
You don't really need to change anything on skills nor even on muls (I really have to modify muls, drk ¬¬), you just have to trick Sphere with a paralel function:
Code:
[function channeling]
if (<argn>)
meditation <argn1> //don't use '=' here so you can still use code like 'channeling +=x' working.
endif
return <meditation>

Now you can use the new 'skill' (it's not a skill, just a function) ingame and/or scripts.
03-05-2015 07:19 PM
Find all posts by this user Like Post Quote this message in a reply
ThatSide
Apprentice
*

Posts: 17
Likes Given: 5
Likes Received: 0 in 0 posts
Joined: Feb 2015
Reputation: 0



Post: #5
RE: Skill Name
(03-05-2015 07:19 PM)XuN Wrote:  You don't really need to change anything on skills nor even on muls (I really have to modify muls, drk ¬¬), you just have to trick Sphere with a paralel function:
Code:
[function channeling]
if (<argn>)
meditation <argn1> //don't use '=' here so you can still use code like 'channeling +=x' working.
endif
return <meditation>

Now you can use the new 'skill' (it's not a skill, just a function) ingame and/or scripts.

It sounds easy but what about the sysmessage a player gets when he gains a skillpoint? (your skill <skill> has been increased...)
08-10-2015 12:51 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Skill Name
I think the sysmessages are handled by clilocs number:

3000260 Your skill in ~1skillname~ has increased by ~2changeamount~. It is now ~3newvalue~.

3000261 Your skill in ~1skillname~ has decreased by ~2changeamount~. It is now ~3newvalue~.
08-21-2015 09:27 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)