rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
9 years ago
how to make Raptors not attack infantry in guard stance?(code-wise of course)
Sponsor
klingondragon
9 years ago
Because of the way the guard stance works you'd probably have to create a new stance.
It would be easy to stop them attacking infantry at all.
Look at how the air only stance works and see if you can adapt it.
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
9 years ago

Because of the way the guard stance works you'd probably have to create a new stance.
It would be easy to stop them attacking infantry at all.
Look at how the air only stance works and see if you can adapt it.

Originally Posted by: klingondragon 

can you give me a tip which file contains stances? i found that i need to look for GUARD_FLYING_UNITS_ONLY but can't find it in main "ini" container.

yet i wonder, isn't it more logical to just change behavior of weapon? like snipers don't attack vehicles for ex. or is it not possible here?
klingondragon
9 years ago
That's connected to the weapon. If you wanted to make it so that raptors never attacked infantry it would be a single line you'd need to change. Having it connected to guard would take more doing.
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
9 years ago
well yeah, i'm more about Guard. 'cause i hate it when Raptors put on guard spend missiles on infantry(even seldom killing some) and then have no ammo for vehicles coming.
so creating another guard stance could be very useful.
klingondragon
9 years ago
Having looked through almost all of the in I files I could find, I couldn't find anything that would allow you to create a new type of guarding.
The commands for the command buttons have the type of GUARD and GUARD_FLYING_UNITS_ONLY. I don't think you can do it without some major editing.
Zatsupachi
9 years ago
What I usually do is that all aircraft have a standard machinegun. And have them to prefer using the machinegun.

I have not tested this, but how 'bout make a dummy weapon that the jets will use on infantry that does 0 damage using PreferredAgainst.

This way you'll have to force fire(?) them to attack infantry.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
klingondragon
9 years ago
But the jets would still use the normal one too.
Zatsupachi
9 years ago
I just tested it now.
It doesn't auto attack infantry with its PRIMARY weapon.
So long as you set the appropriate PreferredAgainsts for each weapon.

Though. I have to clarify this weapon doesn't exactly deal 0 damage. Something 0.00001 or something negligible.

Also I was right when you have force fire/attack ground when to make it use its PRIMARY weapon to hit infantry. Otherwise it uses the dummy weapon.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
klingondragon
9 years ago
Which isn't ideal. You might as well just make it such that the weapon can't hit infantry and just leave it at that.
Zatsupachi
9 years ago
What makes it not ideal? It's called a workaround.
The guy wanted it so that it doesn't waste its actual payload on infantry.

Not every solution has to be clean.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
klingondragon
9 years ago
They should be clean. I could make an entire faction for the game in about half an hour but it wouldn't be very playable. To actually get something working (especially if other people are going to use it) takes time and should work without affecting playability. Your method works but you could get the same effect with less coding. For better playability this could take a bit more doing.
Gameanater
9 years ago

yet i wonder, isn't it more logical to just change behavior of weapon? like snipers don't attack vehicles for ex. or is it not possible here?

Originally Posted by: rey 



The fact that snipers can't attack vehicles is because their weapon deals "SNIPER" DamageType and vehicle armor takes 0% damage from SNIPER damage, making it completely immune and making the sniper realize it can't hurt the vehicle, so he doesn't even try.


Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
9 years ago

I just tested it now.
It doesn't auto attack infantry with its PRIMARY weapon.
So long as you set the appropriate PreferredAgainsts for each weapon.

Though. I have to clarify this weapon doesn't exactly deal 0 damage. Something 0.00001 or something negligible.

Also I was right when you have force fire/attack ground when to make it use its PRIMARY weapon to hit infantry. Otherwise it uses the dummy weapon.

Originally Posted by: Zatsupachi 

am i right to understand that i should just copy some say Comanche machine-gun, make it deal 0.00001 damage and add it Raptor as non-Primary weapon, with PreferredAgainsts = INFANTRY ? yet probably i need to add PreferredAgainsts = VEHICLES for Primary weapon, right? sounds good.

rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
9 years ago

Your method works but you could get the same effect with less coding. For better playability this could take a bit more doing.

Originally Posted by: KlingonDragon 

can you please share your idea?(code would be welcome)

klingondragon
9 years ago
That's the thing. I'm still trying to work it out.
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
9 years ago

The fact that snipers can't attack vehicles is because their weapon deals "SNIPER" DamageType and vehicle armor takes 0% damage from SNIPER damage, making it completely immune and making the sniper realize it can't hurt the vehicle, so he doesn't even try.

Originally Posted by: Gameanater 

so the problem is that there is no damage type that infantry is immune to, otherwise i could create a clone of Raptor's weapon with such weapon type -am i correct?
klingondragon
9 years ago
But the raptor would still fire it. It would just be useless against infantry. I think it might be a good idea to take the dummy weapon idea but not make it do no damage so much as give it a low rate of fire but actually make sure it will do some damage. I would probably try to use the ranger's weapon or something like that.
rey
  • rey
  • 52.5% (Neutral)
  • Major Topic Starter
9 years ago
i'm thinking about try to use dummy with subdual damage which makes no harm to infantry as i see it.