Skip to content

Commit

Permalink
Switch back to VERSION_TYPE_CUSTOM default build type
Browse files Browse the repository at this point in the history
  • Loading branch information
botder committed Aug 11, 2023
1 parent f9fec65 commit d6052f0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 36 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

[Multi Theft Auto](https://www.multitheftauto.com/) (MTA) is a software project that adds network play functionality to Rockstar North's Grand Theft Auto game series, in which this functionality is not originally found. It is a unique modification that incorporates an extendable network play element into a proprietary commercial single-player PC game.

> **Note**
> If you're a fork developer, please read this note carefully. We have changed the default build type back to *CUSTOM* in `Shared/sdk/version.h`. If you're developing without the anti-cheat in mind, say in the Debug configuration, this doesn't affect you at all. Now, if you plan to test your custom client with anti-cheat enabled, you should change your build type to `UNTESTED`. If you want to publish a release of your custom client, you must switch to a *fork support* hardened release of `netc.dll`.
> Please read our [Forks_Full_AC](https://wiki.multitheftauto.com/wiki/Forks_Full_AC) wiki page for more information.
## Introduction

Multi Theft Auto is based on code injection and hooking techniques whereby the game is manipulated without altering any original files supplied with the game. The software functions as a game engine that installs itself as an extension of the original game, adding core functionality such as networking and GUI rendering while exposing the original game's engine functionality through a scripting language.
Expand Down
59 changes: 38 additions & 21 deletions Shared/sdk/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,49 @@
//
#pragma once

//
// To compile a client for mass consumption by players (releasing your own "MTA fork"):
// 1. set MTASA_VERSION_TYPE to VERSION_TYPE_UNSTABLE
// 2. Use netc.dll from https://mirror-cdn.multitheftauto.com/bdata/netc.dll (preferably run utils/buildactions/install_data.lua)
// Per the above, take note of AC constraints of building a fork (see https://wiki.multitheftauto.com/wiki/Forks)
// If you wish to get past "15% AC" constraints and use "official MTA full anticheat", read this new article: https://wiki.multitheftauto.com/wiki/Forks_Full_AC
//
// To compile a client for development and debugging purposes (e.g to avoid AC kicks for attaching a debugger like WinDbg):
// 1. set MTASA_VERSION_TYPE to VERSION_TYPE_CUSTOM
// 2. Use netc.dll from https://mirror-cdn.multitheftauto.com/bdata/netc.dll (preferably run utils/buildactions/install_data.lua)
// Never use 'custom' build type for building a fork: you would change the final "15% AC protection" described at https://wiki.multitheftauto.com/wiki/Forks to
// only 1%, as netc switches to disable everything in favour of MTA contributors' ability to do things like attach debuggers
//
// To compile a public server (players that use official MTA client can connect, as long you don't introduce incompatible patches):
// 1. set MTASA_VERSION_TYPE to VERSION_TYPE_RELEASE
// 2. Use net.dll/net.so from the latest untested/rc/release (nightly.mtasa.com)
//
// To compile a custom server (only custom build players can connect):
// 1. set MTASA_VERSION_TYPE to VERSION_TYPE_CUSTOM
// 2. Use net.dll/net.so from the latest unstable (nightly.mtasa.com)
/*******************************************************************************
* Note for fork developers:
*
* If you don't follow these guidelines, you may suffer from inadequate or even
* zero anti-cheat support, when you release a fork client to the public with a
* misconfigured deployment pipeline. Never use build type VERSION_TYPE_CUSTOM in
* a public release of your fork.
*
* Please read the wiki article at https://wiki.multitheftauto.com/wiki/Forks for
* more information, guidelines and security considerations.
*
* To compile a client for mass consumption by your player base (as a public release):
* 1. Set MTASA_VERSION_TYPE to VERSION_TYPE_UNSTABLE
* 2. Use netc.dll from https://mirror-cdn.multitheftauto.com/bdata/fork-support/netc.dll
* 3. Switch to Nightly build configuration
*
* To develop and test a client locally or in a trustworthy closed group (local or private release):
* a. With active anti-cheat:
* 1. Set MTASA_VERSION_TYPE to VERSION_TYPE_UNSTABLE
* 2. Use netc.dll from https://mirror-cdn.multitheftauto.com/bdata/netc.dll (preferably run utils/buildactions/install_data.lua)
* b. Without anti-cheat:
* 1. Set MTASA_VERSION_TYPE to VERSION_TYPE_CUSTOM
* 2. Use netc.dll from https://mirror-cdn.multitheftauto.com/bdata/netc.dll (preferably run utils/buildactions/install_data.lua)
*
* To compile and host an offical public server (anyone on official MTA client can connect):
* 1. Copy net.dll or net.so from a nightly release (see https://nightly.multitheftauto.com/)
* 2. Set MTASA_VERSION_TYPE to VERSION_TYPE_RELEASE
* 3. Set MTASA_VERSION_BUILD to the build number from the network library (see file version information)
* 4. Switch to Nightly build configuration
*
* To compile and host a custom public server (only custom MTA clients can connect):
* 1. Use `<disableac>5,6,21</disableac>` in your mtaserver.conf (may not be needed in the future)
* 2. Use regular developer net.dll or net.so (preferably run utils/buildactions/install_data.lua)
* 3. Set MTASA_VERSION_TYPE to VERSION_TYPE_UNSTABLE
* 4. Switch to Nightly build configuration
*
*******************************************************************************/

// New version info
#define MTASA_VERSION_MAJOR 1
#define MTASA_VERSION_MINOR 6
#define MTASA_VERSION_MAINTENANCE 0
#define MTASA_VERSION_TYPE VERSION_TYPE_UNSTABLE
#define MTASA_VERSION_TYPE VERSION_TYPE_CUSTOM
#define MTASA_VERSION_BUILD 0

#include "../build_overrides.h"
Expand Down
15 changes: 0 additions & 15 deletions win-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,6 @@ IF /i [%2] == [Win32] (
)
)

rem Override MTASA_VERSION_TYPE for CI builds
for /f %%A in ("Shared\build_overrides.h") do set FILE_SIZE=%%~zA

if /i [%CI%] == [true] (
if %FILE_SIZE% equ 0 (
echo Overridden MTASA_VERSION_TYPE for CI builds
(
echo #undef MTASA_VERSION_TYPE
echo #define MTASA_VERSION_TYPE VERSION_TYPE_CUSTOM
) > "Shared\build_overrides.h"
) else (
echo CI build detected but no changes made to build_overrides.h
)
)

echo Build configuration:
echo BUILD_CONFIGURATION = %BUILD_CONFIGURATION%
echo BUILD_PLATFORM = %BUILD_PLATFORM%
Expand Down

0 comments on commit d6052f0

Please sign in to comment.