AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Building Hats (https://forums.alliedmods.net/showthread.php?t=243705)

Pelipoika 07-08-2014 15:27

[TF2] Building Hats
 
4 Attachment(s)

What is it?
Whenever you build a sentry it will get a hat and the hat will remain through upgrades


Commands:

sm_bhats_reloadconfig : Reload buildinghats.cfg [Default acces: ROOT]
sm_buildinghats : Would you like your buildables without or with hats? [Default acces: Everyone]
sm_rerollhat : Rerolls the hats of your current active buildings [Default acces: Everyone]
sm_buildinghateffect : Allows you to choose the unusual effect of your buildings hats [Default acces: ROOT]

Cvars:
sm_bhats_version Plugin Version
sm_bhats_enabled (default: 1.0) Enable/disable plugin
sm_bhats_unusualchance (default: 0.1) Chance of unusual effect (0.1 = 10% chance)
sm_bhats_rollcooldown (default: 30 seconds) Hat reroll cooldown

Overrides:
sm_buildinghats_access : Is user allowed to receive hats on their buildings? [Default acces: Everyone]
sm_buildinghats_unusuals : Is user allowed to receive unusuals on their buildings hats? [Default acces: Everyone]

The config:
The config must include 4 things.
- The modelpath of the model you want your sentry to wear
- The offset (z offset) this offset the hat up/down and is pretty tedious to get just right
- The modelscale of the hat (1.0 is normal size)
- The animation. (use default to use default animation)
like this:
PHP Code:

"Building hats"    //Don't touch this
{
    
"0"
    
{
        
"modelpath"        "models/player/items/all_class/dueler_spy.mdl"
        "offset"        "-4.0"
        "modelscale"    "1.0"
        "animation"        "default" 
//Don't change animation
    
}


The config that comes with the plugin contains 41 unique hats because i was too lazy to type in more.
Oh, and the config goes to sourcemod/configs/

Chaneglog:
1.0 - Initial Release
1.1:
- Added sm_buildinghats cmd to toggle whether you want hats on your buildings on/off
- Added sm_buildinghats_access override
1.2 - Fixed an error model appearing sometimes
1.3 - Fixed an error model appearing sometimes (For realz this time!)
1.4 - Fixed an error model appearing sometimes (Peli confirmed worst bugfixer of the year)
1.5 - Fixed sm_bhats_reloadconfig not emptying the array.
1.6:
- Added Animation support
- Added Ability to restrict unusual effects (Untested)
- Fixed when a player that does not have access to this plugin builds a building and a player with access to this plugin repairs it or upgrades it, the building gains a hat.
- Fixed buildings having a chance to gain an unusual every upgrade. (Untested)
1.7 - Fixed buildings losing their unusual effect after upgrade.
1.8:
- Added more Unusual effects
- Added sm_rerollhat command, it has a use cooldown that can be controlled with sm_bhats_rollcooldown
- Added sm_buildinghateffect command, Allows users with ROOT acces to change the unusual effect on their buildings.
- All of the above commands are overridable as usual.
1.9: - Hats enabled by default for new players
2.0: - Renamed reserved keywords

Credits:
- MasterOfTheXP: Helped me out with stringtables and loadsa other things
- Arkarr: Teached me Adt_arrays
- island55: Helped me test some fixes

Sreaper 07-08-2014 15:37

Re: [TF2] Building Hats
 
Cool. Mind adding an override feature for defining which flag is able to have sentry hats? Preferably with an option to enable/disable sentry hats for your own buildings as well.

Drixevel 07-08-2014 15:59

Re: [TF2] Building Hats
 
Not a fan of hats but this is amazing!

Pelipoika 07-08-2014 16:58

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Sreaper (Post 2164036)
Cool. Mind adding an override feature for defining which flag is able to have sentry hats? Preferably with an option to enable/disable sentry hats for your own buildings as well.

Later

Horsedick 07-08-2014 18:09

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Sreaper (Post 2164036)
Cool. Mind adding an override feature for defining which flag is able to have sentry hats? Preferably with an option to enable/disable sentry hats for your own buildings as well.

I 2nd this, very nice thing to have but it almost certainly would be best suited for flag usage and perhaps toggle on/off?

404UserNotFound 07-08-2014 22:01

Re: [TF2] Building Hats
 
One of these hats in your config is coming out as an error model. Not sure how to tell.

robotortoise 07-08-2014 22:21

Re: [TF2] Building Hats
 
Oh my god this is amazing.

Now I need one that adds tiny hats to rockets, stickies, and those new Robots that were added.


Also, is there a limit to how big the hat cfg can be? I wonder if I could comb through the model list and just add every hat.

404UserNotFound 07-08-2014 22:32

Re: [TF2] Building Hats
 
Ok so I uncommented the model name printing lines and found this:

Code:

smodel: models/player/items/all_class/all_class_reddit_alt_scout_hat.md
strModelPath:
models/player/items/all_class/all_class_reddit_alt_scout_hat.md
T

The models are ".mdl" in the config so I'm wondering if their file names are too long.

SephirothSG 07-09-2014 02:00

Re: [TF2] Building Hats
 
How easy would it be to grab the builders current hat and add it to the sentry instead of just pulling a hat from the config?

Sreaper 07-09-2014 03:26

Re: [TF2] Building Hats
 
Quote:

Originally Posted by SephirothSG (Post 2164343)
How easy would it be to grab the builders current hat and add it to the sentry instead of just pulling a hat from the config?

I like this idea. Please implement that too if you wouldn't mind.

Pelipoika 07-09-2014 04:26

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Sreaper (Post 2164392)
I like this idea. Please implement that too if you wouldn't mind.

This would be pretty hard to do, getting the players hats model 'should' be easy but getting the offsets magically right to sit ontop of the sentry and not float 400units down/above of the sentry would be hard

Pelipoika 07-09-2014 04:35

Re: [TF2] Building Hats
 
Quote:

Originally Posted by abrandnewday (Post 2164266)
Ok so I uncommented the model name printing lines and found this:

Code:

smodel: models/player/items/all_class/all_class_reddit_alt_scout_hat.md
strModelPath:
models/player/items/all_class/all_class_reddit_alt_scout_hat.md
T

The models are ".mdl" in the config so I'm wondering if their file names are too long.

I had the same problem too but it was
Code:

ls/player/items/all_class/all_class_reddit_alt_scout_hat.mdl
I restarted my server and it seemed to work fine after

TonyBaretta 07-09-2014 05:19

Re: [TF2] Building Hats
 
1 Attachment(s)
nice idea but u need to fix something.
see attachment

Pelipoika 07-09-2014 05:23

Re: [TF2] Building Hats
 
Quote:

Originally Posted by TonyBaretta (Post 2164427)
nice idea but u need to fix something.
see attachment

Did you try restarting your server after installation?

Pelipoika 07-09-2014 05:53

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Sreaper (Post 2164036)
Cool. Mind adding an override feature for defining which flag is able to have sentry hats? Preferably with an option to enable/disable sentry hats for your own buildings as well.

Done.

Sreaper 07-09-2014 06:18

Re: [TF2] Building Hats
 
Thanks! It seems someone has an error model for a sentry/dispenser hat. I restarted my server after installation by the way.
Additionally, they don't seem to set right on mini sentries.

Pelipoika 07-09-2014 07:05

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Sreaper (Post 2164449)
Thanks! It seems someone has an error model for a sentry/dispenser hat. I restarted my server after installation by the way.
Additionally, they don't seem to set right on mini sentries.

I dont know why this would happen but if you could
uncomment the lines
PHP Code:

391 //    PrintToChatAll("smodel: %s", smodel);
392//    PrintToChatAll("strModelPath: %s", strModelPath); 

re compile the plugin and try to get an error to appear and then post the chat output

Powerlord 07-09-2014 09:59

Re: [TF2] Building Hats
 
Code:

decl String:strPath[100]
The constant PLATFORM_MAX_PATH exists for file paths lengths like these.

Pelipoika 07-09-2014 10:05

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Powerlord (Post 2164551)
Code:

decl String:strPath[100]
The constant PLATFORM_MAX_PATH exists for file paths lengths like these.

Thanks Powerlord
Will upload fix

*Edit
Done

martellus 07-09-2014 11:55

Re: [TF2] Building Hats
 
Installed it and restarted server, seems like a great plugin but one hats in the default cfg seems to be messed up:


http://cloud-2.steampowered.com/ugc/...D46B11D1D9F90/

Pelipoika 07-09-2014 12:04

Re: [TF2] Building Hats
 
Quote:

Originally Posted by martellus (Post 2164625)
Installed it and restarted server, seems like a great plugin but one hats in the default cfg seems to be messed up:


http://cloud-2.steampowered.com/ugc/...D46B11D1D9F90/

You are running version 1.2 right?

martellus 07-09-2014 12:16

Re: [TF2] Building Hats
 
yes

Pelipoika 07-09-2014 12:43

Re: [TF2] Building Hats
 
Quote:

Originally Posted by martellus (Post 2164648)
yes

I should really test harder before posting, anyway i think i fixed it now for good. :fox:

Sreaper 07-09-2014 13:07

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Pelipoika (Post 2164666)
Bloody hell i should really test harder before posting, anyway i think i fixed it now for good. :fox:

Installed the version after reading this post and restarted my server. An ERROR hat is among the spawned hats.

Pelipoika 07-09-2014 13:22

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Sreaper (Post 2164681)
Installed the version after reading this post and restarted my server. An ERROR hat is among the spawned hats.

Fixed i think (again)

TonyBaretta 07-09-2014 14:42

Re: [TF2] Building Hats
 
Really love u for this
http://steamcommunity.com/sharedfile.../?id=283618675

Bitl 07-09-2014 17:46

Re: [TF2] Building Hats
 
If you are in MvM before the 1st wave starts and you spawn a sentry, the hat is on the left barrel instead of on top of the rocket launcher.

404UserNotFound 07-09-2014 21:52

Re: [TF2] Building Hats
 
The error model hat is the reddit alt scout hat. Just remove that one and you won't have any error models. Unless you've updated to the latest version, of course.

Also:

Quote:

Originally Posted by SephirothSG (Post 2164343)
How easy would it be to grab the builders current hat and add it to the sentry instead of just pulling a hat from the config?

Very hard. You'd have to code in every single hat, do the offsets for each hat. Not to mention that hats are no longer "hats", they are bunched in as cosmetics with misc items.

Randommagic 07-10-2014 08:09

Re: [TF2] Building Hats
 
Thanks for the amazing plugin. Definitely gonna use it for my server.

robotortoise 07-10-2014 23:08

Re: [TF2] Building Hats
 
I call shenanigans. The teleporters don't have hats.

HERESY!

(Oh and also, would it be possible to add a convar to override the current hat cfg? Like, "sm_hat_config buildinghats.cfg" kind of thing, so I could set specific overrides per maps?)

This plugin is amazing

TonyBaretta 07-12-2014 05:29

Re: [TF2] Building Hats
 
1 Attachment(s)
when someone move the sentry happen this

Js41637 07-12-2014 07:40

Re: [TF2] Building Hats
 
Would you be able to make it so that the reload config command actually properly reloads as it seems to only add entries on top of the other ones and not actually removing the old config.

Pelipoika 07-12-2014 08:11

Re: [TF2] Building Hats
 
Quote:

Originally Posted by Js41637 (Post 2166353)
Would you be able to make it so that the reload config command actually properly reloads as it seems to only add entries on top of the other ones and not actually removing the old config.

Done

YoNer 07-13-2014 23:27

Re: [TF2] Building Hats
 
Quote:

Originally Posted by TonyBaretta (Post 2166304)
when someone move the sentry happen this

Experiencing this very anoying issue as well, any time someone is moving a sentry, every player can see the sentry reach globe thingy

The_Z_Dog 07-14-2014 17:59

Re: [TF2] Building Hats
 
Anyone have an updated cfg with all the new hats that works? I'm a bit of a noob but hey, still know a good plugin when I see one.

robotortoise 07-14-2014 22:45

Re: [TF2] Building Hats
 
Quote:

Originally Posted by The_Z_Dog (Post 2167657)
Anyone have an updated cfg with all the new hats that works? I'm a bit of a noob but hey, still know a good plugin when I see one.

What, you mean like ALL THE HATS IN TF2?

I ain't making that list. :/

lyric 07-15-2014 14:31

Re: [TF2] Building Hats
 
Quote:

Originally Posted by robotortoise (Post 2167812)
What, you mean like ALL THE HATS IN TF2?

I ain't making that list. :/

do you happen to know who Palutena's Bro is?

robotortoise 07-15-2014 14:48

Re: [TF2] Building Hats
 
Quote:

Originally Posted by lyric (Post 2168227)
do you happen to know who Palutena's Bro is?

Ah, it's just a silly name I use for myself. She doesn't have a brother.

At least, not as far as we know.

martellus 07-15-2014 16:46

Re: [TF2] Building Hats
 
Weird problem, I have been trying to add the law to this, but I can't get it to adjust the offset- changing it never seems to work even after a config reload or server restart


PHP Code:

    "41"
    
{
        
"modelpath"        "models/workshop/player/items/all_class/sbox2014_law/sbox2014_law_engineer.mdl"
        "offset"        "-2"
        "modelscale"    "1.2"
    



Pelipoika 07-15-2014 17:06

Re: [TF2] Building Hats
 
Quote:

Originally Posted by martellus (Post 2168306)
Weird problem, I have been trying to add the law to this, but I can't get it to adjust the offset- changing it never seems to work even after a config reload or server restart


PHP Code:

    "41"
    
{
        
"modelpath"        "models/workshop/player/items/all_class/sbox2014_law/sbox2014_law_engineer.mdl"
        "offset"        "-2"
        "modelscale"    "1.2"
    



try making that offset -2.0


All times are GMT -4. The time now is 10:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.