Server-Only Packages

Lessons and tutorials about mods and maps
Post Reply
Deaod
Average
Posts: 37
Joined: Fri Jul 10, 2020 9:22 am

Server-Only Packages

Post by Deaod »

How to determine if my Package is ServerSideOnly
ServerSideOnly packages are a strict subset of all package, so its easier to determine that a package is not ServerSideOnly than to determine that it is.
If you find yourself declaring a variable or function to be replicated, your package is no longer ServerSideOnly.
If you find yourself spawning an Actor of a type from your package and that Actor needs to be replicated to clients, your package is no longer ServerSideOnly.
If you find yourself declaring a function simulated out of necessity, your package is no longer ServerSideOnly.

Packages that are ServerSideOnly, for example, are those that only collect stats.
If you tell your users that they should not add your package to the list of ServerPackages, that's also a good indication that your package is ServerSideOnly.

After you have determined that your package is not relevant to clients in a networked game, you should actually mark your package as such.

How to set ServerSideOnly package flag
Assuming your UT installation is located at C:\UT99\, and your package is called MyPackage, you need to create a file called MyPackage.upkg at C:\UT99\MyPackage\Classes\ and fill it with the following:

Code: Select all

[Flags]
ServerSideOnly=True
Benefits of accurately setting the ServerSideOnly flag
If a package marked ServerSideOnly is added to ServerPackages, it will be ignored.
This helps prevent clients unnecessarily downloading the package and it prevents such packages from being necessary to play back demos.
It also enables automated control of a server's ServerPackages, which significantly reduces administration overhead.
User avatar
sektor2111
Godlike
Posts: 6412
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Server-Only Packages

Post by sektor2111 »

Yes, it's how to mix certain mods, split in two parts, preventing some thievery and clients loaded with useless data.
Post Reply