Modding:MainScreen
Public Methods
static void addGameText(string gameText)
Output string to screen. Does not automatically add newlines.
Unlike io.write, will only accept one string parameter, making it useful to get around the LUFA garbage array bug.
static void continueSceneToMapScene()
Removes screen buttons (but not shown text). Will display one 'continue' button, which when pressed, will redirect flow back to the map (/ player navigation). This is a shortcut into the game's scene flow control that handles most cases, but for instance, if you wanted to continue then go to somewhere else, you should bug Skye to expose the full scene control system.
Added in r35
static void changeToForcedTransformationScene(string prefix, Species species, bool allowEscape = true, function switchSceneAfterTransformationSequence = null, function teleportPlayerOnFinish = true, bool resetLustHP = true, function customOutputFunction = null, bool withContinueScene = true)
Using this, you can play the forced transformation sequence scene. This is primarily useful if you are doing a forced transformation sequence that should be triggered from customized monster logic (ex: not normal defeat logic) or triggered from an arbitrary object.
Note there are several other methods you may want to consider instead of this:
- If you just want to cause a single body part to be transformed at a time, see causeTF()
- If you do want a multi-step tf sequence, and are already triggering this on player defeat to a monster, you probably want to use the normal player defeat logic. This will also check to see if the player is TF'able before trying to TF the player, as well as updating the monster's state to sleep, and inseminating the player if configured. You can trigger this logic on defeat by either
- Not defining the doMonsterVictory function in the json, or
- Defining the doMonsterVictory function, but inside your custom function, calling doMonsterVictoryDefault() to do normal logic
If you do want to call this function, then you'll need to define the following text variables:
| Text Variable | Purpose |
|---|---|
| <PREFIX>_PLAYER_DEFEAT | Initial text shown to player on defeat |
| <PREFIX>_DEFEAT_TFTIME | Text shown every step player is being tf'ed |
| <PREFIX>_DEFEAT_TFTOTAL | Text shown at conclusion of tf |
| <PREFIX>_DEFEAT_TFESCAPE_SUCCESS | Player tried to escape, and did |
| <PREFIX>_DEFEAT_TFESCAPE_FAILURE | Player tried to escape, but failed |
| <PREFIX>_DEFEAT_TFACCEPT | Player did not try to escape / accepted the tf |
Function parameters:
string prefix
Defines the <PREFIX> part of the text keys, per the above table.
Species species
Which TF is being done
bool allowEscape = true
If escape is possible. Button will still be shown, but it will be impossible to escape regardless of lust level.
function switchSceneAfterTransformationSequenceScript = null
This can be used to transition to a different scene after the sequence, instead of back to the normal mapscene.
If not null, called to determine logic for switching scene. (If not set, just goes back to mapscene). The bool indicates if the full tf played out (false if the player escaped mid-tf)
(Most users will just leave this as 'null')
function teleportPlayerOnFinish = true
Whether to teleport player to a respawn position after the sequence finishes
bool resetLustHP = true
On full tf: whether to reset lust + hp.
On early escape: whether to reset lust.
function customOutputFunctionScript = null
If set, this function is called with the text key suffix each tf instead of outputting monsterPrefix+suffix text. (Most users will just leave this as 'null')
bool withContinueScene = true
If true, prepends a continue scene prior to switching the scene to the TF sequence scene. (Set true if you already have text on screen player should have a chance to read first)
Added in r56.1
static void changeToClaimOwnershipScene(Entity potentialOwner, string textPrefix, bool withContinueScene, bool sleepAfterward, function customAfterSceneScript = null)
Transitions to the claim ownership scene -- a scene that displays some intro text, information about the entity (presumably a dom/monster, but can be any entity), and then offers the player the ability to accept or reject them as their new owner. This scene already performs logic for handling if player is already owned by another dom and includes preset text variables.
You don't need to re-define text variables for this function (most monsters currently don't), but if you wish to, you should redefine these:
| Text Variable | Purpose |
|---|---|
| <PREFIX>_CLAIM_START | Initial text, shown regardless of whether player has been claimed by some other dom or not. |
| <PREFIX>_CLAIM_FAIL_ALREADY_OWNED | After the initial text, the NPC will check if player is owned by someone else. There are multiple ways for this detection to happen, and this particular field overrides all of them.
If player is already owned by another dom, this text can be optionally defined if the NPC has some unusual way of identifying ownership over the player. Generally though it's safe to leave this undefined, and one of the standard identification methods below will be used instead. |
| <PREFIX>_CLAIM_FAIL_ALREADY_OWNED_DETECT_SMELL | If your dom can be smelled by any other dom |
| <PREFIX>_CLAIM_FAIL_ALREADY_OWNED_DETECT_COLLAR_SLAVE | Slave collar if player is wearing one |
| <PREFIX>_CLAIM_FAIL_ALREADY_OWNED_DETECT_COLLAR_PET | Pet collar if player is wearing one |
| <PREFIX>_CLAIM_FAIL_ALREADY_OWNED_DETECT_GENERIC | Generic fallback if none of the above apply |
| <PREFIX>_CLAIM_FAIL_ALREADY_DETECT_END | The above detection text is then followed by this |
| <PREFIX>_CLAIM_OK | Scene for player accepting ownership |
| <PREFIX>_CLAIM_FAIL_RESIST | Scene for player rejecting ownership |
Entity potentialOwner
The entity (probably a monster) who is trying to claim ownership over player
string textPrefix
Defines the <PREFIX> part of the text keys, per the above table.
bool withContinueScene
If true, prepends a continue scene prior to switching the scene to the TF sequence scene. (Set true if you already have text on screen player should have a chance to read first)
bool sleepAfterward
If true, monster will go to sleep after this scene. (This is ignored if customAfterSceneScript parameter is defined)
function customAfterSceneScript = null
Instead of doing default scene handling and going back to map, this function can be called instead. This lets you do some other scene or action instead.
Added in r56.1