Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: TrashMan on September 12, 2008, 06:46:58 am
-
I thought I post this here.
I noticed a strange behaviour from a anti-cap missile I made. Basicely, alltough it has all the flags that restrict it to be used on Big ships and against big ships, the missiles still tracks fighters.
Normally I would consider it funny when I see a salvo of huge missiles chasing down fighters and one-shot blasting a whole squadron out of the air, but if you have a ships who's main weaponry are missiles, it becomes next to useless against other capital ships if there are enemy fighters in the vicinity.
This is the weapon in question:
$Name: Fury MK V
$Model File: MissileL.pof
$Mass: 20.0
$Velocity: 175.0
$Fire Wait: 20.0
$Damage: 2500
$Blast Force: 1000.0
$Inner Radius: 50.0
$Outer Radius: 150.0
$Shockwave Speed: 80
$Armor Factor: 1.0
$Shield Factor: 1.0
$Subsystem Factor: 0.8
$Lifetime: 52.0
$Energy Consumed: 0.0
$Cargo Size: 5.0
$Homing: YES
+Type: HEAT
+Turn Time: 2.0
+View Cone: 360.0
$Swarm: 2
$Free Flight Time: 1
$LaunchSnd: 96
$ImpactSnd: 88
$FlyBySnd: -1
$Rearm Rate: 0.05
$Flags: ( "Bomb" "Huge" "Big Ship" "fire down normals" "supercap" )
$Trail:
+Start Width: 1.0
+End Width: 1.75
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 5.0
+Bitmap: MissileTrail02
$Icon: iconbelial
$Anim: belial
$Impact Explosion: exp06
$Impact Explosion Radius: 100.0
-
i think the problem is in the HEAT tracking. aspect tracking would be more usefull i think.
basically, if it has heat, the ship might be targeting another ship, but when launched, the missile converges on the closest ship to it. thats the way heat tracking works.
-
Or that the small crafts might be firing bombs?
-
But I can't use aspect for these missiles.
This type of missile isn't launched towards a ship, but rather like a submarine, in the direction of the launcher, and it then turns around and tracks it's target. As far as I know, that doesn't work with ASPECT.
I was hoping this was not a code thing. If it is, it messes up everything. Even a HEAT missile should only track targets it's designed for and not run after anything with a heat signature. After all, capital ships and fighters are VERY different targets.
-
mm... there is one flag that might help, basically that child inherits target of parent object thing. you could try that one.
-
Hm...it has no children. I dunno if Bomber+ would help.
Better wait for a Code-Wizzards input.
-
Could you try it a child bomb and have it as a sub munition of a launch tube? Like some ballistic missiles launched from subs. They have a protective outer part that falls off when they hit the surface and the primary rocket ignites.
-
I don't think that would help. The missiles don't switch target to fighters - they target fighters initially.
Unless you mean a aspect missile that has HEAT submunitions, so they would inherit it's target?
But that still wouldn't work, since the initial aspect missile wouldn't fire at a target on the other side of the ship.
-
As long as you're willing to limit targets to those within the firing turret submodel's FOV, you could use $Free Flight Time (http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Free_Flight_Time:). This would ensure that the weapon doesn't turn towards it's target until the specified time has been reached. I'm not sure if this will work with turrets, but if it does, it could allow you to use aspect seeking as the weapon's method of target tracking, possibly eliminating the effect you're experiencing.
-
Err.. didn't notice this earlier... "fire down normals" is not a weapons flag but a turret flag. And aspect seeking missiles work just fine in that role.
In fact in brief tests swarming type aspect seeker (no fooling with spawning type weapons that is) without 'fire down normals' flag worked pretty much how i expected you wanted your missile to work. Perhaps free flight time could be tad longer (and perhaps lifetime adjusted as well) and turn time a bit smaller.
-
But it has to have the "fire down normals"..the turret I mean.
I have 2 types of missile turrets on the ship:
- multi-part missile launchers that fire long-range standard aspect seekers and have to face the target to fire
- single-part missile tubes on both sides of the ship. They fire at anything within range, regardless if the turret is facing it or not; the missile turns around after a while.
I recall trying it with aspect but it didn't work. Granted, it was a while ago, a lot of things could have changed by now.
You're basicely saying I should have spect sekers with a bit longer free flight time and 360° missile tracking cone? Would they fire at a target on the other side of hte ship?
-
Missile's FOV =/= Turret's FOV.
Your single part launchers could use swarm type aspect seekers just fine. As for multi-parts... well... 'fire down normals' may not always work like you expect it to work but it might help with those (havent tried).
-
I know turret FOW and missile FOW are not the same.
I'm not sure what swarm has to do with it. The launcher fires a single missile. Multi-part missile luanchers use adifferent missile, they are not the issue.
-
Just try setting the single missile thing to '$Swarm: 1' will you?
-
You mean $Swarm:1 and ASPECT as tracking type, or just Swarm?
-
:sigh:
aspect + swarm
-
well there was a bug that allowed "huge" heat homing missiles to home in on non huge ships, this has been fixed now in the latest builds.
-
It allready had swarm set to 2.
I played the mission once but the test is inconclusive. I'll test some more.
-
Hm....ASPECT + swarm:2 .. so far the missiles didn't fire at fighters....BUT, missile tubes that weren't facing enemy ships didn't fire either. So no worky.
I'll test more.
-
K, test results are in.
The test ships was the vasudan Wepwawet missile corvette. It has single-part missisle launchers on the front and both sides.
Missile turrets are set with the "fire down normals" flag (and have a 360° FoW)
Enemy capital ship is a shivan Cain class cruiser in front and a wing of Mara fighters to the side
1st missile test settings:
ASPECT, swarm2, big ship, huge.
Missile doesn't target fighters at all.
Only forward facing missile turrets (the one facing the enemy test cruiser) fire.
2nd missile test settings:
HEAT, swarm2, big ship, huge.
Missiles fire only at capital ships, but tend to veer off after launch to attack fighters if some are present
Again, only forward facing missile tubes fire.
3rd missile test settings:
HEAT, swarm2, big ship, huge....fire down normals removed
Missiles fire only at capital ships, but tend to veer off after launch to attack fighters if some are present
this time, a few side missiles launched, but not all.
4th missile test settings:
ASPECT, swarm2, big ship, huge.
Missile doesn't target fighters at all.
Forward facing missile turrets fire, since facing fired once (and one).
Doesn't look right...no matter what I do, it doesn't look right.
the ship is supposed to fire off ALL missile turrets, no matter how it's facing the enemy.
suggestions?
-
What difficulty setting do you have the game on? I've noticed in some recent testing that on lower difficulty setting missile and beams don't fire very often. Ramp up the difficulty and they fire off. Also seems to be affected by the number of ships in the area. If I attack alone on easy only turrets will fire unless there aren't very many left. If I have a wing with me then the missiles and beams will start to fire. Granted this is in TBP and multilayer so it may have no effect on what your trying to do.
-
Where in my posts did i say 'use "fire down normals" flag' ?
In fact i stated pretty much the opposite...
-
But the missile doesn't behave like I need it to.
It need to start traveling where the launcher is pointing, and after it gets some distance from the ship, turn towards a target in range.
It shouldn't matter if the target is above, below, behind or in front of the launcher.
-
Just try it
-
I will be watching this intently, because the Sg-1 ships will need to fire some missiles VLS style straight up and then track forward curving toward the target.....
-
Basic VLS... First make single part turrets which have reasonably large fov value (past 180). Then arm them with aspect seeking missiles set to swarm mode (even if there would be just 1 missile in the 'swarm'). Make the free flight time match the flight you want to missile to fly before it turns to home on the target remembering that before homing kicks in the missile travels at 1/4th of max speed. Don't even try to use spawning missiles though.. hard coded retail hacks make sure they wont work (apart from my branch).
-
Looks to be working. :D
-
:(
I've had this feature in Fast Mod for like a year now.
-
http://www.hard-light.net/forums/index.php/topic,56420.0.html
This build should ignore small ships for heat seekers if the missile is fired without a lock and it tries to acquire something. (bug in retail)
-
Hm...code-wizzards, how about a Huge+ flag?
Basicely, it works like a Huge flag, only when there are no huge targets around, the AI might try to use it against smaller targets too :P
-
:(
I've had this feature in Fast Mod for like a year now.
Yeah.. those have been around for several years already
Hm...code-wizzards, how about a Huge+ flag?
Basicely, it works like a Huge flag, only when there are no huge targets around, the AI might try to use it against smaller targets too :P
Well... there are alternatives... in the works (though kinda on back burner due code freeze) anyway.. don't want to spoil any more..
-
Since Trashman's missile seems to be working can I ask a somewhat related question.
How exactly do bombs work in terms of taking damage? From some comments on the Wiki about the GVC Somtus I get the impression that Flak damage cannot take down bombs. Only direct fire. Which makes me think that bombs don't really have hitpoints because apparently Splash damage doesn't apply? Instead they just require a direct hit to be taken out?
Let's say for example Trashman's missile isn't just a missile, but instead it's some large ICBM type of thing. Could a person set it up such that the missile is targettable as a bomb, but requires say X amount of damage to destroy? Like is it possible to either give bomb flagged missiles hitpoints, or to require them to be hit more than once. Obviously the cyclops, and helios, are hard enough to shoot down as it is. But presuming that a missile could be much larger in size, and a much easier target, could it be made a little more durable so as to take some hits before disintegrating?
How hard would something like that be to implement or is it workable under the current system already?
-
Yes, good question. I too have some pretty big missiles :P
-
Not possible with current code.. But quite easy add (and that has been done for some special builds).
-
By direct fire do you mean like AAA beams?
Oh and Wanderer TY, I will let JC4JC know about that! :) (will be great to test once we get the Daedalus in game...)
-
Not possible with current code.. But quite easy add (and that has been done for some special builds).
Good to now.
I guess you did it with a $Missile Hitpoints: line in the weapons.tbl?
Can we expect it in the future then?
-
Hmm.. they should take damage from the flak too... however flak doesn't really do that much damage especially as the target is so small and the shot deviation so large. In any case bombs have 50 hitpoints by default so they are quite durable already. Also there is the thing that bombs are immune to all weapons fire for the first 1.5s after they are fired.
-
:(
I've had this feature in Fast Mod for like a year now.
Yeah.. those have been around for several years already
Which is why I took the effort to put in more features than just an increase in speed. Several new ship types, balancing the main campaign for the mod, new weapons... I'm quite sure that anyone who has played both velocity mod and fast mod can testify to their differences.
-
Hmm.. they should take damage from the flak too... however flak doesn't really do that much damage especially as the target is so small and the shot deviation so large. In any case bombs have 50 hitpoints by default so they are quite durable already. Also there is the thing that bombs are immune to all weapons fire for the first 1.5s after they are fired.
Yeah I thought they may have some set hitpoints.
50 hitpoints is quite a bit but if the bomb was say, about half the size of a fighter it might need a few more depending upon the object's speed and general flight time.
-
Ya..I got one that's bigger than a perseus.
-
Watch this trailer for X3:
http://www.youtube.com/watch?v=6IXffiOex24&feature=related (http://www.youtube.com/watch?v=6IXffiOex24&feature=related)
If people can get that missile barrage that starts at 0:32 that'd be freaking awesome. Because dayaamn, that looks sweet. That whole game looks pretty nice honestly.
-
Hmm.. they should take damage from the flak too... however flak doesn't really do that much damage especially as the target is so small and the shot deviation so large. In any case bombs have 50 hitpoints by default so they are quite durable already. Also there is the thing that bombs are immune to all weapons fire for the first 1.5s after they are fired.
Yeah I thought they may have some set hitpoints.
50 hitpoints is quite a bit but if the bomb was say, about half the size of a fighter it might need a few more depending upon the object's speed and general flight time.
I could have sworn someone cited a code reference saying that they were just a point that if a shot came within a certain distance of it, they blew up. Are you guys sure? I mean, I've destroyed plenty of them with two bolts from a subach (two bolts, not two shots with gun banks firing 2 shots each. One shot on a bank with two fire points.)
-
I think thesizzler's right.
-
Pretty sure they work the way i described...
if (wipA->wi_flags & WIF_BOMB) {
if (wipB->wi_flags & WIF_BOMB) { // Two bombs collide, detonate both.
Weapons[A->instance].lifeleft = 0.01f;
Weapons[B->instance].lifeleft = 0.01f;
Weapons[A->instance].weapon_flags |= WF_DESTROYED_BY_WEAPON;
Weapons[B->instance].weapon_flags |= WF_DESTROYED_BY_WEAPON;
} else {
A->hull_strength -= wipB->damage;
if (A->hull_strength < 0.0f) {
Weapons[A->instance].lifeleft = 0.01f;
Weapons[A->instance].weapon_flags |= WF_DESTROYED_BY_WEAPON;
}
}
} else if (wipB->wi_flags & WIF_BOMB) {
B->hull_strength -= wipA->damage;
if (B->hull_strength < 0.0f) {
Weapons[B->instance].lifeleft = 0.01f;
Weapons[B->instance].weapon_flags |= WF_DESTROYED_BY_WEAPON;
}
}
-
Pretty sure they work the way i described...
if (wipA->wi_flags & WIF_BOMB) {
if (wipB->wi_flags & WIF_BOMB) { // Two bombs collide, detonate both.
Weapons[A->instance].lifeleft = 0.01f;
Weapons[B->instance].lifeleft = 0.01f;
Weapons[A->instance].weapon_flags |= WF_DESTROYED_BY_WEAPON;
Weapons[B->instance].weapon_flags |= WF_DESTROYED_BY_WEAPON;
} else {
A->hull_strength -= wipB->damage;
if (A->hull_strength < 0.0f) {
Weapons[A->instance].lifeleft = 0.01f;
Weapons[A->instance].weapon_flags |= WF_DESTROYED_BY_WEAPON;
}
}
} else if (wipB->wi_flags & WIF_BOMB) {
B->hull_strength -= wipA->damage;
if (B->hull_strength < 0.0f) {
Weapons[B->instance].lifeleft = 0.01f;
Weapons[B->instance].weapon_flags |= WF_DESTROYED_BY_WEAPON;
}
}
Not too sure what that stuff means, but you're a coder and I'm not, so I'll take your word for it. :D
-
Not too sure what that stuff means, but you're a coder and I'm not, so I'll take your word for it. :D
I think the relevant part is:
if (A->hull_strength < 0.0f) {
Measuring I presume if Hull strength is below zero. Meaning that, if it wasn't based on hull strength then it wouldn't have a value like that or you wouldn't be able to measure it.
-
Well... translated from the code it pretty much says that if two bombs collide.. both will detonate automatically. However if a bomb and another weapon collide then the other weapon's unmodified damage value is subtracted from the bomb's hitpoints. If the said hitpoints are as a result of the previous calculation reduced below 0 then the bomb detonates.
-
I see the bombs hitpoints are not directly refererenced. They are stored in a variable somewhere...interesting.
-
Ummh... Why?