In-game Functions: Difference between revisions

Update for v1.0.5 & document discoverMark
(Update for 1.0.2)
(Update for v1.0.5 & document discoverMark)
Line 1: Line 1:
{{V|1.0.2}}
{{V|1.0.5}}
In-game functions are responsible for most things in the game. It is possible to interact directly with them through the console. This can be used to add items, levels, GP and more. These functions can be executed though the console. To access the console open Developer Tools (usually by pressing F12) in your browser and navigate to the console. Then, simply paste the code in the input field and press enter. Most functions will require you to fill out variables in the code before executing them. Note that all code is case sensitive.
In-game functions are responsible for most things in the game. It is possible to interact directly with them through the console. This can be used to add items, levels, GP and more. These functions can be executed though the console. To access the console open Developer Tools (usually by pressing F12) in your browser and navigate to the console. Then, simply paste the code in the input field and press enter. Most functions will require you to fill out variables in the code before executing them. Note that all code is case sensitive.


Line 260: Line 260:
  <nowiki>unlockPet(4);</nowiki>
  <nowiki>unlockPet(4);</nowiki>
The above code will result in the unlocking of {{PetIcon|Cool Rock}}.
The above code will result in the unlocking of {{PetIcon|Cool Rock}}.
== game.summoning.discoverMark ==
The discoverMark function is used to discover [[Summoning#Summoning Marks|Summoning Marks]]. Once discovered, there is no supported method to allow a mark to become undiscovered again.
<nowiki>game.summoning.discoverMark(mark)</nowiki>
=== Attributes ===
{| class="wikitable"
|-
! Attribute !! Type !! Optional? !! Default Value !! Description
|-
| mark || object || No || || A mark object, representing the mark to be discovered.<br/>An array of all available marks can be accessed at <code>Summoning.marks</code>, and the IDs of each mark can be easily identified using the <code>Summons</code> enum.
|}
=== Examples ===
<nowiki>game.summoning.discoverMark(Summoning.marks[Summons.Dragon]);</nowiki>
The above code discovers a single mark for the {{ItemIcon|Dragon}} familiar. Marks may be found for other familiars by changing <code>Summons.Dragon</code> as required.


== Reference Tables ==
== Reference Tables ==