Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

Krow (corcrw) has dgun labeled as FakeWeapon

Open rlcevg opened this issue 9 years ago • 8 comments

corcrw_specialtrigger marked as FakeWeapon, thus ignored by CircuitAI. But in practice corcrw_clusterbomb's reloadFrame is always 0, while corcrw_specialtrigger's is different after shooting and shows real value. Was wrong weapon marked as fake? If no then how to identify real weapon?

rlcevg avatar Mar 02 '17 22:03 rlcevg

Weapons are marked as fake with the purpose of keeping them hidden from various automatically generated manuals. If you want a weaponDefID I am not sure how you are going to get it.

GoogleFrog avatar Mar 03 '17 05:03 GoogleFrog

As i understood fake weapons used as triggers for fight/attack behaviour (like bombers - dive). But krow's fake weapon (specialtrigger) has actual reloadStatus, and krow's non fake weapon (clusterbomb) doesn't have it, that is a bug.

rlcevg avatar Mar 03 '17 10:03 rlcevg

You are inferring a purpose to the fake weapon tag that does not exist. Fake weapons can be used for absolutely anything (targeting, reload, leashing, LUS stuff etc..) and the tag/naming exists only to hide the weapon from unit guides and projectile lights. I spaced clicked on Krow and saw reasonable weapon descriptions so there is no bug in anything concerning ZK lua.

Weapons were never marked fake for the benefit of AIs because I did not know this is how AIs were parsing weapons. You're going to have to say what you want for me to fix this because it's a new interface for me.

GoogleFrog avatar Mar 03 '17 14:03 GoogleFrog

Space-click shows "correct" data only because they look the same as fake_weapon data. If i change reloadTime of clusterbomb to 5s - it shows 5s but reloads 30. And then what's the purpose of the fake_weapon custom param if not using it in special (fake) conditions? How can i determine which weapon can fire (if fake_weapon custom_param doesn't mean anything)?

I need to be able to calc DPS of a unit, determine which weapon is actual DGun to get stats of it like reloadStatus. In the past (and i think it still works for everything except krow) i could just ignore fake_weapon and process any other weapons.

rlcevg avatar Mar 03 '17 15:03 rlcevg

Well, this sucks: fake_weapon used only to filter stuff from displaying. And DGun is hardcoded to slot 3. Apparantly that's the only way to query DGun state, through hardcoded slot 3?

rlcevg avatar Mar 03 '17 15:03 rlcevg

I'm fairly sure removing the fake weapon and putting clusterbombs at slot 3 would be safe and fix the problem.

sprunk avatar Mar 03 '17 16:03 sprunk

Theoretically issue remains. As i understood GoogleFrog: fake_weapon doesn't mean anything, except that it won't be displayed in gui. Such weapon may have non-zero (or zero, see corcrw_specialtrigger) damage and shoot. So there's no way to know which slot/weapon should AI query to get its reloadStatus of casual weapons. And DGun should be queried only at slot 3 (which is fine if slot number won't be changed frequently).

But practically issue found so far only in corcrw.

Also I tried to replace specialtrigger by clusterbomb - it won't dgun at all, so i assume that hacky workaround is needed (or i'm simply a noob at lua).

rlcevg avatar Mar 03 '17 17:03 rlcevg

I'll check it out.

sprunk avatar Mar 03 '17 18:03 sprunk