Forum

> > CS2D > General > Bots Skill
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Bots Skill

6 replies
To the start Previous 1 Next To the start

old Bots Skill

Mami Tomoe
User Off Offline

Quote
It was today that I found out that the standard AI has no impact on the behaviour of the cs2d cmd bot_weapons setting.
That is baked into CS2D.

Therefore, I must ask, does the same apply to cs2d cmd bot_skill?
Because in the built in standard AI for the bots, there's only one check for the skill setting, and that is if the bot should buy armour on spawn or not.
That seems odd, so is there internal logic handling bot skills or is bot skills just simply not used very much (only once) by default?

old Re: Bots Skill

DC
Admin Off Offline

Quote
Bot skills are used internally. They affect these things:

• what you already found out: if bots buy kevlar(+helmet).

• perception range: how close do enemies have to be to be so bots aim at them. This is only a difference of like 30 pixels between worst and best skill so it's doesn't have a huge impact in most scenarios.

• max rotation speed: This affects how good/fast bots are at aiming. Probably has the biggest impact on difficulty!

old Re: Bots Skill

Mami Tomoe
User Off Offline

Quote
Are the last two things not modifiable by the Lua bots folder?
This is what I mean by "baked in".

old Re: Bots Skill

DC
Admin Off Offline

Quote
Yes, these skill effects are hard coded and can't be changed with Lua.

The only way to work around this would be not using the built-in methods cs2d lua cmd ai_findtarget (to get rid of the perception range skill impact) and cs2d lua cmd ai_aim (to get rid of the rotation speed skill impact). Instead you would have to find targets manually and also rotate bots manually using cs2d lua cmd ai_rotate.

Probably replacing cs2d lua cmd ai_findtarget is not worth it because it will (probably) be much slower using pure Lua and also, as I already said, the impact of the skill isn't huge there.

Replacing cs2d lua cmd ai_aim with your own rotation logic shouldn't be super difficult though and probably also shouldn't affect performance that much.
edited 1×, last 04.12.22 01:52:19 pm

old Re: Bots Skill

Mami Tomoe
User Off Offline

Quote
Thank you for the vast amount of knowledge.
I don't seek to change any of that, rather I only seek to understand it for I'm making a bot A.I. from nearly scratch and I needed this cleared up so I'll know what I'm going up against.

Thanks again.

old Re: Bots Skill

DC
Admin Off Offline

Quote
You're welcome. I improved the documentation for the related commands a bit so things are more clear.

old Re: Bots Skill

Mami Tomoe
User Off Offline

Quote
You might want to document the "hooks" for bots as well.
Although they're not added, and are documented in the default folder, having them on the website too couldn't harm.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview