In spring 91, aircraft land after making an attack run

In spring 91, aircraft land after making an attack run

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
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

In spring 91, aircraft land after making an attack run

Post 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,
    },
  },
}
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: In spring 91, aircraft land after making an attack run

Post 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
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: In spring 91, aircraft land after making an attack run

Post by Forboding Angel »

Commandfire on bombers is pretty important... Not knowing which pretty much renders your results invalid.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: In spring 91, aircraft land after making an attack run

Post by FLOZi »

set max wanted speed doesn't even exist anymore
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: In spring 91, aircraft land after making an attack run

Post by Silentwings »

its a widget googlefrog wrote as a hotfix for bugs in spring 91
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: In spring 91, aircraft land after making an attack run

Post 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.)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: In spring 91, aircraft land after making an attack run

Post 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.
Image
(WHAREWHAREWAHRE)
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: In spring 91, aircraft land after making an attack run

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: In spring 91, aircraft land after making an attack run

Post 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?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: In spring 91, aircraft land after making an attack run

Post by knorke »

Forboding Angel wrote:Dropped changes the behavior just like the weapontype does.
changed:
Silentwings wrote:The tag 'dropped' has been deprecated.
It is not in WeaponDefHandler.cpp anymore therefore its fucking gone man.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: In spring 91, aircraft land after making an attack run

Post by FLOZi »

It'll only work for tdfs via the default weapondefs_post.lua or some such.

Do not rely on it!
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: In spring 91, aircraft land after making an attack run

Post 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.
Post Reply

Return to “Game Development”