namespace pkNX.Structures.FlatBuffers.SV;
attribute "fs_serializer";
attribute "fs_valueStruct";

enum Easing : int  {
    InSine = 0,
    OutSine = 1,
    InOutSin = 2,
    InQuad = 3,
    OutQuad = 4,
    InOutQuad = 5,
    InCubic = 6,
    OutCubic = 7,
    InOutCubic = 8,
    InQuart = 9,
    OutQuart = 10,
    InOutQuart = 11,
    InQuint = 12,
    OutQuint = 13,
    InOutQuint = 14,
    InExpo = 15,
    OutExpo = 16,
    InOutExpo = 17,
    InCirc = 18,
    OutCirc = 19,
    InOutCirc = 20,
    InBack = 21,
    OutBack = 22,
    InOutBack = 23,
    InElastic = 24,
    OutElastic = 25,
    InOutElastic = 26,
    InBounce = 27,
    OutBounce = 28,
    InOutBounce = 29,
    Linear = 30,
}

struct EaseColor (fs_valueStruct) {
    Red:float;
    Green:float;
    Blue:float;
    Alpha:float;
}

table UniqueParameter {
    FrontLegDistance:float;
    RearLegDistance:float;
    GlideTurnCameraFactor:float;
    IdlingIntervalMin:float;
    IdlingIntervalMax:float;
    ImpactAngle:float;
    TreeImpactRate:float;
    RollbackDepth:float;
    ChangeOffsetA:ChangeOffsetSet;
    ChangeOffsetB:ChangeOffsetSet;
}

table SwimKinesisParameter {
    SelfSpeedMax:float;
    Accel:float;
    Friction:float;
    MinGripAngle:float;
    MaxGripAngle:float;
}

table SquatKinesisParameter {
    SpeedFixed:float;
    SlipFriction:float;
    GripFactor:float;
}

table SlidingKinesisParameter {
    Friction:float;
    SlipFriction:float;
    InitVelocityRate:float;
    BreakDecrease:float;
    BreakIncrease:float;
}

table SlideDropParameter {
    ForwardDirFactor:float;
    BackwardDirFactor:float;
    UpwardDirFactor:float;
    BackwardTime:float;
    LeanFactor:float;
}

table SlideDropKinesisParameter {
    ForwardGripFactor:float;
    BackwardGripFactor:float;
    Accel:float;
    Friction:float;
    SpeedMax:float;
    CurveAngle:float;
    SpeedUpInputThreshold:float;
    SideInputTolerance:float;
    SideMaxVelocityRate:float;
    SideFriction:float;
    SpeedUpRate:float;
    SpeedDownRate:float;
    ForwardSideAccel:float;
    BackwardSideAccel:float;
}

struct EaseFloatValue (fs_valueStruct) {
    Time:float;
    Value:float;
    Ease:Easing;
}

struct EaseColorValue (fs_valueStruct) {
    Time:float;
    Value:EaseColor;
    Ease:Easing;
}

struct RadialBlurParameter (fs_valueStruct) {
    // EaseFloatValue[3]
    Intensities0:EaseFloatValue;
    Intensities1:EaseFloatValue;
    Intensities2:EaseFloatValue;

    // EaseFloatValue[3]
    Offsets0:EaseFloatValue;
    Offsets1:EaseFloatValue;
    Offsets2:EaseFloatValue;

    Duration:float;
    YawLimit:float;
    PitchLimit:float;
    KillTime:float;
    KillEase:Easing;
}

struct OffsetVector (fs_valueStruct) {
    X:float;
    Y:float;
    Z:float;
}

table MoveParameter {
    PitchFactor:float;
    LeanAngle:float;
    LeanFactor:float;
    RotationFactor:float;
    ReverseSpeedFactor:float;
    ReverseTurnAngle:float;
    ReverseFrictionFactor:float;
    LightLandingHeight:float;
    HeavyLandingHeight:float;
    DynamicsResetCount:int;
    SpinCount:int;
    SpinMaxSpeed:float;
    SpinMaxAnimationSpeed:float;
    SpinInterpolation:float;
    SlideDropToleranceTime:float;
    StopToleranceTime:float;
    TurnStickDiffThreashold:float;
    SliderModeRate:float;
    BallThrowFrictionFactor:float;
    BallThrowBackFrictionFactor:float;
    UnlandablePushVelocity:float;
}

table JumpParameter {
    HeightHi:float;
    HeightLow:float;
    TapDuration:float;
    WaterHeightHi:float;
    WaterHeightLow:float;
}

table InputParameter {
    StickTolerance:float;
    SpinThreshold:float;
}

table GroundParameter {
    SlideDropThreshold:float;
    VerticalMargin:float;
    WallHitAngle:float;
    WaterDraftLine:float;
    WaterSurfaceMargin:float;
    WaterWithstandLine:float;
    UnderWaterThreshold:float;
    ShallowWaterThreshold:float;
    AcceptableRadiusRate:float;
}

table GroundKinesisParameter {
    FirstSpeedMax:float;
    SecondSpeedMax:float;
    SlowSpeedMax:float;
    FirstAccel:float;
    SecondAccel:float;
    SlowAccel:float;
    Friction:float;
    SlipFriction:float;
    SlipFrictionExp:float;
    MaxGripFactor:float;
    MinGripFactor:float;
    RunStickThreshold:float;
}

table GravityParameter {
    Accel:float;
    SpeedMax:float;
}

table GlideParameter {
    DampingRate:float;
    DampingThreshold:float;
    StaminaMax:float;
    StaminaCost:float;
    StaminaGain:float;
}

table GlideKinesisParameter {
    SelfSpeedMax:float;
    Accel:float;
    Friction:float;
    MinGripAngle:float;
    MaxGripAngle:float;
    GravityRate:float;
    FlareSpeedMax:float;
}

table FloatationParameter {
    Floatage:float;
    Dumping:float;
    SpeedMax:float;
    SurfaceDumpingRate:float;
}

table FlightKinesisParameter {
    Accel:float;
    PitchMaxUpAngle:float;
    PitchMaxDownAngle:float;
    PitchMaxTotalAngle:float;
    YawAngleSpeed:float;
    PitchAngleSpeed:float;
    PitchUpSpeedRate:float;
    PitchDownSpeedRate:float;
    PitchStableSpeedRate:float;
    PitchBaseAngle:float;
    RollMaxAngle:float;
    RollFactor:float;
    UpAccelRate:float;
    DownAccelRate:float;
    MaxSpeed:float;
    MaxDiveSpeed:float;
    PitchUpSpeedThreshold:float;
    PitchRateExp:float;
    ReadyScale:float;
    FaintThreshold:float;
    AirRegist:float;
}

table FacialParameter {
    AutoBlinkIntervalMin:float;
    AutoBlinkIntervalMax:float;
}

struct EmissiveColorParameter (fs_valueStruct) {
    // EaseColorValue[3] Blend
    // EaseColorValue[3] Rim
    // EaseColorValue[3] Power
    // EaseColorValue[3] Intensity
    // float Duration
    
    Blend0:EaseColorValue;
    Blend1:EaseColorValue;
    Blend2:EaseColorValue;
    Rim0:EaseColorValue;
    Rim1:EaseColorValue;
    Rim2:EaseColorValue;

    Power0:EaseFloatValue;
    Power1:EaseFloatValue;
    Power2:EaseFloatValue;
    Intensity0:EaseFloatValue;
    Intensity1:EaseFloatValue;
    Intensity2:EaseFloatValue;

    Duration:float;
}

table EffectParameter {
    Emissive:EmissiveColorParameter;
    DashRadialBlur:RadialBlurParameter;
    SwimRadialBlur:RadialBlurParameter;
    GlideRadialBlur:RadialBlurParameter;
    GlideBlurThreshold:float;
    LargeSplayRangeMin:float;
    LargeSplayRangeMax:float;
    SmallSplayRangeMin:float;
    SmallSplayRangeMax:float;
}

table DashParameter {
    SpeedMax:float;
    AccelTime:float;
    AccelRate:float;
    AccelAnimationRate:float;
    SwimSpeedMax:float;
    SwimAccelTime:float;
    SwimAccelRate:float;
    SwimAccelAnimationRate:float;
    GripFactor:float;
}

table ClimbParameter {
    BackJumpInitialVelocity:float;
    UpStickAngle:float;
    SideUpperStickAngle:float;
    SideLowerStickAngle:float;
    MoveSpeed:float;
    PositionMergeFactor:float;
    VertUpMergeFactor:float;
    HorzUpMergeFactor:float;
    Radius:float;
    DownAccel:float;
    ReverseAngle:float;
    FlipEndCheckOffset:float;
    FlipEndCheckLength:float;
    JumpChargeExponent:float;
    GroundDistanceTolerance:float;
    WallHitLength:float;
    WallHitOffset:float;
    OppositeAngle:float;
    AutoStartToleranceFactor:float;
}

struct ChangeOffset (fs_valueStruct) {
    Trans:OffsetVector;
    Rot:OffsetVector;
}

struct ChangeOffsetSet (fs_valueStruct) {
    Stand:ChangeOffset;
    Run:ChangeOffset;
}

table AerialKinesisParameter {
    Accel:float;
    Friction:float;
    SelfSpeedMax:float;
    BackwardAngle:float;
    GripAngle:float;
}

table FieldRide (fs_serializer) {
    Unique:UniqueParameter;
    Gravity:GravityParameter;
    Input:InputParameter;
    Move:MoveParameter;
    Jump:JumpParameter;
    Ground:GroundParameter;
    Dash:DashParameter;
    Climb:ClimbParameter;
    SlideDrop:SlideDropParameter;
    GroundKinesis:GroundKinesisParameter;
    AerialKinesis:AerialKinesisParameter;
    SlideDropKinesis:SlideDropKinesisParameter;
    GlideKinesis:GlideKinesisParameter;
    Glide:GlideParameter;
    SwimKinesis:SwimKinesisParameter (required);
    BadSwimKinesis:SwimKinesisParameter (required);
    Floatation:FloatationParameter;
    Facial:FacialParameter;
    Effect:EffectParameter;
    FlightKinesis:FlightKinesisParameter;
}

root_type FieldRide;
