Add flight physics overhaul with Warium/Futurism mixins
- Route Warium and Futurism force queues through smoothed per-substep delivery - Evaluate wing, stabilizer, control surface and air brake forces every physics substep - Add optional improved flight model with angle-of-attack lift and stalls - Add auto trim toggled by a client key and a server packet - Add config options, translations, and mixin plugin version gating - Bump mod version to 0.2.0 and bundle Futurism 0.0.4 as a compile-only dependency
This commit is contained in:
1 parent
01817fbec1
commit
4b7fb0e1e8
37 files changed
+1954
-4
No files matched your search
@@ -44,6 +44,56 @@ public final class Config {
|
||||
.comment("Ticks a placeholder chunk stays air after no ship needs it anymore, then it goes back to solid")
|
||||
.defineInRange("placeholderReleaseTicks", 100, 20, 6000);
|
||||
|
||||
static {
|
||||
BUILDER.pop();
|
||||
BUILDER.comment("Warium VS (and Futurism) flight physics. Only has an effect when those mods are installed").push("flight");
|
||||
}
|
||||
|
||||
public static final ForgeConfigSpec.BooleanValue SMOOTH_FORCE_DELIVERY = BUILDER
|
||||
.comment("Warium computes its forces 20 times per second but applies them in only one of the physics substeps",
|
||||
"in between, which makes thrust and lift jerky. When enabled, each tick's forces are spread evenly",
|
||||
"over all substeps. The total push per tick stays the same, so existing craft keep their tuning")
|
||||
.define("smoothForceDelivery", true);
|
||||
|
||||
public static final ForgeConfigSpec.BooleanValue PHYSICS_RATE_AERODYNAMICS = BUILDER
|
||||
.comment("Recompute wing, stabilizer, control surface and air brake forces every physics substep from the",
|
||||
"ship's current motion instead of once per tick from its motion one tick ago. Uses Warium's own",
|
||||
"formulas, so craft fly the same, minus the wobble. Required for auto trim and the improved flight model")
|
||||
.define("physicsRateAerodynamics", true);
|
||||
|
||||
public static final ForgeConfigSpec.BooleanValue CONTROL_SMOOTHING = BUILDER
|
||||
.comment("Control surfaces move back to neutral as smoothly as they deflect, instead of snapping back on key release")
|
||||
.define("controlSmoothing", true);
|
||||
|
||||
public static final ForgeConfigSpec.BooleanValue IMPLICIT_DAMPING = BUILDER
|
||||
.comment("Integrate aerodynamic damping implicitly, so many wings on a light craft can no longer overshoot",
|
||||
"and make it shake. Only changes anything where the damping would otherwise overshoot")
|
||||
.define("implicitDamping", true);
|
||||
|
||||
public static final ForgeConfigSpec.BooleanValue IMPROVED_FLIGHT_MODEL = BUILDER
|
||||
.comment("Replace Warium's lift and damping with a model based on each surface's angle of attack:",
|
||||
"lift grows with the square of airspeed, surfaces stall one by one when their angle of attack gets",
|
||||
"too high, and stalled surfaces stop damping rotation, which allows post-stall maneuvers with",
|
||||
"thrust vectoring. Changes how craft fly")
|
||||
.define("improvedFlightModel", false);
|
||||
|
||||
public static final ForgeConfigSpec.DoubleValue DESIGN_SPEED = BUILDER
|
||||
.comment("Improved flight model: airspeed (blocks per second) at which a level wing makes the same lift as in Warium.",
|
||||
"Slower flight needs a higher angle of attack, faster flight a lower one")
|
||||
.defineInRange("designSpeed", 40.0D, 5.0D, 300.0D);
|
||||
|
||||
public static final ForgeConfigSpec.DoubleValue STALL_ANGLE_SCALE = BUILDER
|
||||
.comment("Improved flight model: multiplier for the angle of attack at which surfaces stall")
|
||||
.defineInRange("stallAngleScale", 1.0D, 0.5D, 2.0D);
|
||||
|
||||
public static final ForgeConfigSpec.DoubleValue TRIM_AUTHORITY = BUILDER
|
||||
.comment("Auto trim: largest pitch input (fraction of full deflection) the trim may hold")
|
||||
.defineInRange("trimAuthority", 0.5D, 0.0D, 1.0D);
|
||||
|
||||
public static final ForgeConfigSpec.DoubleValue TRIM_MIN_SPEED = BUILDER
|
||||
.comment("Auto trim: below this airspeed (blocks per second) the trim holds its current value")
|
||||
.defineInRange("trimMinSpeed", 10.0D, 0.0D, 100.0D);
|
||||
|
||||
static {
|
||||
BUILDER.pop();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user