Appearance Syncing - Floogen/FashionSense GitHub Wiki
What is Appearance Syncing?
AppearanceSyncing
allows mod authors to associate the animation updating of Fashion Sense appearances to another appearance (such as pants). This makes it easier to sync the movement between two appearances without having to worry about the Duration
or EndWhenFarmerFrameUpdates
animation properties.
For example, you could sync the appearance of your Fashion Sense shoes with the pants of the player, causing the shoes to animate (e.g. iterate their animation frame) when the player's pants animate.
Note: When a Fashion Sense appearance's animation updates (the frame iterates), conditions will still be evaluated. If the newly iterated frame is not valid, then Fashion Sense will keep iterating until a valid frame is found.
TargetAppearanceType
The TargetAppearanceType
property determines the target that your appearance will sync to.
TargetAppearanceType
can be one of the following values:
- Hat
- Hair
- Accessory
- Shirt
- Sleeves
- Pants
- Shoes
Note: The value for TargetAppearanceType
should not be the same type as your appearance (e.g. don't use a TargetAppearanceType
of Hat
when you working with a Fashion Sense hat).
AnimationType
The AnimationType
property determines what type of animation of the TargetAppearanceType
that your appearance will sync to.
AnimationType
can be one of the following values:
- Idle
- Moving
- Uniform
Example Usage
Below is an example usage of AppearanceSyncing
.
{
"Name": "Shoes That Sync With Pants",
"LeftShoes": {
"StartingPosition": {
"X": 0,
"Y": 0
},
"BodyPosition": {
"X": 0,
"Y": -15
},
"ShoesSize": {
"Width": 16,
"Length": 16
},
"AppearanceSyncing": [
{
"TargetAppearanceType": "Pants",
"AnimationType": "Idle"
},
{
"TargetAppearanceType": "Pants",
"AnimationType": "Moving"
}
],
"IdleAnimation": [
{
"Frame": 0,
"Duration": 100
}
],
"MovementAnimation": [
{
"Frame": 0,
"Conditions": [
{
"Name": "IsWalking",
"Value": true
}
]
},
{
"Frame": 1,
"Conditions": [
{
"Name": "IsWalking",
"Value": true
}
]
},
{
"Frame": 0,
"Conditions": [
{
"Name": "IsWalking",
"Value": true
}
]
},
{
"Frame": 2,
"Conditions": [
{
"Name": "IsWalking",
"Value": true
}
]
},
{
"Frame": 0,
"Conditions": [
{
"Name": "IsRunning",
"Value": true
}
]
},
{
"Frame": 5,
"Conditions": [
{
"Name": "IsRunning",
"Value": true
}
]
},
{
"Frame": 3,
"Conditions": [
{
"Name": "IsRunning",
"Value": true
}
]
},
{
"Frame": 0,
"Conditions": [
{
"Name": "IsRunning",
"Value": true
}
]
},
{
"Frame": 6,
"Conditions": [
{
"Name": "IsRunning",
"Value": true
}
]
},
{
"Frame": 4,
"Conditions": [
{
"Name": "IsRunning",
"Value": true
}
]
}
]
}
}