Onlytargetcategory being ignored - Page 3

Onlytargetcategory being ignored

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Onlytargetcategory being ignored

Post by FLOZi »

but it had the same effect before canAttackGround existed
:lol: 5 years later and people still hadn't noticed I split those tags, it seems. (And quite frankly though I suspected I removed it from toairweapon when i created canAttackGround I wasn't 100% sure myself)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

that's cause the rest of us were doing it correctly and using the tag outside of *A
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Onlytargetcategory being ignored

Post by CarRepairer »

Sorry, I must have gotten that misconception from somewhere when I first started modding, as well as Forb.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

No carp, you didn't. It's because only target category does not block fps control and shooting the weapon at enemy ground units.

Without toairweapon:

Image

Image

Image

Image

Also, smoth, I use VTOL for aircraft category. There is nothing wrong with that. VTOL stands for "vertical take-off and landing", that is what aircraft in spring are.

toairweapon makes fps firing not work at all. This is why everyone used it. Because we had people like googlefrog testing out games and being a dickhead and fpsing rapid fire aa guns and using them to lolpwn everything.

Which actually was very useful testing. I found far more exploits when google frog was playing than at any other time.
Last edited by Forboding Angel on 09 Feb 2012, 10:15, edited 2 times in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

Image

This is what happens when toairweapon is enabled.

NO TARGETING RETICLE
NOTICE WEAPON IS CONTINUALLY "AIMING"


Geeee.


*************

Tired of this shit. The negative sun bug affected mainly ati users. I never had a problem with it. Allow me to dig up a thread where the problem was reported and no one could figure it out (until maelstrom clued me in that negative sun values caused people to crash randomly).

Goddamnit. Can't find the pathways map thread. It was like my second thread I ever made on this board. Was from 2005 iirc.

Here are some related links:
http://springrts.com/phpbb/viewtopic.php?f=13&t=5080
http://springrts.com/phpbb/viewtopic.ph ... elta+siege

It was a very real and big bug at one point in time. Kloot, how long have you been here? How long have any of the current devs been here (Just tobi iirc)? Any from the 2005/2006 era? JC was aware of the bug's existence, however, it was pretty well known that it happened without rhyme or reason and according to the code it should not have happened at all.

Many many theories as to the reason. My own were ATI + drivers.

However, it doesn't happen anymore, so lets all be happy and rejoice.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Onlytargetcategory being ignored

Post by Kloot »

FA: key phrase "whether in FPS mode or not".
It's because onlytargetcategory does not block fps control
Yes, it does*. But definitely don't take my word for it, set toAirWeapon = false and onlyTargetCategory = "VTOL" (or any other valid category string) and find out for yourself that this produces exactly the same situation as http://www.imagebam.com/image/951c39173852516.

* preceding statement invalid for Spring versions >= 86.0

======

Regarding the rest, I've been here long enough to know that neither jc nor tobi were ever convinced the sundir reports showed anything more than a weak correlation with one of the zillions of actual confirmed crash-bugs that existed at the time. Just for fun though, supposing there really was a causal in-engine relation between negative lighting directions and people crashing (and not some obscure driver problem which would make it impossible to track down unless you have a surviving PC/OS configuration from that era), here's what to do if you _really_ care and want to prove them wrong ex post facto:

1) get the most recent release of Spring for which you think these crashes were still happening (http://springrts.com/dl/ has all builds between 0.40 and 0.72) and distribute it with debug symbols
2) grab one of the old maps that crashed and make an exact copy of it with ONLY its name changed and all minus-signs removed from its sundir
3) ask volunteers to test both map versions with (1) in a grand community experiment and see who crashes when
4) laugh in my face if the same set of people crash consistently on the original map but not the copy and their stacktraces conclusively point to any code at all involving the original's sundir 8)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

Onlytargetcategory vtol was set in ALL of the above screenshots.

The only thing that changed was me commenting out toairweapon for the first set of shots (and commenting out "unbind c" in engine_hotfixes.lua gadget )

For those of you who insist that blocking fps shooting was not the intent of toairweapon, how do you KNOW?

All anyone has done is a grep of the source. Greps do not always tell you the whole story.

Do you " [b]know[/b] " are are you " [b]assuming[/b] " based upon the code you have seen?
Last edited by Forboding Angel on 09 Feb 2012, 19:45, edited 3 times in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

http://evolutionrts.googlecode.com/svn/ ... turret.lua
-- UNITDEF -- EAATURRET --
--------------------------------------------------------------------------------

local unitName = "eaaturret"

--------------------------------------------------------------------------------

local unitDef = {

buildCostEnergy = 0,
buildCostMetal = 20,
builder = false,
buildTime = 7,
canAttack = true,
canstop = "1",
category = "NOTAIR",
corpse = "ammobox",
description = [[Dedicated Anti-Air Flak Turret - Damagetype: Explosive :: Armortype: Armored Building

Requires +2 Power]],
energyStorage = 0,
energyUse = 0,
explodeAs = "MEDIUM_BUILDING",
footprintX = 5,
footprintZ = 5,
icontype = "defense",
idleAutoHeal = .5,
idleTime = 2200,
maxDamage = 400,
maxSlope = 60,
maxWaterDepth = 0,
metalStorage = 0,
name = "Copperhe(a)d",
noAutoFire = false,
objectName = "eaaturret2.s3o",
radarDistance = 0,
selfDestructAs = "MEDIUM_BUILDING",
sightDistance = 500,
smoothAnim = true,
unitname = "eaaturret",
yardMap = "ooooo ooooo ooooo ooooo ooooo",
sfxtypes = {
pieceExplosionGenerators = {
"deathceg0",
"deathceg1",
},

explosiongenerators = {
"custom:gdmcannon",
"custom:needspower",
},
},
sounds = {
underattack = "unitsunderattack1",
select = {
"turretselect",
},
},
weapons = {
[1] = {
def = "antiairgunflak",
onlytargetcategory = "VTOL",
},
},
customParams = {
needed_cover = 1,
death_sounds = "generic",
twokhotkey = 'a',
RequireTech = "2 Power",
armortype = "armoredbuilding",
normaltex = "unittextures/lego2skin_explorernormal.png",
helptext = [[Anti-Aircraft Turret

Dedicated Anti-Air Flak Turret

Damagetype: Explosive

Armortype: Armored Building

+500 Line of Sight

+1500 Range

Requires:

+2 Power]],
},
buildingGroundDecalDecaySpeed=30,
buildingGroundDecalSizeX=8,
buildingGroundDecalSizeY=8,
useBuildingGroundDecal = true,
buildingGroundDecalType=[[eaaturret_aoplane.dds]],
}


--------------------------------------------------------------------------------

local weaponDefs = {
antiairgunflak = {
accuracy = 1,
areaOfEffect = 200,
avoidFriendly = false,
avoidFeature = false,
ballistic = true,
collideFriendly = false,
collideFeature = false,
CylinderTargetting = true,
burnblow = true,
endsmoke = "1",
energypershot = 0,
explosionGenerator = "custom:xamelImpact",
energypershot = 7.5,
fireStarter = 80,
id = 1,
impulseFactor = 3,
interceptedByShieldType = 4,
name = "AA Cannon",
pitchtolerance = "500",
range = 1500,
reloadtime = 0.5,
renderType = 4,
soundHit = "explode2",
soundStart = "flakgun_shoot.wav",
startsmoke = "1",
tolerance = 500,
turret = true,
toairweapon = true,
canAttackGround = false,
weaponVelocity = 5000,
customparams = {
damagetype = "explosive",
},
damage = {
default = 75,
},
},
}
unitDef.weaponDefs = weaponDefs


--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
Senna
Posts: 315
Joined: 17 Mar 2009, 00:20

Re: Onlytargetcategory being ignored

Post by Senna »

Forb, AA guns should make default damage 0, and set damage to air units by armor class, then fpsing the aa it would be useless because the gun will do 0 damage to everything thats not on AA armor class like airplanes.

Is one thing i fixed in old Tech Anni, stat flaks sometimes were cover by hlt or doomsday because they tall, when enemy air were close sometimes flak aa hitting buildings and doing the damage vs them as default damage was 1200. so does 1200 damage vs everything and i set that to 0 damage and fixed it
Senna
Posts: 315
Joined: 17 Mar 2009, 00:20

Re: Onlytargetcategory being ignored

Post by Senna »

Armor class is really important and should be well used thats why it exist for things like this
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Onlytargetcategory being ignored

Post by smoth »

not all of the games do armor classes.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

Senna wrote:Armor class is really important and should be well used thats why it exist for things like this
Senna, spring's armor class system is lol. I use smoth's uber lua based armor system of awesomeness.

Also, fuck that, I shouldn't have to. It's a bug, and it needs to get fixed.

Though I have fixed it via gadget anyway, but still, the point remains.
Senna
Posts: 315
Joined: 17 Mar 2009, 00:20

Re: Onlytargetcategory being ignored

Post by Senna »

Forboding Angel wrote:
Senna wrote:Armor class is really important and should be well used thats why it exist for things like this
Senna, spring's armor class system is lol. I use smoth's uber lua based armor system of awesomeness.

Also, fuck that, I shouldn't have to. It's a bug, and it needs to get fixed.

Though I have fixed it via gadget anyway, but still, the point remains.

spring armor can be crappy but it does the work, is that what its important, and whats the bug with the armor class? doesnt show the real damage on units stats widget?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Onlytargetcategory being ignored

Post by Forboding Angel »

Senna, if you want to talk about armor systems and classes, start a new topic.
Post Reply

Return to “Game Development”