.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Re: Need some help for shield support
Old
  (#11)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Need some help for shield support - 27-10-2004

Make your bots display what menu/submenu they are browsing when they buy stuff, so that you can know what they are buying. Of course do that with just 1 bot, not the whole team



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Need some help for shield support
Old
  (#12)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: Need some help for shield support - 27-10-2004

Quote:
Originally Posted by Pierre-Marie Baty
Make your bots display what menu/submenu they are browsing when they buy stuff, so that you can know what they are buying. Of course do that with just 1 bot, not the whole team
This is impossible becorse the bots have one table with ID numbers of the weapons(how much money cost the weapon and with who buy; menuselect they can buy this weapons).They just buy better weapons if they have enough money, but I don't know how to say to the bots that the CS_WEAPON_SHIELDGUN is a good weapon.
Light Ninja is created a table that say to the bots that some weapon is good, I added CS_WEAPON_SHIELDGUN in this table but the bots don't buy shield again.
Other ideas???
  
Reply With Quote
Re: Need some help for shield support
Old
  (#13)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Need some help for shield support - 27-10-2004

just consider this CS_WEAPON_SHIELDGUN as a primary weapon
  
Reply With Quote
Re: Need some help for shield support
Old
  (#14)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Need some help for shield support - 27-10-2004

post this table here, and the function that uses it.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Need some help for shield support
Old
  (#15)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: Need some help for shield support - 27-10-2004

So there is the table

bot_weapon_select_t cs_weapon_select[NUM_WEAPONS+1] = {
// Knife
{CS_WEAPON_KNIFE, "weapon_knife","models/w_knife.mdl",0.0, 50.0, 0.0, 0.0,
TRUE, TRUE, 0.0, 0, 0, -1, -1, 0, 0, 0, 0,FALSE},
// Pistols
// 1280
{CS_WEAPON_USP, "weapon_usp","models/w_usp.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 2.8, 500, 1, -1, -1, 1, 1, 2, 2,FALSE},
// 1536
{CS_WEAPON_GLOCK18, "weapon_glock18","models/w_glock18.mdl",0.0, 2048.0, 0.0, 1200.0,
TRUE, FALSE, 2.3, 400, 1, -1, -1, 1, 2, 1, 1,FALSE},
// 1024
{CS_WEAPON_DEAGLE, "weapon_deagle","models/w_deagle.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 2.3, 650, 1, 2, 2, 1, 3, 4, 4,TRUE},
// 1024
{CS_WEAPON_P228, "weapon_p228","models/w_p228.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 2.8, 600, 1, 2, 2, 1, 4, 3, 3,FALSE},
// new for CS 7.0
// 1280
{CS_WEAPON_ELITE, "weapon_elite","models/w_elite.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 4.6, 1000, 1, 0, 0, 1, 5, 5, 5,FALSE},
// new for CS 1.0
{CS_WEAPON_FIVESEVEN, "weapon_fiveseven","models/w_fiveseven.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 3.17, 750, 1, 1, 1, 1, 6, 5, 5,FALSE},
// Shotguns
// 1024
{CS_WEAPON_M3, "weapon_m3","models/w_m3.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, FALSE, 1.1, 1700, 1, 2, -1, 2, 1, 1, 1,FALSE},
// 1024
{CS_WEAPON_XM1014, "weapon_xm1014","models/w_xm1014.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, FALSE, 0.9, 3000, 1, 2, -1, 2, 2, 2, 2,FALSE},
// Sub Machine Guns
// 1536
{CS_WEAPON_MP5NAVY, "weapon_mp5navy","models/w_mp5.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 2.74, 1500, 1, 2, 1, 3, 1, 2, 2,FALSE},
{CS_WEAPON_TMP, "weapon_tmp","models/w_tmp.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 2.2, 1250, 1, 1, 1, 3, 2, 1, 1,FALSE},
// 1536
{CS_WEAPON_P90, "weapon_p90","models/w_p90.mdl", 0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 3.5, 2350, 1, 2, 1, 3, 3, 4, 4,FALSE},
// 1536
{CS_WEAPON_MAC10, "weapon_mac10","models/w_mac10.mdl", 0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 3.3, 1400, 1, 0, 0, 3, 4, 1, 1,FALSE},
// new for CS 1.0
{CS_WEAPON_UMP45, "weapon_ump45","models/w_ump45.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 4.15, 1700, 1, 2, 2, 3, 5, 3, 3,FALSE},
// Rifles
// 2048
{CS_WEAPON_AK47, "weapon_ak47","models/w_ak47.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 2.6, 2500, 1, 0, 0, 4, 1, 2, 2,TRUE},
{CS_WEAPON_SG552, "weapon_sg552","models/w_sg552.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 4.0, 3500, 1, 0, -1, 4, 2, 4, 4,TRUE},
{CS_WEAPON_M4A1, "weapon_m4a1","models/w_m4a1.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 3.2, 3100, 1, 1, 1, 4, 3, 3, 3,TRUE},
{CS_WEAPON_AUG, "weapon_aug","models/w_aug.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 3.5, 3500, 1, 1, 1, 4, 4, 4, 4,TRUE},
// Sniper Rifles
// 1024
{CS_WEAPON_SCOUT, "weapon_scout","models/w_scout.mdl", 300.0, 2048.0, 0.0, 1200.0,
TRUE, FALSE, 2.2, 2750, 1, 2, 0, 4, 5, 3, 2, TRUE},
// 1280
{CS_WEAPON_AWP, "weapon_awp","models/w_awp.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 2.6, 4750, 1, 2, 0, 4, 6, 5, 6,TRUE},
// 1024
{CS_WEAPON_G3SG1, "weapon_g3sg1","models/w_g3sg1.mdl",300.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 4.9, 5000, 1, 0, 2, 4, 7, 6, 6,TRUE},
{CS_WEAPON_SG550, "weapon_sg550","models/w_sg550.mdl",300.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 4.128, 4200, 1, 1, 1, 4, 8, 5, 5,TRUE},
// Machine Guns
{CS_WEAPON_M249, "weapon_m249","models/w_m249.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 4.85, 5750, 1, 2, 1, 5, 1, 1, 1,TRUE},
{CS_WEAPON_FAMAS, "weapon_famas","models/w_famas.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 3.2, 2250, 1, 1, 1, 4, -1, 1, 1,TRUE},
{CS_WEAPON_GALIL, "weapon_galil","models/w_galil.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 3.2, 2000, 1, 0, 0, 4, -1, 1, 1,TRUE},
{CS_WEAPON_SHIELDGUN, "weapon_shield","models/w_shield.mdl", 0.0, 0.0, 0.0, 0.0,
TRUE, FALSE, 0.0, 2200, 0, 1, 1, 8, -1, 8, 8,FALSE},
//terminator
{0, "","", 0.0, 0.0, 0.0, 0.0, TRUE, FALSE, 0.0,0,0,0,0,0}
};

Whistler how to consider CS_WEAPON_SHIELDGUN as a primary weapon.
Sorry for stupid qestion but I'm a new in bots coding.

Last edited by The Storm; 27-10-2004 at 18:12..
  
Reply With Quote
Re: Need some help for shield support
Old
  (#16)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Need some help for shield support - 27-10-2004

Could you use the [code] tags ? Else it's difficult to read. Please also post the declaration of the table (the struct members) so that we get an idea of who does what, and post the function(s) that call this table. So far we see numbers but we don't really see their purpose.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Need some help for shield support
Old
  (#17)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: Need some help for shield support - 27-10-2004

Quote:
Originally Posted by Pierre-Marie Baty
Could you use the [code] tags ? Else it's difficult to read. Please also post the declaration of the table (the struct members) so that we get an idea of who does what, and post the function(s) that call this table. So far we see numbers but we don't really see their purpose.
{CS_WEAPON_SHIELDGUN, "weapon_shield","models/w_shield.mdl", 0.0, 0.0, 0.0, 0.0,
TRUE, FALSE, 0.0, 2200, 0, 1, 1, 8, -1, 8, 8,FALSE},

So 2200 is money that cost the weapon,
The numbers 8,-1, 8, 8 are the buy numbers.
-1 is added for anoder function from Whistler that check if we are running CS 1.5 to igrone this weapon.
Anoder numbers I don't know for what are there.
Light Ninja don't send me any titorials so I can't fix this.
I think that Whistler know for whats are this numbers becorce he added to the bots CS_WEAPON_FAMAS and CS_WEAPON_GALIL.
So if you PMB can't help me I will wait for help from Whistler.

Last edited by The Storm; 27-10-2004 at 21:48..
  
Reply With Quote
Re: Need some help for shield support
Old
  (#18)
MusicMan
Member
 
Status: Offline
Posts: 236
Join Date: Feb 2004
Default Re: Need some help for shield support - 27-10-2004

Code:
bot_weapon_select_t cs_weapon_select[NUM_WEAPONS+1] = {
// Knife
{CS_WEAPON_KNIFE, "weapon_knife","models/w_knife.mdl",0.0, 50.0, 0.0, 0.0,
TRUE, TRUE, 0.0, 0, 0, -1, -1, 0, 0, 0, 0,FALSE}, 
// Pistols
// 1280
{CS_WEAPON_USP, "weapon_usp","models/w_usp.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 2.8, 500, 1, -1, -1, 1, 1, 2, 2,FALSE},
// 1536
{CS_WEAPON_GLOCK18, "weapon_glock18","models/w_glock18.mdl",0.0, 2048.0, 0.0, 1200.0,
TRUE, FALSE, 2.3, 400, 1, -1, -1, 1, 2, 1, 1,FALSE},
// 1024
{CS_WEAPON_DEAGLE, "weapon_deagle","models/w_deagle.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 2.3, 650, 1, 2, 2, 1, 3, 4, 4,TRUE},
// 1024
{CS_WEAPON_P228, "weapon_p228","models/w_p228.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 2.8, 600, 1, 2, 2, 1, 4, 3, 3,FALSE},
// new for CS 7.0
// 1280
{CS_WEAPON_ELITE, "weapon_elite","models/w_elite.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 4.6, 1000, 1, 0, 0, 1, 5, 5, 5,FALSE},
// new for CS 1.0
{CS_WEAPON_FIVESEVEN, "weapon_fiveseven","models/w_fiveseven.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 3.17, 750, 1, 1, 1, 1, 6, 5, 5,FALSE},
// Shotguns
// 1024
{CS_WEAPON_M3, "weapon_m3","models/w_m3.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, FALSE, 1.1, 1700, 1, 2, -1, 2, 1, 1, 1,FALSE},
// 1024
{CS_WEAPON_XM1014, "weapon_xm1014","models/w_xm1014.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, FALSE, 0.9, 3000, 1, 2, -1, 2, 2, 2, 2,FALSE},
// Sub Machine Guns
// 1536
{CS_WEAPON_MP5NAVY, "weapon_mp5navy","models/w_mp5.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 2.74, 1500, 1, 2, 1, 3, 1, 2, 2,FALSE},
{CS_WEAPON_TMP, "weapon_tmp","models/w_tmp.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 2.2, 1250, 1, 1, 1, 3, 2, 1, 1,FALSE},
// 1536
{CS_WEAPON_P90, "weapon_p90","models/w_p90.mdl", 0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 3.5, 2350, 1, 2, 1, 3, 3, 4, 4,FALSE},
// 1536
{CS_WEAPON_MAC10, "weapon_mac10","models/w_mac10.mdl", 0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 3.3, 1400, 1, 0, 0, 3, 4, 1, 1,FALSE},
// new for CS 1.0
{CS_WEAPON_UMP45, "weapon_ump45","models/w_ump45.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 4.15, 1700, 1, 2, 2, 3, 5, 3, 3,FALSE},
// Rifles
// 2048
{CS_WEAPON_AK47, "weapon_ak47","models/w_ak47.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 2.6, 2500, 1, 0, 0, 4, 1, 2, 2,TRUE},
{CS_WEAPON_SG552, "weapon_sg552","models/w_sg552.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 4.0, 3500, 1, 0, -1, 4, 2, 4, 4,TRUE},
{CS_WEAPON_M4A1, "weapon_m4a1","models/w_m4a1.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 3.2, 3100, 1, 1, 1, 4, 3, 3, 3,TRUE},
{CS_WEAPON_AUG, "weapon_aug","models/w_aug.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 3.5, 3500, 1, 1, 1, 4, 4, 4, 4,TRUE},
// Sniper Rifles
// 1024
{CS_WEAPON_SCOUT, "weapon_scout","models/w_scout.mdl", 300.0, 2048.0, 0.0, 1200.0,
TRUE, FALSE, 2.2, 2750, 1, 2, 0, 4, 5, 3, 2, TRUE},
// 1280
{CS_WEAPON_AWP, "weapon_awp","models/w_awp.mdl",0.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 2.6, 4750, 1, 2, 0, 4, 6, 5, 6,TRUE},
// 1024
{CS_WEAPON_G3SG1, "weapon_g3sg1","models/w_g3sg1.mdl",300.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 4.9, 5000, 1, 0, 2, 4, 7, 6, 6,TRUE},
{CS_WEAPON_SG550, "weapon_sg550","models/w_sg550.mdl",300.0, 4096.0, 0.0, 1200.0,
TRUE, FALSE, 4.128, 4200, 1, 1, 1, 4, 8, 5, 5,TRUE},
// Machine Guns
{CS_WEAPON_M249, "weapon_m249","models/w_m249.mdl",0.0,2048.0, 0.0, 1200.0,
TRUE, TRUE, 4.85, 5750, 1, 2, 1, 5, 1, 1, 1,TRUE},
{CS_WEAPON_FAMAS, "weapon_famas","models/w_famas.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 3.2, 2250, 1, 1, 1, 4, -1, 1, 1,TRUE},
{CS_WEAPON_GALIL, "weapon_galil","models/w_galil.mdl", 0.0, 4096.0, 0.0, 1200.0,
TRUE, TRUE, 3.2, 2000, 1, 0, 0, 4, -1, 1, 1,TRUE},
{CS_WEAPON_SHIELDGUN, "weapon_shield","models/w_shield.mdl", 0.0, 0.0, 0.0, 0.0,
TRUE, FALSE, 0.0, 2200, 0, 1, 1, 8, -1, 8, 8,FALSE},
//terminator 
{0, "","", 0.0, 0.0, 0.0, 0.0, TRUE, FALSE, 0.0,0,0,0,0,0}
};
posted THE_STORM's code with code tags for better readability
  
Reply With Quote
Re: Need some help for shield support
Old
  (#19)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: Need some help for shield support - 27-10-2004

So will help me someone???
  
Reply With Quote
Re: Need some help for shield support
Old
  (#20)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Need some help for shield support - 28-10-2004

Well I COULD help you but for that I'd need AT LEAST the struct declaration for this array !!! How do you want me to guess things you don't understand yourself ?
Quote:
Anoder numbers I don't know for what are there.
Great!
Your array is an array of elements having the "bot_weapon_select_t" type. So, where is "bot_weapon_select_t" defined ? 9_9



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com