![]() |
![]() |
JRob |
![]()
Post
#1
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 52 Joined: 30-April 11 Member No.: 1,970 ![]() |
I have tried adding more weapons to bot_weapons.cpp and bot_weapons.h but to no success.
CODE {TF2_SLOT_PRMRY,TF2_WEAPON_HANDGUN_SCOUT_PRIMARY, "tf_weapon_handgun_scout_primary", WEAP_FL_KILLPIPEBOMBS|WEAP_FL_PRIM_ATTACK|WEAP_FL_UNDERWATER,0,800,1,3,0}, {TF2_SLOT_PRMRY,TF2_WEAPON_SODA_POPPER, "tf_weapon_soda_popper", WEAP_FL_KILLPIPEBOMBS|WEAP_FL_PRIM_ATTACK|WEAP_FL_UNDERWATER,0,800,1,3,0}, {TF2_SLOT_PRMRY,TF2_WEAPON_PEP_BRAWLER_BLASTER, "tf_weapon_pep_brawler_blaster", WEAP_FL_KILLPIPEBOMBS|WEAP_FL_PRIM_ATTACK|WEAP_FL_UNDERWATER,0,800,1,3,0}, {TF2_SLOT_SCNDR,TF2_WEAPON_JAR_MILK, "tf_weapon_jar_milk", WEAP_FL_NONE,0,180,0,1,0}, {TF2_SLOT_PRMRY,TF2_WEAPON_ROCKETLAUNCHER_AIRSTRIKE, "tf_weapon_rocketlauncher_airstrike", WEAP_FL_PRIM_ATTACK|WEAP_FL_EXPLOSIVE|WEAP_FL_UNDERWATER,BLAST_RADIUS*0.9,4096,1,3,TF2_ROCKETSPEED}, {TF2_SLOT_SCNDR,TF2_WEAPON_FLAREGUN_REVENGE, "tf_weapon_flaregun_revenge", WEAP_FL_PRIM_ATTACK, 0, 1600, 2, 2, TF2_GRENADESPEED * 1.5 }, {TF2_SLOT_PRMRY,TF2_WEAPON_CANNON, "tf_weapon_cannon", & nbsp;WEAP_FL_PROJECTILE|WEAP_FL_PRIM_ATTACK|WEAP_FL_EXPLOSIVE|WEAP_FL_UNDERWATER ,100,1200,1,2,TF2_GRENADESPEED*1.5}, {TF2_SLOT_PRMRY,TF2_WEAPON_SHOTGUN_BUILDING_RESCUE, "tf_weapon_shotgun_building_rescue", WEAP_FL_KILLPIPEBOMBS|WEAP_FL_PRIM_ATTACK|WEAP_FL_UNDERWATER,0,800,1,2,0}, // short circuit // wrangler {TF2_SLOT_MELEE,TF2_WEAPON_ROBOT_ARM, "tf_weapon_robot_arm", WEAP_FL_PRIM_ATTACK|WEAP_FL_MELEE|WEAP_FL_UNDERWATER,0,180,3,1,0}, {TF2_SLOT_PRMRY,TF2_WEAPON_SNIPERRIFLE_DECAP, "tf_weapon_sniperrifle_decap", WEAP_FL_SCOPE|WEAP_FL_PRIM_ATTACK,1000,4000,1,3,0}, {TF2_SLOT_PRMRY,TF2_WEAPON_SNIPERRIFLE_CLASSIC, "tf_weapon_sniperrifle_classic", WEAP_FL_SCOPE|WEAP_FL_PRIM_ATTACK,1000,4000,1,3,0}, ... TF2_WEAPON_HANDGUN_SCOUT_PRIMARY, TF2_WEAPON_SODA_POPPER, TF2_WEAPON_PEP_BRAWLER_BLASTER, TF2_WEAPON_JAR_MILK, TF2_WEAPON_ROCKETLAUNCHER_AIRSTRIKE, TF2_WEAPON_FLAREGUN_REVENGE, TF2_WEAPON_CANNON, TF2_WEAPON_SHOTGUN_BUILDING_RESCUE, TF2_WEAPON_ROBOT_ARM, TF2_WEAPON_SNIPERRIFLE_DECAP, TF2_WEAPON_SNIPERRIFLE_CLASSIC, Apparently, there seems to be a MAX_WEAPONS defined to 48. I tried redefining this to TF2_WEAPON_MAX but it only results in random crashes. How are you supposed to add more than 48 weapons? There are obviously more than 48 weapon types in the game. I noticed that you have only been replacing unused entries to avoid this problem. |
![]() ![]() |
Cheeseh |
![]()
Post
#2
|
![]() Admin ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 ![]() |
the default weapons in weapons.cpp is no longer used if you have weapons.ini in the config folder
see: http://rcbot.bots-united.com/forums/index....ost&p=13465 |
JRob |
![]()
Post
#3
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 52 Joined: 30-April 11 Member No.: 1,970 ![]() |
I just updated and it still crashes when I try to add more weapons through weapons.ini.
|
Cheeseh |
![]()
Post
#4
|
![]() Admin ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 ![]() |
I just updated and it still crashes when I try to add more weapons through weapons.ini. MAX_WEAPONS is how many weapons a player can carry, not the maximum number of weapons in the game, although the old rcbot code used this as a maximum for in the game for convenience sake. Though if you want to add a new weapon without weapons .ini, you need to have this: CODE {0, 0, "\0", 0, 0, 0, 0, 0, 0}//signal last weapon at the end of the WeaponsData_t [] weaponlist I noticed this was omitted out of DODs and HL2DM so I've added this back in just in case. Could you locate where in the code it is crashing due to changing weapons.ini file? |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 8th August 2025 - 07:11 AM |