3D modeling question / Making missiles harder to hit

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

3D modeling question / Making missiles harder to hit

Post by Gazz »

Hi, I'm Gazz and I'm a noob.

I'm just trying to look at the entirety of a single X3 model and apparently, I'm failing.

Models / scenes are all unpacked into .BOD files so they are readable.
Textures are still DDS but atm I only care about what is there, not which colour it has.

GMAX 1.2 and
DBOX2_1.13 are installed.
DBOX2_1.8_patch_1 will not patch the (only available) v1.13 so it can only be some kind of in-joke.

So I can load scenes and single .BOD files.
Sounds about right.

irR4tiOn4L claims in this post that the missile scenes have
"a very large box there which could be the collision box".

When I open either missile scene or model, I see no box.

Can anyone tell me what I need to do to see the Box of Boxness?
Obviously, I tried importing with and without limiting to "highest LOD only". That's not it.
Last edited by Gazz on Tue, 24. May 11, 18:30, edited 1 time in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

Hi Gazz, are you talking about being able to see the missile's collision box in Gmax? If so it does not appear as a graphical representation, its size can be found at the bottom of it's bod file when viewed with a text editor like notepad++

AS far as I know neither Gmax or 3dsmax displays the collision box of any object when it's loaded. However making a box with the same dimensions found at the bottom of the bod file and placing it over the missile in Gmax would give you what you are looking for I think...
Still life in the old dog yet...
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Oh! Ah! There it is!
But you make that sound rather easy.

There is a line of...
/! COLLISION_BOX: 0.000000; 0.060608; 0.000000; 1.156006; 0.221619; 0.195557; 1.000000; !/

This looked like a comment line to me, probably because / * blah */ is a comment in PHP...

...but how do I turn this into a box?
Where in GMAX do I enter "0.000000; 0.060608; 0.000000; 1.156006; 0.221619; 0.195557; 1.000000; "?

Or can I write something like MAKE A BOX into the BOD file using these numbers?
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden »

no. this "collision box" is for the autopilot.

On stations and ships it tells the autopilot of a ship when to start with evading procedures.

The actual physical collision of a model is the last LOD. So if you want to increase/decrease the hitbox you can scale the last LOD.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

That "last LOD" would be part of the missile model file, I suppose?

How (in GMAX) do I select / filter which LOD I am currently viewing, provided several exist?
All I see is a single object.
If I delete this object, nothing remains. This would imply that there is only one thing in the missile model.

Looking into the BOD file I also see only 1 model, consisting of 1 part.

When or if I figure this out (or have someone figure it for me =), I should probably write a 3D for Dummies tutorial. =P
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden »

your right there
That means missiles have only one level of detail
That means the missile model actually is the hitbox.

You can add one LOD however. Draw a box. Place it at x=0 y=0 z=0.
Now rightclick->convert to editable poly. Then select "faces" (the red) square in the menu on the right. now you can move the faces independently of the base-coordinates of the box.

If you are ready look in the menu where you can select maxscript for dbox. There is a "reset Xform". Select your box and click that button.
Rightclick ->convert to editable poly again.


name your box

Code: Select all

*modelname*_1

e.g. Banshee_IR_1
then export the body including the original missile by "export all"

Now open the bodyfile you just exported.
crtl+f for "body" until you fount the beginning of your 2nd body

something similar to this:

Code: Select all

// beginning of body 2
30; 

// beginning of points (2805)
-19249; 19583; 2003; // 0
-28418; 21339; -15633; // 1
-20786; 19354; -6168; // 2
The 30 is the percentage at which stage the LOD will kick in. Change it to 1 because you don't want the player to see the box. Thats it.

If you want to see the real size of the box-LOD for testing your can change it to 99 (dunno if 100 works)

If for whatever reason you want to import and change the size again by the rescale tool, make sure you "reset Xform" prior exporting.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

So... by
- creating / adding this new LOD,
- and having it be "the last LOD", aka Body 2...

1. it automatically becomes THE hitbox that will always be used, regardless of what is visible.

2. The actual missile model (Body 1) turns into irrelevant window dressing without any collision ability.



I'm asking because the model apparently has some sort of invisible wings that I cannot see at all in GMAX.
I assigned the missile model to a ship so it would stay put and I could rule out any hardcoded missile quirks.
Then I shot it with beam lasers so I could fluently trace the impact location.
There is exactly one rectangle going straight through the missile.


[ external image ]
The dots show the area where a repair laser will impact.

Strangely enough, bullet lasers like PAC and PRG do not impact with this rectangle and the missile (ship) is a very hard target because of that.
There may still be some hardcoded missile-only weirdness on top of that because missiles are absolutely not hard to hit.




So.... what do missiles do differently?
I wanna know.
So I mod an Aurora dumbfire (same as above) missile... with a speed of practically zero.
That one also stays put after launch and I can do my hitability tests.

The scary result?
It's hard to hit. (without auto aim)
I literally have to score a hit on the missile's visible body... or no hit.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Hmmkay. Cannot be. Did I screw up the model or something like that?

I delete all unpacked missile BODs.

The same "test" missile as before is now loading it's scene / model directly from the CAT archives.
Basically vanilla conditions.


Using the rear turret (because it's closely aligned with the laser barrel) I test how close to the missile a laser bullet can be for a near miss.
[ external image ]

Umm... wow.
No direct hit on the visible missile body - no cigar.


The huge missile hitbox is a lie!

All the speculations over the years... and it simply doesn't exist? What a hoot. =P




So with collision working properly... what could be done with object sizes and LOD?
Here for comparison some bullets and a missile.
[ external image ]

Under the current system lasers do hit missiles quite easily... but they don't cheat.
My project to make missiles more interesting and less "spammy" would imply that missiles are not trivially easy to shoot down.
With a setup like above, that's a fail in the making.
Last edited by Gazz on Fri, 20. May 11, 19:11, edited 1 time in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
paulwheeler
Posts: 8132
Joined: Tue, 19. Apr 05, 13:33
x3tc

Post by paulwheeler »

Gazz, check the SRM thread. I just uploaded a package with all missile model sizes halved. Let me know what you think.
bobxii
Posts: 591
Joined: Mon, 9. Feb 09, 00:46
x3tc

Post by bobxii »

Can you not add shields to the missiles?
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Anyone got an answer to my questions in the post above?

This whole LOD business is somewhat tricky to figure out...
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden »

So... by
- creating / adding this new LOD,
- and having it be "the last LOD", aka Body 2...

1. it automatically becomes THE hitbox that will always be used, regardless of what is visible.

2. The actual missile model (Body 1) turns into irrelevant window dressing without any collision ability.
Yes. At least for common objects like ships, stations and so on. No idea if ES hardcoded another weirdo exception thing for missiles.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Thanks. That's a start.

With what I found out about the collision mechanics of missiles and bullets, I'm not quite sure how to proceed.

The original intention of the project was to severely limit missile "spam" and make individual missiles more challenging instead.

With the bullets being the huge "brooms" that they are, reducing the size of the already tiny missiles any further doesn't seem helpful.

Reducing bullet diameter (the obvious fix) would make small / agile ships very very difficult to hit.

That may not actually be a bad thing, though. What if the bullet speed was increased as well?
That capital ship lasers have a bullet flight time of 20 sec is ridiculous anyway.

Lasers designed to hit small things would have a somewhat larger bullet size but using PPC for missile defense would be rather... useless.


Somewhat reducing the missile sizes is not a bad idea but I don't think it will be "enough", especially since bullet sizes vary wildly. No real rhyme or reason there.

Part of the issue could be, that capital ship bullets are supposed to be visible at longer ranges.
So if a "fake" collision box LOD were added to the bullets, they could stay big and visible while their hit boxes could be balanced separately.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden »

If they use the same mechanic as ships and so on, that should be an option.

You can use anything for LODs ... so you could also just copy the bullet, name it "*bullet*_1" and shrink it, reset xform and export.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Personally I think reducing bullet size would do the trick. Current bullet sizes are many orders of magnitude too large. This would also recompense the poor M5 a lot as they are currently getting the raw end of a VERY big set of sticks. Small fast fighters would excel until up against a high bullet speed weapon. Which again makes sense.
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

first you built a better mousetrap, then you noticed how dumb mice are and now you try to breed more clever ones :D

been breaking my head on missiles too a while ago so while slightly OT here I will throw in a few ideas:

have you considered lobomizing missile defense turret and fight routines a bit ?
for example using the "torpedo" flag to disallow turrets to target this specific missile claiming it has some kind of stealth properties ?

if you want to defend against swarm missiles and not use some kind of ECM to just blow them up (I found that the easiest way to deal with them though) you could try giving them a large blast radius so when one warhead is hit / blown up it will take it's brothers with it ?

the IR flag makes missiles aim for engine emitters (if they are present) we used that to mark "small" missiles which are no threat to big ships, you can just skip shooting them down, ignoring them on those

you can also try to make a missiles body permanently have no collision, turning this missile immune to normal laser attacks (which probably needs the proximity fuse set and have a blast radius as the missile itself cannot hit the target any longer)
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Sartorie wrote:first you built a better mousetrap, then you noticed how dumb mice are and now you try to breed more clever ones :D
An astute analysis of the situation. =P

Need more clever mice in order to maintain sales.
They would evade competing mouse defense solutions, increasing desireability of our product!

Using obsolete missile flags as useful information for the script is an interesting idea but only useful if you're writing a script to exclusively work with one particular mod.

I've been looking at ECM systems but have never seen a convincing one.
All they do is blow up incoming missiles either automatically or on a button press.
There is zero challenge and zero gameplay in that mechanic.

An ECM that temporarily "confuses" missiles, making them fly in a straight line - that would be something else but I've never seen this.
It's technically possible because a script can control the alpha/beta/gamma values of a missile.
Arguably messy... but possible.
I think it permanently messed up a missile's guidance script somehow. At least with Swarm. Been a while since I tried that.

No collision at all is no solution.
Impossible to hit is just as unbalanced as too easy to hit. You can not balance extremes like that.


have you considered lobomizing missile defense turret and fight routines a bit ?
for example using the "torpedo" flag to disallow turrets to target this specific missile claiming it has some kind of stealth properties ?
As you know "toning down" is terribly difficult if the target lead calculation is 100% hardcoded.
The only choices are to shoot or... not shoot.

Wing Commander had some sort of "blinking" stealth torpedo.
It turned invisible in set intervals, making intercepting it more... interesting.

This is scriptable... in a way.
After launch, the torpedo is set back away to a point 2000 km from the target.
Eventual cockpit target on it is cleared. It "cloaks".
After x seconds or after "the invisible torpedo" is calculated to be within x m of the target, it is scripted to the position "where it uncloaks".
"actual" torpedo run commences at this point.
This reduces the time that a missile defense turret has to track / shoot the torpedo but doesn't make it harder to hit.

An alternative is to make such a torpedo flicker / teleport / strafe.
Every 1000 ms it is set to a random point within x m of it's current position.
Crude, I know...



Still... those are all workarounds to an issue that is probably solveable by messing with bullet sizes.
Bullet visibility is the most likely issue with that.
We want capital ship bullets visible from quite a distance.
Their diameter, however, doesn't necessarily need to be as large as it is now.

The whole 3D shebang is only the first step on the way to balancing missiles.
As long as missiles are as easy to hit as they are now, any attempt at balancing their stats or launch frequency is futile.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

I still think it's not the missiles but the bullets that are the problem.

Capital weapons are normally a bit slower but when they are the size of an M5 logic has taken a long walk off a short pier...

Beams for instance are actually huge, but seeing as the bullet sizes can be altered by rapid box rather than the image you can reduce their sizes accordingly and hopefully reduce the problem to balanceable levels.
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
bobxii
Posts: 591
Joined: Mon, 9. Feb 09, 00:46
x3tc

Post by bobxii »

We want capital ship bullets visible from quite a distance.
Their diameter, however, doesn't necessarily need to be as large as it is now.
Which capital weapons are great at shooting down missiles? FAA is the only answer I can come up with, and with its range (or lack thereof), there is no real need to keep it visible at distances - in fact, I'm pretty sure the bullet on that is tiny to begin with. Conclusion: capital weapons' bullet sizes are not really an issue; fix the rest and don't even worry about cap weapons.


On the other hand, there are a number of issues which are making the missile problem unnecessarily heinous:
1) missiles are slow
2) missiles have 1 hp with no shields

I'd propose that instead of decreasing the number of missiles and ramming your head into the wall trying to make missiles harder to shoot down, you try this instead:

1) Increase the number of missiles in the field by either increasing burst count (not sure of that mechanic, if it's even editable) or decreasing cargo requirements and reload speed (and price/increase # per cycle). How about... 5x as many missiles?
2) Increase missile speeds dramatically (try doubling)
3) Adjust damage per missile downward based upon gameplay criteria (cost/reload rate/speed/availability/race)

Continuing the mousetrap analogy: Instead of trying to breed supermice with armor, simply add more (and faster) mice until using the trap becomes a challenge again.
bobxii
Posts: 591
Joined: Mon, 9. Feb 09, 00:46
x3tc

Post by bobxii »

Also, altering missile turn rates should allow one to tune their effectiveness against fighters (to adjust the amount of "looping" before a hit occurs - see Mosquitos).

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”