HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
HI again!. Finaly I managed to make the Bot of my mod work almost as I wanted. As some of you remember, it was made using Botmanīs Bot#10īs SDK as the main code for it. SInce it shares many functions and procedures with HPBot I decided to post this thread here and not in Offtopic or General Bot coding.
Well, as I was saying, the bot is behaving fairly well, except for some old issues that I cannot fix, no matter what I did. I must say that my knowledge of C++ is VERY basic, so I must assume that it is not a probem with the Bot#10 code but my entire and absolute lack of skills on coding. Said that, I will expose what happen with the ZWCBot (thatīs how I call it): -Bots cannot "see" where the void is, so they usually fall into it and die (chhese gave me a fix in 2014, but did not work, so Iīm still working on it). -Bots seem to not recognize that there are other weapons in inventory, thus they only use the weapon on slot 2, ignoring the rest (After hundred of test sessions, they used one time the weapon on slot 1). -Botīs aiming is quite weird, they fire upwards and forwards fine, but, suddenly is like if the weapons started to weight too much and point them to the floor even if thereīs not an enemy, then return to aim normally, but this is happening over and over. -Another issue is that, when shooting, they start to shake up and down the weapons very fast, like a Heavy Metal addict headbanging to his death. -Another issue is: when aiming upwards, if the Bot get past the maximum pitch angle, it bends all the body lying on the floor on its back (looks very weird). As you can see, it is not like the bots donīt work at all, but those issues make the gamelay look like shit (IMHO). If you want, I can post the bot_combat.cpp and bot.cpp file of the Bot. ;) |
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Sorry for the spelling mistakes...
|
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Hereīs the full combat.cpp file (no secret is revealed, except the part to make bots shoot sentinels). ;) Use it freely (but give me some credit!!, haha).
Code:
//=========================================================== Hereīs a video of the Bot in action... http://www.moddb.com/mods/zion-warcr...ource#imagebox |
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Wow you have one epic mod there I'm testing it now.
...well until I've tested it...hehe...well I've commented at your moddb page using my other nick...alencore. Yeah those bots needs more work really wish I could help but I don't know shit when it comes to coding LOL! Hope some of the more clever ones here would help you out coz the mods seems very promising. |
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
I hope to not be too harsh, but this foruns at botsunited are quite dead-ish, no?:unsure:
|
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Sadly yes. The active times were 2004-2008, after that it is only basic support forum.
|
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
crap...:cursing:
This place used to be a superb place to get info for modders... Btw: may I ask for your help? ;) |
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Sorry I cannot help you much, but I can recommend you to base your bot on the official template from the Half-Life SDK. It is much clearer code and I guess that such bugs would not be present there.
https://github.com/ValveSoftware/hal...ame_shared/bot |
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Oh, wow!, thanks!, I have taken a slight look to the code and looks far simpler and clearer than bot#10's code. Also I have a doubt, what should I spect from this bot? seems like it is done for Counter-Strike...
|
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
There is some CS leftovers but it is generic code.
|
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
I see that it is included into the game_shared folder, does it need special dependencies or it will compile if it is directly added into the hl project?, for hl project I mean the modīs project, not the one of the ISOHL.
(Letīs give some life to this forum!!) :punk: |
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Go test it out. ;)
|
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Let us know how you go - I'm interested in taking a look at the new bot code but haven't had a chance to.
|
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Hi!!, of course I tried!! :)
But, even if I made it to insert all the code (un modified), I realized that I must do a lot of changes to many of the essential features of the Bot. :glare: I did start with the combat part, and find myself in serious trouble trying to declare things, and even doing this, the bot did not move at all, I did look for waypointing method but the only thing I finally did is place info_nodes, then the Bot started to move but not in a better way than the previous code from the Bot#10. :confused: The bot also didnīt try to combat, and here I tried to make the bot do this through iRelationship method, attacking a certain class by string (monster_whatever, etc.) etc, etc; with this part the MOd crashes very often because (I think) I did something bad with pointers or stuff like that (Iīm no coder at all). :whistling: What I did finally is use the old version of the ZWC Bot. I did some major modifications and now it works better, but not perfect. At least it tries to navigate a bit for the map , and finally choose weapons almost right... :guns: I will do further tests and try other modifications. :unsure: This weekend I will make a video with the new version of the Zion Dockīs map, there you will se how the ZWC Bot will behave. Anyway, I will also post the combat code and the navigation code here for you can help me to improve it if you wish ;) :beta: |
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
If your coding skills are really as low as you say I strongly suggest to improve them before continuing with your AI adventure. Coding AI for games is not picnic and if you have issues with pointers you are really on the wrong way to go.
Also posting large pieces of code here and expecting someone to try to find the issue only by looking in the code is not good option. You should begin using some kind of version control system like Git and provide all the code in compilable state, so in case that someone wants to help you he will be able to run the code using debugger and find issues much more easy. |
Re: HPBBot/Bot#10/ZWC Bot: final fixes NED HELP!
Yes, youīre right, I must learn more C++. It is one of the things that ashame me the most. :blushing:
Anyway, I did not mean to post the whole block of code, but the link to GitHub. :whistling: Actually the real problem is that the Bot does not turn around if it hits a wall, I know itīs easy to code, but I am stuck with it. I ony want the bot walk straight until it is near a wall, then turn a certain number of degrees and walk again, nothing complex, more or less like a vacuum cleaner bot. What I can do (I hope you agree :sweatdrop: ) is to provide ALL the mod in its beta stage along with its Source Code to anyone who really wants to help. There are three people who has the Mod now, thanks to them I did finish the new features of the Mod, itīs the bot what is causing me more trouble. I will be pleased if someone SERIOUSLY wants to take a look. :surrender: |
All times are GMT +2. The time now is 20:16. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.