Define baseline running speed

This commit is contained in:
2026-05-15 13:49:03 -07:00
parent 0400bfe3f7
commit 775925c03d
5 changed files with 104 additions and 10 deletions
+31
View File
@@ -0,0 +1,31 @@
import unreal
MOVEMENT_DEFAULTS = {
"WalkSpeed": 140.0,
"SprintSpeed": 550.0,
"SprintStaminaCostPerSecond": 28.0,
"MinSprintStamina": 5.0,
}
def load(path):
asset = unreal.EditorAssetLibrary.load_asset(path)
if not asset:
raise RuntimeError(f"Could not load {path}")
return asset
def main():
character_bp = load("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter")
character_cdo = unreal.get_default_object(character_bp.generated_class())
for property_name, value in MOVEMENT_DEFAULTS.items():
character_cdo.set_editor_property(property_name, value)
unreal.log(f"Set {property_name} to {value}")
unreal.EditorAssetLibrary.save_loaded_asset(character_bp)
unreal.log("Agrarian movement baseline setup complete.")
main()