Generic Score Announce {release}

Search, find and discuss about Mutators!
JackGriffin
Godlike
Posts: 3767
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Generic Score Announce {release}

Post by JackGriffin » Tue Jan 12, 2016 12:17 am

By request. This is a generic announce mod that lets you configure it however you like. All the sounds are called dynamically from an ini file that you edit so you can change them as often as you like to whatever flips your switch.
GSA.zip
Read the text file included and it will explain how to use. I annotated some of the source code if you want to learn how to do dynamic stuff like this in your mod. Do what you want with this. It really needs a server test to see if it generates any errors. If it does I'll fix it, I just don't feel like testing.

I included a sample uax file so the mod works immediately and will also serve as an example for how to edit the ini file. If you have problems just let me know. It's super simple to make your own sound package to use so go wild with this.

OK, now I fix dinner. Whew.
You do not have the required permissions to view the files attached to this post.
So long, and thanks for all the fish

User avatar
UTPe
Masterful
Posts: 510
Joined: Sun Jul 12, 2009 7:10 pm
Personal rank: Dude
Location: Trieste, Italy

Re: Generic Score Announce {release}

Post by UTPe » Tue Jan 12, 2016 2:02 pm

hi Kelly, thanks for your work ! :tu:
Personal map database: http://ut99maps.gamezoo.org

"These are the days that we will return to one day in the future only in memories." (The Midnight)

User avatar
UnrealGGecko
Godlike
Posts: 2682
Joined: Wed Feb 01, 2012 11:26 am
Personal rank: GEx the Gecko
Location: Kaunas, Lithuania

Re: Generic Score Announce {release}

Post by UnrealGGecko » Tue Jan 12, 2016 3:22 pm

:gj: Downloading right away... not sure when I'll get to play around with this though.

JackGriffin
Godlike
Posts: 3767
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Generic Score Announce {release}

Post by JackGriffin » Tue Jan 12, 2016 3:54 pm

Glad to help guys. In the future I'm going to start adding dynamic coding to my mods so they are easily customized. I should have done that with FoodFight, RedeemerMania, and MH2. Availability of deep options would allow a greater flexibility of usage.

If you are reading this and you are interested in applying this method to your work then the way I did the sound loading will also work for things like forcing the level's music to change for things like a victory song at the end of a match(see UTPostalBabes for how I did it there), dynamic texture assignments (PostalBabes again for assigning them whatever skin you wanted), really anything you see or hear in the game can be skinned or re-sounded as many times as you like without forcing actor replacements.
So long, and thanks for all the fish

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

Re: Generic Score Announce {release}

Post by Barbie » Tue Jan 12, 2016 11:27 pm

Thanks for providing the source code. :thuup: Because my project SBMutatorFastWarShell works also with dynamic sounds, I had a look how you managed that. But by reviewing your code I stumbled over that:

Code: Select all

function bool addPawnToList(Pawn P)
{
   local int i;
   for (i = 0; i < numPawns; i++)
   {
      if (Player[i] == P)
	 		return False;
   }
   Player[i] = P;
   numPawns++;
   return True;
}
Won't there be a problem at a server with a high player fluctuation? (Spoken technically: after ArrayCount(Player) players have joined, the array boundary will be exceed by i regardless of current player count.)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

JackGriffin
Godlike
Posts: 3767
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Generic Score Announce {release}

Post by JackGriffin » Wed Jan 13, 2016 12:49 am

I can see your concern but it's never created a problem that I've seen.
So long, and thanks for all the fish