Changelog

From GTA Network Wiki
Jump to: navigation, search

Changelog


Planned

  • Native (AOT) Compilation (IL2CPP) to enjoy the performance of C++ by writing code in C# instead, this would eventually bypass JIT entirely which ofcourse has some trade offs but the main objective here is performance and efficiency while maintaining proper functionality.
  • Implementing missing functionalities that was functional before the bridge.
  • Automated testing (incl. regression checks) to ensure proper API functionality with framework updates.
  • Getting rid of dependencies as much as possible (Linux).
  • Make use of the latest C# features (7.0+).



Implemented but not yet versioned

  • Changes: Value type arguments are now passed by readonly reference to avoid unnecessary heap allocations. readonly-ref.md (Github)
  • Fixes: Resolved runtime assembly issues, bridge should be fully standalone.
  • Fixes: The bridge now has its own Newtonsoft.Json to avoid version conflicts with the user-loaded (newer/older) assembly.
  • Fixes: Dynamic type no longer relies on an older Microsoft.CSharp.dll assembly which was a workaround.



Version 0.4.0.3 (Not released yet)

  • Added: Methods to register Commands at runtime using NAPI.Command.Register and NAPI.Command.Unregister
  • Added: Methods to invoke RemoteEvents and Commands using NAPI.RemoteEvent.Invoke and NAPI.Command.Invoke
  • Added: Method and property to Client to Block parsing commands



Version 0.4.0.2 (Not released yet)




Version 0.4.0.1 (Not released yet)

  • Important: Bridge's framework update now targets netcoreapp2.1, make sure to set your target framework to .NET Core 2.1 in your projects for the resource to function properly, this framework update brings a lot of performance improvements over .NET Core 2.0 as well as the missing features for EF Core importantly.
  • Updated: Overall bridge performance improvements and optimizations. most evidently, ClientEvent Triggers now perform atleast 2 times faster than they did before.
  • Updated: Allow Instantiating private ctors (fool-proofing)
  • Updated: Commands, ServerEvents and RemoteEvents should no longer require a public (& non-static) access modifier. for example
  • Removed: The unable to locate .NET Core SDK message, the bridge is self-contained and does not require any SDKs to be installed.
  • Fixed: VehicleSirenToggle event
  • Fixed: Vehicle Trailer API
  • Added: Driver property to Vehicle object (OOP)
  • Added: Commands Attributes, this should be an alternative to the current ones. Here's an example of usage and a list of available attributes
  • Added: RemainingText parameter attribute to Commands, this should replace GreedyArg. Here's an example of usage
  • Removed: NativeHashes enum (obsolete)
  • Added: Disabling default server behaviour event attributes: [DisableDefaultChat], [DisableDefaultOnConnectSpawn] and [DisableDefaultOnDeathRespawn], example of usages can be seen, as following on OnChatMessage, OnPlayerDeath and OnPlayerConnected.
  • Added: GetAllPlayers to ColShape object (OOP)
  • Added: Included Windows-1251 (Cyrillic) Encoding by default Encoding.GetEncoding("Windows-1251")
  • Fixed: Cast exceptions and other bugs reported by users.
  • Added: As much as possible fool-proofing to avoid devs falling in pitfalls of mistakes
  • Added: ConsoleOutput overloads with the ability to output colorful text on console.. examples of usages: here
  • Updated: NAPI.Log.Exception now has a customizable file param, example usage: NAPI.Log.Exception("Ouch, I've crashed!", "server_ouches.txt")
  • Added: GetServerPassword method
  • Added: New server events such as VehicleDeathEx with additional reason and killer params
  • Added: A Remote Console that can interact with the server directly which supports a multiple kinds of input. very useful for development and testing without having to in-game. You can read the documentation here
  • Fixed: A couple of memory leaks in ClientEvent triggers
  • Fixed: Vehicle mods API
  • Fixed: Clean up EntityData after deletion
  • Added: Default resource template creation for an easy resource creation using the guides as following: Setting up a dev env using Visual Studio and Setting up a dev env using Visual Studio Code



Version 0.3.5.1




Version 0.3.5.0

  • Important: A new .NET hosting method for the bridge which means an obnoxiously screamingly loud "LINUX SUPPORT!" for the bridge, so you can now use your cheap a$$ virtual private servers.
  • Updated: Performance improvements of events, remote events and commands.. it's basically the stuff that programmers love seeing, if you're not impressed.. get out of here!!
  • Added: SetEntitySharedData overload with Dictionary as a param, this should help you a lot to avoid overhead and increase efficiency, as well as SetSharedData OOP method for entities
  • Added: SetPlayerCustomization
  • Added: SetPlayerDecoration (incl. an overload with an array as param)
  • Added: RemovePlayerDecoration
  • Added: SetPlayerDecoration
  • Added: SetPlayerClothes overload with dictionary as param
  • Added: Missing Client customization OOP methods and properties including the ones mentioned above
  • Added: FirstChanceException Event that should catch all the exceptions thrown before being handled.
  • Added: UnhandledException Event that should catch all the unhandled exceptions thrown.
  • Added: DeathReason enum that can be obviously used to determine the death reason in the Death event (as well as the WeaponHash)
  • Fixed: StackOverflow exception due to events when no resources are loaded.
  • Fixed: Deleted props should now be synced on player connection.



Version 0.3.3.0

  • Updated: The old-fashioned way of events was completely replaced with a new efficient and performant system that relies on attributes while looking quite clean and fancy. (Here's an example)
  • NOTE: Make sure your event method modifier is set to public!!!
  • Removed: For the sake of the events overhaul, CancelEventArgs had to be deprecated, worry not though, there's a replacement as following:
  • Added: NAPI.Server.SetAutoRespawnAfterDeath(bool value) -- disables the default auto respawning after death, default value: true.
  • Added: NAPI.Server.SetAutoSpawnOnConnect(bool value) -- disables the default auto spawn on player connection, default value: true.
  • Added: NAPI.Server.SetGlobalServerChat(bool value) -- disables the default server chat, default value: true.
  • Updated: Remote events have been enhanced (as requested by many) and should now be very straightforward to use like commands (Here's an example of possible usages)
  • Updated: Additionally, We've also made it possible to use Entity objects (Client, Vehicle, Object, etc..) in Remote events, so you wont have to do the additional work (Here's an example)
  • Updated: Commands have been optimized and should now be much more performant than ever
  • Added: Non thread-safe methods will no longer cause a server crash when called outside of main thread, will simply print a warning on console.
  • Added: Added (NetHandle).Entity<T>() method for the sake of OOP fanciness, this has the same usage as NAPI.Entity.GetEntityFromHandle
  • Fixed: CreateVehicle should now spawn with desired colors set in the parameters.
  • Added: Exceptions are now logged into their own file (server_exceptions.txt), so now you can worry not about the console crashing without you having a look at the thrown exception.
  • Added: Additionally, we've added Ben.Dymestifier which should make exception (stack traces) logs more productive.
  • Added: Optionally, NAPI.Log class was added which includes a Exception(string exceptionText) method
  • Added: FromJson<T>(string json) and FromJson<T>(object json) to NAPI.Util
  • Updated: Weather methods now use Weather enum instead
  • Added: SetPlayerSkin/(Client)SetSkin method overloads were added with a uint param
  • Fixed: Custom vehicle colors were not working as expected (Issue #66 and #59)
  • Added: VehicleSeats, DisconnectionType, CheckpointType and MarkerType enums were added
  • Fixed: ConstantVehicleData was not functional thus not reading from vehicleData.json correctly, a lot of vehicle related methods were not functional.
  • Fixed: (Client).Vehicle crashes server if player is not in a vehicle (Issue #58)
  • Fixed: Explosions should no longer crash the server.
  • Added: NAPI.Vehicle.GetVehicleMaxPassengers
  • Added: NAPI.Server.SetGlobalDefaultCommandMessages(bool value) -- disables the default messages thrown out by commands (as per request from some lazy dude that didn't want to use the Hide attribute param)



Version 0.3.2.3-1

  • Updated: platform 0.3.4 compatbility.



Version 0.3.2.1




Version 0.3.1.1

  • Updated: added alpha param to CreateObject
  • Fixed: TriggerEvent issue introduced in 0.3.2 RC-2
  • Fixed: entity dimensions not applying on creation
  • Fixed: client.Address
  • Fixed: client.VehicleSeat
  • Fixed: seat id in vehicle events
  • Fixed: large 32-bit unsigned integers not casting in triggers
  • Fixed: transferred entities being null clientside
  • Fixed: NetHandle.Equals for different entities with same ids



Version 0.3.1.0

  • Added: player.Eval (API.Eval)
  • Fixed: colshape events issue
  • Fixed: delayed NAPI.Task crashing the server
  • Updated: triggers: Entity types could be passed as well as NetHandle
  • Updated: triggers: most of integer types are supported (only UInt32 before)
  • Updated: triggers: Vector3 is now supported
  • Updated: triggers: Custom objects are supported (check Newtonsoft JSON for serialization details)
  • Updated: entity.GetHashCode now generates unique code instead of returning entity id



Version 0.3.0.13

  • Fixed: vehicle.Repair (API.RepairVehicle)
  • Fixed: remote events weren't triggered without addition params (#208 / #244)
  • Fixed: TriggerClientEvent unable to pass booleans (internal: #22)
  • Fixed: API.SendNativeToAllPlayers (#237)
  • Fixed: Client.Equals returns false (#241)
  • Fixed: ColShape issue (internal: #23)



Version 0.3.0.12

  • Added: Add Copy() to Vector3 (Issue #222) (nice number!)
  • Added: Hide attribute to commands, if set to true, the command will not output the helptext when invoked. (Please avoid using OnPlayerChat event for handling commands)
  • Fixed: Game-hang related to SendChatMessageToAll (SDK-related issue)
  • Fixed: GetPlayerAddress should no longer return empty data
  • Fixed: SetPlayerWeaponAmmo issue.
  • Fixed: PlayPlayerAnimation issue.
  • Fixed: PlayPlayerScenario issue.
  • Remove: Redundant AddToHelpmanager attribute from commands



Version 0.3.0.11

  • Added: User informing of bridge initialisation failure when core assemblies are missing.
  • Added: fool-proofing against the common mistake of making constructors private, causing resource classes instantiation failure, should now alert the user of it
  • Fixed: GetResourceFolder returning the wrong or incomplete directory
  • Fixed: System.IO.FileSystem.dll assembly for the File class is now loaded by default to avoid headache for us and for you
  • Fixed: ReflectionTypeLoadException should now output the LoaderExceptions for debugging purposes, a message to inform the user of possible causes was also added, which should inform you of missing assemblies.
  • Fixed: ReflectionTypeLoadException when loading modular compiled resources that depend on other dlls, caused by the fact that compiled resource dll was loaded into memory thus loosing directory access for loading the required modules. as a result, shadowcopy attribute removal was reverted and the resource will no longer be loaded into memory before being used but instead, it will be loaded from the directory imposing a file lock on the resource dll and its modules.
  • Fixed: DeletePlayerWorldProp was missing in the API (not NAPI)
  • Fixed: Server crash when an entity type was not initialised in the entity pool, throwing missing key in dictionary exception when using NAPI.Pools.GetAll(Type) while it's empty.
  • Fixed: Exported functions and events were fixed, should no longer throw an exception.
  • Fixed: (Client).Address/GetPlayerAddress that threw a GetPlayerIp exception when called
  • Fixed: ConsoleOutput's logging to server_logs.txt (disable-able via attribute in settings.xml) is now thread-safe, shouldn't crash the server when it's being written into
  • Fixed: CreateObject should no longer spawn invisible objects.
  • Changed: GetPlayersInRadiusOfPositon radius param was changed back to double instead of float
  • Changed: (Vector3).ToString() method will now output {X} {Y} {Z} instead of X: {X} Y: {Y} Z: {Z}, this was introduced to work around a StackOverflow exception when trying to serialize Vector3, read more on Issue #197
  • Changed: SendChatMessageToAll should now be much more efficient
  • Changed: IMPORTANT!! default spawned player dimension was changed to 0 (previously: GlobalDimension)
  • Changed: IMPORTANT!! default spawned vehicle dimension was changed to 0 (previously: GlobalDimension)
  • Removed: visible param is no longer a thing in CreateCheckpoint and CreateMarker, it is by default set to true



Version 0.3.0.10 (Hotfix)

  • Fixed: Referenced assembly loading issue



Version 0.3.0.10

  • Fixed: Compiled resource fails to load if the pdb file does not exist at the same folder
  • Fixed: Cyrillic in chat issues



Version 0.3.0.9

  • Added: Debugging mode for compiled resources, you can now attach to the server and debug your resource. (the pdb file must exist within same directory as the dll file)
  • Added: Added GlobalDimension to NAPI
  • Added: IsPlayerOnLadder implemented
  • Fixed: CS0122 Privilege issues for resources, that were unable to access system classes such as Environment, File, Path and etc.. (Issue #159)
  • Fixed: API to execute thread-safe tasks from threaded tasks (#173), check Task
  • Changed: compiled resources are now loaded into memory (shadowcopied) and can now be reloaded on the fly, therefor shadowcopy attribute in meta.xml is now deprecated.
  • Changed: Improved assembly loading..
  • Changed: GetHashKey return type changed from int to uint
  • Changed: Vehicle hashes enum updated with 1.42 game patch
  • Changed: NETCoreApp 2.0.3 dependency is now no longer required.



Version 0.3.0.8




Version 0.3.0.7

  • Added: Graceful server shutdown that should invoke the OnResourceStop event on running resources and kick all connected players before shutting down.
  • Added: CreateVehicle overloads with Vector3 rotation param for old resources compatiblity's sake
  • Fixed: Critical fix to Pool Handler, this should fix the "An Item with the same key has already been added" exception message thrown when a different entity type is created
  • Fixed: Critical fix to OnPlayerDisconnected event that crashes the server on player disconnection (at a certain case)



Version 0.3.0.6

  • Changed: Fix critical assembly loading issue, if reference is not found in resources/(resourceName) folder, it will be loaded from runtime/ folder, otherwise it will error out.
  • Changed: Minimal improvements to exception handling.



Version 0.3.0.5

NOTE: Due to lack of time, the following changes (and any possibly other changes stated here) were not applied to their following pages




Version 0.3.0.4 (internal)

  • Added: SetDefaultSpawnLocation to override the default spawn location which is at the Galileo observatory
  • Added: A new clean and organised API that can be accessed via NAPI.
  • Changed: Events are now in their own derived class, can be accessed via Event. instead of API.
  • Changed: Compiler now shows error message, filename and error line on resource compile error.
  • Changed: DeleteObject has been renamed to DeleteWorldProp to avoid confusion, along with param changes. (persistent, new players get synced data)



Version 0.3.0.3 (internal)




Version 0.3.0.2




Version 0.3.0.1




Version 0.3.0

General

  • Changed: All API Methods are now in PascalCase
  • Changed: Dimensions are now in usigned integer

Events

Entity

Player

Vehicle

Marker

Checkpoint

Colshape

TextLabel