ServerActor vs ServerPackage vs Mutator & when to use each?

Discussions about Coding and Scripting
Post Reply
nullbyte
Novice
Posts: 27
Joined: Sat Sep 03, 2016 3:40 am

ServerActor vs ServerPackage vs Mutator & when to use each?

Post by nullbyte »

Hi all

I can't find a basic explanation of the differences between a ServerActor, ServerPackge, and a Mutator and when you would use each. I've checked the OldUnreal Wiki and various other places but there's no really simple explanation and comparison of each of these things.

Can someone please help me to write a brief and simple explanation of the above as well as what kind of things you would use each of them for?

Thank you
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by Barbie »

Did you find oldunreal: ServerActors and ServerPackages? All essential is explained there.

A Mutator varies the kind of game play but does not change it. For example it does not change CTF into DM, but can change weapons or items (InstaGib Mutator for example). A Mutator is also a kind of ServerActor in the sense that it is loaded at game start, but the command for it is given at the startup command line and therefore not loaded on every level necessarily (for example decided by a map vote program). Whether the clients need that Mutator too, depends on what the Mutator does.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by sektor2111 »

Another explanations:
- ServerActor - uses to be some U file package containing things running ONLY IN SERVER;
- ServerPackages - uses to be loaded/sent to clients else they have no deals and even errors - a weapon which is not in packages declared will spread errors spam in client and it is usually invisible;
- Mutator - Hey do I need to explain ? RocketArena is a mutator which is running into default game-types or similar ones - it turns all weapons into rockets - It doesn't need to be declared in ServerPackages if references are loaded already by client (Botpack in cause), but others having non stock effects, sounds, have to be mentioned there as Packages else client doesn't know what happens - sample MapVote types - client needs to know how do looks interface so it has to load it VIA ServerPackages.
nullbyte
Novice
Posts: 27
Joined: Sat Sep 03, 2016 3:40 am

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by nullbyte »

Barbie wrote:Did you find oldunreal: ServerActors and ServerPackages? All essential is explained there.

A Mutator varies the kind of game play but does not change it. For example it does not change CTF into DM, but can change weapons or items (InstaGib Mutator for example). A Mutator is also a kind of ServerActor in the sense that it is loaded at game start, but the command for it is given at the startup command line and therefore not loaded on every level necessarily (for example decided by a map vote program). Whether the clients need that Mutator too, depends on what the Mutator does.
Thank you. I'll read through that page.
sektor2111 wrote:Another explanations:
- ServerActor - uses to be some U file package containing things running ONLY IN SERVER;
- ServerPackages - uses to be loaded/sent to clients else they have no deals and even errors - a weapon which is not in packages declared will spread errors spam in client and it is usually invisible;
- Mutator - Hey do I need to explain ? RocketArena is a mutator which is running into default game-types or similar ones - it turns all weapons into rockets - It doesn't need to be declared in ServerPackages if references are loaded already by client (Botpack in cause), but others having non stock effects, sounds, have to be mentioned there as Packages else client doesn't know what happens - sample MapVote types - client needs to know how do looks interface so it has to load it VIA ServerPackages.
Thank you for that.

So a ServerActor is kind of a permanent mutator which can't be changed via a server's startup/level string, but which can't spawn packages which don't exist on the client unless those packages are included in the ServerPackages lines?

Does a ServerActor actually send any data to the client? So for example if you wrote a MapVote as a ServerActor and defined the interface inside it (using classes which extend UWindow etc.), would the client be able to display the mapvote's interface without needing any ServerPackages?
Chris
Experienced
Posts: 134
Joined: Mon Nov 24, 2014 9:27 am

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by Chris »

Let me clarify it for you.

Any object relative to the Level is a derivative of class Actor. Here you have fundamental functions like PreBeginPlay, PostBeginPlay and PostNetBeginPlay, aswell as some other relative events. This is a barebone Level actor which you program to do whatever it's supposed to do in the game.

A mutator is a derivative from Actor, with the purpose of altering the game behavior, which means that each mutator is a part of a call chain, allowing any registered mutator to modify the parameters of that function call.

ServerActors are completely irrelevant of Mutators, this is simply a list of additional Actors to spawn during startup, and is not ment for Mutators. (It can be but follow the guidelines until you learn the basics.)

ServerPackages are there to help the admin include additional packages to the PackageMap that is sent to the client. Mostly useful for Skins, sounds, music or whatever else that isn't statically linked with any of the root packages (gametype?).

Now you're asking a quetion about basic replication. In UScript sending data between client and server is very abstract, and each client relevant object (Server replicates the actor to the client and opens a channel) has its own channel and transmits given variables to server or from server depending on declarations. If this is a serverside only actor, which means it has to network relevancy, then no the clients will never know about this actor. But if it is client relevant, then the server MUST have the package it resides in sent to the client.

You should really use that wiki site to gather as much information as possible about Actors and whatever else, a lot of things will become very obvious once you know what they are. ServerActors and ServerPackages being one of them. Simply learning every word one by one isn't the way to go, instead you have to understand keywords and see each purpose and how they're used together.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by sektor2111 »

If a MapVote is called in server but not mentioned in Packages, client will never see it. Because it contains things than must be seen by Player. A mutator for doing something with score in TakeDamage it's not a need to be in ServerPackages only if has some visual effects that must be shown directly to player. Damage is an authoritative thing exactly as Level.Game. Whoever is trying to call Level.Game in client will fail. Client knows only what game is running but it doesn't control it - Server is "The Man".
A Hint:
- a custom game-type running in server doesn't need description in ServerPackages. Whatever toys included in that package is being automated by Server without mentions in INI file.

Sample, more admins are setting up "ServerPackages=MonsterHunt". It makes no sense - it's utterly useless because game-type is defaulted in PackageMap with any matter being the main controller, but... this won't happen with mutators. If a mutator loads a weapon from Bpak.u, in order to not figure weapon invisible in client, you need it in "ServerPackages=BPak" else "amazing" weaponry there have only deadly effects but nothing too visible... of course, a mutator for loading weaponry is not a must have in Packages, but a weapon held... IT'S A MUST-
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by Chamberly »

nullbyte wrote:
sektor2111 wrote:Another explanations:
- ServerActor - uses to be some U file package containing things running ONLY IN SERVER;
- ServerPackages - uses to be loaded/sent to clients else they have no deals and even errors - a weapon which is not in packages declared will spread errors spam in client and it is usually invisible;
- Mutator - Hey do I need to explain ? RocketArena is a mutator which is running into default game-types or similar ones - it turns all weapons into rockets - It doesn't need to be declared in ServerPackages if references are loaded already by client (Botpack in cause), but others having non stock effects, sounds, have to be mentioned there as Packages else client doesn't know what happens - sample MapVote types - client needs to know how do looks interface so it has to load it VIA ServerPackages.
Thank you for that.

So a ServerActor is kind of a permanent mutator which can't be changed via a server's startup/level string, but which can't spawn packages which don't exist on the client unless those packages are included in the ServerPackages lines?

Does a ServerActor actually send any data to the client? So for example if you wrote a MapVote as a ServerActor and defined the interface inside it (using classes which extend UWindow etc.), would the client be able to display the mapvote's interface without needing any ServerPackages?
Gonna point out something here in a different mind of saying thing.
ServerActor - This thing is set up to execute codes to do anything by the server side. It can do anything for both server and the client. This is not to be downloaded to the client.
ServerPackages - This file has stuffs in it. Media content such as texture, music, sounds, or some codes, it can be anything. This is what the people will download from the server. Without it, some things wouldn't work or display.

Why some? The idea here is if a server actor or a mutator (the mutator will do something as well, as long it is coded to do something and it doesn't have to be downloaded if it doesn't need extra contents) come with a code that uses some default content (ut99 stuff, not the custom) it can make the player see stuff anyway.

So the mutator... it can come with a server package and actor or none of those at all to run what it need to the dependent files and content.

Note that all of this content isn't always permanent. You can change any of these.
The mutator and server actor can spawn stuff that is executed by the code within the file. If things are missing, well that depend on the content, the server will shut down for missing content and spit out an error in the log... or the server will be running but things will be missing.

A ServerActor can send any data to the client or not. But to your mapvote reference, if the actor was built with required dependent files like a server package, it will need it or the client can't see everything.
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by sektor2111 »

Chamberly wrote:A ServerActor can send any data to the client or not
Pretty FALSE Which means you did not understand what replication is.

If client doesn't have a clue what is running because we have a Server-Side will discard data as a sort of Net trash - sometimes is crashing if some bunch bytes are badly bugging client - yeah, read well this. If you are modifying an actor in server, if actor has a a replication toward some property, client will figure actor changed, but NOT FACTOR who changed it - an admin or a mutator.

That WSRH so called mutator Server-Side works (wacky somehow) regarding to server attempt to replicate data just because weapon uses to replicate natively animations like any "meshed" actor, but client has a delayed reaction having no clue who triggered that speed-up. By using it as a Package client will receive data knowing what to do and it will work more smoother than only using native's actor replication definitions. Mod debugged using noob-type logs as well...

Before presuming stuff and writing False information, do a mutator with a simulated function called using a mutate command. Do some log in that function. Now load mutator in server and add it in packages. See logs at mutate command (client server), now remove it from packages and load only as mutator. Go figure logs - CLIENT HAS NONE in this second case when are no packages defined.
Amazingly, TeleporterFixvXXX works better only as Server-Side without calling stupid client in MOVEMENT problems, else client might crash properly being bugged in a crap-ton of iterations depending on connectivity.

A Server-Side in exchange can spawn something replicated and that's why it looks like works but is a false alarm. Client knows about a new actor appearance but will never know who spawned it - SWARMSPAWN is direct sample. Stuff it's being triggered in server and client will see creatures (packaged) because ScriptedPawn is an actor with a native replication - client will only be skating a bit surprised first by new things that has to be dynamically loaded - primary lagging/skating problem it's now solved in my server-machine using cacher mutator preloading all SS config into client and having only a few KB, also tested with logs and not assumptions.
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by Chamberly »

Pretty true when I've seen things worked within the server actor's code.

I'm not gonna write a book about that. So, be nice. It wasn't nice within the way you wrote it.
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ServerActor vs ServerPackage vs Mutator & when to use ea

Post by sektor2111 »

Excuse me but I cannot handle english with tech terms...

So
Chamberly wrote:Pretty true when I've seen things worked within the server actor's code.
ServerActor is None in client. But if this entity from server spawns a PAWN, for that Pawn a SpawnNotify thing will inform player about new stuff, when Pawn is Package. So we have something called by a ServerActor and we are intended to say: Woow, ServerActor works in client but in fact it doesn't work at all - Pawn is factor noticing client about self presence not the Spawner actor. Another sample, you can broadcast advertisements. Do you know why they are readable in client ? Because of client itself from server replicating variables to player Not because of that ServerAdds, that one is only charging Pawn from server which will replicate that data to pawn from client. So to speak this action is not directly applied, it is a result of Actor's replicated properties.
If that actor doesn't replicate location, in server you can move it 1000 UU and this won't be noticed in client because that actor is crapped. Sample ? Yes, LiftCenter. Play a game local and see Liftcenter (in good maps) and then check out VIA Server. I was trying harder to make a move with it but... it is refusing to replicate location due to default Actor's declaration - of course such an actor is not a "must be updated" it is hidden else it made me confused at debugging ON Line A.I., but it's pretty explanatory about replication things that cannot be operated always from a ServerActor because those actors handled doesn't replicate changes in Network.

Now some lousy part - half Net stuff looking screwed
Boulder thrown by Titan is notified to client but... it doesn't say nothing about rotation speed. Results: Off-Line it looks properly, ON-Line looks like a train on an invisible railway moving in straight line. This boulder can be spawned even by a ServerSide Actor but, it will be the same as long as ServerActor cannot speak nothing to client, Boulder itself is announcing presence and nothing more... no rotation no direction changed...
Post Reply