Jump to content


Photo

orca weapon problems


  • Please log in to reply
12 replies to this topic

#1 Stygs

Stygs
  • Members
  • 99 posts

Posted 09 September 2007 - 11:21 PM

Hi.

I am searching for a way to force a unit to use a specific weapon againt a target.

To give an example:

I gave the Orca a gatling gun for killing infantry and light amored targets (a bit like the CCG Comanche). It looks really great, but it works really terible, too :/

When I use force fire to shoot at the ground, the gattling gun works fine - but whenever I try to attack an enemy unit, the orca uses its missiles (for infantry, tanks, buildings and so on).

How can I change this? I want him to use his gatling against infantry and his missiles agains everthing else.
I know there was something like PrefferedAgainst in Generals and its also mentioned in WeaponSet.xsd, but I cant get it to work :/



And a second question: is it possible to hide a mesh after firing? I made all orca missiles seperate objects, but I cant find a way to hide them after firing.
ProjectileBoneFeedbackEnabledSlots still works in TW (was used to hide the tomahawk back in Generals), but it only defines the weapon, not the actual mesh I want to hide :/

Edited by Chriz, 09 September 2007 - 11:24 PM.


#2 Helge129

Helge129

    title available

  • Project Team
  • 259 posts

Posted 10 September 2007 - 03:23 AM

Maybe you could look at the GDI Mammoth Tank, it's cannons cans engage aircraft.

fhvfBYy.jpg


#3 CodeCat

CodeCat

    Half fox, half cat, and all insanity!

  • Members
  • 3,768 posts
  •  Fighting for equality of all species

Posted 10 September 2007 - 09:52 AM

You could use WeaponChoiceCriteria="PREFER_MOST_DAMAGE" on the weaponset hardpoint. That way, it'll always try to use the weapon that does the most damage. So as long as the gattling does more damage to infantry, it should work. And if not, try using the new object filter logic to stop the rocket weapon from damaging infantry, and the gattling from damaging anything else.
CodeCat

Posted Image
Posted Image

#4 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 10 September 2007 - 10:27 AM

Seems stupid to me that they disabled the old OnlyAgainst/PreferredAgainst logic. Or I'm just too stupid to use it... it is somewhere in the schema files but seems linked to a type of weapon logic which isn't used. Maybe we'll figure out a way to use it though.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#5 Daz

Daz

    title available

  • Hosted
  • 2,654 posts
  •  Revora Co-Founder

Posted 10 September 2007 - 10:35 AM

Try AntiMask="ANTI_INFANTRY" on the weapon and warhead for the gattling gun and AntiMask="ANTI_VEHICLE"
Or try "ANTI_GROUND_VEHICLE" and "ANTI_GROUND_INFANTRY" if the above doesn't work.

There's no existing examples of it but it may work.
You can have "ANTI_STRUCTURE", "ANTI_AIRBORNE_INFANTRY" and "ANTI_AIRBORNE_VEHICLE" so it's worth a shot.

#6 CodeCat

CodeCat

    Half fox, half cat, and all insanity!

  • Members
  • 3,768 posts
  •  Fighting for equality of all species

Posted 10 September 2007 - 10:47 AM

These are the only possibilities, no others are allowed:

ANTI_AIRBORNE_VEHICLE
ANTI_GROUND
ANTI_PROJECTILE
ANTI_SMALL_MISSILE
ANTI_MINE
ANTI_AIRBORNE_INFANTRY
ANTI_BALLISTIC_MISSILE
ANTI_PARACHUTE
ANTI_STRUCTURE
ANTI_AIRBORNE_MONSTER
CodeCat

Posted Image
Posted Image

#7 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 10 September 2007 - 10:47 AM

Good idea, but according to the schema files only these types exist:

ANTI_AIRBORNE_VEHICLE
ANTI_GROUND
ANTI_PROJECTILE
ANTI_SMALL_MISSILE
ANTI_MINE
ANTI_AIRBORNE_INFANTRY
ANTI_BALLISTIC_MISSILE
ANTI_PARACHUTE
ANTI_STRUCTURE
ANTI_AIRBORNE_MONSTER

EDIT: CodeCat beat me

Edited by Dark Lord of the Sith, 10 September 2007 - 10:49 AM.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#8 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 10 September 2007 - 11:16 AM

Okay, I did some further research on what I said above. All of the following is purely hypothetical, nothing has been tested so far, but it should work according to the XML schema files.

There are two possible ways of setting weapons:
One is the WeaponSetUpdate, which is currently used by all of EALA's units. This module is nested in the Behaviors-element and is defined in Schemas\xsd\Modules\WeaponSetUpdate.xsd. it does not correspond to the "old" way of setting weapons, this is an update module.

The other, by default unused, method is the WeaponSet, ported from the old Generals/BFME INI logic and is similar in use to the ArmorSet for example. It is not placed in the Behaviors-element but directly in GameObject. This one would theoretically also support the old PreferredAgainst/OnlyAgainst arguments, but I'm not sure if it still works decently and if those two types can be mixed. I'll try it out as soon as I have time for it though. This module is defined in Schemas\xsd\GameObject\WeaponSet.xsd if anyone's interested.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#9 Stygs

Stygs
  • Members
  • 99 posts

Posted 10 September 2007 - 01:10 PM

You could use WeaponChoiceCriteria="PREFER_MOST_DAMAGE" on the weaponset hardpoint. That way, it'll always try to use the weapon that does the most damage.


I think it works quite different: WeaponChoiceCriteria says that the unit targets the enemy which does the most damage. That would be more logical as units use their most effective weapon by default. :p
It would also explain why sniper have that setting even they have only one weapon....

The problem is, that the orca missiles basicly 1-hit kills every infantry and does a lot of splash damage, so it will allwaby be better vs infantry than the gatling gun...

@ Dark Lord of the Sith
The Problem is that WeaponSet only contains weapon data while WeaponSetUpdate also allows to define turrets. Since I use a turret for my gattling (to make it pitch up and down), WeaponSet its kinda useles :/

Maybe i should use the good old overlord way and make te gattling a seperate unit which is contained by the orca....

that or really lowering the rocket damage vs infantry...

#10 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 10 September 2007 - 01:46 PM

Nope, CodeCat is right, it means choosing the weapon with the most damage. The Possibilities are:
PREFER_MOST_DAMAGE
PREFER_LONGEST_RANGE
PREFER_GRAB_OVER_DAMAGE
PREFER_LEAST_MOVEMENT
SELECT_AT_RANDOM
USE_WEAPONSET_DEFAULT_CRITERIA

That doesn't really solve your problem if you don't want to exclude infantry from your missiles though. Using a contained weapon might be quite a good idea in that case.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#11 Stygs

Stygs
  • Members
  • 99 posts

Posted 10 September 2007 - 02:17 PM

hmm, next try:

I added

<DamageScalarDetails Scalar= "0%">
<Filter
Rule="NONE"
Include="INFANTRY" />

to GDIOrcaMissileWarhead .... they fire the same way as before, but now they dont kill anyone >_<
And DamageScalarDetails requires a DamageNugget, so I cant give it to GDIOrcaRocketWeapon without making it do some damage ...

guess i have to settle for a contained gattling :p

#12 user_unknown

user_unknown

    Federation Supreme Commander

  • Hosted
  • 404 posts
  • Location:London
  • Projects:Event Horizon

Posted 15 September 2007 - 03:00 PM

Prefer_most_damage doesn't seem to work very well with projectile objects with type filters. I made an EMP grenade that both disables and damages vehicles and structures (using the same ALL except INFANTRY TIBERIUM etc. code used in the EMP control centre), but my soldiers still try to use it against infantry, even though it does nothing to them (except a bit of suppression) :/

#13 Stygs

Stygs
  • Members
  • 99 posts

Posted 23 September 2007 - 02:03 PM

UPDATE:

Finally, it works: My orca attacks everything with its gattling and everything cept infantry with missiles.

Thanx to Golan, who told me the solution:

I needed a SpecialObjectFilter for both, the weapon and the actual warhead and for every DamageNugget and every SuppressionNugget in both parts.

Now it works like it should: the orca tears every infantry with gatling shells apart while everything else will be killed with missiles and gatling.

only 2 problems left:

1. missiles wont damage infantry if the accidantly hit them
2. orca will allways try to fly back to reload if he has no missiles left, even if his target is infantry

the first one can easily be solved with a deathweapon for the missiles, nut the second one may be a bit harder ^^




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users