SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   [REL] Rockets mod (https://www.subsim.com/radioroom/showthread.php?t=228911)

Kendras 01-10-17 05:44 PM

Have to fix the crazy machine guns of this plane ... :o

http://i.imgur.com/ACpfXnG.png

gap 01-10-17 06:07 PM

@ Kendras

What is the minimum armor level of the aircraft you are using for your tests (considering CollionableObject's AL of the plane and the AL of its wings/engine)? It is probably something between 0.5 and 2. If so, have you tried setting the AP value of the spawned explosive charge and of the dummy rockets on the racks to 0? To be sure also set the minimum radius of the explosive charge smaller than the maximum radius (let's say 0 and 0.1 for a start) and set Min and MaxEF to the same value (let's say double the hit points required for the dummy rocket to be destroyed).

If you followed these instructions and the plane still gets destroyed before the rockets in its racks, then I am afraid there is not alternative but reducing the Min and MaxEF of the explosive and the HP of the dummy rockets to something veeeery low. The plane would still get damaged, but the damage would be so modest that the player won't notice it. The downside is that the rockets would disappear from under the wings even when they are subject to enemy fire, but I think we can live with it :)

Kendras 01-10-17 06:46 PM

Quote:

Originally Posted by gap (Post 2457336)
What is the minimum armor level of the aircraft you are using for your tests (considering CollionableObject's AL of the plane and the AL of its wings/engine)?

AL/HP (armor level/hitpoints) :
unit "Avenger" = 1/300
front wings = 11/110
engine = 14/70

explosive charge spawned :
MinEF=1
MaxEF=10
AP=100
MinRadius=0
MaxRadius=0,000000001

Rocket new zone :
Multiplier=1
Flotability=0
HitPoints=5
Destructible=Yes
Armor Level=90
Critic Flotation=0
Critical=No
FloodingTime=1
CargoType=None
Crash Depth=10
Effect1=#plane_on_fire, 50

Quote:

Originally Posted by gap (Post 2457336)
It is probably something between 0.5 and 2. If so, have you tried setting the AP value of the spawned explosive charge and of the dummy rockets on the racks to 0?

No, maybe I will try this.

Quote:

Originally Posted by gap (Post 2457336)
To be sure also set the minimum radius of the explosive charge smaller than the maximum radius (let's say 0 and 0.1 for a start) and set Min and MaxEF to the same value (let's say double the hit points required for the dummy rocket to be destroyed).

Already tested.

I'm trying another solution. If I fail, I will try a bit more with your/TDW solution.

gap 01-10-17 07:18 PM

Try with these values:

explosive charge spawned
MinEF=1000
MaxEF=1000
AP=0
MinRadius=0
MaxRadius=0.1

Rocket new zone
Multiplier=1
Flotability=0
HitPoints=500
Destructible=Yes
Armor Level=0
Critic Flotation=0
Critical=No
FloodingTime=1
CargoType=None
Crash Depth=1000

If the Avenger still explodes, try reducing charge's Min/MaxEF and rocket's HitPoints to 2 and 1 respectively (I am not sure whether decimal numbers are valid HP entires; if they are, something like 0.25 and 0.0625 respectively, would be even better...)

If the Avenger finally doesn't explode but the dummy rockets don't disappear, try increasing a bit the max radius of the explosive charge and moving gun's muzzles away from the dummy rocket. It is possible that if an explosion happens within an object, that object can't get damaged (i.e. the explosion must impact its damage box from outside) :hmm2:

Kendras 01-10-17 07:31 PM

Quote:

Originally Posted by gap (Post 2457348)
It is possible that if an explosion happens within an object, that object can't get damaged (i.e. the explosion must impact its damage box from outside) :hmm2:

Yeah, I though about that too. But the spawned explosion has no speed.

Kendras 01-10-17 09:12 PM

I've found how to prevent the plane to explode. But the rockets still don't disappear ...:damn:

Further tests tomorrow, mayge the night will teach me something ...
:Kaleun_Sleep:

gap 01-11-17 03:39 AM

Quote:

Originally Posted by Kendras (Post 2457355)
I've found how to prevent the plane to explode.

:up:

Did you apply my suggested settings or how else did you manage doing that?

Quote:

Originally Posted by Kendras (Post 2457355)
But the rockets still don't disappear ...:damn:

Quote:

Originally Posted by Kendras (Post 2457349)
But the spawned explosion has no speed.

I didn't suggest the explosion to move away from the dummy rocket due to its own speed, but you to move the muzzle that the explosion generates from away from the rocket :03::D

Doing that might be unpractical, because muzzle's position in the 3D world, is also where the real rockets spawn from after being fired, and they departing the plane several cm away from their supposed initial position would look a bit odd.
There is a possible workaround though: get a basic mesh, attach it to the rocket rail as a separate object, place it near the position of the virtual rocket gun muzzle but not on top of it (neither its 3D mesh nor its damage box should overlap the muzzle), make it invisible, and set it to be destroyable applying to it the new damage zone. Set then the node of the dummy rocket model as a child of the invisible mesh. If everything works well, the invisible equipment should get destroyed by the explosion (just like aircraft wings and engine before your tweak), and its child rocket model should disappear from the SHIII world...

Kendras 01-11-17 09:41 PM

:nope: disappointing ..... nothing is working ..... yet.

Kendras 01-11-17 10:13 PM

Sorry, but I give up with this problem. I've spent more than 20 hours with tests of all kind, and I won't do more. If you want to test by yourself, I can send you my files. Maybe you will have more luck than me ...

Anvar1061 01-11-17 10:48 PM

Leave missiles under their wings and go!

Kendras 01-11-17 11:13 PM

Quote:

Originally Posted by Anvar1061 (Post 2457567)
Leave missiles under their wings and go!

Jawohl ! :salute:

gap 01-12-17 02:55 AM

Quote:

Originally Posted by Kendras (Post 2457563)
Sorry, but I give up with this problem. I've spent more than 20 hours with tests of all kind, and I won't do more. If you want to test by yourself, I can send you my files. Maybe you will have more luck than me ...

Yes please, send them to me, and sorry for your disappointment :)
If nothing works, it is also possible that, due to game mechanics, an equipment can't get damaged by its own fire. I will see if putting the rockets in a separete equipment will make any difference :up:

Kendras 01-12-17 06:49 AM

I have finally something working .... but the way it works is strange .... further tests needed .... I tell you more this evening .... or later ..... :salute:

gap 01-12-17 05:05 PM

Quote:

Originally Posted by Kendras (Post 2457601)
I have finally something working .... but the way it works is strange .... further tests needed .... I tell you more this evening .... or later ..... :salute:

:up:

Can't wait for your news!

Kendras 01-12-17 07:07 PM

RESULTS OF MY TESTS
 
So, I will explain you how it works.

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

Now, here are the details : :Kaleun_Salivating:

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 ! :know:

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 ??

:salute:

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 ... :doh:


All times are GMT -5. The time now is 04:24 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.