Page 1 of 2
In spring 91, aircraft land after making an attack run
Posted: 15 Oct 2012, 00:58
by Forboding Angel
As in they fire their weapon, then immediately land.
(Yes I have implemented the i_hate_cmd_set_wanted_max_speed.lua gadget from zk)
Unitname in Evo is ebomber. Notice that the weapon is
NOT dropped=true,
Code: Select all
local weaponDefs = {
SBOMB = {
badTargetCategory = [[ARMORED LIGHT]],
AreaOfEffect = 250,
avoidFriendly = false,
ballistic = true,
burst = 10,
burstrate = 0.1,
cegTag = "lightbomb",
collideFriendly = false,
cylinderTargeting = true,
Commandfire = true,
explosionGenerator = "custom:dodaibomb",
energypershot = 1.25,
id = 5,
impulsefactor = 0,
interceptedByShieldType = 4,
name = "Bombs",
noSelfDamage = true,
range = 300,
reloadtime = 8,
weaponType = "Cannon",
sprayangle = 2000,
soundHit = "bombhit.wav",
soundStart = "18393_inferno_reject.wav",
startVelocity = 50,
turret = true,
tolerance = 1000,
weaponVelocity = 200,
customparams = {
damagetype = "bomber",
},
damage = {
default = 37.5,
},
},
}
Re: In spring 91, aircraft land after making an attack run
Posted: 15 Oct 2012, 19:27
by knorke
i c&ped the ebomber unitdef (changed model etc) and it worked normal.
dont remember if that was after changing Commandfire = true, to = false.
only time it landed was when an attack one-shotted a target and no new new target was around. For that there is land/fly toggle.
Otherwise it did attackruns until target was dead.
(Yes I have implemented the i_hate_cmd_set_wanted_max_speed.lua gadget from zk)
i havent
Re: In spring 91, aircraft land after making an attack run
Posted: 15 Oct 2012, 21:02
by Forboding Angel
Commandfire on bombers is pretty important... Not knowing which pretty much renders your results invalid.
Re: In spring 91, aircraft land after making an attack run
Posted: 15 Oct 2012, 21:56
by Silentwings
Some combination of commandfire and other things causes problems with the armcybr (liche) in BA at the moment, although that's a missilelauncher.
If anyone wants a long description of the issues with liche and what seems to work/doesn't work, I can give. But afaik corgripn (emp bomber) works fine and has commandfire=true.
Most bombers (in fact, all others, iirc) use commandfire=false.
Re: In spring 91, aircraft land after making an attack run
Posted: 15 Oct 2012, 22:38
by FLOZi
set max wanted speed doesn't even exist anymore
Re: In spring 91, aircraft land after making an attack run
Posted: 15 Oct 2012, 23:05
by Silentwings
its a widget googlefrog wrote as a hotfix for bugs in spring 91
Re: In spring 91, aircraft land after making an attack run
Posted: 15 Oct 2012, 23:39
by Forboding Angel
Silentwings wrote:
Most bombers (in fact, all others, iirc) use commandfire=false.
Well that's not good. That means that bombers, if given a move order will randomly drop their load on anything they come across. Even if they are on their way to a target, meaning that they might reach the target which is guarded by lots of AA and they are still reloading.
Rogue bombers isn't fun.
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 00:13
by Silentwings
Well that's not good. That means that bombers, if given a move order will randomly drop their load on anything they come across.
No, it doesn't - and they don't.
Commandfire (when behaving correctly) affects the number of times a unit fires when aimed at the ground. It's not an on/off switch for automatic targetting. Iirc, you might be thinking of manualbombsettings.
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 00:58
by Forboding Angel
Forboding Angel wrote:Notice that the weapon is NOT dropped=true,
Command fire signifies that the unit must be told to attack either a target or a location.
Commandfire is why nukes don't randomly shoot at the first radar dot they see.
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 02:55
by Forboding Angel
It occurred to me that i can achieve the same results by removing commandfire and setting the default firestate on these units to hold fire.
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 07:34
by yuritch
That's what we use for bombers in S44 (and I thought that was a known solution to random bombing problem, we have it implemented for a few years already). Hold Fire as default works good and ensures they only bomb what they are told to.
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 07:43
by Forboding Angel
I also noticed that some new tags have been added semi recently that pretty much make commandfire obsolete, which is interesting. However, the combination of 3 separate tags to control it give really granular control over it, so I'm not complaining.
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 10:49
by Silentwings
Command fire signifies that the unit must be told to attack either a target or a location. Commandfire is why nukes don't randomly shoot at the first radar dot they see.
Not according to the wiki (
http://springrts.com/wiki/Weapon_Variables):
CommandFire: When ordered to attack ground this weapon will only fire once, rather than continuously. This does not work when ordered to attack units (It will continue to fire until the target is dead). If the unit has CanDgun=1...
The tag 'dropped' has been deprecated. (It's implied by weapontype=aircraftbomb, which iirc is used by all BA bombers with commandfire=false. It will be removed from BA weapondefs in due course.)
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 13:14
by Forboding Angel
Dropped is the same thing as aircraftbomb
Since a long time ago, commandfire (it wasn't always called that, there was another tag before that did the same thing) has been used for this purpose. It's an old TAism that stuck around. Obviously, as I have pointed out previously, it can now be achieved through better means by controlling the default firestate.
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 19:26
by knorke
Dropped is the same thing as aircraftbomb
dropped = true/false does nothing. (as Silentwings said)
Forboding Angel wrote:I also noticed that some new tags have been added semi recently that pretty much make commandfire obsolete, which is interesting.
(WHAREWHAREWAHRE)
Re: In spring 91, aircraft land after making an attack run
Posted: 16 Oct 2012, 20:31
by Silentwings
You won't get exactly the same result from removing commandfire and using hold fire, because commandfire affects the number of times the weapon attacks a point set on the ground, whereas hold fire doesn't affect this. But you might still achieve what you want.
Re: In spring 91, aircraft land after making an attack run
Posted: 17 Oct 2012, 01:08
by Forboding Angel
knorke wrote:stuff
Dropped changes the behavior just like the weapontype does.
New doesn't always mean "new", Knorke.
If a fat chick falls in the forest, do the trees laugh?
If I add a feature but don't document it, does it really exist?
Re: In spring 91, aircraft land after making an attack run
Posted: 17 Oct 2012, 01:30
by knorke
Forboding Angel wrote:Dropped changes the behavior just like the weapontype does.
change
d:
Silentwings wrote:The tag 'dropped' has been deprecated.
It is not in WeaponDefHandler.cpp anymore therefore its fucking gone man.
Re: In spring 91, aircraft land after making an attack run
Posted: 17 Oct 2012, 19:09
by FLOZi
It'll only work for tdfs via the default weapondefs_post.lua or some such.
Do not rely on it!
Re: In spring 91, aircraft land after making an attack run
Posted: 17 Oct 2012, 19:58
by KDR_11k
Commandfire drops the fire command as soon as the first shot is fired, IIRC I've even seen units autotarget something else for the following shots of their burst and I believe commandfire does not prevent the unit from autotargeting (it's some relation between the unit's target and the weapon's). Stockpile + commandfire was a special behavior IIRC.
Dropped was the trigger for using the aircraftbomb type if you use the type autodetection.
I've been out of it for years now so I have no idea what the current situation is.