Clothing JSON Mod Format: Difference between revisions

From SkyCorp Global
Jump to navigation Jump to search
(Created page with "Entity JSON supports a variety of parameters to create custom objects. JSON definitions can specify each as programmable (LUA) or literal values. {| class="wikitable" !Return...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Entity JSON supports a variety of parameters to create custom objects.  JSON definitions can specify each as programmable (LUA) or literal values.
Entity JSON supports a variety of parameters to create custom objects.  JSON definitions can specify each as programmable (LUA) or literal values.
(All [[Entity Mod JSON Format|Entity JSON]] parameters are also supported!)
Note that clothing uses a type of 'CLOTHING' instead of 'ENTITY'
{| class="wikitable"
{| class="wikitable"
!Return Type
!Return Type
!Parameter
!Parameter
|-
|string
|'''name'''
Title of the item.
|-
|string
|'''description'''
Description of the item when looked at.
|-
|-
|boolean
|boolean
|'''playerOnEnterRoom'''
|'''isVulnerableToMasculineTheft'''
Can be used to present some special text when player enters a room when this object is inside it. 
If true, this item can be lost in situations where masculine clothes are lost (currently only the thief scene).
 
Normally true.  If false, will prevent mapscene from doing further room processing (be sure to use a continue scene)
|-
|-
|boolean
|boolean
|'''playerAttemptLeaveRoom'''
|'''isConcealableClothing'''
 
If true, this item can conceal a transformation in the slot it is in (true for most clothing items).
Can be used to prevent player from leaving room when in same room as entity.
 
Normally true.  If false, will prevent mapscene from doing further room processing (be sure to use a continue scene)  
|-
|-
|boolean
|string
|'''isExaminable'''
|'''getSlot'''
Allow player to examine object?  (This is the page description is displayed onOtherwise will be invisible to player).
Which [[Clothing slot|slot]] the clothes exists in.   
|-
|boolean
|'''isUseable'''
Display the 'use' button on the examine item page?
|-
|boolean
|'''doUse'''
Action to do on using entity.
 
Usually should return true -- this will cause a continue scene after the text.
 
For a manual continue or a different scene change, return false.
|-
|boolean
|'''isPickupable'''
Should a pick-up item be displayed on item page if item is in the world?
|-
|boolean
|'''playerAttemptPickupCheck'''
Player has opted to pick up the item (may output descriptive message to screen)


Returns if successful in pickup attempt.
This should almost certainly be a literal string -- changing this value during run-time will lead to unknown results.   
|-
|boolean
|'''isDropable'''
Should a drop item be displayed on item page if item is in inventory?
|-
|boolean
|'''playerAttemptDropCheck'''
Player has opted to drop the itemReturn if successful in drop attempt.
|-
|void
|'''inInventoryTick'''
Called each turn the item exists in the player's inventory.
|-
|void
|'''inWorldTick'''
Called each turn the item exists on the map somewhere (may not be called if player is on a different map).
|-
|void
|'''(TODO) notifyPlayerEnterRoom'''
|-
|void
|'''(TODO) notifyPlayerEnterRoomPreScene'''
|-
|void
|'''(TODO) notifyPlayerLeftRoom'''
|}
|}

Latest revision as of 02:10, 30 December 2017

Entity JSON supports a variety of parameters to create custom objects. JSON definitions can specify each as programmable (LUA) or literal values.

(All Entity JSON parameters are also supported!)

Note that clothing uses a type of 'CLOTHING' instead of 'ENTITY'

Return Type Parameter
boolean isVulnerableToMasculineTheft

If true, this item can be lost in situations where masculine clothes are lost (currently only the thief scene).

boolean isConcealableClothing

If true, this item can conceal a transformation in the slot it is in (true for most clothing items).

string getSlot

Which slot the clothes exists in.

This should almost certainly be a literal string -- changing this value during run-time will lead to unknown results.