Author Topic: Anyone know if the BZII APC can engage while in hold?  (Read 3865 times)

desertdog

  • Guest
Anyone know if the BZII APC can engage while in hold?
« on: November 18, 2011, 07:05:00 AM »
I tried posting on Mates forum but the tread got locked before I really got much information. Has the APC AI process gotten modified for BZII versions later then 1.2? The problem I'm having is that my APC's won't attack enemy units when I tell it to hold. Mates, said sometihng like the APC AI process is broken or sometihng to the effect that the APC class does not work like other unit types that will engage the enemy while holding. Thanks.

Ded10c

  • Loremaster, Archivist
  • Global Moderator
  • BZ2 Fanatic
  • *
  • Posts: 1161
    • View Profile
    • Battlezone Wiki
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #1 on: November 19, 2011, 06:44:28 AM »
As Nathan explained, APCs, being assault units, will only attack things you explicitly tell them to. The pilots they have dropped off, however, will then attack nearby enemies and structures once their target is down.

starrider

  • BZ2 Fanatic
  • *
  • Posts: 67
    • View Profile
    • StarRider Studios
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #2 on: November 20, 2011, 08:29:35 AM »
I thought the assault tanks would defend if they were just sitting there.  I wonder if I gave them a direct Hold command, would they not defend then?   hmmmmm. 

desertdog

  • Guest
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #3 on: November 20, 2011, 12:58:44 PM »
Apparently, APC's can be told to attack a target and after the soldiers deploy and begin attacking when a hold command is given will begin using the secondary weapons on board of the craft. The secondary weapons are already on the stock APC. A special and 2 guns. By default they are not used by the APCProcess itself. You have to modify the odf and add a weapons mask and 2 secondary AI entries under the default AI APCProcess. I used the Sabre's default AI entries. I used the weapons mask from the Sabre Tank as well. You also have to add some ammo to the ammo entry in the odf as the default is 0 if you want to use the secondary weapons like the cannon, 2 guns, special and the mortar. I also had to add hp's to my custom APC model to include a cannon_1 and mortar_1 as the defaults are only a special and 2 guns. I posted the modified odf below and it was initially tested on Beta version 1.3.6.2. I also somewhat got it working on 1.2, but had a few freeze up's.

Someone do me a favor and kick Mates in the pants and let him know so he knows that us modders aren't as stupid as we seem to some programmers; I had my account deleted by my own request because I got tired of all the BS on his forum. Hopefully this forum will be a bit more open to some new ideas. Anyone who can create APC models should be able to test the odf out to verify my discovery. PS: Remember to also add an engageRange entry if you want to to use this function.

Who was it again that said the APC would never attack in hold mode?? I don't blame anyone really as some of this stuff just gets answered by trial I guess?


Code: [Select]
[GameObjectClass]
baseName = "ivapc"
geometryName = "ivapcbng.xsi"
classLabel = "apc"
collisionRadius = 7.0
scrapValue = 20
scrapCost = 50
customCost = 80
buildTime = 20.0
customTime = 20.0
maxHealth = 3000
addHealth = 5
maxAmmo = 3000
addAmmo = 5
unitName = "Assault APC"
aiName = "APCProcess"
aiName2 = "TankFriend"
aiName3 = "TankEnemy"

heatSignature = 10.0
imageSignature = 0.5
radarSignature = 0.0
isAssault = 1

canSnipe = 0

armorClass = L

requireCount = 2
requireName1 = "ibfact"
requireText1 = "Build Factory"
requireName2 = "ibtrain"
requireText2 = "Build Training"

boxCollide = 1

lightHard1 = "hp_light_1"
lightName1 = "spotblue2"
lightHard2 = "hp_light_2"
lightName2 =  

/////// weapons ///////////////////

weaponMask = 00011

weaponHard1 = "HP_CANNON_1"
weaponName1 = "gatstab_c"
weaponAssault1 = 0
weaponHard2 = "HP_GUN_1"
weaponName2 = "gminigun_c"
weaponAssault2 = 0
weaponHard3 = "HP_GUN_2"
weaponName3 = "gminigun_c"
weaponAssault3 = 0
weaponHard4 = "HP_MORTAR_1"
weaponName4 = "gmortar"
weaponAssault4 = 0
weaponHard5 = "HP_SPECIAL_1"
weaponName5 = "gredfld"
weaponAssault5 = 0

////////////////////////////////////

[CraftClass]
rangeScan = 500 // 200.0
periodScan = 5.0 // 0.0
velocJam = 5.0 // 0.0
engageRange = 150 // 300

braccelFactor = 0.05f;
strafeFactor = 0.1f;
steerFactor = 1.0f;
omegaFactor = 0.2f;
velFactor = 0.2f;

avoidSpeed = 20;
topSpeed = 30;

selectWaitMsg = "avapcva.wav"
selectDropoffMsg = "avapcvf.wav"
selectPickupMsg = "avapcvg.wav"
selectOtherMsg = "avapcvj.wav"

goMsg = "avapcv0.wav"
attackMsg = "avapcv9.wav"
followMsg = "avapcvh.wav"
followMeMsg = "avapcv3.wav"
repairMsg = "avapcv4.wav"
recycleMsg = "avapcv6.wav"
rescueMsg = "avapcv5.wav"
otherMsg = "avapcvh.wav"

deployedMsg = "avapcv2.wav"
diedMsg = "abetty3.wav"

[HoverCraftClass]
setAltitude = 5 // 1.5
accelDragStop = 4.0
accelDragFull = 1.0
alphaTrack = 10.0
alphaDamp = 3.0
pitchPitch = 0.5
pitchThrust = 0.1
rollStrafe = 0.1
rollSteer = 0.1

velocForward = 15.0
velocReverse = 15.0
velocStrafe = 15.0
accelThrust = 50.0
accelBrake = 50.0
omegaSpin = 2.0
omegaTurn = 1.0
alphaSteer = 5.0
accelJump = 150.0

soundThrust = "iapc02.wav"
soundSteer = "avapce5.wav"
soundDeploy = "iapc04.wav"
soundUndeploy = "avapc30.wav"

[APCClass]
soldierType = "issold"
soldierCount = 3
soldierDelay = 10.0
timeDeploy = 1.0
flightAltitude = 50 // 75.0
« Last Edit: November 21, 2011, 11:44:44 AM by desertdog »

General BlackDragon

  • Administrator
  • BZ2 Fanatic
  • *
  • Posts: 1882
  • Nu Ani Anquietas
    • View Profile
    • ZEMod Forum
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #4 on: November 20, 2011, 04:53:15 PM »
There is no such thing as aiName3. That line might as well say Bibblebobblejickeypants.

As for mixing AInames, it might be attacking due to aiName2 being TankFriend.

That's interesting to know...

Though honestly I don't know why you didn't just do the normal thing and make a tank that shoots soldiers....
« Last Edit: November 20, 2011, 04:53:55 PM by General BlackDragon »


*****General BlackDragon*****

desertdog

  • Guest
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #5 on: November 21, 2011, 06:54:46 AM »
There is no such thing as aiName3. That line might as well say Bibblebobblejickeypants.

As for mixing AInames, it might be attacking due to aiName2 being TankFriend.

That's interesting to know...

Though honestly I don't know why you didn't just do the normal thing and make a tank that shoots soldiers....

The APC is a better delivery vehicle for getting up high to deal with archers and other hard to get at targets. Basically, I end up with an agressive APC that can defend itself now. As I recall the APC given a hold command will just sit there and let it self be destroyed. The modifications I made to the stock APC still acts like an APC, but with an bad attitude. They are very agressive when enemies come within their engage range.

A tank is just that a tank. Shooting soldiers is okay, but I'd prefer to keep tanks as agressive ground pounders. The stock APC never showed me very much due to it's light armor and lack of self defensive weapons.

Now I'm wondering if the same modifications can be applied to other unit type like scavengers, service trucks, tugs and constructors? Guess I'll have to give it a try and see what happens? As I recall Mates said it could not be done with the APC class but was apparently wrong in his statement on his own forum. He pissed me off when he locked the topic and I ask him to reopen the discussion again.

Anyone know if the bomber process can do more then just drop bombs? Thanks.
« Last Edit: November 21, 2011, 08:00:04 AM by desertdog »

General BlackDragon

  • Administrator
  • BZ2 Fanatic
  • *
  • Posts: 1882
  • Nu Ani Anquietas
    • View Profile
    • ZEMod Forum
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #6 on: November 21, 2011, 10:41:39 AM »
The reason he got upset was that it seemed like you were asking for a new feature. I.E. He wasn't going to change the way they worked for you.


*****General BlackDragon*****

desertdog

  • Guest
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #7 on: November 21, 2011, 11:20:58 AM »
The reason he got upset was that it seemed like you were asking for a new feature. I.E. He wasn't going to change the way they worked for you.

The reason he gave me was that I was bumping the topic and he didn't like that. My post was asking for information on if the APC could be placed on hold and still attack passing targets. I think I pissed both him and Red Devil off when I posted a somewhat scarcastics comment about his forum not being much like the old BZU. He also complained about some double posting I think? I posted another inquiry after the first was locked and he moaned again about bumping the topic and told me to stop, so when he PM'ed me about the same stupid crap and that he was going to lock that post  I basically just cussed him out and told him to just delete my account which he did.

It looks like the APC process has pretty much remained the ssame from version 1.2 to the latest build. I'm really surprized that adding the weapon mask to the APC odf even worked, but it did and now it will attack targets when told to hold. I guess even the BZII developers themselves don't really know everything about BZII.

If I can't ask questions then his forum pretty much becomes useless to my needs and posting there becomes a waste of both Nathan's and my time. It just seemed logical to close my account there.

General BlackDragon

  • Administrator
  • BZ2 Fanatic
  • *
  • Posts: 1882
  • Nu Ani Anquietas
    • View Profile
    • ZEMod Forum
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #8 on: November 21, 2011, 04:18:48 PM »
asking a question is fine. People were harping on you because you kept asking over and over after you got a few answers.


*****General BlackDragon*****

desertdog

  • Guest
Re: Anyone know if the BZII APC can engage while in hold?
« Reply #9 on: November 22, 2011, 12:44:13 PM »
asking a question is fine. People were harping on you because you kept asking over and over after you got a few answers.

I didn't get any answers initially. It was only after I posted the sarcastic comment that any responses were posted and most were just the typical nasty negative responses to a valid question that I posted and expected some legitimate feedback on.

The answers that I did get were all that it could not be done with the APC process which turned out to be wrong. It turns out that I answered my own question and just got pissed off that my treads were getting locked before others could provide any more information. In my opinion the treads were locked for my Socratic comment rather then the reasons given by Nathan. I guess it was partially my own fault; it is his forum after all. He could probably just say that I can do whatever I want it's my forum not yours and he would be right I suppose, but like I said to him that locking a tread prematurely is pretty selfish and cheapens the forums usefulness to 3rd party modders seeking feedback from other modders.

Anyways, back on topic again the modifications work and the APC will indeed attack targets in the hold mode. I noticed it works from BZII version 1.2 and up. The enemy APC is extremely aggressive and will pursue the other teams with it's main secondary weapon; a cannon on my custom APC. It still will deploy the soldiers if given an attack order and if given a hold command will use it's secondary weapons to defend an area. I decided to give this feature to my APC's to help defend themselves as the stock ODF lacks this feature big time and were sitting ducks before making the changes. I suspect that any weapons mask can be used to give the custom APC different behaviors. Now the onborad default weapons of 2 guns and a special could actually be modified to help the units overall usefulness or if you don't want this behavior change just leave the default APC ODF alone. It's really up to the modder to decide any usefulness in this post. It is posted as FYI. PS: I posted a tutorial on Bzcommand as well.

FYI Update: I found that the human players APC can be made to attack targets automatically by placing the "TankFriend" AI entry over the "APCProcess" AI entry in the ODF file. My default the APC process won't attack enemy targets unless an attack order is given. However, the enemy APC by default will attack near by enemies automatically. So really the way around this is to use 2 APC ODF based variants. Use the APC over the Tank AI variant for the enemy and the Tank over APC variant for the human side.
« Last Edit: January 05, 2012, 10:36:59 AM by desertdog »