1. Onset
  2. News

Onset News

Update 1.5.1

Game
  • Fix UCharacterMovementComponent not working with GetComponentsByClass
  • Increase tow truck acceleration.
  • Fix door model number 6 collision.
  • Fix game freezes mostly happening in fullscreen mode.
  • Fix ambient sound near the northern desert mountain.
  • Fix tractor, van and news van body coloring.


Server
  • Fix some Lua natives that broke due to C#.
  • Fix reported C# errors (Thanks to DaskDarki).
  • Fix crash on multi-dimensional tables.
  • Add function EnableObjectStreamEvents (bEnable) which enables OnObjectStreamIn/Out events.
  • Add optional bSync parameter to SetObjectLocation/Rotation and SetVehicleLocation/Rotation. This parameter is true by default. Setting it to false updates the internal location/rotation of the entity but does not sync it to the clients. Useful for stuff like physics sync and attached vehicle sync for tow trucks.

Onset 1.5.0

[h2]Onset 1.5.0 (Protocol Compatibility 5)[/h2]

The game compatibility has changed in this release. Server owners must update their server via steamcmd in order to allow clients to connect.
https://dev.playonset.com/wiki/DedicatedServer

[h3]Experimental C# support (server side)[/h3]



Onset now features C# as a secondary scripting language.

Why C#?
Lua hits its limits when it comes to large projects. Becoming difficult to keep track of structure due to it's missing type safety and limited OOP. Onset is and was always about learning and having fun coding. C# is a popular and stable language loved by many.

Will it split the scripting community?
It might cause distraction to some extent but the C# implementation and Lua work very well together. You can mix both in a package and also communicate between the two languages. In the end we think the pros will surpass the cons.

In this version only the server has C# support. The client will follow in one of the next updates.

To get started take a look at the documentation. Remember it's still in experimental state. Things can change a bit until the stable release.

C# Developer Wiki

A big thank you to DasDarki for working with me on the implementation. For his efforts he received a special rank on our Discord server.

[h3]New landscape material[/h3]

The landscape material has been replaced to offer better variation and tiling at large distances.







[h3]Tractor[/h3]

Vehicle made by PolySquid studios. Id to spawn is 63.



https://www.artstation.com/artwork/680yA6

[h3]Van[/h3]

Vehicle made by PolySquid studios. Id to spawn is 61.



[h3]News Van[/h3]

Vehicle made by PolySquid studios. Id to spawn is 62.



https://www.artstation.com/artwork/kDd3Xd

[h3]Apocalypse Cars[/h3]

Vehicles added for apocalypse servers. Ids to spawn: 59 & 60.



[h3]Improved vehicle handling[/h3]

Several improvements have been made to the vehicle handling.
Vehicles no longer get unstable at high speeds. Steering is more attached to the road. Generally the vehicles feel much heavier now. Acceleration has been adjusted accordingly.

[previewyoutube][/previewyoutube]

[h3]Breakable vegetation[/h3]

Many bushes and smaller trees can now be run over by cars. This feature can also be added to vegetation on custom maps selectively.

[previewyoutube][/previewyoutube]

[h3]Dynamic vehicle camera[/h3]

The vehicles camera now follows the car while driving. You can still move the camera freely with your mouse. The camera will reset behind the vehicle after a few seconds if there is no mouse input and while not standing still.

[previewyoutube][/previewyoutube]

[h3]Improved UnrealLua Wiki[/h3]

The wiki now finally has been updated to reflect all of the games Unreal functions showing their proper signature. There will be more usage examples too.

https://dev.playonset.com/wiki/UnrealLua

[h3]Other changes[/h3]

New
  • Add function FlashInTaskbar()
  • Add function IsGameWindowFocused()
  • Add function IsDoorInteractable(door)
  • Add function GetGameLanguage()
  • Add event OnGameLanguageChange()
  • Add function GetServerPath()
  • Add function GetFilesInDirectory()
  • Add function GetDirectoriesInDirectory()
  • Add function SteamId3ToSteamId64()
  • Add function SteamId64ToSteamId3()
  • Add possibility to disable collision with vehicle tires if hit actor has DisableVehicleCollision tag. This is useful when moving roadblocks to avoid collision with vehicles.
  • Add developer mode whitelist server side setting to server config. "dev_whitelist" and "dev_whitelist_steamid". See https://dev.playonset.com/wiki/server_config
  • The address in the direct connect window is now saved on game restarts.
  • Add hostage animations to animation list.
  • Add loading screen (with progress) on game startup to prevent lags in the main menu.
  • New exposed UnrealLua functions:
  • Enums: EMovementMode, EEasingFunc
  • APawn::GetController
  • UKismetMathLibrary.RLerp, REase
  • UCharacterMovementComponent:SetMovementMode
  • UPrimitiveComponent:GetPhysicsLinearVelocity, GetPhysicsLinearVelocityAtPoint, GetPhysicsAngularVelocityInDegrees
  • AActor:GetVelocity

Add new tools to object list:


Fixes
  • Fix vehicle steering on level streaming load hitches.
  • Fix firetruck front license plate position.
  • Fix firetruck wheel collision.
  • Fix firetruck ladder becoming invisible at certain angles.
  • Fix vehicles behaving very unstable at high speeds.
  • Fix vehicle 24 front suspension height.
  • Fix police sedan bullbar collision.
  • Fix vehicle gear sync.
  • Fix height fog not being reset on level reset.
  • Some minor map fixes. Thanks to everyone reporting them.


Improvements
  • New grass bush has been added to the desert part of the landscape.
  • Improve bike handling a little bit.
  • Increase ground friction for vehicles.
  • Set default license plate text to "0123456789" on the server.
  • Improve fence meshes collision to prevent players glitching through them.
  • Print "[autostart]" next to the package name if this specific package was started from the autostart folder.

Onset 1.4.3

[h2]Onset 1.4.3 (Protocol Compatibility 4)[/h2]

[h3]Firetruck[/h3]



[previewyoutube][/previewyoutube]

Keybindings for the ladder:
E, Q - Extend ladder
Numpad 4, 6 - Rotate ladder
Numpad 2, 8 - Move ladder up and down

The ladder and water mesh is a skeletal mesh with an attachment point named "water". You can use that to spawn and attach water particles through Lua.

[h3]Lua function SetWebFocus for WebUIs[/h3]

This is a great addition to WebUIs. Until now you couldn't focus an input on purpose. For example for a custom chat system.

function OnKeyPress(key)
if key == "Space Bar" then
if IsCtrlPressed() then
AddPlayerChat("Focus mapeditor")
SetWebFocus(EditorGui)
ExecuteWebJS(EditorGui, "FocusInput();")
end
end
AddEvent("OnKeyPress", OnKeyPress)


After calling SetWebFocus you must also focus the HTML (input) element through Javascript.

[h3]Other changes[/h3]

  • Add button to the main menu to open the server content cache folder.
  • Add SetHeightFogDensity, GetHeightFogDensity
  • Adjust front light intensity of some cars to be more consistent.
  • Improve vehicle torque, suspension and transmission settings for vehicle IDs 7, 8, 9, 13-16, 17, 18, 24, 42, 47, 48, 49
  • Add new engine sounds for Apocalypse_02 (ID 56)
  • Remove pumpkins from the cemetery.
  • Improvements to game asset size again.
  • Object IDs 728, 729, 732, 735 have been removed. (Replaced with a cube) You can use other existing chairs instead.
  • Add function UActorComponent:ComponentHasTag(TagName), ComponentAddTag(TagName), ComponentRemoveTag(TagName)
  • Add function UMaterialInstanceDynamic:GetFloatParameter(ParamNa me), GetColorParameter(ParamName), GetTextureParameter(ParamName)
  • Add function UObject:GetClass(), GetClassPathName()
  • UObject.ProcessEvent custom user parameters are not optional.


[h3]Fixes[/h3]

  • Fix wrongly checking Lua errors in exported functions causingparams to always return nil
  • Fix player flying away when static mesh mobility is set to movable
  • Fix a game freeze in WebUIs.
  • Fix a game freeze when a sound (CreateSound/3D) is being destroyed.
  • Fix many map glitches.
  • Fix writing server data if existing file is read only.
  • Fix MuscleCar (ID 40) driver animation.
  • Fix some textures streaming incorrectly.
  • Should fix some landscape LOD artifacts.
  • Fix vehicle light sync in some circumstances



[h3]Server changes[/h3]

Sandbox option

Add a new option named "sandbox" to the server_config.json. (Disabled by default)
Turning this on will enforce the same script security boundaries as on the client. For example no loading of compiled Lua scripts or usage of possible dangerous functions.


  • Fix BroadcastRemoteEvent parsing parameters incorrectly.
  • Fix crash when checking vehicle passengers.
  • Fix GetStreamedPlayersForPlayer not returning players that are inside a vehicle.
  • Update WorldDoors.lua in the default package.

Onset 1.4.2

[h2]Onset 1.4.2 (Protocol Compatibility 4)[/h2]

[h3]Remote WebUI whitelisting[/h3]

Until now remote WebUIs could only display websites that have been whitelisted in the game config.

To give you more freedom, servers can now request the client to whitelist additional domains. Only domain names with a top level domain (TLD) can be whitelisted.

Use the new function AddWebUIWhitelist in your index.lua or any other package script. When a player connects they will be asked.



Example whitelisting from the above picture:
--index.lua
AddWebUIWhitelist("vimeo.com")
AddWebUIWhitelist("vimeocdn.com")
AddWebUIWhitelist("firebaseio.com")
AddWebUIWhitelist("sentry-cdn.com")
AddWebUIWhitelist("vimeo.magisto.com")
AddWebUIWhitelist("akamaized.net")


The following Lua event is called in your scripts once the player reacted to the request screen:


-- The 1st parameter "domains" is a table containing the domains which the player allowed on the whitelist.
AddEvent("OnWhitelistAccepted", function(domains)
print("OnWhitelistAccepted", #domains)
for k, v in pairs(domains) do
print(k, v)
end
end)


[h3]Loading screen download progress[/h3]

The following Javascript functions are now called in your custom connect screen.

function OnDownloadComplete(file)
{
console.log("OnDownloadComplete " + file);
}

// (string) msg: The message that is usually displayed to the player.
// (string) file: What file is currently being downloaded.
// (int) remaining_files: Number files still needed to download.
// (string) bytes_received: The number of bytes already received for the current file downloading as a string.
function OnDownloadProgress(msg, file, remaining_files, bytes_received)
{
console.log("OnDownloadProgress " + msg + " " + file + " " + parseInt(remaining_files) + " " + bytes_received)
}


[h3]Clientside variable storage[/h3]

Saving data on the client can be useful for some client settings. For example the ordering of an inventory in your UI.

Saving variables:
SetStorageValue("var_str", "Some long string variable")
SetStorageValue("var_int", 1337)
SetStorageValue("var_float", 3.1415)
SetStorageValue("var_bool", true)


Reading variables:
print(GetStorageValue("var_str"))
print(GetStorageValue("var_int"))
print(GetStorageValue("var_float"))
print(GetStorageValue("var_bool"))


[h3]Apocalypse_02 battle car[/h3]

Spawnable using the function CreateVehicle with vehicle model id 56.



[h3]Other changes and additions[/h3]
  • Add Lua function IsInputKeyDown.
  • Add UnrealLua function USkeletalMeshComponent:SetAllBodiesBelowSimulatePh ysics(BoneName, bNewSimulate, bIncludeSelf)
  • Fix Set/GetPlayerPropertyValue for the local player.
  • Negative player identifiers passed to Set/GetPlayerPropertyValue will now be treated as local player.
  • Fix error logging in exported functions.
  • Allow the default Lua function "error" on the client.
  • WebUIs now check files if they have been modified before they are loaded.
  • Support .otf and .woff font files.
  • The Truck02 vehicle has completely new collisions.
  • Fix backfire not working since the last update.
  • Some weird proxy LOD meshes should be fixed now.
  • Custom maps using world composition and streaming levels had a bug where the streaming levels are not loaded after reconnecting to a server. This is now fixed.
  • The game files have been optimized and reduced by another 1GB.
  • The winter edition is now disabled.


[h2]Server[/h2]
  • Fix crash in exported functions where returned tables contain functions.

Onset 1.4.1

[h2]Onset 1.4.1 (Protocol Compatibility 4)[/h2]

[h3]Package index.lua[/h3]

Each package can now register package files and scripts in a special Lua file. The index.lua is executed before the server loads the package.json file. In this Lua file you can register scripts and files to this package.

The following functions are only available to the index.lua script. Besides that, only Lua library functions are exposed the index.lua but no other Onset server functions.



Example for an index.lua script:
AddServerScript("server/*_s.lua")
AddClientScript("client/*_c.lua")
AddSharedScript("shared/*.lua")
AddFile("audio/sound.mp3")
AddFile("ui/*.html")


For the package to work, there has to be either an index.lua or a package.json config file. Both at the same time are also supported.

[h3]Package autostart folder[/h3]

To autostart packages place them into the folder "autostart" where your OnsetServer.exe is located. If the folder does not exist, create a new one.
Packages inside this folder will be started alphabetically before any other packages.

The function StartPackage will attempt to look for packages in the autostart folder first.

[h3]SetPlayerVoiceRange[/h3]

Besides the existing voice channel feature, a new function has been introduced that allows you to set the 3D range of a player's voice.
The range can't be greater than the voice distance set in the server_config.json.

To reset the voice range pass a value of 0.0 or less to this function.

Server:
AddRemoteEvent("ServerWhisper", function(player, whisper)
if whisper then
-- Player will be heard only 4 meters (400 cm)
SetPlayerVoiceRange(player, 400.0)
else
SetPlayerVoiceRange(player, 0.0)
end
end)


Client:
AddEvent("OnKeyPress", function(key)
if key == "N" then
CallRemoteEvent("ServerWhisper", true)
end
end)

AddEvent("OnKeyRelease", function(key)
if key == "N" then
CallRemoteEvent("ServerWhisper", false)
end
end)


[h3]Config files comments[/h3]

The server_config.json and package.json can now have comments starting with // or /* */.

[h3]Other server changes:[/h3]
  • Update to VS2019 (VC16). If you have troubles starting the server make sure you have the latest 2019 vc_redist 64bit installed.
  • Print MB instead of KB to the console for the total client download if it exceeds a certain amount.
  • Add --port and --maxplayers parameter.


[h3]Client changes[/h3]
  • Fix vehicles tires sometimes glitching through the ground.
  • Fix vehicle falling through the ground when getting out and the car is flipped.
  • Fix sportscar door position.
  • Fix Pak unloading too early when disconnecting and a custom map is still loaded.
  • WebUI whitelist PayPal and Cloudfront by default.
  • UObject.ProcessEvent now supports FName and FText.
  • Add function
UPrimitiveComponent:GetInertiaTensor(BoneName)


Wiki front page design updated

Check it out! https://dev.playonset.com/wiki/Main_Page