Zero Angel wrote:It had never occurred to me to cripple the power of human piloted hedouxes in order to fix an undesirable AI behavior.Red Devil wrote:just comment out the gun HP's
EDIT: Lowered the scorch factor by 50%
Getting an asstank to always use a given weapon
Moderators: GSH, VSMIT, Red Devil, Commando
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: Getting an asstank to always use a given weapon
life is short; no need to be snarky.
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: Getting an asstank to always use a given weapon
Doesnt seem to be so. I tried setting weaponmask to 00110 (AKA: use guns only) and then set all weapons to assault class and the Hedoux would use its main cannon still. This tells me that AssaultTankProcess ignores weaponmask altogether.Zax wrote:Then weaponmask is being overwritten and ignored by the isAssault.Zero Angel wrote:Zax is right about that, and it might cause balance issues to appear -- if not now, then sometime in the future when people get more comfortable with the Hadeans.
Back on topic. I tried weaponMask with the AI settings that RTs and Asstanks use but it still went back to its default behavior of preferring to use its secondary guns against Combat class targets.
Re: Getting an asstank to always use a given weapon
Checking the code, most (all?) of the AI processes call UnitTask::SelectWeapon(), a function that tries to find the best match of weapon combat/assault vs target combat/assault. Changing this behavior would require a code change to be in the next public beta, but doing so could lead to BZ1-style exploits of dropping the 'right' crates on enemy units to give them a bad weapon in the hardwired slot, when a better weapon is in another slot.
For reference, that SelectWeapon call is done from the following files. As UnitTask.cpp is the base class for other *Tasks, other derived classes may call it indirectly.
ArcherProcess.cpp
ArcherProcess.cpp
ArtilleryProcess.cpp
AssaultTankProcess.cpp
AttackTask.cpp
AttackTask.cpp
GechProcess.cpp
MortarBikeProcess.cpp
MortarBikeProcess.cpp
SupportProcess.cpp
TurretTankProcess.cpp
TurretTankProcess.cpp
UnitTask.cpp
UnitTask.cpp
WingmanProcess.cpp
WingmanProcess.cpp
-- GSH
For reference, that SelectWeapon call is done from the following files. As UnitTask.cpp is the base class for other *Tasks, other derived classes may call it indirectly.
ArcherProcess.cpp
ArcherProcess.cpp
ArtilleryProcess.cpp
AssaultTankProcess.cpp
AttackTask.cpp
AttackTask.cpp
GechProcess.cpp
MortarBikeProcess.cpp
MortarBikeProcess.cpp
SupportProcess.cpp
TurretTankProcess.cpp
TurretTankProcess.cpp
UnitTask.cpp
UnitTask.cpp
WingmanProcess.cpp
WingmanProcess.cpp
-- GSH
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: Getting an asstank to always use a given weapon
Well, said exploit is already possible. I've seen players drop AT-Stabs on approaching titans or TAG cannon on rocket tanks to make them more killable, but it's not big enough of a deal since most players will just shoot those powerups out of the sky or learn to keep better tabs on their idle assault units (and besides, modders who wish to disable that feature can do so via powerupAcceptMask). That said, the ideal way of controlling weapon switching would be to have it so that it is possible to specify priorities in the gfiles (ie: combatPriority = 30 / AssaultPriority = 80), and then have the AI processes read the priorities out of the weapons files and select the best weapon for the job -- but thats a lot of work that I won't ask you to do.
Anyways thanks for the info, i'll dig at the AI angle for a bit longer and then switch to some slightly less ideal plans that I have devised. If none of those work, i'll leave it as-is. Not a huge deal anyways.
Anyways thanks for the info, i'll dig at the AI angle for a bit longer and then switch to some slightly less ideal plans that I have devised. If none of those work, i'll leave it as-is. Not a huge deal anyways.
Re: Getting an asstank to always use a given weapon
Or perhaps forceWeaponMaskOverride and default to false.Zero Angel wrote:Well, said exploit is already possible. I've seen players drop AT-Stabs on approaching titans or TAG cannon on rocket tanks to make them more killable, but it's not big enough of a deal since most players will just shoot those powerups out of the sky or learn to keep better tabs on their idle assault units (and besides, modders who wish to disable that feature can do so via powerupAcceptMask). That said, the ideal way of controlling weapon switching would be to have it so that it is possible to specify priorities in the gfiles (ie: combatPriority = 30 / AssaultPriority = 80), and then have the AI processes read the priorities out of the weapons files and select the best weapon for the job -- but thats a lot of work that I won't ask you to do.
Anyways thanks for the info, i'll dig at the AI angle for a bit longer and then switch to some slightly less ideal plans that I have devised. If none of those work, i'll leave it as-is. Not a huge deal anyways.
- S.cavA.rmyG.en
- Sabre
- Posts: 296
- Joined: Fri Mar 04, 2011 3:15 am
- Location: ISDF Junk Yard
- Contact:
Re: Getting an asstank to always use a given weapon
try this
Code: Select all
isAssault = 0
aiName = "SupportProcess"
aiName2 = "SupportProcess"
weaponMask = 00001
weaponAssault1 = 1
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: Getting an asstank to always use a given weapon
As I expected, that did not accomplish what I wanted it to. It did, however make the Hedoux drive around its target while shooting (SupportProcess w/ no Attack/SubAttack entries), which I found interesting.S.cavA.rmyG.en wrote:try thisCode: Select all
isAssault = 0 aiName = "SupportProcess" aiName2 = "SupportProcess" weaponMask = 00001 weaponAssault1 = 1
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: Getting an asstank to always use a given weapon
for the love of Mike, since you're already modifying something, you might as well make AI-specific ships... 

- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: Getting an asstank to always use a given weapon
Cluttering the build menu is not something that's on my Todo list.
- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
Re: Getting an asstank to always use a given weapon
You have to be the first modder ever to have a problem with getting a unit to not use all its weapons. 
If you had rec/factory consoles you could just give it the one weapon as default, and players could add a gun if they wanted to.
Without consoles a commander has to build every weapon upgrade from the armoury, so adding a gun to a hedoux is just one more upgrade. Personally I always found this lack of consoles a be a big annoyance with the Hadeans. Trying to reintroduce the limitations 1.2 put on units seems like a daft way to go about implementing them in 1.3.

If you had rec/factory consoles you could just give it the one weapon as default, and players could add a gun if they wanted to.
Without consoles a commander has to build every weapon upgrade from the armoury, so adding a gun to a hedoux is just one more upgrade. Personally I always found this lack of consoles a be a big annoyance with the Hadeans. Trying to reintroduce the limitations 1.2 put on units seems like a daft way to go about implementing them in 1.3.
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: Getting an asstank to always use a given weapon
good idea, mts;
i may try adding consoles to them; annoys me, too.

- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: Getting an asstank to always use a given weapon
It may be something that I will experiment around with after VSR Beta 4.0 gets out the door (which is in a few hours)MrTwosheds wrote:You have to be the first modder ever to have a problem with getting a unit to not use all its weapons.
If you had rec/factory consoles you could just give it the one weapon as default, and players could add a gun if they wanted to.
Without consoles a commander has to build every weapon upgrade from the armoury, so adding a gun to a hedoux is just one more upgrade. Personally I always found this lack of consoles a be a big annoyance with the Hadeans. Trying to reintroduce the limitations 1.2 put on units seems like a daft way to go about implementing them in 1.3.
Re: Getting an asstank to always use a given weapon
I'm against it, the lack of consoles was one of the defining factors that shaped the Hadean design.
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Getting an asstank to always use a given weapon
Yeah. They controlled their weapon loadouts with their mindsAHadley wrote:I'm against it, the lack of consoles was one of the defining factors that shaped the Hadean design.

- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
Re: Getting an asstank to always use a given weapon
The fact that consoles couldn't be used, shaped the Hadean design. I am sure if they had worked in 1.2 the Fe devs would have used them.I'm against it, the lack of consoles was one of the defining factors that shaped the Hadean design.
I'm not saying the hadean design should change, consoles can only improve it and make a greater variety of strategies simpler to achieve. Having to drop power ups on every unit you wish to alter is time consuming for a commander.
I cant see any good reason why the Hadeans should not adopt this aspect of alien technology, while maintaining their traditional regimental structures. Traditionalists would be free to not use them if they wish.