Raised This Month: $51 Target: $400
 12% 

[TF2] Give Bots Weapons (04.01.2023)


Post New Thread Reply   
 
Thread Tools Display Modes
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 02-17-2020 , 20:03   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #81

I believe luki1412 is already working on a new version. We should give him a chance to post a new version if he desires.

This is already a very good plugin. All I did was add pieces of code from manicogmaing and myself.

Pro: You can give Bots lots of weapons, including what you see in the attached link.
Con: The version I made requires tf2attributes and tf2itemsinfo.

Here's a newer video since I made some changes:
PC Gamer is offline
That Annoying Guide
Member
Join Date: Aug 2019
Old 03-09-2020 , 20:42   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #82

@PC Gamer Sense I have found editing the plugin to be really easy I would like to know if it is possible to set a random number selector to run another one when it's selected for a different list. As I want to add reskins in but I don't want to mess the random equal chance for the weapons with different stats. Example being spy and the revolver and Big Kill as I want it to if it roles the Revolver it would then role for either revolver or Big Kill. (Sorry as I really don't know how to phrase this)
That Annoying Guide is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 03-10-2020 , 00:19   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #83

I think this is what you are asking to see code for: If Bot rolls a Revolver, roll the dice again to see if the Bot gets a Revolver or Big Kill.

I'm just a hobby programmer, so I'm certainly no expert. However, if I was going to modify the code to do what you asked it would look like something like this:

PHP Code:
        case TFClass_Spy:
            {
                
int rnd GetRandomUInt(1,5);
                
TF2_RemoveWeaponSlot(client0);

                switch (
rnd)
                {
                case 
1:
                    {
                        
CreateWeapon(client"tf_weapon_revolver"616);  //The Ambassador
                    
}
                case 
2:
                    {
                        
CreateWeapon(client"tf_weapon_revolver"4606);  //The Enforcer
                    
}
                case 
3:
                    {
                        
CreateWeapon(client"tf_weapon_revolver"2246);  //L'Etranger
                    
}
                case 
4:
                    {
                        
int rnd2 GetRandomUInt(1,2);   //Roll for Revolver or Big Kill
                        
switch (rnd2)
                        {
                        case 
1:
                            {
                                
CreateWeapon(client"tf_weapon_revolver"246);  //Revolver
                            
}
                        case 
2:
                            {
                                
CreateWeapon(client"tf_weapon_revolver"1616);  //Big Kill
                            
}
                    }
                case 
5:
                    {
                        
CreateWeapon(client"tf_weapon_revolver"5256);  //The Diamondback
                    
}                    
                }
            } 
If Bot rolls a '4', (which would have been the Revolver), he immediately re-rolls to see if he still gets a Revolver (new roll of 1) or maybe a Big Kill (new roll of 2).

Is that what you wanted to see? You could also influence the outcome by adding more or less instances of the same weapon to the code. In the above code if the Bot rolls a '4' you have a 50% percent chance to get either a Revolver or a Big Kill. You can add more cases to change the percentage chance of getting a particular outcome.
PC Gamer is offline
That Annoying Guide
Member
Join Date: Aug 2019
Old 03-10-2020 , 07:43   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #84

Yes this is what I was looking for. Just couldn't find out how to do it. Thank you and I'll put it to use tonight.
That Annoying Guide is offline
Se8099
New Member
Join Date: Apr 2020
Old 04-04-2020 , 08:35   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #85

Hey, for some Reason my Bots dont get any Weapons or Cosmetics... Both plugins run Correctly but the bots still dont get their Stuff...

Hope someone can Help me.
Thanks
Se8099 is offline
Se8099
New Member
Join Date: Apr 2020
Old 04-04-2020 , 09:11   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #86

Quote:
Originally Posted by Se8099 View Post
Hey, for some Reason my Bots dont get any Weapons or Cosmetics... Both plugins run Correctly but the bots still dont get their Stuff...

Hope someone can Help me.
Thanks
Okay as it turns out, I was probably missing some kind of Config file... not sure..
Se8099 is offline
Happy DODs player
AlliedModders Donor
Join Date: Sep 2009
Old 04-05-2020 , 05:20   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #87

Any update on the version with the extra painted weapons, unusual hats etc for the bots?
__________________
Happy DODs player is offline
MasterKiller777
Junior Member
Join Date: Jun 2016
Old 04-05-2020 , 10:17   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #88

I've been trying to edits the plugin files but I can't seem to find any good way to change it.

I've tried to decompile it with Lysis's SMX decompiler, edited in the files to add weapons, but when I tried to re-compile it with Sourcemod Compiler, I just get bunches of errors. I didn't touch anything else on the files. Even if I test without changing anything, I still get bunches of errors.

I wish to see an example of how you edit the files :/
MasterKiller777 is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 04-05-2020 , 13:56   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #89

Quote:
Originally Posted by MasterKiller777 View Post
I wish to see an example of how you edit the files :/
You should ask this question in the General or Scripting forum. Here's how I do it:

1. Obtain the .sp file for the plugin.
2. Edit the .sp file using something like Notepad++
3. Make whatever changes you want and save the file.
4. Compile the file using SPCOMP. It will create a .smx file.
5. Move the newly created .smx to your plugins folder.
6. Load plugin or change map.
7. You are done.
PC Gamer is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 04-11-2020 , 04:39   Re: [TF2] Give Bots Weapons (06.11.2017)
Reply With Quote #90

I'm working on a version with config file so you dont have to edit the plugin.
__________________
luki1412 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 20:36.


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