Conditions Properties - Floogen/FashionSense GitHub Wiki
Conditions allow frames to be skipped or only played when certain criteria are met.
If a frame's condition(s) fails to pass, then the frame will be skipped.
Property | Required | Description | Default |
---|---|---|---|
Name |
true |
The logical condition to check against See the section below for more details. |
N/A |
GroupName |
true |
The conditional group to check against See this page for more details. |
N/A |
Value |
true |
The value to check against, based on Name .This can utilize the random function. |
N/A |
Operator |
false |
Accepts a comparison operator, which allows for comparisons against the Value property. |
N/A |
Independent |
false |
If false , this condition will require all other conditions to be true .If true , this condition will return true so long as it evaluates as true , regardless of the other conditions |
false |
Name | Description | Expected Value | Example Value |
---|---|---|---|
GameStateQuery |
A game state query which determines if the condition is valid | string |
N/A |
MovementSpeed |
The speed which the player is moving at. Affected by terrain, buffs and horse riding. Note: Is true if the given input is greater than or equal to the player's current speed. |
long |
5 |
MovementSpeedLogical |
The speed which the player is moving at. Affected by terrain, buffs and horse riding. Unlike MovementSpeed , this condition can make use of the Operator logic. |
long |
5 |
MovementDuration |
Duration (milliseconds) that the player has been moving. The duration resets when the player stops moving. Note: Is true if the given input is greater than or equal to the player's current movement duration. |
long |
1000 |
MovementDurationLogical |
Duration (milliseconds) that the player has been moving. The duration resets when the player stops moving. Unlike MovementDuration , this condition can make use of the Operator logic. |
long |
1000 |
IsElapsedTimeMultipleOf |
Duration (milliseconds) that has passed since this frame has been played. The duration resets after the frame is played. |
long |
1000 |
DidPreviousFrameDisplay |
Whether or not the frame before this one played successfully (i.e. passed its conditions) | bool |
true |
RidingHorse |
If the player is currently riding a horse | boolean |
false |
InventoryItemCount |
The current amount of items in the player's inventory | int |
12 |
IsInventoryFull |
If the player's inventory is currently full | boolean |
false |
IsDarkOut |
If the current location is dark or raining or if the current mine location is dark | boolean |
false |
IsRaining |
If the current location is raining | boolean |
false |
IsSnowing |
If the current location is snowing | boolean |
false |
IsWalking |
If the player is performing the walking animation | boolean |
false |
IsRunning |
If the player is performing the running animation | boolean |
false |
IsSitting |
If the player is currently sitting | boolean |
false |
IsEating |
If the player is performing the eating animation | boolean |
false |
IsDrinking |
If the player is performing the drinking animation | boolean |
false |
IsCasting |
If the player is casting a line out while fishing | boolean |
false |
IsFishing |
If the player is performing the waiting fishing animation | boolean |
false |
IsNibbling |
If the player is fishing and there is a fish nibbling on the line | boolean |
false |
IsReeling |
If the player is currently reeling in a fish | boolean |
false |
IsPullingFishOutOfWater |
If the player is currently pulling a fish out of water (after the minigame) | boolean |
false |
ToolChargeLevel |
The current tool charge level, which starts at 0. This increases when the player is "charging" the upgraded tool (the hoe / watering can / axe) by holding the use action. |
int |
0 |
IsUsingHeavyTool |
If the player is currently using the hoe / pickaxe / axe | boolean |
false |
IsUsingMilkPail |
If the player is currently using the milk pail | boolean |
false |
IsUsingShears |
If the player is currently using the shears | boolean |
false |
IsUsingPan |
If the player is currently using the pan | boolean |
false |
IsUsingScythe |
If the player is currently using the scythe | boolean |
false |
IsWatering |
If the player is currently using the watering can | boolean |
false |
IsUsingMeleeWeapon |
If the player is currently using a melee weapon | boolean |
false |
IsUsingSlingshot |
If the player is currently using a slingshot | boolean |
false |
IsUsingDagger |
If the player is currently using a dagger | boolean |
false |
IsHarvesting |
If the player is performing the harvesting animation (plucking crop from the ground) | boolean |
false |
IsInMines |
If the current location is within the mines | boolean |
false |
IsOutdoors |
If the current location is outdoors | boolean |
false |
HealthLevel |
The player's current health | int |
100 |
StaminaLevel |
The player's current stamina | int |
100 |
IsCarrying |
If the player is currently holding an item above their head | boolean |
false |
IsSwimming |
If the player is currently swimming | boolean |
false |
IsInBathingSuit |
If the player is currently wearing their bathing suit | boolean |
false |
IsSick |
If the player is currently playing the "sick" animation | boolean |
false |
IsPassingOut |
If the player is currently passing out | boolean |
false |
CurrentFarmerFrame |
The current FarmerSprite.CurrentFrame of the player | int |
false |
RandomChance |
The percentage value to be checked against the framework | float |
0.0 |
Name | Description |
---|---|
GreaterThan |
Returns true if the Value is greater than the Condition 's current value |
EqualTo |
Returns true if the Value is equal to the Condition 's current value |
LessThan |
Returns true if the Value is less than the Condition 's current value |
{
"Name": "Accessory Which Changes Sprite Based On Player's Inventory Space",
"BackAccessory": {
"DrawAfterPlayer": true,
"StartingPosition": {
"X": 0,
"Y": 0
},
"HeadPosition": {
"X": 0,
"Y": -12
},
"AccessorySize": {
"Width": 16,
"Length": 16
},
"UniformAnimation": [
{
"Frame": 0,
"Duration": 100,
"OverrideStartingIndex": true,
"Conditions": [
{
"Name": "InventoryItemCount",
"Operator": "GreaterThan",
"Value": 0
},
{
"Name": "InventoryItemCount",
"Operator": "LessThan",
"Value": 12
}
]
},
{
"Frame": 1,
"Duration": 100,
"OverrideStartingIndex": true,
"Conditions": [
{
"Name": "InventoryItemCount",
"Operator": "GreaterThan",
"Value": 11
},
{
"Name": "InventoryItemCount",
"Operator": "LessThan",
"Value": 24
}
]
},
{
"Frame": 2,
"Duration": 100,
"OverrideStartingIndex": true,
"Conditions": [
{
"Name": "InventoryItemCount",
"Operator": "GreaterThan",
"Value": 23
}
]
}
]
}
}
Random values can be generated or selected for the Value
property of conditions.
Note: Random values are recalculated after the frame that requests them is played successfully.
Selects a random integer value between Min
and Max
.
Note: This does not accept decimal values (1.0, 1.1, etc.)
Example usage
"Conditions": [
{
"Name": "IsElapsedTimeMultipleOf",
"Value": {
"RandomRange": {
"Min": 1000,
"Max": 5000
}
}
}
]
Selects a random value from a given list.
Note: This does accept decimal values (1.0, 1.1, etc.) and other values such as strings ("test", "123", etc.)
Example usage
"Conditions": [
{
"Name": "IsElapsedTimeMultipleOf",
"Value": {
"RandomValue": [ 1000, 2500, 5000 ]
}
}
]
{
"Name": "Long Hair",
"RightHair": {
"DisableGrayscale": true,
"StartingPosition": {
"X": 0,
"Y": 0
},
"HeadPosition": {
"X": 16,
"Y": 0
},
"HairSize": {
"Width": 48,
"Length": 32
},
"IdleAnimation": [
{
"Frame": 0,
"Duration": 100
}
],
"RequireAnimationToFinish": true,
"MovementAnimation": [
{
"Frame": 0,
"Duration": 100
},
{
"Frame": 1,
"Duration": 100
},
{
"Frame": 2,
"Duration": 100
},
{
"Frame": 3,
"Duration": 100,
"OverrideStartingIndex": true,
"Conditions": [
{
"Name": "MovementDuration",
"Value": 500
},
{
"Name": "MovementSpeed",
"Value": 4
}
]
},
{
"Frame": 4,
"Duration": 100,
"Conditions": [
{
"Name": "MovementDuration",
"Value": 500
},
{
"Name": "MovementSpeed",
"Value": 4
}
]
},
{
"Frame": 5,
"Duration": 100,
"Conditions": [
{
"Name": "RidingHorse",
"Value": true
}
]
},
{
"Frame": 6,
"Duration": 100,
"Conditions": [
{
"Name": "RidingHorse",
"Value": true
}
]
}
]
}
}