Onset 1.8.0-alpha (Protocol Compatibility 9)
Client changelog
New clothing items
Server changelog
Update Steam libraries, steam_api64.dll, libsteam_api.so, steamclient.so.
This update has less content as usual because I'm finishing the map behind the scenes.
Client changelog
- Improve pine tree LODs and increase their draw distance.
- Improve look of pine and beech trees during night.
- Improve forest vegetation.
- Player can no longer enter the vehicle while reloading.
- Some map collision fixes.
- Improve body, lower head (neck) textures, and body mask texture.
- Fix crash related to On*NetworkUpdatePropertyValue event.
- New Lua functions:
- GetObjectStaticMeshComponent
- GetNPCSkeletalMeshComponent
- GetPickupStaticMeshComponent
- SetPlayerClothingPreset, SetNPCClothingPreset (works like the old model system in case you don't want to manually set each clothing item)
- SetPlayerOutline
- HexToRGBAFloat
- DrawTexture
- DrawTextureEx
- DrawMaterial
- Add some materials that you can use to do basic shading
- /Game/Scripting/Materials/MI_OpaqueLit
ColorParameters: BaseColor, Metallic, Specular, Roughness, EmissiveColor
FloatParmeters: EmissiveMultiplier - /Game/Scripting/Materials/MI_OpaqueUnlit (Fastest rendering)
ColorParameters: EmissiveColor
FloatParmeters: EmissiveMultiplier - /Game/Scripting/Materials/MI_TranslucentLit (Use alpha value of BaseColor to control translucency)
- /Game/Scripting/Materials/MI_GenericTexture
TextureParameters: BaseColorTexture
ColorParameters: BaseColor, Metallic, Roughness, EmissiveColor
FloatParmeters: EmissiveMultiplier
- /Game/Scripting/Materials/MI_OpaqueLit
- UnrealLua enhancements:
- USceneComponent
- SetMobility
- SetHiddenInGame
- UPrimitiveComponent
- SetPhysicsAngularVelocityInDegrees
- SetPhysicsLinearVelocity
- GetMaterial
- UTexture
- ReleaseTexture
- USceneComponent
Code:
function SetPickupColor(pickup, HexColor, materialslot = 0) local StaticMeshComponent = GetPickupStaticMeshComponent(pickup) StaticMeshComponent:SetMaterial(materialslot, UMaterialInterface.LoadFromAsset("/Game/Scripting/Materials/MI_OpaqueLit")) local MaterialInstance = StaticMeshComponent:CreateDynamicMaterialInstance(materialslot) local r, g, b, a = HexToRGBAFloat(HexColor) MaterialInstance:SetColorParameter("BaseColor", FLinearColor(r, g, b, a)) end function SetVehicleTexture(vehicle, texture, materialslot) local SkeletalMeshComponent = GetVehicleSkeletalMeshComponent(vehicle) SkeletalMeshComponent:SetMaterial(materialslot, UMaterialInterface.LoadFromAsset("/Game/Scripting/Materials/MI_GenericTexture")) local MaterialInstance = SkeletalMeshComponent:CreateDynamicMaterialInstance(materialslot) MaterialInstance:SetTextureParameter("BaseColorTexture", UTexture2D.LoadFromAsset(texture)) MaterialInstance:SetColorParameter("BaseColor", FLinearColor(1.1, 1.0, 1.0, 1.0)) -- Give it a small red shift end function SetVehicleTextureFile(vehicle, textureFile, materialslot) local SkeletalMeshComponent = GetVehicleSkeletalMeshComponent(vehicle) SkeletalMeshComponent:SetMaterial(materialslot, UMaterialInterface.LoadFromAsset("/Game/Scripting/Materials/MI_GenericTexture")) local MaterialInstance = SkeletalMeshComponent:CreateDynamicMaterialInstance(materialslot) local Texture2D = UTexture2D.LoadFromFile(texture) MaterialInstance:SetTextureParameter("BaseColorTexture", Texture2D) -- UTexture2D.LoadFromFile holds a reference to the texture loaded from file. Reuse it as often as you can to save GPU memory! -- When you no longer need it, free the texture by calling Texture2D:Release() -- If you loose the reference to a texture object it will be released when Lua's garbage collector runs. return Texture2D end
New clothing items
Code:
/Game/CharacterModels/Clothing/Meshes/SK_Jeans01 /Game/CharacterModels/Clothing/Meshes/SK_Pullover /Game/CharacterModels/Clothing/Meshes/SK_ShirtCombo01 /Game/CharacterModels/Clothing/Meshes/SK_Shoes01 /Game/CharacterModels/Clothing/Meshes/SK_Shorts01 /Game/CharacterModels/Clothing/Meshes/SK_TShirt01 /Game/CharacterModels/Clothing/Meshes/SK_TShirtShorts01 /Game/CharacterModels/Clothing/Meshes/SK_Undershirt01
- Remove model identifier from NPCs (apply clothing items the same way as you do for players)
- Improve accuracy for object locations (@Swizz)
- Remove CreateLight, a much better solution will be possible with the UnrealLua API in one of the next updates
- Remove SetPickupVisibleForPlayers
- Add SetPickupVisibility, SetText3DVisibility
- Add SetPlayerRagdoll, SetNPCRagdoll
- Add HexToRGBAFloat
- Add SetPlayerVoiceDimension
Update Steam libraries, steam_api64.dll, libsteam_api.so, steamclient.so.
This update has less content as usual because I'm finishing the map behind the scenes.