I am trying to create a new gathering skill, but do not want it attached to any of the other gathering skills. The idea is to create a Foraging skill that can be triggered by ON=@DClick a particular item (perhaps some sort of special knife), and then being able to @TARGON on a variety of new Region Resource Types and gather certain Resources (mostly reagents, but a few others as well).
I have been looking through the Sphere files, and read both the Scripting tutorial and the Making Your Own Skills tutorial, and have a few questions. I am not sure I am on the right track or not. I understand how to create the item (knife) for the trigger, and have discovered a lot of pieces, but I am not sure exactly how they fit, or rather where the actual meat of the script is supposed to go, or if it works in some other manner.
1. Is it possible to create such a skill, unconnected to the others?
2. If so, is there an actual script behind the gathering skills (I cannot seem to find any, beyond the basics in the Script folder) I can use as an example?
Slightly modified Lumberjacking Skill (I left the numbers the same):
Quote:[SKILL --]
DEFNAME=SKILL_FORAGING
FLAGS=SKF_SCRIPTED
KEY=Lumberjacking
TITLE=Forager (working title)
PROMPT_MSG=
DELAY=1.0
STAT_STR=85
STAT_INT=30
STAT_DEX=45
BONUS_STR=90
BONUS_DEX=10
BONUS_INT=0
BONUS_STATS=20
ADV_RATE=2.5,50.0,200.0
VALUES=1,10,50
ON=@Fail
SRC.SYSMESSAGE @,,2 500495
ON=@Abort
SRC.SYSMESSAGE You decide not to forage for now.
[eof]
3. Can the Key be changed to Foraging? Is this merely the skill level?
4. What causes the Lumberjacking skill to trigger when an equipped axe is d-clicked, and from what file? I do not see any such triggers looking through the items (axes and bladed)
Resource to be Gathered:
Quote:[ITEMDEF 0f7b]
//Blood Moss
DEFNAME=i_reag_blood_moss
TYPE=T_REAGENT
VALUE=3
PILE=1
WEIGHT=.1
CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Reagents - Normal
DESCRIPTION=Blood Moss
Item to Be Harvested From (Targeted):
Quote:[ITEMDEF 0cf3]
//fallen log
DEFNAME=i_log_fallen
VALUE=1
CATEGORY=Vegetation
SUBSECTION=Trees
DESCRIPTION=Fallen Log
Sphere_Types
Quote:[TYPEDEF t_fallen_log]
TERRAIN = 0cf3
(and various sister items and dupes)
5. Can an Item be made a Terrain Type in this manner?
Sphere_Region
Quote:[REGIONTYPE r_default_fallen_log t_fallen_log]
// Default fallen log area resources
RESOURCES=5.0 mr_blood moss
Sphere_Region_Resource
Quote:[REGIONRESOURCE mr_fallen_log]
// t_fallen_log
skill=85.0,100.0
amount=1,5
reap=i_blood_moss
regen=60*60*2