#author("2023-02-07T01:23:32+00:00;2023-02-07T01:18:13+00:00","default:admin","admin")
#author("2024-10-23T22:00:43+09:00","default:admin","admin")
*What are State Definitions [#o3ec9dd2]

A "state" can be granted to a terrain or skill, which, during the game, changes the cast's abilities or behavior.
You can create a "poison swamp" by giving the terrain a poisonous state, or if you give it to a skill, you can create "paralyzing attack magic" or "magic that increases the attack power of allies".
This section specifies the effects of the various states on the ability and the conditions under which they are released.

//COLOR(#FF0000):画像入る

#ref(./Database_StateDefinition.png,50%)
#br
#contents

**Function Description [#pfac834d]

//COLOR(#FF0000):画像入る

#ref(./State Add.png,80%)
#br

- ''Add''
Add a state.

- ''Add Folder''
Create a folder.

- ''Copy''
Copy the data in the selected state.

- ''Paste''
Paste the data in the copied state into the last column.

- ''Delete''
Delete state data.

-''Management Tags + Notes''
You can add management tags and jot down memorandums.
Tags are registered by adding # to the beginning of the line. Tags and notes entered in this field will not appear in the game.
//The specified tags can be used to narrow down the entries displayed in the "Picture Book" screen, etc., by specifying them in the Layout Tool function.
#br
''&color(red){(!)};''When specifying multiple tags, please DO NOT leave spaces between them.
If you put #atk#def, it will be displayed regardless of whether you filter by #atk or #def.
if you put a space like #atk #def, it will not be displayed when you filter by #atk, but only when you filter by #def.


**State Definition Properties[#pfac834d]

//COLOR(#FF0000):画像入る

#ref(./Database_StateDefinition_Name.png,80%)
#br

-''Name''
Enter a name for the state.
You can also write a description of the state.

- ''Base Settings''
-''Icon Image''
Specify an icon image of this state to be displayed in the game.

-''Motion When Used''
Specify the motion to be displayed when the cast becomes in this "state".

**Influence of State Change [#dbdfea5d]
#ref(./Database_StateDefinition_Abilities.png,80%)
#br

***Basic Settings [#gb7bc6ca]
Specify basic information such as the probability of changing to a "state" and the conditions under which the "state" ability is removed.

--''Success Rate''
Specify the probability that the cast will actually change to this state when the conditions for this change are met.
For example, if an attack is made with a weapon that has "sleep" as an attack attribute, and the attack hits the opponent, this success rate is referenced when determining whether the opponent is actually going to "sleep".
A random number between 0 and 100 is compared with the "Resistance to State" of the attack target, and if the random number exceeds it, the "state" is granted.


--''Multiplexing''
Specify the behavior when the same state is used repeatedly for the same cast.
Specifies the behavior when the same cast is affected by this "state" again while it continues to have this "state" ability.
//Select from "Disable", "Removal Condition: Overwriting" and "Removal Condition: Adding".
|Disable|This “state” cannot be multiplexed.|
|Removal Condition: Overwriting"|This “state” can be multiplexed. When the multiplexing is applied, the ongoing release condition will be overwritten (reset).&br;Example: If the condition for removal turn is 3, when a multiplexing is performed while the number of turns remaining to removal is 1, it will be counted from turn 0 again.|
|Removal Condition: Adding|This “state” can be multiplexed. When a multiplexing is performed, a new removal condition will be added to the ongoing removal condition.&br;Example: If the condition for removal turn is 3, and a multiplexing is performed while the number of remaining turns to removal is 1, the original condition for removal turn 3 is added to the number of remaining turns, and the number of remaining turns to removal becomes 4.|

---''Type''
Select from "Disable", "Removal Condition: Overwriting" and "Removal Condition: Adding".

-''Assign Terrain State Change''
Specify to which terrain state change this data should be assigned.
--''Assign Terrain State Change''
Assign this "state" to which terrain state change.
For example, if "State A" is assigned to "sleep" and "sleep" is turned on in Resources > [[Terrains]] > State Change player will be in "Sleep" = "State A".

--''Move to Back of the Party while Granted''
If turned on, a cast member who becomes in this state during a battle will automatically move to the end of the party member lineup.
This feature is enabled when Game Definition > [[Rules and Operations]]>"Rearrange by State During Battle" is on.

-''Removal Condition''
Specify the removal condition under which the state will be maintained.
Specify the conditions under which this "state" is to be removed.

--''When Battle Ends''
When turned on, the effect is removed at the end of the battle.
When turned on, the ability is lost at the end of the battle.

--''When Receiving Damage''
The effect is removed when the damage is received for the specified value.
--''Number of Turns(In Battles)''
When turned on, the ability is removed at the end of the battle.

--''Number of Steps Moved''
The effect is removed when the number of steps moved by the cast reaches the specified value.
--''Probability(%)(In Battles)''
A judgement is made on each turn during battle, and the ability is lost with a specified probability.

--''Probability''
The effect will be removed with the specified probability.
--''Cumulative Damage(In Battles)''
If the HP takes more than the specified amount of cumulative damage from the time it enters this "state," it loses its ability.
Only damage received during battles is affected; damage received on maps does not affect the judgement.
Damage values are added across battles.

--''Number of Turns''
The effect is removed when the number of turns in the battle reaches the specified value.
--''Time (Sec)(On Map)''
The ability disappears after a specified number of seconds on the map.

-''Change in Appearance When Applied''
Specify the appearance to be taken when the target enters this “state”.
If multiple “states” are assigned, the most recently assigned “state” will be applied.

-''Icon Image''
Specify an icon image of this state to be displayed in the game.
--''Display in Translucent (In Battles)''
The target with this “status” will appear translucent during battles.

--''Display Color (In Battles)''
The color of the target graphic with this “state” will be multiplied by the color assigned in this section during battles.

**State Definition: Influence of State Change[#pfac834d]
--''Display in Translucent (On Maps)''
The target with this “state” will appear translucent when it is on maps.

//COLOR(#FF0000):画像入る
--''Display Color (On Maps)''
When a target with this “state” is on maps, its graphic color will be multiplied by the color assigned in this section.

#ref(./Database_StateDefinition_InfluenceofStateChange.png,80%)
#br
-''Message''
Specify the message text to be displayed when the cast changes to this "state" during battle.
The text specified here will be displayed in Layout Tool > [[Battle Messages:https://rpgbakin.com/pukiwiki_en/?Screen+List#b16fe321]].

-''Abnormal Action''
Specify what to do in the event of this state.
---''When Activated on Ally''
Enter a message when an ally becomes in this state.

--''Unable to Act''
If selected to YES, the action is disabled when in this state.
---''When Activated on Opponent''
Enter a message when the opponent becomes in this state.

--''Attack''
If selected YES, it will ignore input commands and attack other cast members during battle.
---''When State Continues''
Enter a message when this state continues.

---''Target''
Select the target to attack from "All Allies", "All Enemies", "Oneself", "Except Oneself", "All Enemies and Allies" and "All Except Oneself".
---''When State Ends''
Enter a message when this state ends.

--''Auto Damage''
If selected to YES, damage will occur automatically for a certain period of time.
***State Abilities [#u3468c2a]
Specify the ability when the cast enters this "state".
The Add button opens the "Ability Selector Dialog".
Selecting an ability closes a dialog that allows you to specify the parameters of the ability (e.g., the amount of damage for automatic damage).

---''Frequency (Battle Turns)''
Specify the cycle in which damage occurs during battle, in terms of the number of battle turns.
-''Ability Selector''
Switch to "Category" and select the "Ability" that you wish to specify.
If you specify an "ability" that can only be set to one "state", it will not appear in this dialog.
#ref(./Database_StateDefinition_AbilitySelector.png,60%)
#br

---''Damage Type (Battles)''
Specify the type of damage that occurs during battle. Select from "Direct Value", "HP Rate", or "Maximum HP Rate".
-''Abnormal Action''
//Specify what to do in the event of this state.

---''Damage Parameter (Battles)''
Specify how much damage will occur.
If the damage type is "direct value," enter the damage value for one occurrence; if it is "HP rate," enter a percentage of the current HP; if it is "maximum HP rate," enter a percentage of the maximum HP.
--''Unable to Act (In Battles)''
It is the ability to become incapable of action during battle.

---''Appearing Cycle (Map Steps)''
Specify the cycle in which damage occurs on the map in terms of the number of steps taken by the cast to move.
--''Auto Attack (In Battles)''
The ability to ignore input commands during battle and attack the assigned cast.
If selected YES, it will ignore input commands and attack other cast members during battle.

---''Damage Type (Map)''
Specify the type of damage that occurs on the map. Select from "Direct Value", "HP Rate", or "Maximum HP Rate".
--''Auto Damage (In Battles:(HP))''
It is an ability that automatically causes damage to be incurred for each Consumption Status consumed in each assigned turn during battle.
The status name in parentheses () indicates the consumption value for which the ability is targeted.
//The damage value can be set as "direct value", "rate of consumption value to the current value" or "rate of consumption value to the maximum value".
//A negative value in the damage value will result in the ability to automatically recover the consumption value.
The Edit button opens a dialog where you can enter the following parameters.
|Target|You can select the consumption value for which damage is to be inflicted.|
|Damage Parameter (Battle)|Assigns a damage value. Depending on the Damage Type setting, the value specified will either be treated as a “direct value” or as a “rate (%)”.&br;Specifying a negative value will result in the ability to automatically recover the consumption value.|
|Damage Type (Battle)|Specifies how the values set in the damage parameter are treated when affecting the target consumption value.&br;"Direct Value": The specified value is treated as an as-is value.&br;"Rate (Current Value)": The specified value is treated as a rate (%) of the current consumption value.&br;"Rate (Max Value)": The specified number is treated as a rate (%) of the maximum consumption value.&br;|
|Frequency (Battle Turns)|Specify how many turns of damage will occur each turn.|
|Minimum Value|Specifies the lower limit of the consumption value when this ability reduces the consumption value of the target.&br;For example, if “1” is set in the “Lower Limit”, the status will never fall below “1” even if it continues to be affected by effects such as “Poison”. |

---''Damage Parameter (Maps)''
Specify how much damage will occur.
If the damage type is "direct value," enter the damage value for one occurrence; if it is "HP rate," enter a percentage of the current HP; if it is "maximum HP rate," enter a percentage of the maximum HP.

--''Forced Grant at HP=0''
If selected to "YES", the cast is forced to enter this state if its HP falls below a certain value
--''Auto Damage (On Maps:(HP))''
It is the ability to automatically cause damage to the Consumption Status consumption value every assigned number of seconds on the map.
The status name in parentheses () indicates the consumption value for which the ability is targeted.
//The damage value can be set as "direct value", "rate of consumption value to the current value" or "rate of consumption value to the maximum value".
//A negative value in the damage value will result in the ability to automatically recover the consumption value.
The Edit button opens a dialog where you can enter the following parameters.
|Target|You can select the consumption value for which damage is to be inflicted.|
|Damage Parameter (Maps)|Assigns a damage value. Depending on the Damage Type setting, the value specified will either be treated as a “direct value” or as a “rate (%)”.&br;Specifying a negative value will result in the ability to automatically recover the consumption value.|
|Damage Type (Map)|When affecting the target consumption values, specify how the values set in the damage parameter are to be treated.&br;"Direct Value": The specified value is treated as an as-is value.&br;"Rate (Current Value)": The specified value is treated as a rate (%) of the current consumption value.&br;"Rate (Max Value)": The specified number is treated as a rate (%) of the maximum consumption value.&br;|
|Occurrence Period (Seconds on Map)|Specify how many seconds the damage will occur.|
|Minimum Value|Specifies the lower limit of the consumption value when this ability reduces the consumption value of the target.&br;For example, if “1” is set in the “Lower Limit”, the status will never fall below “1” even if it continues to be affected by effects such as “Poison”. |

--''Force Granting HP Rate (%)''
If "YES" is selected in the above section, specify the percentage of HP that will be forced to be granted.
--''Force Granting Below a Certain Value''
The ability to force a cast to enter this "state" when the consumption value of an assigned consumption status is less than a specified rate of its maximum value.
For an ability, you can specify the consumption value at which the ability is judged to be triggered and the threshold at which it is triggered when the consumption value falls below a certain rate.

-''States Removed Upon Granting''
--''Remove''
Specify the state to be removed on.
--''Disable Command ''
Assigning a “tag” to a battle command disables the ability to select that command from the battle command menu. 
Assign the default tags such as “Attack” and “Skill” or the tags specified in the “Battle Command Menu” under Database > Casts > [[Battles:https://rpgbakin.com/pukiwiki_en/?Casts#k1ba20ce]]. 
''&color(red){(!)};''This ability is to “disable command selection”. Therefore, it cannot disable a monster's “action by battle action AI”. Note that it is currently not possible to block a monster's skills during battles, for example.

--''States''
The list displays the currently registered "status".

-''State Disabling''
The cast member receiving this ability will not change to the assigned "state".
For example, if the "State Disabling (Poison)" ability is enabled, the cast will not be "poisoned".

-''Influence on Abilities''
Specify the influence value to be given to each ability at the time of grant.
For each ability, you can specify between -9999 and 9999.
-''State Granting''
Assigns an additional “state” to the target. 

--''Max HP''
The maximum HP changes by the entered value.
---If “Not Granted” is assigned, the specified “state” is granted to the target cast when it is not in that state. 
For example, if you assign [State Granting - Not Granted - “Sleep”] as the “poison” ability, then when a cast member who is not poisoned is put into the “poison” state by an event, “Sleep” will also be given to the cast member. 

--''Max MP''
The maximum MP changes by the entered value.。
---If “Granted” is assigned, then the specified “state” will be granted when the target cast member is in the “state”. 
For example, if you assign “State Granting - Granted - ‘Deadly Poison’” as the “Poison” ability, then when the “poisoned” cast is “poisoned” by an event, “Deadly Poison” will also be granted to them. 
''&color(red){(!)};''If the cast is not “poisoned” in the above example, this ability is disabled. 
''&color(red){(!)};''This ability will not work unless the “State” Multiplexing setting is specified as ''other than "Disable"''.        
''&color(red){(!)};''It is recommended to specify the ability to remove the ''poison'' condition together with this ability. 

--''Attack Power''
The attack power changes by the entered value.
-''State Recovery''
Recover an assigned “state”.
''&color(red){(!)};''Unlike the “state disabling” ability, this ability only removes the “state” once.

--''Magical Power''
The magical power changes by the entered value.
- ''State Change (When Removed) ''
When this “state” is removed, the assigned “state” is granted to the target. 
However, if the “state” is disabled by a “State Disabling” ability, this ability will not work.
|Always|When this “state” is removed except by “State Disabling”, the assigned “state” is given.|
|At Removal Condition|When this “state” is removed by the “Removal Condition”, the assigned “state” is given.|
|At State Recovery|When this “state” is recovered by a skill, state, etc., or in other words, when this “state” is removed except by a “Removal Condition,” the assigned “state” is given. |

--''Defense Power''
The defense power changes by the entered value.

--''Agility''
The agility changes by the entered value.
-''Change in Status''	
It is the ability to change the value of each status.
The range of change can be specified as a direct value or as a rate.
Values can be specified between -999999 and 999999.
If assigned as a rate, the current ability value will be changed by multiplying the current ability value by the rate (%).
Ex. If the rate is 50, the current ability value will be increased by 50% multiplied by the current ability value.
This ability, like the item, is valid not only in battle, but also on maps.
#br
There is a limit to the final status value that considers the increase or decrease value due to abilities.
Please check the [[Growth Factors:https://rpgbakin.com/pukiwiki_en/?Casts#Database_Cast_GrowthFactors]] section.
Ex. The status of the keyword "mhp" (default name is "Max HP") cannot be less than 1.

--''Evasion Rate''
The evasion rate changes by the entered value.
Values beyond the range of 0% to 100% are ignored when this value is taken into account.
-''Raise in Resistance:Attributes''
This ability increases the resistance to the “attribute” of the target cast by a value. (Specifying a negative value will decrease the resistance.)

--''Accuracy''
The accuracy rate changes by the entered value.
Values beyond the range of 0% to 100% are ignored when this value is taken into account.
-''Raise in Resistance:States''
This ability increases the resistance to the “state” of the target cast by a value. (Specifying a negative value will decrease the resistance.)


-''Influence on Equipment''
Specify the influence on the equipment at the time of grant.
-''Equipment''
It is the ability to influence the removal and attachment of equipment.
You can choose the following abilities for each designated equipment body part.
|No Change|It does not affect anything about the current equipment ability. In other words, if they already have the "Equipment Fixed/Disabled" ability, the "Equipment Fixed/Disabled" will not be removed even if they enter a "state" in which they have this ability.|
|Fixed|Currently equipped equipment cannot be removed.|
|Disabled|They will no longer be able to equip items at the assigned equipment body parts.|

--''Weapon''
When selected as "Fixed", the currently equipped weapon cannot be removed.
When "Disabled" is selected, weapons cannot be equipped.

--''Arm Armor''
When selected as "Fixed," the currently equipped arm armor cannot be removed.
When "Disabled" is selected, arm armor can no longer be equipped.
-''Battle''
It is the ability to influence during battle.
For each parameter, you can specify a value between -9999 and 9999.
''&color(red){(!)};''The values applied to each party member are combined and have the ability to affect the outcome.
However, please keep in mind the following:
---It does not include the ability of reserve members.
---The ability to receive from the same "state" is not duplicated.
For example, the abilities of member 1 and member 2 from the same "state A" are not combined.
On the other hand, the abilities of member 1 and member 2 from "state A" and "state B", respectively, are combined.

--''Headgear''
When selected as "Fixed," the currently equipped headgear cannot be removed.
When "Disabled" is selected, the head armor cannot be equipped.

--''Body Armor''
When selected as "Fixed," the currently equipped body armor cannot be removed.
When "Disabled" is selected, body armor can no longer be equipped.

--''Accessory 1''
When selected as "Fixed", the currently equipped accessory1 cannot be removed.
When "Disabled" is selected, accessory1 can no longer be equipped.

--''Accessory 2''
When selected as "Fixed", the currently equipped accessory2 cannot be removed.
When "Disabled" is selected, accessory2 can no longer be equipped.

-''Influence on Battles''
Specify the influence in battle at the time of grant.
For each field, you can specify a value between -9999 and 9999.

--''Add Attack Count''
The number of attacks changes by the value entered.
It is the ability to change the number of attacks by the number entered.

--''Preemptive Attack Rate (%)''
The first strike rate (%) changes by the value entered.
The ability to add or subtract the entered value (%) to or from the Preemptive Attack Rate (%).
For example, "25" would increase the Preemptive Attack Rate by 25%.
The values applied to each party member for this ability are added together to affect the result.

--''Critical Hit Rate (%)''
The critical hit rate (%) changes by the value entered.
The ability to add or subtract the entered number (%) to or from the Critical Hit Rate (%).
For example, "25" will increase the Critical Hit Rate by 25%.

--''Max Damage/Recovery Amount''
This value is added to the "Basic Max Damage/Recovery Amount" for this game specified in the Game Definition.
This is the ability to add the specified value to the "Basic Max Damage/Recovery Amount" for this game set in [[Game Definition>[[Rules and Operations]]].

--''Reward Rate (%)''
The reward rate (%) changes by the value entered.
--''Reward Price (%)''
The ability to add or subtract the entered value (%) to or from the rate of Reward Price (%) that can be obtained from defeated enemies after the battle.
For example, "25" would increase the Reward Price by 25%.
The values applied to each party member for this ability are added together to affect the result.

--''EXP Growth Rate (%)''
The experience rate (%) changes by the value entered.
--''EXP Growth Rate(%)''
The ability to add or subtract the entered number (%) to or from the rate (%) of the amount of EXP gained from the defeated enemy after the battle. For example, "25" will increase the EXP gained by 25%.

--''Item Obtaining Rate (%)''
The item availability rate (%) will change by the value entered.
--''Item Drop Rate (%)''
The ability to add or subtract the entered value (%) to the Item Drop Rate (%) that can be obtained from defeated enemies after the battle.
For example, "25" would increase the drop rate by 25%.
The values applied to each party member for this ability are added together to affect the result.


--''Change in Targetability (%)''
The entered value will change the targetability (%). If a negative number is entered, the target will be less likely to be targeted.
//マイナス値にはならない
The ability to add or subtract the entered number (%) to or from the targetability (%).
The higher the value, the more likely it is to be targeted as an attack target.
The actual target of the attack depends on the relative targetability values of each party member and the "Personality" of the enemy, which is specified in Database > Casts > [[Battles:https://rpgbakin.com/pukiwiki_en/?Casts#k1ba20ce]].

-''Influence on Map Movement''
Specify the influence on the map when moving around the map.
-''Map Movement''
It is the ability to influence when moving around maps.
''&color(red){(!)};''The values applied to each party member are combined and have the ability to affect the outcome.
However, please keep in mind the following:
---It does not include the ability of reserve members.
---The ability to receive from the same "state" is not duplicated.
For example, the abilities of member 1 and member 2 from the same "state A" are not combined.
On the other hand, the abilities of member 1 and member 2 from "state A" and "state B", respectively, are combined.

--''Change in Number of Encounters''
The number of encounters with enemies changes by the value entered.
--''Change in Number of Encounters (%)''
The ability to add or subtract the entered number (%) to or from the rate (%) of encounters with enemies.
The position on the map where the player is affects the number of enemies specified in the Map Editor > Map Settings palette > [[Enemy Distribution:https://rpgbakin.com/pukiwiki_en/?Map+Settings+Palette#ye15ba1e]].

--''Disable Encounters''
If selected to "YES", enemies will no longer be encountered.
--''Change in Encounter Rate (%)''
The ability to add or subtract the entered number (%) to or from the encounter probability (%) with enemies.
The position on the map where the player is affects the number of enemies specified in the Map Editor > Map Settings palette > [[Enemy Distribution:https://rpgbakin.com/pukiwiki_en/?Map+Settings+Palette#ye15ba1e]].
The values applied to each party member for this ability are added together to affect the result.
As a result of this ability, if the encounter probability is 0%, the enemy will not be encountered.

--''Increase Movement Speed (%)''
The movement speed changes by the entered value %.
The ability to add or subtract the entered number (%) to or from the rate (%) of the player's movement speed.
For example, "25" will increase the movement speed of by 25%.
The values applied to each party member for this ability are added together to affect the result.
As a result of this ability, if the movement speed (%) is reduced to 0%, it will not be able to move.

--''Move to Back of Party Train''
If selected to "YES," the cast in this state moves to the tail of the party train.
The ability allows the cast member in this "state" to move to the tail end of the Party Train.

--''Display in Translucent''
If selected to "YES", the cast in this state is displayed semi-transparently.



**State Definition Properties: Effects[#pfac834d]
//COLOR(#FF0000):画像入る
#ref(./Database_StateDefinition_Effects.png,80%)
#br

-''Message Upon Change of State''
--''Message Setting''
Specify a message when this state is granted during a battle.

---''When Activated on Ally''
Enter a message when an ally becomes in this state.

---''When Activated on Opponent''
Enter a message when the opponent becomes in this state.

---''When State Continues''
Enter a message when this state continues.

---''When State Ends''
Enter a message when this state ends.

-''Motion When Used''
Specify the motion for this state.

-''Effect When Used''
***Effect When Applied [#v8332f0b]
Specify the effect to be displayed on the cast in this state.


Front page   New Page list Search Recent changes   Help   RSS of recent changes