Thread: [REL] Rockets mod
View Single Post
Old 01-12-17, 07:07 PM   #75
Kendras
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Icon5 RESULTS OF MY TESTS

So, I will explain you how it works.

How did I succeed ? First because I'm obstinate. And second thanks to gap's excellent ideas. Thank you bro !

Now, here are the details :

First, I've removed the collision boxes and zones from the wings to prevent them to be destroyed by the explosion input. Now, I could probably add them again without any problem I think, I didn't test.

I've separated the 3D model of the rockets from the rack and made it child node. Perhaps I could also put the virtual gun as child node to have more simple loadout definitions files.

I've added a "trigger" under each rack placement in the airplane .dat file. For these triggers, I've created a special zone in the Zones.cfg.

To have these triggers destroyed when a rocket is fired, 3 things are necessary :

- a collision sphere, whatever size or location.
- the new type-box, but with an armor level different from -1 (which is odd, because -1 means that the value is the one in the Zones.cfg file which is 90) : if you set 90 instead of -1, it works ! (it's very odd). This type-box is linked to the object of the rockets model in the guns_SB.dat file. Thus, when the trigger is destroyed, the rockets model disappear.
- a 3D model (which can be invisible, but I let it visible for my tests, so I can see it when destroyed).

And finally, I've created an explosion input. For that, I downloaded The Dark Wraith mod about fire destroying the ships. I've understood the process and created a file containing the settings for a single explosion. There is an odd thing here : there must be a very high value (200) to destroy a zone with only 20 hitpoints ...

Anyway. This explosion is linked to the particles.dat file where the effect of rocket launch event is stored. Moreover, the explosion is in a child node which allows to put it UNDER the wings, where I placed the triggers. Thus, the explosion can't destroy the wings !

And that's it.

To better understand what's going on, I've added some visual marks (small light stars) spawned when an event occures. The red stars indicate the location of the explosion impulses. The blue stars indicate the location of each rocket-shell departure and last 5 seconds during which you can see the virtual gun moving on the left or on the right, you will see that the marks are always placed in the rockets models.

So, maybe now you want to see this by yourself ? No problem, here is my experimental airplane with the necessary files for the rockets. And also a single mission to test (called "rockets"). It is JSGME ready.

http://www.mediafire.com/file/kvs7q7...ET_TESTING.zip

But before installing, you have to create a new zone in Zones.cfg (a new number at the end of the list (example : 192=Rocket), and a new paragraph), and report its number in the airplane .zon file (for each trigger, the actual number is 192, but maybe it will be different for you). The zone settings are :

[Rocket]
Multiplier=1.0
Flotability=0.0
HitPoints=20
Destructible=Yes
Armor Level=90
Critic Flotation=0.3
Critical=No
FloodingTime=1
CargoType=None


For testing, there are 40 rockets for each gun, one rocket is launched every second. I've made them inoffensive for your U-Boot.

A strange thing is that sometimes, more than 5 rockets are launched and the rockets model is not destroyed. That's why I made bigger boxes in .zon file but without success. I was on the point to test with a bigger 3D model for one of the trigger. Perhaps by adding more collision spheres ?

You see ? That was a hard work, and it's still not perfect, even if I spent near 25 hours in tests. Thank you very much gap for your excellent advice which helped me to solve the problem. Have fun with tests, and tell me what could be improved, and how ??



Last thing : I didn't manage to fix the crazy forward machine guns of the Avenger, also firing straight forward when the U-Boot is behind ...
  Reply With Quote