User:Oggal/Sandbox: Difference between revisions

From Hazeron Wiki
Jump to navigation Jump to search
No edit summary
 
Line 40: Line 40:
! Method Name!! Arguments!! Description !! Return
! Method Name!! Arguments!! Description !! Return
|-
|-
|  
| avatar || || Returns the person executing the story.
|-
| avatarConstructedIndustryHabitable || || Test if the person has ever constructed a particular industry on a habitable world. True is returned if they ever planned one, regardless of whether it was completed.
|-
| avatarConstructedIndustryHarsh || || Test if the person has ever constructed a particular industry on a world with a harsh environment. True is returned if they ever planned one, regardless of whether it was completed.
|-
| avatarCreditAccount || real || Adds a number of cronodollars to the person's account.
|-
| avatarCurrentItem || commodity || Test if the person's current item is a commodity.
|-
| avatarDebitAccount || real || Subtracts a number of cronodollars from the person's account.
|-
| avatarEnvironment || || Returns the environment atom that contains the person. This is usually a solar system but it can be an arena or a design studio. The environment containing the person is the only environment a story can access. || atom
|-
| avatarEVAMinutes  || || Returns the number of minutes of EVA experience.
|-
| avatarHadItem || commodity || Test if the person's gear has ever contained a commodity.
|-
| avatarHasFood || || Test if the person's gear contains any food.
|-
| avatarHasItem || commodity || Test if the person's gear contains a commodity.
|-
| avatarHasItemInHand || commodity || Test if the person is holding a commodity in their hand.
|-
| avatarHasItemInHandSpecific || commodity,quality,empire,text || Test if the person is holding a specific commodity in their hand. 'text' is compared against the inscription only if 'text' is not blank.
|-
| avatarHasItemSpecific  || commodity,quality,empire,text || Test if the person's gear contains a very specific commodity. 'text' is compared against the inscription only if 'text' is not blank.
|-
| avatarHasPreon || || Test if the person's gear contains any kind of preon. Also checks inside the ship the person is aboard; checks both cargo and items lying about that are not on static display. Also checks in the vehicle the person is aboard, if any.
|-
| avatarInCity || || Test if the person is in a city. The person must be standing in a developed terrain tile.
|-
| avatarInitScenario || scenario || Test if the person started the game using a specified 'scenario'.
|-
| avatarInOrbit || || Test if the person is in orbit at a planet, outside the atmosphere.
|-
| avatarInStudio || || Test if the person is inside a design studio instance.
|-
| avatarInVehicle || || Test if the person is inside a certain type of vehicle.
|-
| avatarInVehicleMoving || || Test if the person is inside a certain type of vehicle that is moving.
|-
| avatarInVehicleOnGround || || Test if the person is inside a certain type of vehicle that is touching the ground.
|-
| avatarItemCount || commodity || Returns the amount of a commodity possessed by the avatar.
|-
| avatarItemMakePermanent || commodity,quality,empire,text || Makes permanent a specific item in the person's gear. Permanent story items persist in the game after the story ends. Nonpermanent story items are removed from the game when the story ends. <br><br>Arguments:<br>'text' is compared against the inscription only if 'text' is not blank.
|-
| avatarItemSetDropOnDeath || int,commodity,quality,empire,text || Sets the 'drop' behavior of an item: 0=default random drop on death, 1=no drop, 2=always drop. 'bool' is the new state.
|-
| avatarLineageAvatar || || Returns true if the avatar's lineage is a regular avatar.
|-
| avatarLineageDemiavatar || || Returns true if the avatar's lineage is demiavatar.
|-
| avatarLineageHighborn || || Returns true if the avatar's lineage is highborn.
|-
| avatarOnLineMinutes || || Returns number of minutes the person has been on line.
|-
| avatarRecallNpcWorld || ''text'' <sup>[this assumption is unchecked]</sup> || Returns the world on which an npc was last seen. <br><br>Arguments:<br>'text' is the name of the npc. || world
|-
| avatarStoryCompleted || || Test if the person has completed a particular story script id.
|-
| avatarStoryCompletedMinutes || || Returns the number of minutes since a story was completed. Returns -1 if the story was never completed.
|-
| avatarStoryLastResult || || Returns a result code associated with a particular story script id. A result code of 0 to 255 indicates the avatar has run the script. -1 is returned if the story has never been started.
|-
| avatarStoryResult || int || "Stores the result for the current story in an avatar's memory. 'int' is result, in the range 0 to 255.
|-
| avatarTraversedStargate || || Test if the avatar has ever been aboard a spacecraft that traversed a stargate.
|-
| avatarVehicleMinutes || || Returns number of minutes the person has experience in a vehicle.
|}
|}

Latest revision as of 17:40, 25 June 2026

Custom Stories

Custom stores can be created in any text editor. They require at minimum 2 story blocks, the catalyst and one other. They can contain any number of blocks.

Functions

Story Functions

Story functions configure the current story. Most story functions can only be used in the catalyst block. The only exception is the 'storyDroppable' function.

Story Functions
Method Name Arguments Description Return
storyTitle text
storyAuthor text Identifies the author of the story. Required in catalyst block.
storyAutoRepeat Enables the story to automatically start repeatedly, based on the catalyst. The story can restart within 10 seconds of being terminated if an interval is not specified. Only one auto started story can be active at a time.
storyAutoRepeatUntilComplete int Enables the story to automatically start repeatedly, based on the catalyst. The story can restart within 10 seconds of being terminated if an interval is not specified.The story stops autostarting once it has been completed. A story that is dropped is not considered to be completed. Only one auto started story can be active at a time.
storyAutoStart Enables the story to automatically start once, based on the catalyst. Only one auto started story can be active at a time.
storyBrief text Gives a brief description of the story. Required in catalyst block.
storyDroppable bool Sets the current story's droppable state. The droppable state of a story can be changed at any time in the script. A story that is not droppable cannot be canceled by the avatar using the Jobs window. The avatar gets a thought message if they try dropping an undroppable story. Usually, avatars must be able to drop a story to enable it to restart. Disable drop only when dropping would break the story in some way.
storyInterval int Specifies the time interval in minutes before the story can start again. The time interval starts when the story terminates, whether by finishing or by dropping.
storyResultText int,text Declares the text that explains a result code set by avatarStoryResult.

Avatar Functions

Avatar functions operate on the avatar atom for whom the story is running.

Avatar Functions
Method Name Arguments Description Return
avatar Returns the person executing the story.
avatarConstructedIndustryHabitable Test if the person has ever constructed a particular industry on a habitable world. True is returned if they ever planned one, regardless of whether it was completed.
avatarConstructedIndustryHarsh Test if the person has ever constructed a particular industry on a world with a harsh environment. True is returned if they ever planned one, regardless of whether it was completed.
avatarCreditAccount real Adds a number of cronodollars to the person's account.
avatarCurrentItem commodity Test if the person's current item is a commodity.
avatarDebitAccount real Subtracts a number of cronodollars from the person's account.
avatarEnvironment Returns the environment atom that contains the person. This is usually a solar system but it can be an arena or a design studio. The environment containing the person is the only environment a story can access. atom
avatarEVAMinutes Returns the number of minutes of EVA experience.
avatarHadItem commodity Test if the person's gear has ever contained a commodity.
avatarHasFood Test if the person's gear contains any food.
avatarHasItem commodity Test if the person's gear contains a commodity.
avatarHasItemInHand commodity Test if the person is holding a commodity in their hand.
avatarHasItemInHandSpecific commodity,quality,empire,text Test if the person is holding a specific commodity in their hand. 'text' is compared against the inscription only if 'text' is not blank.
avatarHasItemSpecific commodity,quality,empire,text Test if the person's gear contains a very specific commodity. 'text' is compared against the inscription only if 'text' is not blank.
avatarHasPreon Test if the person's gear contains any kind of preon. Also checks inside the ship the person is aboard; checks both cargo and items lying about that are not on static display. Also checks in the vehicle the person is aboard, if any.
avatarInCity Test if the person is in a city. The person must be standing in a developed terrain tile.
avatarInitScenario scenario Test if the person started the game using a specified 'scenario'.
avatarInOrbit Test if the person is in orbit at a planet, outside the atmosphere.
avatarInStudio Test if the person is inside a design studio instance.
avatarInVehicle Test if the person is inside a certain type of vehicle.
avatarInVehicleMoving Test if the person is inside a certain type of vehicle that is moving.
avatarInVehicleOnGround Test if the person is inside a certain type of vehicle that is touching the ground.
avatarItemCount commodity Returns the amount of a commodity possessed by the avatar.
avatarItemMakePermanent commodity,quality,empire,text Makes permanent a specific item in the person's gear. Permanent story items persist in the game after the story ends. Nonpermanent story items are removed from the game when the story ends.

Arguments:
'text' is compared against the inscription only if 'text' is not blank.
avatarItemSetDropOnDeath int,commodity,quality,empire,text Sets the 'drop' behavior of an item: 0=default random drop on death, 1=no drop, 2=always drop. 'bool' is the new state.
avatarLineageAvatar Returns true if the avatar's lineage is a regular avatar.
avatarLineageDemiavatar Returns true if the avatar's lineage is demiavatar.
avatarLineageHighborn Returns true if the avatar's lineage is highborn.
avatarOnLineMinutes Returns number of minutes the person has been on line.
avatarRecallNpcWorld text [this assumption is unchecked] Returns the world on which an npc was last seen.

Arguments:
'text' is the name of the npc.
world
avatarStoryCompleted Test if the person has completed a particular story script id.
avatarStoryCompletedMinutes Returns the number of minutes since a story was completed. Returns -1 if the story was never completed.
avatarStoryLastResult Returns a result code associated with a particular story script id. A result code of 0 to 255 indicates the avatar has run the script. -1 is returned if the story has never been started.
avatarStoryResult int "Stores the result for the current story in an avatar's memory. 'int' is result, in the range 0 to 255.
avatarTraversedStargate Test if the avatar has ever been aboard a spacecraft that traversed a stargate.
avatarVehicleMinutes Returns number of minutes the person has experience in a vehicle.