Code Monkey home page Code Monkey logo

r5sdk's Introduction

Source SDK

  • This repository houses the source code for the development package targeting the game Apex Legends.

Building

R5sdk uses the CMake project generation and build tools. For more information, visit CMake.
In order to compile the SDK, you will need to install Visual Studio 2017, 2019 or 2022 with:

  • Desktop Development with C++ Package.
  • Windows SDK 10.0.10240.0 or higher.
  • C++ MFC build tools for x86 and x64.
  • [Optional] C++ Clang/LLVM compiler.

Steps:

  1. Download or clone the project to anywhere on your disk.
    1. Run CreateSolution.bat in the root folder, this will generate the files in build_intermediate.
    2. Move all the game files in the game folder so that the path game/r5apex(_ds).exe is valid.
  2. Open r5sdk.sln in Visual Studio and compile the solution.
    1. All binaries and symbols are compiled to the game folder.
    2. Run launcher.exe, toggle and set the desired options and hit the Launch Game button.

Debugging

The tools and libraries offered by the SDK could be debugged right after they are compiled.

Steps:

  1. Set the target project as Startup Project.
    1. Select Project -> Set as Startup Project.
  2. Configure the project's debugging settings.
    1. Debug settings are found in Project -> Properties -> Configuration Properties -> Debugging.
    2. Additional command line arguments could be set in the Command Arguments field.

Launch Parameters

  • The -wconsole parameter toggles the external console window to which output of the game is getting logged to.
  • The -ansicolor parameter enables colored console output to enhance readability (NOTE: unsupported for some OS versions!).
  • The -nosmap parameter instructs the SDK to always compute the RVA's of each function signature on launch (!! slow !!).
  • The -noworkerdll parameter prevents the GameSDK DLL from initializing (workaround as the DLL is imported by the game executable).

Launch parameters can be added to the startup_*.cfg files,
which are located in <gamedir>\platform\cfg\startup_*.cfg.

Note [IMPORTANT]

This is not a cheat or hack; attempting to use the SDK on the live version of the game could result in a permanent account ban. The supported game versions are:

  • S3 R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM.

Pylon [DISCLAIMER]

When you host game servers on the Server Browser (Pylon) you will stream your IP address to the database, which will be stored there until you stop hosting the server; this is needed so other people can connect to your server.

There is a checkbox in the Server Browser called Server Visibility that defaults to Offline.

  • Offline: No data is broadcasted to the master server; you are playing offline.
  • Hidden: Your server will be broadcasted to the master server, but could only be joined using a private token.
  • Online: Your server will be broadcasted to the master server, and could be joined from the public list.

Alternatively, you can host game servers without the use of our master server. You can grant people access to your game server by sharing the IP address and port manually. The client can connect using the connect command. The usage of the connect command is as follows: IPv4 connect 127.0.0.1:37015, IPv6 connect [::1]:37015. NOTE: the IP address and port were examples.

r5sdk's People

Contributors

ayezeebb avatar bobthebob9 avatar d3-3109 avatar happydoge avatar icepixelx avatar ijarika avatar kralrindo avatar kyeondiscord avatar m1kep avatar marcii0 avatar mauler125 avatar mrsteyk avatar o-robotic avatar r-ex avatar salcodes1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

r5sdk's Issues

README debug setup not up to date

Title says it all, followed the configuration steps from the README and it doesn't work (VS 2022).

The solution dir is set to build_intermediate, so it wont find /game/r5apex.exe.

On an unrelated note I have a link error on netconsole as it tries to link to DetourAttach. Probably an error on my end but i'd be happy if someone had a solution.

p4sync crashes after 3d36c

Building from p4sync commit 3d36c x64 Release and running r5apex.exe results in a gamesdk.dll crash.

I am able to run the preceding p4sync commit 02087 without issue, so I believe the refactor introduced a static initialization order fiasco. I locally fixed CreateGlobalMemAlloc and g_pMemAllocSingleton initialization; afterwards, the gamesdk.dll crash is no longer present but the game startup hangs indefinitely, so there are likely more issues. Ref crash log:

apex_crash.txt

To be sure this wasn't fixed by some later commit, I tried jumping forward to 3bb4e and applied the same local fixes to tier0\memstd.h. However, CModule::GetExportedSymbol() fails to map the following three symbols:

g_ThreadMainThreadID
g_ThreadServerFrameThreadID
LauncherMain

This because the inner pImageExportDirectory->NumberOfNames loop only finds the following 5 names:

WinMain
AmdPowerXpressRequestHighPerformance
CreateGlobalMemAlloc
g_pMemAllocSingleton
g_pCmdLine

The result is another crash since v_LauncherMain = nullptr which triggers the detours attach failure assert.

Let me know if there's anything else I could try that would be helpful.

Menu doesnt work

When you launch the new "SDK Launcher", it shows Map and Playlist, once all of the chosen things are equipped like "mp_rr_aquaduct " it launches to the default screen instead of the chosen map and playlist. Please fix this issue.

No HD textures on shipped build

I'll make a PR for this after finals, but essentially you can get the game down to <10GB by throwing out the starpaks (which aren't necessary) and forcing the game to return true in CHLClient::HasPartialInstall (index 2, +16 from interface start). Then you need to make some UI script edits to get rid of the "HD TEXTURES DOWNLOADING" shit. You should probably toss out Origin when you do this too (which isn't too hard), because Origin integration serves no purpose (persistence from retail servers isn't used, the game is free so there's no ownership to verify, and everyone just makes new accounts for r5 anyway). You can make the HD textures an optional download I guess if people want that, and then it wouldn't be too hard to check for their presence in the haspartialinstall hook.

Error while running dedi server

Hi, I'm trying to host a dedi server for the EU/Italian community, everything looks good beside 1 thing.

Sometimes the server crashes when someone picks up a barrel (i think)

[modToRemove] ""
[item] "barrel_stabilizer_l4_flash_hider"
[weapon] ENTITY (weaponx mp_weapon_autopistol [376] (weapon "mp_weapon_autopistol" at <-1115.81 3890.98 10.8191>))
[player] ENTITY (player nickname [1] (player "nickname" at <-1121.82 3879.96 -31.9525>))
[this] TABLE
[weaponData] STRUCT LootData
[allowedToAdd] true
[itemData] STRUCT LootData
[deathBox] ENTITY (prop_death_box player_death_box [195] at <-1173.63 3979.53 -3.34375>)
[forceActive] false
[returnToInventory] false
[takeFromInventory] false
[modToRemove] ""
[item] "barrel_stabilizer_l4_flash_hider"
[weapon] ENTITY (weaponx mp_weapon_autopistol [376] (weapon "mp_weapon_autopistol" at <-1115.81 3890.98 10.8191>))
[player] ENTITY (player nickname [1] (player "nickname" at <-1121.82 3879.96 -31.9525>))
[this] TABLE
[modToRemove] ""
[weapon] ENTITY (weaponx mp_weapon_autopistol [376] (weapon "mp_weapon_autopistol" at <-1115.81 3890.98 10.8191>))
[weapons] ARRAY
[slot] 1
[isPlayerSwitching] false
[attachment] "barrel_stabilizer_l4_flash_hider"
[data] STRUCT LootData
[deathBox] ENTITY (prop_death_box player_death_box [195] at <-1173.63 3979.53 -3.34375>)
[pickupFlags] 20
[player] ENTITY (player nickname [1] (player "nickname" at <-1121.82 3879.96 -31.9525>))
[pickup] ENTITY (prop_survival [241] at <-1173.63 3979.53 -3.34375>)
[action] 11
[this] TABLE
[oldAmmo] 1
[useLong] false
[useAlt] false
[lootRef] STRUCT LootRef
[as] STRUCT LootActionStruct
[lt] STRUCT LootTypeData
[data] STRUCT LootData
[pickedUp] false
[deathBox] ENTITY (prop_death_box player_death_box [195] at <-1173.63 3979.53 -3.34375>)
[pickupFlags] 20
[player] ENTITY (player nickname [1] (player "nickname" at <-1121.82 3879.96 -31.9525>))
[pickup] ENTITY (prop_survival [241] at <-1173.63 3979.53 -3.34375>)
[this] TABLE
[deathBox] ENTITY (prop_death_box player_death_box [195] at <-1173.63 3979.53 -3.34375>)
[lootEnt] ENTITY (prop_survival [241] at <-1173.63 3979.53 -3.34375>)
[pickupFlags] 20
[lootEntEEH] 98545
[args] ARRAY
[player] ENTITY (player nickname [1] (player "nickname" at <-1121.82 3879.96 -31.9525>))
[this] TABLE

DIAGPRINTS

any idea on how could i fix this?

thanks

ImGui config file missing.

Open launcher.exe and after choosing launching mode, i got an error:

Native(M):ImGui config file 'D:\Apex\R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM\platform\imgui.json' not found. Changing the settings in the console or server browser options re-create's it. Exception: '[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal'

help

how can i find the season 3 build? is there any archives of apex legends builds

Provide two exes instead.

Hey.
I'm trying to run this awesome mod through Wine.
So the game launches but when I click ~ or F10 nothing appears it's because the scripts are not being injected.
This could be due to launcher using some call/function that Wine doesn't support.
I wonder if it would be possible to work around this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.