This patch can be used to dump the data contained in the `allExtracts.json` files in the server locations database. When enabled, load into each map sequentially, and the extract data will be dumped to `ExfilDumps/{mapName}/allExtracts.json`, ready to be copy/pasted into the server `database/locations` directory
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#98
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Fixes exception thrown when trace logging is enabled and you accept a quest
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#97
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Needs merged with: SPT-AKI/Server#262
Short story first: Last night I was poking around the code as I always do looking for the cause of an exception and got sick and tired of the generic bad exceptions we always work off of. So I fixed it.
This allows us access to BSG's internal logging using Nlog. This is useful for everybody. Not just SPT dev's, but mod dev's alike. It can be enabled from `core.json` with the option to send the output to the server.
Here's an example of the improvement, its huge. Bepinex console is the gerneric logging we always use, the editor behind it is the improved logging from Nlog. Its night and day.
![image](/attachments/491dd8b6-e89a-4809-b19e-c5906ab6989e)
The levels are based off of Nlog ordinals where low is more logging, high is less. (Stupid I know, but what can you do)
Verbosity is as follows:
* In all cases, except off, better exceptions will be logged.
* to see the logging output in your bepinex logs, make sure you have debug logging enabled in bepinex.
* WARNING: trace-info logging will quickly create log files in the megabytes.
* 0 - trace
* 1 - debug
* 2 - info
* 3 - warn
* 4 - error
* 5 - fatal
* 6 - off
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#96
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
Needs merged with: SPT-AKI/Server#249
Added
- Moved beta disclaimer text to the server
- Moved `PreventClientModsPatch` to AKI.Debugging as it makes more sense here after this PR. People who need to know, know why.
- Ability to show a release note summary to users in-game
- Cool debug message only shows build hash.
Instructions for testing
- Since I opted to store properties in the registry, its not as straight forward as deleting a file. (Thanks Drakia for the suggestion). So in order to test you need to open up regedit and navigate to `Computer\HKEY_CURRENT_USER\Software\Battlestate Games\EscapeFromTarkov` inside of that directory are 3 values stored in relation to this PR.
`SPT_AcceptedBETerms` - `REG_DWORD` that stores a value of 0 or 1
`SPT_ShownReleaseNotes` - `REG_DWORD` that stores a value of 0 or 1
`SPT_Version` - `REG_BINARY` that stores a binary converted string.
In order to reset after first run for a second test, you just delete all 3 entries.
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#90
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
This PR introduces a message to be shown to users when first running bleeding edge, or if the version has changed since last run.
the SPT version string is stored in the registry and checked against on each subsequent run.
In the future this can be expanded to displaying the patch notes if we wish, but for now its just a generic message.
For questions, ping me on discord.
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#89
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
Fixes the screen bounds for the water mark, it now no longer clips off the screen. It was really bothering me...
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#88
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
- Move most BTR code to Aki.Custom (Leaving debug commands in Aki.Debugging)
- Make BTR patches public to match other patches
- Disable debug BTR command patches
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#66
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
- Move creation/init of the BTRManager to before the `ExtractionTimerPanel.SetTime` method, to fix BTR timer panel not functioning
- Add subserviceId to the `OnTraderServicePurchased` event
- Add BTR taxi service handling
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#64
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Todo:
* Taxi service
* Improve turret aim/firing
* Switch targets when current target out of line of sight
* Allow certain aspects to be configured from server, for example: price multipliers, wait times at each location, etc.
* Perhaps, a persisting blacklist from the BTR for several raids afterwards
* Further code refactoring
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#63
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Todo:
* Taxi service
* Refinement of BTR turret aim/shooting
* BTR should switch targets if it has no line of sight to current target
* Blacklist player from entering BTR after antagonising it
* Perhaps make blacklist persist for 3 raids (apparently on Live?)
* Code refactor because it currently looks like doodoo
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#62
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
I've moved trader services handling from Aki.Debugging BTR code into Aki.SinglePlayer
This simplifies some of the code, and allows a more "generic" implementation.
I've also patched the GetTraderServicesDataFromServer and TryPurchaseTraderService methods to properly utilize the TraderServicesManager for storing service state
For now, this makes Aki.Debugging depend on Aki.SinglePlayer, this can be reverted once the BTR stuff is moved
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#61
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Should make the BTR work again.
I've also switched named methods to use "nameof" where it made sense. And removed an unnecessary method call and fixed an incorrect async on one of my patches
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#59
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Depends on SPT-AKI/SPT-AssemblyTool#3
* Refactored Modules for better consistency and general readability, along with preparing the code for a publicized assembly
* Added `PublicDeclaredFlags` to `PatchConstants` to cover a set of commonly used flags to get methods post-publicizing
* Added a replacement to LINQ's `.Single()` - `.SingleCustom()` which has improved logging to help with debugging Module code. Replaced all `.Single()` usages where applicable
* Replaced most method info fetching with `AccessTools` for consistency and better readability, especially in places where methods were being retrieved by their name anyways
**NOTE:**
As a side effect of publicizing all properties, some property access code such as `Player.Position` will now show "ambiguous reference" errors during compile, due to there being multiple interfaces with the Property name being defined on the class. The way to get around this is to use a cast to an explicit interface
Example:
```cs
Singleton<GameWorld>.Instance.MainPlayer.Position
```
will now need to be
```cs
((IPlayer)Singleton<GameWorld>.Instance.MainPlayer).Position
```
Co-authored-by: Terkoiz <terkoiz@spt.dev>
Reviewed-on: SPT-AKI/Modules#58
Co-authored-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Co-committed-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Todo:
* Make the UI notifications for BTR-related stuff appear, e.g. when BTR is about to depart
* Prevent player from entering BTR when it is hostile to the player
* Implement cover fire trader service
* Finish implementation of taxi service
* Finetune the turret machine gun shooting (it might need some pauses as it will shoot nonstop if it is aiming at you)
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#56
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
- Reads service list from server
- Properly calculates cost of taxi and delivery service
- Only allows sending items to stash once per raid
- Enable service debug commands `debug_show_dialog_screen` and `btr_deliver_items` (Only usable in raid)
- Implements delivery of items via the BTR to stash
Does not currently implement usage of taxi service
Requires server PR: SPT-AKI/Server#187
Opening a PR at this point because the next processes can be built on top of this as separate tasks, and this is at a good usable state
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#53
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Todo:
* BTR trader services requires implementation server-side
* Send items to player stash (2x4)
* Provide covering fire
* Taxi to a specific location on Streets
* Fix turret aiming at player from raid start
* Make turret shoot at enemies (including player)
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#52
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Todo:
* BTR Driver services
* Send to items to player stash (2x4)
* Provide covering fire
* Taxi to a specific location on Streets
* BTR turns hostile if you shoot it
* BTR automatically follows a set path from raid start, stopping at locations for 90 seconds each stop
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#51
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Current progress:
* BTR spawns in, clientside BTR is synced with serverside BTR
* BTR Bot spawns in, is assigned to BTRController (GClass2911) correctly
* BTR Bot is initialized properly (invisible, makes no sound, doesn't shoot at player)
Todo:
BTR is currently missing functionality
* It needs to allow player to enter and exit
* Player should be able to interact with BTR driver/open BTR stash UI/pay money to get taxi'd to a chosen location/pay money for it to provide covering fire
* Turret should rotate to shoot player if they attack it
* It should be able to drive on its own from raid start, going from location to location, on a set path
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#50
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Since gameWorld.LocationId can be used by multiple things (And may be used by more in the future), move it to its own patch instead of as part of the BTR patch.
Target `method_3` in `BaseLocalGame` to assign it as close to where a live game would set it
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#49
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
GClass2911 expects gameWorld.LocationId to be set to instantiate the BTRView
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#48
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
only run on streets
Split patch into pre and post fixes
lots of logging
assign btrcontroller an instance of GClass2911, not a newed version of the class