Difference between revisions of "REGIONRESOURCE"

From SphereWiki
Jump to: navigation, search
m
(Triggers)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Languages|REGIONRESOURCE}}
 +
 
__FORCETOC__
 
__FORCETOC__
 
A region resource block defines a resource that can be found in a region.
 
A region resource block defines a resource that can be found in a region.
Line 9: Line 11:
 
| '''Name''' || '''Read/Write''' || '''Description'''
 
| '''Name''' || '''Read/Write''' || '''Description'''
 
|-
 
|-
| [[AMOUNT]] || RW || Gets or sets the initial amount of the resource available when it spawns.
+
| [[AMOUNT]] || RW || Gets or sets the initial amount of the resource available when it spawns. Accepts multiple values to build a weighted range of difficulty values.
 
|-
 
|-
 
| [[DEFNAME]] || W || Gets or sets the resource defname.
 
| [[DEFNAME]] || W || Gets or sets the resource defname.
Line 19: Line 21:
 
| [[REGEN]] || RW || Gets or sets the length of time it takes for the resource to decay, in seconds.
 
| [[REGEN]] || RW || Gets or sets the length of time it takes for the resource to decay, in seconds.
 
|-
 
|-
| [[SKILL]] || RW || Gets or sets the difficulty of gathering the resource. Accepts multiple values to build a weighted range of difficulty values.
+
| [[SKILL (Region Resource Property)|SKILL]] || RW || Gets or sets the difficulty of gathering the resource. Accepts multiple values to build a weighted range of difficulty values.
 
|}
 
|}
  
  
 
==Triggers==
 
==Triggers==
Here is a list of all region triggers. Click on the trigger name for more detailed information such as arguments and examples.
+
Here is a list of all region resource triggers. Click on the trigger name for more detailed information such as arguments and examples.
  
 
{| border="1" cellspacing="4" cellpadding="4"
 
{| border="1" cellspacing="4" cellpadding="4"
 
| '''Name''' || '''Description'''
 
| '''Name''' || '''Description'''
 +
|-
 +
| [[@ResourceFound]] || Fires when the resource is spawned.
 +
|-
 +
| [[@ResourceGather]] || Fires when you are going to gather a resource.
 
|-
 
|-
 
| [[@ResourceTest]] || Fires when the resource is being considered for spawning.
 
| [[@ResourceTest]] || Fires when the resource is being considered for spawning.
|-
 
| [[@ResourceFound]] || Fires when the resource is spawned.
 
 
|}
 
|}
 
  
 
==Examples==
 
==Examples==

Latest revision as of 21:36, 5 December 2013

Help
Available languages


A region resource block defines a resource that can be found in a region.


Properties

The following properties are available when defining a region resource:

Name Read/Write Description
AMOUNT RW Gets or sets the initial amount of the resource available when it spawns. Accepts multiple values to build a weighted range of difficulty values.
DEFNAME W Gets or sets the resource defname.
REAP RW Gets or sets the BASEID of the resource item.
REAPAMOUNT RW Gets or sets the amount of the resource that can be gathered in one use of a skill. Accepts multiple values to adjust based on skill level.
REGEN RW Gets or sets the length of time it takes for the resource to decay, in seconds.
SKILL RW Gets or sets the difficulty of gathering the resource. Accepts multiple values to build a weighted range of difficulty values.


Triggers

Here is a list of all region resource triggers. Click on the trigger name for more detailed information such as arguments and examples.

Name Description
@ResourceFound Fires when the resource is spawned.
@ResourceGather Fires when you are going to gather a resource.
@ResourceTest Fires when the resource is being considered for spawning.

Examples

//
// Fish resource from default script pack.
//
[REGIONRESOURCE mr_fish1]
SKILL=1.0,100.0    // requires between 1% and 100% skill to gather
AMOUNT=9,30        // between 9 and 30 fish available
REAP=i_fish_big_1  // the resource item
REGEN=60*60*10     // decays after 10 hours