Raised This Month: $ Target: $400
 0% 

[TF2 MvM] Force Golden Frying Pan on Robots


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 05-15-2015 , 17:29   [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #1

How can I go about stripping all MvM robots of their stock melee weapon and force them to equip the golden frying pan so that all melee'ing robots will be attacking players with the golden frying pan rather than their boring bat or shovel or whatever?

I mentioned the golden frying pan on the pop file but the robots all spawn in with their stock melee instead. Is it possible to force them to use the frying pan with tf2items or something? If so, how would I be able to go about in doing that? I also want it to only swap out the stock weapons and not just every melee (so the KGB heavies in decoy adv3 should still have their KGB equipped).

An example of where this would be hilarious is decoy expert1 wave 2, with the infinite crit bat scout support (with the 2 giant heavies and 5 giant scouts and some pyros). The scouts whacking players with golden frying pans instead of bats would be hysterical (and annoying).

Thanks!
Potato Uno is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 05-16-2015 , 07:37   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #2

Write external plugin to make tf2items spawn golden frying pan to robots

you need to put into the robotname like character to detect the robot which should have pan like GP Heavy and you check the string

Because valve disallows it for bots even.
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 05-16-2015 , 18:02   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #3

golden frying pan's textures get set to a normal pan, it'd only change the name of the item.

unlessss... things. ;3
__________________
Chdata is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 05-16-2015 , 18:33   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #4

Golden frying pan is its own thing. In BWR I wrote a scout with a golden frying pan equipped and it did work. Except for the attachables nerf. But that's not relevant since MvM robots circumvent the attachables nerf anyway.
Potato Uno is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 05-17-2015 , 04:22   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #5

So your problem was solved?
__________________
Chdata is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 05-18-2015 , 14:48   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #6

Well you can get his melee wep look if it's a base wepons, and with t2items you give the golden frying pan, and if it have the base texture add this attrib: 2027 set on 1
__________________
Benoist3012 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-18-2015 , 15:55   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #7

Quote:
Originally Posted by Potato Uno View Post
How can I go about stripping all MvM robots of their stock melee weapon and force them to equip the golden frying pan so that all melee'ing robots will be attacking players with the golden frying pan rather than their boring bat or shovel or whatever?

I mentioned the golden frying pan on the pop file but the robots all spawn in with their stock melee instead. Is it possible to force them to use the frying pan with tf2items or something? If so, how would I be able to go about in doing that? I also want it to only swap out the stock weapons and not just every melee (so the KGB heavies in decoy adv3 should still have their KGB equipped).

An example of where this would be hilarious is decoy expert1 wave 2, with the infinite crit bat scout support (with the 2 giant heavies and 5 giant scouts and some pyros). The scouts whacking players with golden frying pans instead of bats would be hysterical (and annoying).

Thanks!
What did you use as the ItemName for it?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 05-18-2015 , 23:43   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #8

What I meant to say is that for TF2 BWR I made TF2Items give me a gold frying pan and it was visible to me (but invisible to everyone one else because valve) when I joined the robots team. So I know TF2Items can be used to make it work, but I don't know exactly how to give it to all MvM bots instead (and it would be visible to everyone because it's bots). I would somehow need to delete their current melee weapon and then use tf2items to give them the golden frying pan.

Do I grab the melee weapon entity and then kill that entity to delete the melee weapon, and then assign the golden frying pan via TF2Items to the bot? (And hook to the player_spawn event and skip all RED players?) Or is there a forward I can use that is fired when items are given to a player, so that I can intercept the melee weapon and replace it with a gold frying pan? (After seeing its item index is < 40 or whatever the stock weapon range is, that is.)

To answer Ross' question, this the pop file code that I tested (something like this):

PHP Code:
T_TFBot_Golden_Pan_Scout_Crit
{
    Class 
Scout
    Skill Expert
    WeaponRestrictions MeleeOnly
    Item 
"Gold Frying Pan"             // straight from the item schema
    
Attributes AlwaysCrit
    ItemAttributes
    
{
        
ItemName "Gold Frying Pan"
        "melee attack rate bonus" 
0.25 // +75% melee swing speed bonus
    
}
    
CharacterAttributes
    
{
        
"move speed bonus" 1.4
    
}

It's a saxxy item, and it's possible Valve hard-coded MvM to prevent saxxy weapons from being given the robots via the pop file, since even the normal frying pan doesn't appear.

EDIT: I should also note that the gold frying pan's item definition index is 1071.

Last edited by Potato Uno; 05-18-2015 at 23:48.
Potato Uno is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-19-2015 , 10:01   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #9

Hmm, it could be that bot population files don't understand weapons that have proxy classes.

Which makes me wonder if things like The Reserve Shooter would have issues as well... tf_weapon_shotgun is a proxy class that is tf_weapon_shotgun_primary for Engineer, tf_weapon_shotgun_hwg for Heavy, tf_weapon_shotgun_pyro for Pyro, and tf_weapon_shotgun_soldier for Soldier.

Anyway, any plugin that alters the bot weapons may run into the issue where the weapon attributes don't get applied due to the weapon that's spawned being a totally different weapon. I'm not sure as I haven't tried it.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 05-19-2015 , 12:18   Re: [TF2 MvM] Force Golden Frying Pan on Robots
Reply With Quote #10

No no valve disallows giving such weapons like this to bots because valve don't trust thier bots either like invisible attached sapper.
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:46.


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