Tagz mod

Share source code that can be compiled/de-compiled here.
Post Reply
Kelly
Posts: 41
Joined: Fri Sep 29, 2017 1:54 pm
Location: Coos Bay Oregon

Tagz mod

Post by Kelly » Sat Feb 03, 2018 3:37 pm

If you've ever played TeamFortress 2 or a number of Valve games you've seen the ability to use personal spray tags. I always liked that idea so I made it in UT. Here's a demo:


You can see that the rotation is not clamped but that is fixed in this current code. Players may use by binding a password to a mutate command like this:
mutate <password>
and it will spray their tag onto whatever surface they are looking at if it is close. This prevents other players from spoofing your tag or you from using theirs.

Edit/Update:
Here's a new video of the working mod code. You can see the sprays now orient correctly. These are just a few quick grabs I pulled down from google images to show you what it will look like in game. I'll get the mod+code posted tonight after I do a final check and cleanup. The readme is going to take a bit to get done too.


Finally, got it ready...
goTagzMod.7z
(133.9 KiB) Downloaded 2 times
Here's the readme (included in the zip)
SpoilerShow
Simple mod to allow players to use personal spray tags. This was quite fun in TeamFortress2 as you could spray your tag deep in the enemy base to show them you can make it that far.

How to set it up:
Add the files and you can test it out easily. It comes pre-configured with seven tags for demo use. Add the mod to any game type, walk up to a wall or any surface that will take decals and enter in console:

mutate one

and if you are close enough to where you are looking you'll get a tag sprayed on the wall. Each spray can only exist once on a server so if you respray it will remove the old one and update it to where you are now spraying.

Why passwords?
Kid porn and really gruesome images. No kidding, you should see some of the racist, hateful, violent shit people will spray tag if you let them decide on their own. I promise you if I coded this to let the player decide you'd have swastikas and DeathTube.com images the first day. Nope, that isn't going to happen on my watch so I'm forcing the admins to allow each and every image and tying that to a password.

This lets each person have their very own spray tag that no one else can use. Just have your players pick out any texture that is 128X128 and have them create a password. You then edit the ini file and add them in, paying attention to the number you are assigning them. Here's an example...my player wants to use the control panel texture from starship and wants to use the password kitty43. I edit my ini like this:

[goTagz.goTagz]
Tagz1Password=kitty43

[goTagz.Tagz1]
Tag1TextureChoice=starship.wsh6

and you're all done. Please remember that if you use some obscure texture there must be a serverpackage line for it on the server or other players will not see it. Be sure to tell players not to share their passwords or others can use their tag.

Binding the spray:
Easily done. Just edit your user.ini and set an unused letter to the command. In this example I'll bind "M" to it:

M=mutate kitty43

Now each time I hit M it will try to spray the starship tag. Easy peazy. The mod is limited to 24 tags but can easily be extended by following how I did it if you need more. As always use this mod/code/idea any way you like.

For coders (how does it work?)-
When you call the mutate command it spawns a very tiny, silent, non-damaging rocketMK2 that shoots out to where you are looking. When it hits something it attempts to place a Tagz decal on that surface. I did it this way since the spawned decal is properly replicated in native code. You will never see or hear the rocket so it appears the spray just appears on the surface. I wanted to get all fancy and create a "spray" mist that looked like paint going on the wall but then I thought "Fuck that, I'm lazy." I guess it's on you now to do it. Enjoy!

Kelly
"gopostal"
I don’t wanna give the end away
but we’re gonna die one day

User avatar
SC]-[WARTZ_{HoF}
Site Admin
Posts: 110
Joined: Wed May 10, 2017 7:08 am

Re: Tagz mod

Post by SC]-[WARTZ_{HoF} » Sat Feb 03, 2018 6:01 pm

I can see this being a popular mod for the DM servers. Can this mod be bound to a hotkey for ease of use?

User avatar
Diego_{HoF}
Posts: 153
Joined: Thu Sep 21, 2017 11:23 pm
Location: Costa Rica
Contact:

Re: Tagz mod

Post by Diego_{HoF} » Sun Feb 04, 2018 5:52 am

Nice Kelly but be careful, like in all those valve games people use 18+ spray animated or not.......
Who i'm kidding, we don't have kids here and its not secret, People use Boobs, Asses and animation or real naked woman as spray
FEAR ME.
I AM THE REAPER, I AM EVIL.
I AM DIEGO!

ALL HAIL MY EVIL BALL OF DOOM!

Diego_{HoF}

Kelly
Posts: 41
Joined: Fri Sep 29, 2017 1:54 pm
Location: Coos Bay Oregon

Re: Tagz mod

Post by Kelly » Sun Feb 04, 2018 3:50 pm

(I worked on the code a bit this morning, I'll try to have the mod+source posted by in the morning)

The sprays are not decided client-side. I could do that but it leaves way too much room for abuse. Porn was the least of it, I used to see swastikas, VERY questionable kiddie pictures, really anything that was as offensive as possible on the TF2 servers. Yeah, none of that here.

The player simply tells the admin "I would like to use the eagle head texture from botpack.u and my password will be 'blue34'." Then the admin of the server can simply edit the ini file (can be done on a live server without restart) like this:

<on mod ini file>
Tagz1Texture=Botpack.TLGuard
Tagz2Texture=
Tagz3Texture=

and then add the password:
Tagz1Password=blue34
Tagz2Password=
Tagz3Password=

and the player will be ready to roll. He can then either bind it to a hotkey or just use mutate to spray it on a close wall, floor, etc. Here's a sample bind where f will do the spray:
f=mutate blue34

Using passwords accomplishes two good things. First you can't spoof someone else's tag without knowing their password and secondly you can remove anyone at any time if they abuse the spraying or they get annoying with it. BTW, you can only have one of your sprays on the map at any given time. If you respray it will remove the old one and update to the new spot. That keeps the map from getting trashed....

(Although I will tell you that I tested this with HUNDREDS of sprays and it did not hurt server performance if that's your thing ;) )
I don’t wanna give the end away
but we’re gonna die one day

User avatar
Diego_{HoF}
Posts: 153
Joined: Thu Sep 21, 2017 11:23 pm
Location: Costa Rica
Contact:

Re: Tagz mod

Post by Diego_{HoF} » Mon Feb 05, 2018 1:59 am

Kelly wrote:
Sun Feb 04, 2018 3:50 pm
(I worked on the code a bit this morning, I'll try to have the mod+source posted by in the morning)

The sprays are not decided client-side. I could do that but it leaves way too much room for abuse. Porn was the least of it, I used to see swastikas, VERY questionable kiddie pictures, really anything that was as offensive as possible on the TF2 servers. Yeah, none of that here.

The player simply tells the admin "I would like to use the eagle head texture from botpack.u and my password will be 'blue34'." Then the admin of the server can simply edit the ini file (can be done on a live server without restart) like this:

<on mod ini file>
Tagz1Texture=Botpack.TLGuard
Tagz2Texture=
Tagz3Texture=

and then add the password:
Tagz1Password=blue34
Tagz2Password=
Tagz3Password=

and the player will be ready to roll. He can then either bind it to a hotkey or just use mutate to spray it on a close wall, floor, etc. Here's a sample bind where f will do the spray:
f=mutate blue34

Using passwords accomplishes two good things. First you can't spoof someone else's tag without knowing their password and secondly you can remove anyone at any time if they abuse the spraying or they get annoying with it. BTW, you can only have one of your sprays on the map at any given time. If you respray it will remove the old one and update to the new spot. That keeps the map from getting trashed....

(Although I will tell you that I tested this with HUNDREDS of sprays and it did not hurt server performance if that's your thing ;) )
Thank God... I don't want to see all that shit in UT99, not need here
FEAR ME.
I AM THE REAPER, I AM EVIL.
I AM DIEGO!

ALL HAIL MY EVIL BALL OF DOOM!

Diego_{HoF}

Kelly
Posts: 41
Joined: Fri Sep 29, 2017 1:54 pm
Location: Coos Bay Oregon

Re: Tagz mod

Post by Kelly » Tue Feb 06, 2018 2:27 am

Don't worry brother, that's never going to happen if I'm involved.

I updated the first post with a new vid, mod download, and a copy of the readme. Have fun :)
I don’t wanna give the end away
but we’re gonna die one day

Post Reply