Monster Advanced JSON Mod Format: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
(All [[Entity Mod JSON Format|Entity JSON]] parameters are also supported!) | (All [[Entity Mod JSON Format|Entity JSON]] parameters are also supported!) | ||
== Example == | |||
See [[Sample: Monster Advanced Example|this sample]] for an example of this monster in action. | |||
== Fixed Fields == | == Fixed Fields == | ||
Line 9: | Line 12: | ||
'''id''' and '''customPublicFunctions''' are also supported (see entity JSON docs for details), don't forget to set id if you plan to have multiple custom monsters loaded at a time. | '''id''' and '''customPublicFunctions''' are also supported (see entity JSON docs for details), don't forget to set id if you plan to have multiple custom monsters loaded at a time. | ||
For setting up the below values, you may want to use [[Creating a Monster Mod|SCLab]] to generate a base simple monster (Monster Code), test it a bit, then update its type to MONSTERADVANCED, and move the parameters around into the correct structure. | |||
=== initialValues === | === initialValues === | ||
Line 25: | Line 30: | ||
* inseminationAttemptOnPlayerVictory | * inseminationAttemptOnPlayerVictory | ||
* inseminationAttemptOnPlayerDefeat | * inseminationAttemptOnPlayerDefeat | ||
=== defaultText === | |||
This collection of text follows the format of Monster Mods. These key-value pairs are supported: | This collection of text follows the format of Monster Mods. These key-value pairs are supported: | ||
* alert | * alert | ||
Line 35: | Line 40: | ||
* playerUse | * playerUse | ||
* playerDefeat | * playerDefeat | ||
=== defeatTf === | |||
If set, and if the default monster victory function is called, then will cause the player to TF. | |||
This collection follows the format of Monster Mods. These key-value pairs are supported: | |||
* tfTime | |||
* tfTotal | |||
* tfEscapeFailure | |||
* tfEscapeSuccess | |||
* tfAccept | |||
* bodyType | |||
== Dynamic Fields == | == Dynamic Fields == | ||
Line 42: | Line 58: | ||
!Return Type | !Return Type | ||
!Parameter | !Parameter | ||
|- | |||
|void | |||
|'''tickRest''' | |||
|- | |||
|void | |||
|'''tickAttack''' | |||
|- | |||
|void | |||
|'''tickDefeat''' | |||
|- | |||
|void | |||
|'''tickSleep''' | |||
|- | |||
|void | |||
|'''resetHPLust''' | |||
|- | |- | ||
|boolean | |boolean | ||
|''' | |'''isAttackable''' | ||
|- | |||
|void | |||
|'''doAttackPhysical''' | |||
|- | |- | ||
| | |void | ||
|''' | |'''doAttackLust''' | ||
|- | |||
|void | |||
|'''beginSleep''' | |||
|- | |||
|void | |||
|'''doMonsterVictory''' | |||
|- | |- | ||
| | |void | ||
|''' | |'''rewardDrop''' | ||
|} | |} | ||
Note that while the usual '''name''' field is supported, it is not recommenced to be used. If set, it will not update when the monster is defeated or asleep. Instead, use the fixed field initialValues.name (see above). | Note that while the usual '''name''' dynamic field is supported, it is not recommenced to be used. If set, it will not update when the monster is defeated or asleep. Instead, use the fixed field via initialValues.name (see above). |
Revision as of 06:51, 28 December 2018
Monster Advanced is a special type of entity which combines the power of LUA driven entities with the existing Monster Mods system. It is one of the hardest types of entities to create, so it is recommended to start with a simpler mod type before creating a Monster Advanced.
Monster Advanced JSON supports a variety of parameters to create custom monsters. JSON definitions can specify each as programmable (LUA) or literal values.
(All Entity JSON parameters are also supported!)
Example
See this sample for an example of this monster in action.
Fixed Fields
Note that Monster Advanced entities uses a type of 'MONSTERADVANCED' instead of 'ENTITY'
id and customPublicFunctions are also supported (see entity JSON docs for details), don't forget to set id if you plan to have multiple custom monsters loaded at a time.
For setting up the below values, you may want to use SCLab to generate a base simple monster (Monster Code), test it a bit, then update its type to MONSTERADVANCED, and move the parameters around into the correct structure.
initialValues
This collection of values follow the format of Monster Mods. These key-value pairs are supported:
- name
- escapeChance
- hp
- lustMax
- meleeAttackPlayerDamage
- meleeAttackPlayerAccuracy
- lustAttackPlayerDamage
- lustAttackPlayerAccuracy
- lustAttackChance
- meleeAttackMonsterAccuracy
- lustAttackMonsterAccuracy
- inseminationAttemptOnPlayerVictory
- inseminationAttemptOnPlayerDefeat
defaultText
This collection of text follows the format of Monster Mods. These key-value pairs are supported:
- alert
- lustOk
- lustFails
- attackOk
- attackFails
- playerUse
- playerDefeat
defeatTf
If set, and if the default monster victory function is called, then will cause the player to TF.
This collection follows the format of Monster Mods. These key-value pairs are supported:
- tfTime
- tfTotal
- tfEscapeFailure
- tfEscapeSuccess
- tfAccept
- bodyType
Dynamic Fields
In addition to the usual Entity JSON fields, monster fields are also included:
Return Type | Parameter |
---|---|
void | tickRest |
void | tickAttack |
void | tickDefeat |
void | tickSleep |
void | resetHPLust |
boolean | isAttackable |
void | doAttackPhysical |
void | doAttackLust |
void | beginSleep |
void | doMonsterVictory |
void | rewardDrop |
Note that while the usual name dynamic field is supported, it is not recommenced to be used. If set, it will not update when the monster is defeated or asleep. Instead, use the fixed field via initialValues.name (see above).