![]() |
Buytable SCREWED.
All my CTs buy Shields first, then MAYBE buy something else.
Ts are fine, they usually get AKs and whatnot but that's normal. |
Re: Buytable SCREWED.
hehe, yep... i changed some shield compatible code. I wanted to let them buy shields... you should change the source for that.
|
Re: Buytable SCREWED.
The bots do not screw up buying at all, i have a nice buytable which lets CT's buy shields, but not too much. Quite fun. I will lower it a bit and provide a buytable.ini file, perhaps just package WIP #11 now... hmm
|
Re: Buytable SCREWED.
Why do my bots always buy shields, then?
If it isn't broken, tell me what stat in the ini files determines how often they buy shields. |
Re: Buytable SCREWED.
Here is my buytable.ini (note, it is shorter now, because the CS 1.6 bug is fixed)
Quote:
|
Re: Buytable SCREWED.
I even DELETED the entry for shield.
The bots still buy shields EVERY ROUND. EVERY SINGLE ROUND! |
Re: Buytable SCREWED.
be more specific, how many bots buy the shields? All of them?
You should not delete the entry for shield btw. Anyway, its odd because they do not buy a dang thing here if i set the priority to 0. |
Re: Buytable SCREWED.
All of them.
And I tried priority 0. Sometimes... two or three will not buy the shield. (Out of 8 bots on the team) But usually 7/8 or all of them buy shields. Moreover, everybody on the T team thinks that once a shield drops it'd be the sweetest thing in the world to pick it up and use it until they die. |
Re: Buytable SCREWED.
In the same vein, I suspect that some crashes with build 3051 are linked to the weapon system...
On my Linux, I have the following crash info: Code:
0x438bdd09 in CBasePlayer::HasPlayerItem () from .../hlds_l/cstrike/dlls/cs_i386.so Not really useful info..., I know :'( -eric |
Re: Buytable SCREWED.
Well I haven't experienced any crashes... but it is really annoying because I can't use RB anymore... the CTs suck at using the shields but they buy them every single round so there's no point in playing as CT or T. It's either too easy or your allies do absolutely nothing.
|
Re: Buytable SCREWED.
Can we please get a fix? The CTs buy shields every round if they have the money.
They even buy WEAPONS, but then they buy SHIELDS right after they buy weapons. What's the point of buying an AWP if you are gonna drop it for a shield in a millisecond!? |
Re: Buytable SCREWED.
edit the source code
you can disable them from buying completely in bot_buycode.cpp by return false for CS_SHIELD or whatever the definition is. |
Re: Buytable SCREWED.
Frankly, but looking at the code, there is no specific code for the shield.
So, my guess is that if you do not want a bot to buy a shield (considered as a primary weapon): - specify a favorite weapon in the bot personality file, they should never drop their favorite weapon - specify a very low priority (actually it is a probability as %) for the shield in buytable.ini - move the shield down in the list in buytable.ini, first weapons have more probability to be selected than later ones (even with a lower priority) NB: there may well be code missing to understand that a bot is carrying a shield. This could well be another problem. Hope it helps -eric |
Re: Buytable SCREWED.
Evy, Stefan, I have TRIED all that. Yes, favorite weapons ARE SPECIFIED.
I have 0 priority for shield I TRIED DELETING THE SHIELD ENTRY The bots buy IN THIS ORDER: Chance of getting weapon If they have leftover money, THEY GET A SHIELD EVERY TIME. Heck, maybe it's a probability that they get the shield, but I'll be damned that EVERY GAME I play, all but one or two CTs fail to buy a shield. They aren't MISUNDERSTANDING when they have a shield, they buy the shield when they dont have one. Almost every time! |
Re: Buytable SCREWED.
source updated, i found a bug somewhere where the shield was not 'found' (or detected). It was used in the buy code, so it could influence this behaviour. Try the latest dll and see if it works for you now.. :)
|
Re: Buytable SCREWED.
Thank you! Thank you!
I will try the new DLL immediately. However, I think your new shield code improperly ranks the shield too highly, as they are still bought at 0 priority quite often. The bots tend to buy a prim. weapon, then they buy shield. So it isnt that they arent detecting shield, but they think prim. weapon is different from shield and they buy it, I think. Like it isnt recognizing that both are technically primary weapons, and that you cant buy a FAMAS + shield. |
Re: Buytable SCREWED.
the code ranks no shields at all. the buytable ranks.. ;)
|
Re: Buytable SCREWED.
They are still buying shields, almost every round all but 2 buy shields.
It is now like 50/50... much better but they still buy shields all too often. |
Re: Buytable SCREWED.
hmm, this is really odd! Well , i think its back to the drawing board then. Ow, i wonder if there are any other meta plugins running at ur server? Ie, when i run statsme, it somehow messes up sometimes. So *perhaps* other mods/plugins influence this behaviour... (just a random shot though).
|
Re: Buytable SCREWED.
I only have StatsMe and RealBot, with MetaMod 1.17.1.
It's a local server. And uh... here's what they do every round, I think the problem is in detecting what type of 'weapon' the shield is. Round start [Bot will about 80% of the time buy a new primary weapon, even if it is a downgrade... like AK47 to MP5 or SG552 to pump-shotty] [If bot is CT, the bot will usually buy a shield at this point] I don't think it's statsme because AFAIK it wouldn't have any reason to interface with metamod in the same way RealBot does... |
Re: Buytable SCREWED.
would something like this work?
bot_buycode.cpp:270 Code:
if (UTIL_GiveWeaponType (wapen_tabel[i].iId) == SHIELD) Code:
if (pBot->iPrimaryWeapon > -1) { // bot has a weapon |
Re: Buytable SCREWED.
i think your code should work...
|
Re: Buytable SCREWED.
the first code set should work, the second code set won't because iId != wapen_tabel index. a simple function to create a static array should be easy, ie
Code:
int UTIL_GetWapenIndex (int iId) HTH. testing the shield code now... |
Re: Buytable SCREWED.
There already is code to revert the real ID and the wapen_tabel id ... in the buycode.cpp function afaik.
|
Re: Buytable SCREWED.
yea, there is, thanks.
bot_buycode.cpp: 210 Code:
if (pBot->iPrimaryWeapon > -1) { Code:
if (pBot->iSecondaryWeapon > -1) { bot_buycode.cpp line 254 Code:
// Buy favorite weapon |
Re: Buytable SCREWED.
In the code util.cpp, there are question marks around the weapon name used internally by CS 1.6 for shields, can someone check in reallog.txt if there are lines like:
UTIL_GiveWeaponId: Unknown weapon name xyz where xyz should be weapon_shield (then the question marks should be removed), else the code should be modified 9_9 You need to use build 3056 which has just been committed on 18th of July... Thanks -evy PS: I have no access to a CS 1.6... |
Re: Buytable SCREWED.
i have no Unknown weapon name in my reallog.txt, though they don't run 24/7. bots have bought all the weapons though. HTH
|
Re: Buytable SCREWED.
i made the changes to my bot_buycode described below and it has drastically reduced/eliminated the buying multiple primaries each round.
it also reduces the buying of a shield if they have a primary weapon no Unknown weapons yet evy, done aprrox 30 rounds on mindmaze and none yet. |
Re: Buytable SCREWED.
sorry for all the double posting
bot_buycode.cpp: line 179 why isn't it Code:
pBot->buy_primary = false; also, for the actual buy'ing section, I don't know if the compiler will optimize it as much as converting it to a switch statement because that's all it basically is. I remember from my compilers class that a switch statement converts to quicker code than if statements :) HTH :) I have such conversion implemented :) you have line 444 = line 436 perhaps we could put into the personality a buy only pistols option? perhaps it could be a mode ;) i've been trying to debug the buycode, it doesn't seem to update the iPrimaryWeapon before going into the buycode sometimes it is updated after the swat teams are created though :/ any idea why that is????:(:'( |
Re: Buytable SCREWED.
The original code was meant to buy every round a new primary weapon; or better said, to let the bot rethink about it so it could buy a BETTER weapon when it has the money and such. When the favorite weapon ip is set, the 'thinking' will be stopped automaticly there.
a pistol mode is cool ;) iPrimaryWeapon is updated every frame in UpdateStatus() of the bot. |
All times are GMT +2. The time now is 17:58. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.