Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: What controls the bomb pattern when attached to the plane?  (Read 378 times)

0 Members and 1 Guest are viewing this topic.

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 480
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
What controls the bomb pattern when attached to the plane?
« on: April 12, 2019, 03:15:57 AM »

Hi

What controls the bomb pattern when attached to the plane?

For example: Choosing 8x100VNo1 then eight 100 kg boms are shown in one row without spacing.

If I would like to change that to 2 rows with 4 boms in each row instead and add a Little spacing between the boms, where do I change that and how?

Is it in the Aircraft class file or in the [HookLoc] section of the mesh where the bomb hooks are?

Best regards

vonOben
Logged

Dreamk

  • Modder
  • member
  • Offline Offline
  • Posts: 1565
Re: What controls the bomb pattern when attached to the plane?
« Reply #1 on: April 12, 2019, 03:28:33 AM »

Just edit the [HookLoc] section of the mesh where the bomb hooks are.
Logged

Koty

  • Mr. MiG
  • Modder
  • member
  • Offline Offline
  • Posts: 2026
  • It's a MiG!
Re: What controls the bomb pattern when attached to the plane?
« Reply #2 on: April 12, 2019, 03:45:35 AM »

well, ultimately, it's both

in the mesh you create "hooks", those are your virtual hard-points
and then in the aircraft class you select which hooks are used for what in a specific loadout

where you have to decide whether you want to:
a) change which hooks the bombs use (there already may be the hooks you want - or changing the hooks could break other loadouts)
b) change/add the position of the hooks
Logged
If I don't have to do it, I won't. If I have to do it, I'll make it quick.

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 480
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: What controls the bomb pattern when attached to the plane?
« Reply #3 on: April 12, 2019, 03:47:25 AM »

Thanks Dreamk & Koty!   :)

I have search for a description which value does what for the [HookLoc] section, but I've only found this:
The last three numbers are the coordinates of the hook.

For the 100VNo1 bombs mentioned above the current numbers are:
[HookLoc]
0 -1 0 -1 0 0 0 0 1 0 -1.5 0

So which number controls the spacing between the bombs?
Should each row have it's own hook or can one centre hook have bombs in two rows?

Best regards

vonOben
Logged

SAS~vampire_pilot

  • SAS Team
  • member
  • Offline Offline
  • Posts: 4107
  • The man of a million fixes
Re: What controls the bomb pattern when attached to the plane?
« Reply #4 on: April 12, 2019, 08:00:39 AM »

these are just 3D coordinates in the mesh for one single hook. angles, rotations and location of [HookLoc] in that case...

the placement of which bomb goes on what hook happens in java (or in a cod file)

investigate meshes and teh loadout section of the java of a  bomber and you should be able to understand it from looking at it.
Logged

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 480
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: What controls the bomb pattern when attached to the plane?
« Reply #5 on: April 12, 2019, 08:24:05 AM »

This is the java code for the earlier mentioned  8x100VNo1 bombs:

            hashmapint.put(Finger.Int(s), a_lweaponslot);
            s = "8x100VNo1";
            a_lweaponslot = new Aircraft._WeaponSlot[byte0];
            a_lweaponslot[0] = null;
            a_lweaponslot[1] = null;
            a_lweaponslot[2] = new Aircraft._WeaponSlot(10, "MGunHispanoMkIt", 600);
            a_lweaponslot[3] = null;
            a_lweaponslot[4] = new Aircraft._WeaponSlot(3, "BombGun100kg_VNo1", 2);
            a_lweaponslot[5] = null;
            a_lweaponslot[6] = new Aircraft._WeaponSlot(3, "BombGun100kg_VNo1", 2);
            a_lweaponslot[7] = new Aircraft._WeaponSlot(3, "BombGun100kg_VNo1", 2);
            a_lweaponslot[8] = null;
            a_lweaponslot[9] = new Aircraft._WeaponSlot(3, "BombGun100kg_VNo1", 2);

I still don't understand which edits are needed to get spacing and two rows...  :-[

Logged

SAS~vampire_pilot

  • SAS Team
  • member
  • Offline Offline
  • Posts: 4107
  • The man of a million fixes
Re: What controls the bomb pattern when attached to the plane?
« Reply #6 on: April 12, 2019, 09:04:15 AM »

above that there should be a section that actually declares all the hooks and which order they have.
so you will know what 0, 1, 2... actually are as hook name in the mesh.


looking at that, I presume, you are on a wrong trail in the mesh anyway, you must have at least 10 individual hooks.
But unless you want to do 3D work, you can leave the mesh alone completely.
if you only want to mod loadouts on existing hooks, you only work in java in your case

or do you want to modify the hook locations in 3D? You should do that in a proper 3D program, not just in a  text editor in a mesh then. and there you should be able to see what's a hook... I am not completely sure what you want to do.
Logged

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 480
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: What controls the bomb pattern when attached to the plane?
« Reply #7 on: April 12, 2019, 09:41:48 AM »

What I want to do:
Instead of having eight 100 kg boms in one row without spacing I would like to change to 2 rows with 4 bombs in each row instead and add a little spacing between the bombs.

From the msh-file (irrelevant hooks and HookLoc removed):

[Hooks]
_BombSpawn01 <BASE>
_BombSpawn02 <BASE>
_BombSpawn03 <BASE>
_BombSpawn04 <BASE>
_BombSpawn05 <BASE>
_BombSpawn06 <BASE>
_BombSpawn07 <BASE>
_BombSpawn08 <BASE>
_BombSpawn09 <BASE>
_BombSpawn10 <BASE>

[HookLoc]
0 -1 0 -1 0 0 0 0 1 0 -3.0 0 // bomb01
0 -1 0 -1 0 0 0 0 1 0 -2.5 0 // bomb02
0 -1 0 -1 0 0 0 0 1 0 -2.0 0 // bomb03
0 -1 0 -1 0 0 0 0 1 0 -1.5 0 // bomb04
0 -1 0 -1 0 0 0 0 1 0 -1.0 0 // bomb05
0 -1 0 -1 0 0 0 0 1 0 -3.0 0 // bomb06
0 -1 0 -1 0 0 0 0 1 0 -2.5 0 // bomb07
0 -1 0 -1 0 0 0 0 1 0 -2.0 0 // bomb08
0 -1 0 -1 0 0 0 0 1 0 -1.5 0 // bomb09
0 -1 0 -1 0 0 0 0 1 0 -1.0 0 // bomb10
Logged

Dreamk

  • Modder
  • member
  • Offline Offline
  • Posts: 1565
Re: What controls the bomb pattern when attached to the plane?
« Reply #8 on: April 13, 2019, 01:26:19 PM »

First pay attention to a potential problem: the hooks are here referenced as "_BombSpawnxx" this means they are internal bombs hooks - external bombs hooks are referenced as _ExternalBombxx". This has, among others, influence on the behavior of the AI.
To be corrected this would demand to edit both the java and the mesh.
However for your request, editing the mesh is enough:
All your bombs have the same x and z positions (or rather y and z as they seem to be rotated) so to have them on two rows, try something like that:
[HookLoc]
0 -1 0 -1 0 0 0 0 1 0.8 -3.0 0 // bomb01
0 -1 0 -1 0 0 0 0 1 0.8 -2.5 0 // bomb02
0 -1 0 -1 0 0 0 0 1 0.8 -2.0 0 // bomb03
0 -1 0 -1 0 0 0 0 1 0.8 -1.5 0 // bomb04
0 -1 0 -1 0 0 0 0 1 0.8 -1.0 0 // bomb05
0 -1 0 -1 0 0 0 0 1 0 -3.0 0 // bomb06
0 -1 0 -1 0 0 0 0 1 0 -2.5 0 // bomb07
0 -1 0 -1 0 0 0 0 1 0 -2.0 0 // bomb08
0 -1 0 -1 0 0 0 0 1 0 -1.5 0 // bomb09
0 -1 0 -1 0 0 0 0 1 0 -1.0 0 // bomb10
Logged

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 480
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: What controls the bomb pattern when attached to the plane?
« Reply #9 on: April 18, 2019, 04:26:12 AM »

Ok, thanks!

I'll do some testing!

What confused me is that there are two bombs on each hook as in this example:  :-[

a_lweaponslot[4] = new Aircraft._WeaponSlot(3, "BombGun100kg_VNo1", 2);

So those bombs  show without a distance, which looks strange.

Is it possible to create a distance between them in such a case or shall I have one bomb for each hook and add more hooks if needed?

Best regards

vonOben
Logged

Dreamk

  • Modder
  • member
  • Offline Offline
  • Posts: 1565
Re: What controls the bomb pattern when attached to the plane?
« Reply #10 on: April 18, 2019, 09:00:30 AM »

a_lweaponslot[4]   = the 5th hook as defined in the java class (the count begins with a_lweaponslot[0])
new Aircraft._WeaponSlot(3   = bomb release key
"BombGun100kg_VNo1"  = name of the bomb class  (bombgun class activates the release, bomb class defines the bomb characteristics)
2); =  2 samples of this bomb at this same hook position, released one after the other
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 26 queries.