Playing configurable sound on clients fails at some packages

Discussions about Servers
Post Reply
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Playing configurable sound on clients fails at some packages

Post by Barbie »

At reworking my Mutator "SBMutatorFastWarShell" I stumbled over the following: If NetMode==NM_Standalone (=playing locally) everything works like expected. If I put the Mutator on a dedicated server and want to play a INI-configurable sound, it works too, if I add that sound package in server's UnrealTournament.ini -> [Engine.GameEngine] -> ServerPackages. So far, so clear, so good. But it does not work (nothing is played on client side) for several sound packages, for example Male2Voice.uax. I guess the following server's log red coloured entry that I have never seen before has to do with it:
UTLog.log wrote:TcpNetDriver on port 7777
Server Package: BotPack
[...]
Server Package: TCowMeshSkins
Server Package: Male2Voice
(server-side only)
Server Package: SkeletalChars
What does Male2Voice make so special?
Furthermore I noticed that sound of some packages (LadderSounds.uax or unrealshare.u for example) don't need a ServerPackages-entry. Concerning LadderSounds.uax I guess its already loaded at client because occurrence in UTMenu.u.

Because it works with some packages and with some others not I guess it is not a problem of the code. Furthermore - remember this thread - I replaced all server's placeholder files with "real" ones and so it shouldn't be a problem of the server sound files. And I know that I could export a specific sound from Male2Voice into a separate package, but that's not my aim. I need to know what I have to write into the readme-file of SBMutatorFastWarShell for users of that package and why they cannot use some sounds. :what:

EDIT: added the text "red coloured"
Last edited by Barbie on Sat Jan 09, 2016 2:48 pm, edited 1 time in total.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Playing configurable sound on clients fails at some pack

Post by JackGriffin »

Couple of things...
-What does the server log look like? Are the packages loading?
-Are you running a ton of package lines? There is a limit (not sure what it is though. Anyone?)

Feel free to email me the ini file and let me take a look at it. I cannot tell you the number of times I've both found errors and asked others to find mine. You can easily get too close to your work and obvious mistakes are just so easily missed and picked up by fresh eyes.
So long, and thanks for all the fish
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Playing configurable sound on clients fails at some pack

Post by sektor2111 »

Barbie wrote:NetMode==NM_Standalone
Cough, where is this sequence ?
Normally if we have a sort of actor:
- with a simulated function this won't run in clients - non of server and client is a StandAlone;
- with a non-simulated function won't work in clients as well - checking where happens game - not in NM_DedicatedServer, not in Client;
For your knowledge, Epic forgot to read Wiki when they were coding some net stuff :loool: . Eg: Boulder thrown by Titan and the rest of such stuff.
I recall well that grenade crap which nobody can hear it On-Line, not even the server, messed up by others.

Also those UAX types were bugging me, I never bored to understand if they have nasty flags or some specific links with Botpack purposedly, I simply re-imported needed sounds which were working like a charm.

TheNote: I'm not sure if sounds located in Player - STOCK so to speak, has to be claimed in packages. THEY are already in player. If they don't work is because of other reasons. Many default Levels have sounds which are not in packages but they work as long as are STOCK.
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Playing configurable sound on clients fails at some pack

Post by Wormbo »

A ServerPackages entry explicitly puts the package into the package map. Implicitly, all packages a ServerPackages entry or on the current level depends on are in the package map as well.
If a package is internally flagged as serverside only, it will not be required on the client, IIRC. I'm not sure how this will affect replicated references (e.g. to sounds), but I could imagine those won't work either, because the client needs the package to understand the package map.

BTW, the package map is a list of packages for network play and the names and objects imported from those packages. It is set up taking package versions into account as reported by client and server. Server and client agree to the lower of their corresponding package "generations" for each individual package. That's sometines the source of things breaking when the client and server have the same package generation number, but each individually generated from a common base. (Textures on dedicated server vs high-res textures on a client is such a case.)
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Playing configurable sound on clients fails at some pack

Post by Barbie »

Thanks for replies; in the meanwhile I've found the section Package Flags in the Wiki, and UTPT shows that Male2Voice.uax has in fact set the flag ServerSideOnly:
Male2Voice.uax-Flags.jpg
Male2Voice.uax-Flags.jpg (35.52 KiB) Viewed 3266 times
PS: I've noticed recently that UTPT can even decompile these hexadecimal written codes - now the mysteries of Monsterhunt.u can be solved... :rock:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Playing configurable sound on clients fails at some pack

Post by JackGriffin »

It's dangerous to go alone. Take this:
ChocoPackageEdit.zip
(214.74 KiB) Downloaded 76 times
Also, thumb down to the last post here: https://www.ut99.org/viewtopic.php?f=15&t=6473
Grab that posted download, you'll need it.

Have fun B.

(Players who download everything posted: If you don't know what you are doing, do not mess with choco. You can super easily make your install unplayable with a couple of clicks and you'll be doing a reinstall.)
So long, and thanks for all the fish
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Playing configurable sound on clients fails at some pack

Post by sektor2111 »

Barbie wrote:PS: I've noticed recently that UTPT can even decompile these hexadecimal written codes - now the mysteries of Monsterhunt.u can be solved... :rock:
It's solved nothing. If you are changing file flag simply file will be different, doing this at stock you'll make 0 game-play because clients won't change stock. For MonsterHunt there is no any secret, you have to
use a normal version before to screw file used by servers into another 0 fixed one.

Back on topic:
Understanding replication is the key for client in rendering sounds - see WEAPON by example, and leave alone stock files as they are.

I'll send you some MH2 mod with code stripped. Decompile it with UTPT, then I'll show you the real source-code, you can compare and "enjoy" later. See topic with MapVoteUL debate about sharing source. UTPT is doing sucks as the most of decompilers when we speak about long classes stripped. Trust me, I figured these already...

Edit:To Not forget
As you see, we have UAX files dedicated to make some noise, Server-Side. This Original modding logic is fascinating indeed. Nobody ever heard server singing something but we have Server-Side sounds :ironic: . I did not checked these packages, I rather went to clone them into Downloadable stuff.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Playing configurable sound on clients fails at some pack

Post by Barbie »

Thanks for all your comments - as I wrote I wanted to clarify why some sounds cannot be played for the documentation of the Mutator:
Spoiler
If you want to change any sound and run this Mutator locally, just change the name of the sound in the ini file.
If you run this Mutator on a server, the most reliable method is to create an UAX sound package by yourself and use this. Make sure that the clients possess this sound also (key word "ServerPackages"). See directory "Help -> SBMutatorFastWarShell-Example" for a user defined sound package.
You can use stock sound packages also, but some of them have the flag "ServerSideOnly" and therefore they do not work if the mutator runs on a server.
Spelling or content fixes are welcome. :mrgreen:
(After some days testing on my server I'll release it to public.)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply