Essentials Docs Wiki

The Essentials wiki has moved and is now at: Essentials Engine wiki

This wiki will no longer be updated.

READ MORE

Essentials Docs Wiki
Tag: Visual edit
Maruno (talk | contribs)
No edit summary
Line 1: Line 1:
  +
{{for|regular visible items lying around in maps|Item balls}}
 
This page describes how the Itemfinder item works in Essentials.
 
This page describes how the Itemfinder item works in Essentials.
   
 
== The Itemfinder ==
 
== The Itemfinder ==
   
The Itemfinder, also known as the Dowsing Machine, is a key item used to help players find hidden items within close proximity.
+
The Itemfinder, also known as the Dowsing Machine, is a Key Item that can be used to find hidden items in maps. It has a range of 7 tiles in the east/west directions and 5 tiles in the north/south directions, which covers all the whole tiles visible on-screen at the default screen size (it doesn't cover the half-tiles visible at the edges of the screen).
   
  +
When the Itemfinder detects a hidden item, it will turn the player to face towards it. If the player is standing on it, the player will spin around instead.
== Hidden Items ==
 
The Itemfinder will only consider an item a hidden item if it is properly set as one, i.e., hidden items ''must'' have the exact name "<code>HiddenItem</code>". See the [https://essentialsdocs.fandom.com/wiki/Item_balls Item Balls'] sub-section, "hidden item" for more details.
 
   
== Messages ==
+
== Hidden items ==
Depending on what the Itemfinder finds, you'll be displayed a varying message.
 
{| class="article-table"
 
|"... ... ... ... Nope! There's no response."
 
|Indicates that there are no nearby hidden items.
 
|-
 
|"The Itemfinder's indicating something right underfoot!"
 
|Indicates that your character is on a hidden item.
 
|-
 
|"Huh? The Itemfinder's responding!
 
There's an item buried around here!"
 
|Indicates that there is a hidden item nearby.
 
|}
 
   
  +
A hidden item is an event with a name of "<code>HiddenItem</code>". This name is case-sensitive and cannot have anything else in it. You can name an event "<code>HiddenItem:POTION</code>" (or some other item name), and the hidden item's event will be properly generated and renamed by the [[Compiler]]. In addition, the event's Self Switch A must be OFF for it to be detectable, because turning this ON is used to indicate that the item has already been picked up.
== Script ==
 
  +
The script for the Itemfinder can be found in PItem_ItemEffects, where you can edit the mechanics and messages.
 
  +
While the event can technically do anything (the only requirement is that it has a specific name), events detectable by the Itemfinder are [[item balls]].
  +
  +
== Itemfinder's code ==
  +
  +
The code for the Itemfinder's effect is in an ItemHandlers proc in the [[script section]] '''PItem_ItemEffects'''. It makes use of <code>def pbClosestHiddenItem</code> which is in the [[script section]] '''PItem_Items'''.
  +
 
== Tips ==
  +
  +
* You can make hidden items that [[Time-sensitive events|regenerate every so often]].

Revision as of 20:29, 19 August 2019

For regular visible items lying around in maps, see Item balls.

This page describes how the Itemfinder item works in Essentials.

The Itemfinder

The Itemfinder, also known as the Dowsing Machine, is a Key Item that can be used to find hidden items in maps. It has a range of 7 tiles in the east/west directions and 5 tiles in the north/south directions, which covers all the whole tiles visible on-screen at the default screen size (it doesn't cover the half-tiles visible at the edges of the screen).

When the Itemfinder detects a hidden item, it will turn the player to face towards it. If the player is standing on it, the player will spin around instead.

Hidden items

A hidden item is an event with a name of "HiddenItem". This name is case-sensitive and cannot have anything else in it. You can name an event "HiddenItem:POTION" (or some other item name), and the hidden item's event will be properly generated and renamed by the Compiler. In addition, the event's Self Switch A must be OFF for it to be detectable, because turning this ON is used to indicate that the item has already been picked up.

While the event can technically do anything (the only requirement is that it has a specific name), events detectable by the Itemfinder are item balls.

Itemfinder's code

The code for the Itemfinder's effect is in an ItemHandlers proc in the script section PItem_ItemEffects. It makes use of def pbClosestHiddenItem which is in the script section PItem_Items.

Tips