MonsterHunt: Coding weapon/ammo exchange

Discussions about Coding and Scripting
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: MonsterHunt: Coding weapon/ammo exchange

Post by Aldebaran »

Barbie wrote:I noticed the same if you give them a WarheadLauncher. They don't shoot or shoot just one time.
I just played MH-Kuratorium. I have swapped OLquadshot with TheMiner. Now I had a look to the Skaarj right before I started the match.
And I saw that he shoot all his ammo (here mines) out of the weapon although no opponent was in sight.
My conclusion is that this Skaarj simply has not enough ammo if opponents will fight against them later and they get no new ammo reloaded.
User avatar
OjitroC
Godlike
Posts: 3746
Joined: Sat Sep 12, 2015 8:46 pm

Re: MonsterHunt: Coding weapon/ammo exchange

Post by OjitroC »

Aldebaran wrote:... I have swapped OLquadshot with TheMiner. Now I had a look to the Skaarj right before I started the match.
And I saw that he shoot all his ammo (here mines) out of the weapon although no opponent was in sight.
My conclusion is that this Skaarj simply has not enough ammo if opponents will fight against them later and they get no new ammo reloaded.
I think it is a problem with the Miner rather than the Skaarj - I noticed that, when playing TDM, bots would spam mines continuously; it became so annoying that I eventually stopped using the Miner.
User avatar
papercoffee
Godlike
Posts: 10507
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: MonsterHunt: Coding weapon/ammo exchange

Post by papercoffee »

OjitroC wrote:
Aldebaran wrote:... I have swapped OLquadshot with TheMiner. Now I had a look to the Skaarj right before I started the match.
And I saw that he shoot all his ammo (here mines) out of the weapon although no opponent was in sight.
My conclusion is that this Skaarj simply has not enough ammo if opponents will fight against them later and they get no new ammo reloaded.
I think it is a problem with the Miner rather than the Skaarj - I noticed that, when playing TDM, bots would spam mines continuously; it became so annoying that I eventually stopped using the Miner.
Really? I played many matches of CTF and TDM with bots and NW3 and never had this problem. They rather avoided to use the miner if they collected them.
User avatar
OjitroC
Godlike
Posts: 3746
Joined: Sat Sep 12, 2015 8:46 pm

Re: MonsterHunt: Coding weapon/ammo exchange

Post by OjitroC »

papercoffee wrote: Really? I played many matches of CTF and TDM with bots and NW3 and never had this problem. They rather avoided to use the miner if they collected them.
Yes - I've watched (and heard) bots firing mines continuously in a number of matches - but it's interesting that you haven't had this problem - not sure what the explanation is.
User avatar
papercoffee
Godlike
Posts: 10507
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: MonsterHunt: Coding weapon/ammo exchange

Post by papercoffee »

OjitroC wrote:
papercoffee wrote: Really? I played many matches of CTF and TDM with bots and NW3 and never had this problem. They rather avoided to use the miner if they collected them.
Yes - I've watched (and heard) bots firing mines continuously in a number of matches - but it's interesting that you haven't had this problem - not sure what the explanation is.
I'll try to reproduce it.
I know that bots tend to shoot with the Miner like any regular weapon ...but never did I hear or see it shooting the mines without an enemy in sight. :noidea
User avatar
Feralidragon
Godlike
Posts: 5498
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: MonsterHunt: Coding weapon/ammo exchange

Post by Feralidragon »

:mrgreen:

Most are probably not aware of this, but there's a fair amount of AI code which does not reside in the bots, but in the weapons themselves.
For example, the standard UT Pulse Gun is the one which has the necessary AI code to "teach" a bot how to use and sustain the beam. By default a bot doesn't know how to handle a Pulse Gun.

In the same fashion, any weapons in this pack which are not just "shoot & kill" require at least some rudimentary level of AI built into them, so the bots use them how they are supposed to.
In the case of the Miner, since it's mostly a weapon to lay explosive traps to enemies rather than to engage directly, I made it so that they would randomly shoot the weapon sometimes in order to lay down some traps, to have yourself and the other bots/players to be careful and check their step, otherwise you get caught by an explosive surprise (which is the whole point).

The Miner AI code is not exactly brilliant by any means, it's mostly a rudimentary randomization where the bots will just shoot it in random directions at random times, and it may be the case where if this is the only weapon a pawn has (bot or monster), once it runs out of ammo the bot can no longer fire it (similar to the Redeemer problem you guys mentioned before).
But on the other hand, if the map is small enough, you may get caught by their mines they just placed.
User avatar
sektor2111
Godlike
Posts: 6435
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MonsterHunt: Coding weapon/ammo exchange

Post by sektor2111 »

"All time" problem of WarHeadLauncher is that ammoamount which is 0, that's why Skaarj won't shoot it or shoots very rare, not in my mods, where that dumb thing is adjusted or... guess well... a new Skaarj root will deal with it way different... :wtf: