first commit

This commit is contained in:
cclecle
2022-05-08 17:18:43 +02:00
commit d6d08f59a4
53 changed files with 1038 additions and 0 deletions

27
Help/XC_Core Readme.txt Normal file
View File

@@ -0,0 +1,27 @@
=========================================================
XC_Core - Base extension for native UT99 addons by Higor
Version 11
=========================================================
This package is required to run all other XC Tools.
See XC_CoreStatics class for information on new native functions.
====================
UBinary serializer:
Now merged into XC_Core, provides minimal binary file handling to UnrealScript.
Check classes BinarySerializer (Object) and BinaryTester (Actor) for usage guidelines.
For security measures file writer doesn't allow creating files outside of the game directory.
=========================
c++ headers and linking:
This package contains headers that allow the user to utilize XC_Core features in own native packages.
Just add ..\XC_Core\Inc to include settings and link to XC_Core.lib (or XC_Core.so in Linux)
Don't forget to define this macro somewhere in your code (or preprocessor):
#define XC_CORE_API DLL_IMPORT

View File

@@ -0,0 +1,54 @@
=========================
Automatic cache converter
=========================
The Automatic cache converter is a simple setting that allows the client to copy
files delivered by the current server it's connected to into the package folders
with correct names and cases.
The file copy operations occur immediately after loading the map on a remote
server and new files will be placed into the first directory that matches the
file system criterias.
All file copy operations will be logged and won't replace existing files.
======
Usage:
This option is disabled by default, you must enable it in order for it to work.
Set XC_GameEngine.bCacheConvertAtJoin=True.
- The option can be modified via INI as follows
[XC_Engine.XC_GameEngine]
bCacheConvertAtJoin=True
- Or via a command:
SET XC_GAMEENGINE bCacheConvertAtJoin 1
=========
Examples:
- Copying downloaded files into default folders
[Core.System]
Paths=../System/*.u
Paths=../Maps/*.unr
Paths=../Textures/*.utx
Paths=../Sounds/*.uax
Paths=../Music/*.umx
- Copying downloaded files into a common folder
[Core.System]
Paths=../Downloaded/*.u
Paths=../Downloaded/*.unr
Paths=../Downloaded/*.utx
Paths=../Downloaded/*.uax
Paths=../Downloaded/*.umx
Paths=../System/*.u
Paths=../Maps/*.unr
Paths=../Textures/*.utx
Paths=../Sounds/*.uax
Paths=../Music/*.umx
-> Make sure you create the folder you're going to use!!

View File

@@ -0,0 +1,61 @@
=========================
Addons for Unreal Editor
=========================
By loading XC_EditorAdds in Unreal Editor via 'EditPackages' new buttons will
appear on the Brush Builder panel.
These addons consist on
- Paths Builder (see "Paths Builder" documentation)
- Level cleanup
- Brush To Mesh
- Measure Distance
- Properties Window
- Actor Transform
- Setup Lift Paths
==============
Manual setup:
Add the new EditPackages line in UnrealTournament.ini under:
[Editor.EditorEngine]
...
EditPackages=XC_EditorAdds
========
Addons:
- Level cleanup:
Compacts the actor list and removes texture information from brush faces that
don't currently have an existing surface in the map's BSP construction.
This is very useful to get rid of unused textures that remain referenced by
hidden/non-built faces from brushes.
- Brush To Mesh:
Converts the selected brush into a mesh and spawns an actor at the brush's location.
The user must specify a unique mesh name.
Additionally texture tiling can be simulated by splitting the mesh into smaller faces.
Default actor class is Unreali.Knife
Default package is MyLevel (embedded into map).
*Note: The mesh shouldn't have more than 7 unique textures
- Measure Distance:
Compares distance between two selected actors.
Compares distance between one selected actor and it's nearest camera.
- Properties Window:
Opens up a fixed property window on the selected actor, this one doesn't change when
selecting another actor.
Also, the 'None' tab displays the hidden properties.
- Actor Transform
Applies various transformation steps to the selected actors.
Clicking on the button without any selected actors or transformation steps
will display quick usage instructions.
- Setup Lift Paths
Select LiftCenter, LiftExit nodes (and optionally a mover) and link them using
the same LiftTag.
Clicking on the button without any selected actors will display quick usage instructions.

View File

@@ -0,0 +1,63 @@
================
Enhanced Netcode
================
For use with the new relevancy system, requires XC_GameEngine.bUseNewRelevancy=True
The new relevancy system is a full rewrite of the actor prioritizator and visibility check system
used to determine how and when actors are relevant to other clients over net play.
It also affects in some cases how actor updates are done.
Additionally, a lot of changes have been introduced to reduce bandwidth usage from
server to client.
=========
Features:
Dynamic Tickrate:
- Bandwidth saturation detection, artificially reduces update rate of clients.
** Spectators' dynamic tickrate is always set to half of normal players.
** This makes increasing max server tickrate to higher values possible (limit=120).
- On clients with XC_Engine v24 or greater, the dynamic tickrate is capped to the client's framerate.
Actor prioritization:
- Active discarding of less relevant actors in case of channel saturation.
- Prevents servers from being inaccesible and allows players to see their inventory and nearby enemies.
- Owned actor bursting, clients receive actors they own earlier and with higher priority.
- Benefits replication of owned actors and low frequency info holders.
Bandwidth saving:
- Simulated pawns don't have their location updated if moving in straight lines.
- Unnecessary Rotation, Velocity updates no longer sent.
- USERFLAG saturation addressed, players don't get more than 20 messages per second.
- Players receive less position adjustment updates at higher tickrates.
=====================
Extended actor flags:
Actors now have additional replication variables that allow the relevancy loop to modify
the behaviour of the relevancy checks on them, increasing capabilities and reducing workload.
These flags are unaccessible to compiled unrealscript code, in order to enable these flags
on one or more actors the coder must either:
- Apply a global 'SET' command.
- Individually call SetPropertyText on said actor.
* bNotRelevantToOwner *
This actor is not sent to the player that owns the connection.
Extremely useful on lag compensators that uses separate client/server effects.
* bRelevantIfOwnerIs *
This actor becomes synchronized with it's owner when it comes to being relevant
to other clients, this means that if the owner is relevant to a client, so is this actor.
This is applied by default on ShieldBelt effects.
* bRelevantToTeam *
This actor becomes relevant to an entire team (best used with bAlwaysRelevant for backwards compatibility)
The actor must have a 'byte' variable named 'Team' in order for this condition to work.
* bSuperClassRelevancy *
If this actor isn't on the network communication map and therefore cannot be replicated, then the
relevancy loop will attempt to replicate a superclass version of this actor that can be replicated.
Useful for small weapon/monster AI modifications without expanding the network package list.
WARNING: DO NOT HOTSWITCH BETWEEN NEW/OLD RELEVANCY CODE IF YOU HAVE bSuperClassRelevancy ACTORS IN THE LEVEL

View File

@@ -0,0 +1,47 @@
==========================
LZMA in Unreal Tournament:
==========================
=====================
Package downloading:
Clients can query redirects and UT [XC] servers for LZMA files.
Servers can send the compressed package if the LZMA (or UZ) file is on the
same directory as the package.
It is possible to enable automatic LZMA compression on a XC_Engine server.
As soon as a server loads a map, it'll automatically compress the files that
are eligible to be sent to clients.
See: "XC_GameEngine settings" in documentation.
The automatic LZMA compressor on XC_Engine servers now stores it's LZMA
cache both in memory and "../LzmaCache/", see the "LzmaCache.ini" in
said directory to modify the behaviour of the LZMA compressor.
===================================
Automatic LZMA compressor settings:
; If enabled, do not print compression actions to log
Silent=true
; Push largest packages to file cache if total in memory exceeds this
MaxMemCacheMegs=16
; Purge oldest packages from file cache if total in disk exceeds this
MaxFileCacheMegs=256
; Any uncompressed package larger than this is automatically pushed to file cache
ForceSourceToFileMegs=8
=========================
Compression commandlets:
You can LZMA compress files using a XC_Core commandlet:
> UCC LZMACompress ..\Maps\CTF-Coret.unr
You can LZMA decompress files using 7zip, WinRar or:
> UCC LZMADecompress ..\Maps\CTF-Coret.unr.lzma
Both commandlets support wildcards.

View File

@@ -0,0 +1,38 @@
===============================================
Exposed properties for existing native classes
===============================================
Additional properties are now visible on certain native classes and their subclasses.
These increase the potential functionality of servers and clients running mods coded
to access them via GetPropertyText() or GET commands.
Warning: compiling and saving code accessing these properties without the above
methods will render your package unusable!
See "Relevancy loop.txt" for extra properties in Actor.
====================
List of properties:
= CLASS -> CPP_PropertyName -> UScript_PropertyName (type) (flags)
- GameEngine -> GLevel -> Level (obj Level) (const, editconst)
- GameEngine -> GEntry -> Entry (obj Level) (const, editconst)
- DemoRecDriver -> DemoFileName -> DemoFileName (string) (const, editconst)
- LevelBase -> NetDriver -> NetDriver (obj NetDriver) (const, editconst)
- LevelBase -> DemoRecDriver -> DemoRecDriver (obj NetDriver) (const, editconst)
- LevelBase -> Engine -> Engine (obj Engine) (const, editconst)
- LevelBase -> URL.Protocol -> URL_Protocol (string) (const, editconst)
- LevelBase -> URL.Host -> URL_Host (string) (const, editconst)
- LevelBase -> URL.Port -> URL_Port (int) (const, editconst)
- LevelBase -> URL.Map -> URL_Map (string) (const, editconst)
- LevelBase -> URL.Op -> URL_Options (array<string>) (const, editconst)
- LevelBase -> URL.Portal -> URL_Portal (string) (const, editconst)
- LevelBase -> Actors.Num() -> ActorListSize (int) (const, editconst)
- Level -> iFirstDynamicActor -> iFirstDynamicActor (int) (const, editconst)
- Level -> iFirstNetRelevantActor -> iFirstNetRelevantActor (int) (const, editconst)
- NetDriver -> ClientConnections -> ClientConnections (array<obj NetConnection>) (const, editconst)
- NetDriver -> ServerConnection -> ServerConnection (obj NetConnection) (const, editconst)
- Property -> PropertyFlags -> PropertyFlags (int) (const, editconst)
- Property -> ArrayNum -> ArrayNum (int) (const, editconst)
- ByteProperty -> Enum -> Enum (obj Enum) (const, editconst)

View File

@@ -0,0 +1,58 @@
==================================================
New Path Builder and visualizer for Unreal Editor
==================================================
The new Paths Builder has been rewritten from scratch to address limitations in the original pathing code
and to produce paths using a more predictable, simple behaviour.
It will be available through a button on the brush builders' panel.
==================
Building process:
Every pair of Navigation Points are sorted by distance prior to creation of ReachSpecs.
Then said ReachSpecs will be created by said order of distance between it's ends.
The main purpose of this is to completely eliminate the old "Paths Prune" process which becomes erratic
after the paths list (16) fills in areas full of Navigation Points.
Since all short paths are built first, it becomes easier to see if a long path already has a set of
short routes connecting them which makes discarding the long path a lot easier.
The new criteria to discard routes is more aggresive at shorter distances which prevents
overcrowding of reachspecs in places full of Navigation Points (ex: areas full of items).
The theoretical maximum distance is 2000, but it may be lower in specific areas/routes.
====================
Special ReachSpecs:
An additional rule to the Paths Builder has been added.
Just like a Trigger uses Event >> Tag to send signals to Actors in the game, the Paths Builder will
Attempt to create a one-way 'special' ReachSpec from points with Event to points with matching Tag.
Logic:
B.Tag = 'Destination'
A.Event = 'Destination'
R_SPECIAL ReachSpec created with Start=A, End=B, Distance=500 (same type as Teleporters, Lift paths)
=========
Markers:
As usual, markers will be spawned for Inventory and Warp zones with the difference that if a marker
is unhidden from Unreal Editor, it will not be deleted/respawned when the new Path Builder is run.
Placement of markers considers the smaller collision size of a UT player and uses additional placement
methods when the marker doesn't initially fit in the item's spot.
Said methods consist on a walk simulation from another nearby Navigation Point.
=====================
Reachability checks:
The builder runs additional reachability checks in case of failure, these reachability checks
allow the builder to jump over multiple obstacles and ledges.
If Navigation Points still fail to connect when on ramps or stairs, consider moving the node closer to
the ground or using Event >> Tag linking.

View File

@@ -0,0 +1,67 @@
==============================
NexgenXCGE server actor readme
==============================
=============
Installation:
Requires XC_GameEngine.
On the Server/Game main ini:
[XC_Engine.XC_GameEngine]
ServerActors=NexgenXCGE_01.NexgenXCGE_PreLogin
If you don't have a XC_GameEngine entry, copy it from GameEngine instead of making a new one or ugly things happen.
===========
Description
This PreLoginHook actor will allow the IP component of Nexgen bans to reject players
before they even get to load the map, just like default ip bans.
The ban reason is also displayed on the client's Log.
In theory, all versions of Nexgen and NexgenABM should be supported.
This is extremely useful for saving server resources and keeping those
able to bypass NexgenABM bans out.
====================================
PreLogin hook Description for coders
This is a PreLoginHook actor (subclass of XC_Engine.PreLoginHookElement),
it autoregisters itself to XC_GE's PreLoginHooks list and gains the ability
to interfere with a player's PreLogin function.
How does this happen?
event PreLogin( string Options, string Address, out string Error, out string FailCode)
{
HOOK: PreProcess PreLogin (runs thru all PreLogin hooks)
//default code start
...
//default code end
HOOK: PostProcess PreLogin (runs thru all PreLogin hooks)
}
Then both of these are called on your actor:
function PreLoginHook_PreProcess // Called before PreLogin
(
string Options,
string Address,
out string Error,
out string FailCode
);
function PreLoginHook_PostProcess // Called after PreLogin (only if passes PreLogin)
(
string Options,
string Address,
out string Error,
out string FailCode
);
This allows every hooked actor to alter the Error and FailCode values with simple unrealscript code.
The only requirements is to simply spawn the actor via ServerActors or any other means.

View File

@@ -0,0 +1,120 @@
XC_Engine - XC_GameEngine extension for UT99 v469b by Higor.
===========
Setting up:
===========
Place XC_Engine files in your ~UT/System/ directory.
/** Auto-installer scripts
Run XC_Enable.bat/XC_Enable_nohome.sh scripts in order to auto-config XC_Engine stuff
The scripts will enable the engine, net driver and editor addons.
See "XC_Setup.txt" for more info.
**/
In case the above fails, or a different setup is needed, follow these steps.
The new GameEngine we want to load has to be specified in UnrealTournament.ini (or it's server equivalent) as follows.
[Engine.Engine]
;GameEngine=Engine.GameEngine
GameEngine=XC_Engine.XC_GameEngine
;NetworkDevice=IpDrv.TcpNetDriver
NetworkDevice=XC_IpDrv.XC_TcpNetDriver
Be adviced, when editing ServerPackages and ServerActors in a XC_Engine server, find the [XC_Engine.XC_GameEngine] entry!!!
Either remove it (and apply on GameEngine), or apply the changes on said (XC_GameEngine) entry instead.
Safe to use in v469, and on ACE servers since most hacks are reverted during online sessions.
=================
Features:
=================
- Global
Makes several properties from native only classes visible to UnrealScript, player commands and edit window (win32).
* See "Object properties.txt" for a list of newly visible properties.
Collision Grid replacing the old hash, loaded from CollisionGrid (.dll/.so)
Log file size reduction by grouping log spam and displaying how much log messages repeat.
UnrealScript patcher for servers and offline play, allows replacement of code in runtime.
IPv6 support through XC_IpDrv.
- Server
Moving Brush Tracker in Dedicated servers (movers block visibility checks), specific maps can be ignored.
* See "Server Exploits" for a list of patched exploits.
* See "Enhanced Netcode" for changes in relevancy netcode.
* See "TravelManager" for info on coop server enhancements.
Ability to send maps marked as 'no download' (Unreal SP content for example).
- Client / Player:
Prevents servers from using 'Open' and 'ClientTravel' commands to open local files on the client.
Clients no longer send options 'Game' and 'Mutator' in their login string.
More info displayed during file download: amount of files, data pending installation.
* See "AutoCacheConverter.txt" for info on the ingame cache converter.
====================
Other documentation:
====================
- LZMA
- Editor
- Paths Builder
- Object properties
- Self Dynamic Loading
- Script Compiler
================
Extra commands.
Check other documentation files for more commands.
================
- EditObject Name=Objectname Skip=skipcount
Client, Win32 only.
Brings up a property editor dialog of an object with a specified name.
Skip= is optional and can be used to bring up a newer objects with said name.
Example: "EditObject Name=MyLevel Skip=1" Brings up play level's XLevel properties.
Example: "EditObject Name=MyLevel" Brings up Entry level's XLevel properties.
- DumpObject Name=Objectname
Dumps object in question's memory block into a file (with the object's name), only dumps the first object with matching name.
If the object is a UFunction, then it will also save a file name FUNCTIONDATA.bin with the script code (serialized TArray<BYTE>).
- LogFields Name=classname
Logs all of the UnrealScript visible properties of the specified class, with property flags, offset, size and array count.
Boolean properties have their bitmask info logged instead of array size.
- LogClassSizes Outer=packagename(optional)
Prints in log a huge list of classes and their size in memory.
If the Outer=packagename parameter isn't used (or fails), it will print all classes's sizes.
- ToggleDebugLogs - DebugLogs
Toggles additional logging, for developers.
Disabled by default, saved in [XC_Engine.XC_GameEngine] config entry.
- ToggleRelevancy - ToggleRelevant
Requires bUseLevelHook.
Toggles XC_Level relevancy loop on net servers, see "Relevancy loop.txt" for details.
====================================
Functions patched/hooked in runtime:
====================================
See XC_Engine_Actor and XC_Engine_UT99_Actor for a full list of script patches.
=================
Credits:
=================
I would like to thank my fellow betatesters
- Chamberly
- ~V~
- Nelsona
- SC]-[LONG_{HoF}
- $carface (and the legions of Siege apes)
- AnthRAX
- SicilianKill
And all of Cham's development server visitors for the help in bugfixing this.

View File

@@ -0,0 +1,98 @@
===================================
Script Compiler addons (win32 only)
===================================
When XC_Core is loaded during UnrealScript compilation, the script compiler
may add extra functions to Core and Actor.
While these functions don't precisely exist in Unreal Tournament's stock
classes, it may be possible to call these functions under specific conditions.
The usefulness of this is a huge amount of code simplification and access to
other mod's functionalities without generating package dependency.
You may perform a simple XC_Engine check on the machine running the code to
avoid crashing the game/server by adding something like this:
// Sample version check here
if ( int(ConsoleCommand("get ini:Engine.Engine.GameEngine XC_Version")) >= 19 )
{
// Run XC_Engine safe code here
// Most XC_Engine functions are safe to use from version 19 and above
// The route mapper requires version 24
// To limit to v469 you must check for version 25
}
Note: Dynamic arrays have been officially implemented in v469, but XC_Engine
supports those as of version 19 as well, so you may always check for either
XC_Version or Level.EngineVersion (>=469) before using them.
==================================
Functions available to all actors:
; Describe a reachSpec **safe**
native(519) final function describeSpec(int iSpec, out Actor Start, out Actor End, out int ReachFlags, out int Distance);
; Add/check packages to server's download list **XC_Engine required**
native(1718) final function bool AddToPackageMap( optional string PkgName);
native(1719) final function bool IsInPackageMap( optional string PkgName, optional bool bServerPackagesOnly);
; Actor iterators **XC_Engine required**
native(3540) final iterator function PawnActors( class<Pawn> PawnClass, out pawn P, optional float Distance, optional vector VOrigin, optional bool bHasPRI, optional Pawn StartAt);
native(3541) final iterator function NavigationActors( class<NavigationPoint> NavClass, out NavigationPoint P, optional float Distance, optional vector VOrigin, optional bool bVisible);
native(3542) final iterator function InventoryActors( class<Inventory> InvClass, out Inventory Inv, optional bool bSubclasses, optional Actor StartFrom);
native(3552) final iterator function CollidingActors( class<Actor> BaseClass, out actor Actor, float Radius, optional vector Loc);
native(3553) final iterator function DynamicActors( class<Actor> BaseClass, out actor Actor, optional name MatchTag );
; Script Patcher **XC_Engine required**
native(3560) static final function bool ReplaceFunction( class<Object> ReplaceClass, class<Object> WithClass, name ReplaceFunction, name WithFunction, optional name InState);
native(3561) static final function bool RestoreFunction( class<Object> RestoreClass, name RestoreFunction, optional name InState);
===================================
Functions available to all objects:
; Unreal 227 compatible functions **XC_Engine or Unreal 227 required**
native(192) static final function Color MakeColor( byte R, byte G, byte B, optional byte A);
native(257) static final function bool LoadPackageContents( string PackageName, class<Object> ListType, out array<Object> PckContents );
native(391) static final function name StringToName( string S );
native(600) static final function Object FindObject( string ObjectName, class ObjectClass, optional Object ObjOuter ); //ObjOuter param incompatible with 227!!!
native(601) static final function Class<Object> GetParentClass( Class<Object> ObjClass );
native(602) static final iterator function AllObjects( class<Object> BaseClass, out Object Obj );
native(643) static final function float AppSeconds();
; Other XC_Engine functions **XC_Engine required**
native(3014) static final function bool HasFunction(name FunctionName, optional Object ObjToSearch); //Defaults to caller
native(3554) static final function iterator ConnectedDests( NavigationPoint Start, out Actor End, out int ReachSpecIdx, out int PathArrayIdx); //XC_Core
native(3555) static final operator(22) Object | (Object A, skip Object B);
native(3555) static final operator(22) Object | (Actor A, skip Actor B);
native(3556) static final function Clock( out float C[2]);
native(3557) static final function float UnClock( out float C[2]);
native(3559) static final function int AppCycles();
native(3558) static final function name FixName( string InName, optional bool bCreate); //Fixes name case, optionally create if not there
native(3570) static final function vector HNormal( vector A);
native(3571) static final function float HSize( vector A);
native(3572) static final function float InvSqrt( float C);
=======================
User defined functions:
As of XC_Engine 25, the script compiler can add extra functions to
the table of global functions, the requirements are as follows:
- Create a class named "GlobalFunctions" in your mod
(make sure no other GlobalFunctions exists at compile time)
- Define the functions you want to be global in said class.
** If GlobalFunctions is a subclass of Actor, all non-static functions
** will only be available to Actors and not Objects.
- 'final' functions will be executed as defined in GlobalFunctions, while
the remaining functions will be executed as defined in the Object.
** This means that non-final functions will only work as simple declarations.
** In said case if the Object doesn't have a function with the same name/params
** the game/server will simply crash.

View File

@@ -0,0 +1,35 @@
Letting a package have control over it's presence in the UPackageMap object without
requiring it to be in 'ServerPackages' list.
WARNINGS:
This method crashes servers not running XC_Engine if not coded the following way.
This method only works before the first Tick, so do it while mutators are initializing.
Make sure this method isn't called on clients, may crash windows clients.
The function needs to be declared on the class about to use it, the compiler won't
complain about it and you'll be able to call it without problems if the opcode (1718)
is defined.
In order to prevent a call when said opcode isn't defined (Win32 client, no XC_Engine)
We simply perform a sanity check and make the mod not depend on XC_Engine at all!
AddToPackageMap works in two different ways:
- PkgName specified: attempts to load said package and add to Send list.
- PkgName unspecified: adds the actor's own package to Send list.
Adding a package to the UPackageMap object will automatically add all of it's
dependancies as well, so if you have a master package that (statically) loads others,
simply add that one package and the others will be inserted as well.
This method cannot force packages marked as ServerSide-Only to be sent.
====================
class MyMutator expands Mutator;
native(1718) final function bool AddToPackageMap( optional string PkgName);
event PostBeginPlay()
{
if ( int(ConsoleCommand("XC_Version")) >= 11 )
AddToPackageMap();
}
====================

View File

@@ -0,0 +1,37 @@
=======================================================
Unreal Tournament server exploits patched in XC_Engine:
*** PreLogin bypass / fake player exploit.
It is possible to bypass the server's PreLogin function, potentially making the password
protection useless and making it vulnerable to fake player flooding.
PATCHED:
- JOIN command requires LOGIN first, valid player name and class must be supplied by
the client in order to allow joining.
*** Control channel spam.
It is possible to make the server spam the log by sending text commands using the control
channel.
PATCHED:
- Unrecognized commands no longer logged.
- Pre-Join commands have no effect if the player is already in game.
- Post-Join commands have no effect if the player hasn't joined.
*** Mutate command spam.
If the server is running badly coded mutators, it is possible to lag/crash the server by
spamming mutate commands.
PATCHED:
- Replaced PlayerPawn.Mutate with XC_Engine_PlayerPawn.Mutate
Players can only possible to send up to 2 commands per second.
Only players logged in as administrator can fully spam mutate.
*** ShowInventory command spam
It is possible to make the server write huge log files by constantly spamming
ShowInventory command.
PATCHED:
- Replaced PlayerPawn.ShowInventory with XC_Engine_PlayerPawn.ShowInventory
Only players logged in as administrator can use the command.

View File

@@ -0,0 +1,26 @@
=================
TravelManager:
=================
The TravelManager is a small addon that's inserted into the game upon XC_GameEngine initialization.
It can receive console commands and controls the travel list when a server is running.
=== Global Features:
- Automatically corrects the existing level's travel list owner (if any) when a player changes name.
If a player's new name already has an existing travel entry, the name change is reverted!.
This means that a player cannot override an existing travel entry with his own.
Players' travel info is kept for as long as the coop chain isn't broken.
When (XC_GameEngine.bAutoTravelManager = True):
- Scans current connections and updates the client's travel list items every two seconds.
The scanning is performed using class and property caching, avoiding any kind of slowdowns in extremely high traffic theoretical scenarios.
The most obvious effect of enabling this setting, is the ability to recover all items/status a player had prior to disconnection.
This can be turned on or off in runtime safely.
=== Commands:
- TravelInfo
Lists players and their items in the Single Player travel list!
- TravelUpdate
Forces manual travel list update on multiplayer games.
Coop games may implement this if they don't want to run with bAutoTravelManager.

View File

@@ -0,0 +1,80 @@
=================================
XC_ConnectionHandler actor readme
=================================
This actor is automatically spawned on net servers running XC_GameEngine.
It was made to operate independantly of XC_GameEngine so you can spawn it
on a non XC_GameEngine server by simply adding it to the ServerActors list
as follows:
[Engine.GameEngine]
...
ServerActors=XC_Engine.XC_ConnectionHandler
=== Features:
Can timeout connections without channel data at much lower values.
Timeout value can switch to a lower 'critical' timeout when connection count
exceeds a user defined value as a way to aggresively enforce less resource
usage on the server.
Can query the TCPNetDriver object an extra amount of times per frame, this
is done to mitigate a design flaw in the driver where a bad set of packets
can delay the client's incoming data by a 'n' amount of frames causing
said data to be discarded by the server due to artificially increased
delay.
By querying the TCPNetDriver an extra (user defined) times per frame, we
ensure than the malicious packets causing artificial delay are gone from
the socket at a much faster rate.
The connection handler is best run using XC_IpDrv.XC_TcpNetDriver as main
net driver, but said net driver hasn't been throughly tested and only works
on Win32 platforms so use at own risk.
=== Settings (On XC_Engine.ini):
The default settings are as follow:
[XC_Engine.XC_ConnectionHandler]
DatalessTimeout=5.0
CriticalTimeout=2.0
CriticalConnCount=10
ExtraTCPQueries=2
DatalessTimeout: Timeout for dataless connections in normal conditions
CriticalTimeout: Timeout for dataless connections in critical conditions
CriticalConnCount: Amount of dataless connections needed to trigger critical mode
ExtraTCPQueries: Extra TCPNetDriver queries per frame
There are some restrictions:
- DatalessTimeout may not be lower than 2.0
- CriticalConnCount may not be lower than 2
Lowering said values to anything below will reset those to their defaults.
=== Notes on attacks:
This is best run in conjunction with ServerCrashFix.
As SCF handles exploits, this handles data overflow and a TCPNetDriver flaw.
The values are completely arbitrary and depend on the volume of an attack.
At extreme DDoS conditions these values had to be used:
DatalessTimeout=3.0
CriticalTimeout=0.0
CriticalConnCount=6
ExtraTCPQueries=50
With some remote ports firewalled.
Firewalling remote ports is important to prevent bandwidth amplification
attacks from reaching UT.
You can easily spot those amplification attacks as you notice thousands
of different IP addresses, but very common remote ports where said data
originates from.
Example:
SSDP reflected DoS attack.
Consists of vulnerable routers returning 30x the attacker's bandwidth to
the game server via spoofing, these connection attempts can be easily spotted:
random.ip.address:1900 -> multiple times
All you have to do is firewall all incoming connections with remote port 1900.

View File

@@ -0,0 +1,56 @@
These are a few samples of XC_GameEngine settings.
- Use the map sorting functions if you need to fix your mapvote.
- Copy ServerPackages and ServerActors from your Engine.GameEngine block
Client:
[XC_Engine.XC_GameEngine]
bCacheConvertAtJoin=True
bAutoCompressLZMA=False (True if you host LAN games)
;ServerPackages=
;ServerActors=
Siege server:
[XC_Engine.XC_GameEngine]
NoBrushTrackerFix=CTF-Niven
NoBrushTrackerFix=CTF-'uK-Simplex][
NoBrushTrackerFix=CTF-Niven][
; Add any other maps where doors make it unplayable
;ServerPackages=
;ServerActors=
CTF/DM/TDM/AS server:
[XC_Engine.XC_GameEngine]
;ServerPackages=
;ServerActors=
Coop server:
[XC_Engine.XC_GameEngine]
bSortMaplistByFolder=True
bAutoTravelManager=True
bFasterUpload=True
;ServerPackages=
;ServerActors=
MH server:
[XC_Engine.XC_GameEngine]
bSortMaplistGlobal=True
bFasterUpload=True
;ServerPackages=
;ServerActors=
- If you're running a NexGen server and you want to prevent reconnect spam from banned players:
Add to ServerActors: NexgenXCGE_01.NexgenXCGE_PreLogin
==========================
Advanced settings (defaults displayed):
[XC_Engine.XC_GameEngine]
bUseLevelHook=True (hooks the level object after map is loaded)
bUseNewRelevancy=True (runs the relevancy loop on net servers using xcge code)
bEnableDebugLogs=False
bAutoCompressLZMA=True (run LZMA autocompressor)
bForceLevelHook=False (use level hook on client sessions, may trigger ACE)
bInterceptLog=True (Add thread-safe layer to log, filters log spam by grouping lines together)
bCollisionHashHook=True (Uses CollisionGrid)

3
Readme.md Normal file
View File

@@ -0,0 +1,3 @@
# XC_Engine Release GIT repository
checkout official release thread: https://ut99.org/viewforum.php?f=63

91
Run.sh Normal file
View File

@@ -0,0 +1,91 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
OUTPUT_DIR="$2"
CFG_FILE="$3"
DEFAULT_CFG_FILE=UnrealTournament.ini
function install() {
cp $SCRIPT_DIR/Help $OUTPUT_DIR/Help -Rf
cp $SCRIPT_DIR/System $OUTPUT_DIR/System -Rf
echo install ok
}
function enable() {
# Warning: ugly hack with sed to allow multiple key instances
#crudini --set $OUTPUT_DIR/System/$CFG_FILE 'Engine.GameEngine' _ServerPackages $SSBBaseName
#sed -i 's/_ServerPackages/ServerPackages/g' $OUTPUT_DIR/System/$CFG_FILE
#crudini --set $OUTPUT_DIR/System/$CFG_FILE 'Engine.GameEngine' _ServerActors $SSBBaseName.SmartSBServerActor
#sed -i 's/_ServerActors/ServerActors/g' $OUTPUT_DIR/System/$CFG_FILE
# TODO
echo enable ok
}
function disable() {
#sed -i "/ServerPackages[[:space:]]*=[[:space:]]*$SSBBaseName/d" $OUTPUT_DIR/System/$CFG_FILE
#sed -i "/ServerPackages[[:space:]]*=[[:space:]]*SmartSBStats/d" $OUTPUT_DIR/System/$CFG_FILE
#sed -i "/ServerActors[[:space:]]*=[[:space:]]*$SSBBaseName.SmartSBServerActor/d" $OUTPUT_DIR/System/$CFG_FILE
# TODO
echo disable ok
}
function show_help() {
echo
echo "Usage: $0 { install | enable | disable } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
echo
}
function check_cfg_file() {
if [ -z ${CFG_FILE} ]
then
echo "CFG_FILE is unset, setting it to $DEFAULT_CFG_FILE"
CFG_FILE=$DEFAULT_CFG_FILE
else
echo "CFG_FILE is set to '$CFG_FILE'"
fi
if [ ! -f $OUTPUT_DIR/System/$CFG_FILE ]
then
echo "$OUTPUT_DIR/System/$CFG_FILE does not exist"
show_help
exit 9999 # die with error code 9999
fi
}
function check_game_dir() {
### Check if a directory does not exist ###
if [ ! -d $OUTPUT_DIR ]
then
echo "incorrect <UT99_INSTALL_DIR>"
show_help
exit 9999 # die with error code 9999
fi
}
case "$1" in
'install')
check_game_dir
install
;;
'enable')
check_game_dir
check_cfg_file
disable
enable
;;
'disable')
check_game_dir
check_cfg_file
disable
;;
*)
show_help
exit 1
;;
esac
exit 0

BIN
System/Cacus.dll Normal file

Binary file not shown.

BIN
System/Cacus.so Normal file

Binary file not shown.

BIN
System/CollisionGrid.dll Normal file

Binary file not shown.

BIN
System/CollisionGrid.so Normal file

Binary file not shown.

BIN
System/LZMA.dll Normal file

Binary file not shown.

BIN
System/LZMA.so Normal file

Binary file not shown.

33
System/LZMA.txt Normal file
View File

@@ -0,0 +1,33 @@
LZMA library version 16.04 (LZMA SDK)
DLL compiled with Visual C++ 6
* From lzmalib.dsp
SO compiled with GCC 4.6.3
* From the following makefile:
*************************
CC = gcc
CFLAGS = -c -m32 -O2 -Wall -D_7ZIP_ST
LDFLAGS = -shared
TARGET_LIB = LZMA.so
SRCS = Alloc.c LzFind.c LzmaDec.c LzmaEnc.c LzmaLib.c
OBJS = $(SRCS:.c=.o)
.PHONY: all
all: ${TARGET_LIB}
$(TARGET_LIB): $(OBJS)
$(CC) ${LDFLAGS} -o $@ $^
$(SRCS:.c=.d):%.d:%.c
$(CC) $(CFLAGS) -MM $< >$@
include $(SRCS:.c=.d)
.PHONY: clean
clean:
-${RM} ${TARGET_LIB} ${OBJS} $(SRCS:.c=.o)
-${RM} ${TARGET_LIB} ${OBJS} $(SRCS:.c=.d)[/code]
*************************

BIN
System/NexgenXCGE_01.u Normal file

Binary file not shown.

BIN
System/XC_Core.dll Normal file

Binary file not shown.

10
System/XC_Core.int Normal file
View File

@@ -0,0 +1,10 @@
[Public]
Object=(Name=XC_Core.DeobfuscateNamesCommandlet,Class=Class,MetaClass=Core.Commandlet)
Object=(Name=XC_Core.LZMACompressCommandlet,Class=Class,MetaClass=Core.Commandlet)
Object=(Name=XC_Core.LZMADecompressCommandlet,Class=Class,MetaClass=Core.Commandlet)
[Progress]
DecompressFile=Decompressing file %s (F10 Cancels)
DecompressDesc=%s %iK > %iK
RemainingFiles=File %i of %i (%s pending installation)

BIN
System/XC_Core.so Normal file

Binary file not shown.

BIN
System/XC_Core.u Normal file

Binary file not shown.

8
System/XC_Disable.bat Normal file
View File

@@ -0,0 +1,8 @@
@echo off
cls
echo Status previous to uninstallation:
ucc XC_Setup -nohomedir *engine *netdriver *editor
echo Disabling all components:
ucc XC_Setup -nohomedir -engine -netdriver -editor

View File

@@ -0,0 +1,5 @@
echo Status previous to uninstallation:
./ucc-bin XC_Setup -nohomedir *engine *netdriver
echo Disabling all components:
./ucc-bin XC_Setup -nohomedir -engine -netdriver

BIN
System/XC_DripFix1.u Normal file

Binary file not shown.

BIN
System/XC_EditorAdds.u Normal file

Binary file not shown.

8
System/XC_Enable.bat Normal file
View File

@@ -0,0 +1,8 @@
@echo off
cls
echo Status previous to installation:
ucc XC_Setup -nohomedir *engine *netdriver *editor
echo Enabling all components:
ucc XC_Setup -nohomedir +engine +netdriver +editor

View File

@@ -0,0 +1,5 @@
echo Status previous to installation:
./ucc-bin XC_Setup -nohomedir *engine *netdriver
echo Enabling all components:
./ucc-bin XC_Setup -nohomedir +engine +netdriver

BIN
System/XC_Engine.dll Normal file

Binary file not shown.

BIN
System/XC_Engine.so Normal file

Binary file not shown.

BIN
System/XC_Engine.u Normal file

Binary file not shown.

BIN
System/XC_Engine_Menu.u Normal file

Binary file not shown.

BIN
System/XC_Engine_UT99.u Normal file

Binary file not shown.

BIN
System/XC_IpDrv.dll Normal file

Binary file not shown.

6
System/XC_IpDrv.int Normal file
View File

@@ -0,0 +1,6 @@
[Public]
Object=(Name=XC_IpDrv.XC_TcpNetDriver,Class=Class,MetaClass=Engine.NetDriver)
Preferences=(Caption="XC_Engine TCP/IP",Parent="Networking",Class=XC_IpDrv.XC_TcpNetDriver)
[XC_TcpNetDriver]
ClassCaption="XC_Engine TCP/IP"

BIN
System/XC_IpDrv.so Normal file

Binary file not shown.

2
System/XC_Setup.int Normal file
View File

@@ -0,0 +1,2 @@
[Public]
Object=(Name=XC_Setup.XC_SetupCommandlet,Class=Class,MetaClass=Core.Commandlet)

BIN
System/XC_Setup.u Normal file

Binary file not shown.

BIN
System/XC_UPakPredator.u Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB