FlightGear - Création d'avions et autres / Creation of aircraft and other

Vous désirez aider à améliorer les avions de Hangar de Helijah, c'est ici que cela se passe / You would like to help improving aircraft from Helijah's hangar, this is where it happens

Vous n'êtes pas identifié(e).

#1 2014-12-01 18:19:46

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

An AI weapons request.

Hello,

Since 5H1NOB1 is making working turrets,  I was wondering what further work would be required to make static models like WWI era AA trucks and fixed ground gun emplacements active in Bombable?  Is there work already being done here?

I ask because I've been  in the process of populating a WWI aerodrome at Belfort-Chaux.  It's not truely the original WWi aerodrome at Belfort Fontaine, but it has grass runways, and the proximity to the Vosges makes it ideal for creating the feel of a Alsace-Lorraine WWI era airfield.

  Astra Comte Dirigible hangar and the main airfield

Morane BB at Belfort with Bessenau double hangars




Hence I want to populate the Rhine valley and the Eastern edge of the Vosges with observation balloons, cannons, AA guns, and machine guns nests.  I've already started to populate Belfort Chaux with hangars and equipment.  the icing on the cake would be to have Bombable missions where an opposing teams flies over to Belfort and all the local AA guns start firing on the intruder, and vis-versa.

Would the coding be maddenly hard to do?  I'm no Nasal creator.  I can mod some easily figured out snippets.

Thanks for the work you've already done,  I'd like to add more to this with your help.

Lewis


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#2 2014-12-01 20:42:46

5H1N0B1
Developpeur
Inscription : 2012-08-07
Messages : 597

Re : An AI weapons request.

Making it bombable but still in a multiplay shouldn't be really difficult. Making it AI bombable, I have no Idea of how to do it. But anyways I need a break on the 2000 and turret need some improve. I'll have a look smile That could be great smile

Hors ligne

#3 2014-12-02 20:13:42

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

Re : An AI weapons request.

OK,  I've had some success with getting your turrets nasal file to play with my Sopwith 1 &1/2 Strutter's,  Scarff  gun ring/Lewis MG/ and observer figure, although when I initially load the model, I have to cycle through all the views to get it to function, and then the 'gunners' view is 180 degrees out of heading, so I'm  looking at the gunner's head instead of sighting down the barrel of the gun.   I'm guessing that possibly the big chore ahead is getting  the gun's submodels to play along with the animated gunner's view?  I also noticed once you got the turret following the mouse view  it's works for all the views, which would be nice to turn this feature off for the views it's not needed in.


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#4 2014-12-02 20:51:34

5H1N0B1
Developpeur
Inscription : 2012-08-07
Messages : 597

Re : An AI weapons request.

Yep ...I need to rework the thing Because the first problem it that the synchronisation is to fast ... and I have to also rework it to make the function disapear...I can try this evening, and update it on the B17... smile

I'll look on that heading inversion...I remember something strange like that. I'll let you know.

Hors ligne

#5 2014-12-02 21:12:57

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

Re : An AI weapons request.

I'm wondering if the 'bore-sight' part of the old radar nasal from your M-2000 could be hacked into a small, self contained detection and target tracking nasal for groups of AA guns?

I'm referring to this code here..

 

# ===================
# Boresight Detecting
# ===================
locking=0;
found=-1;

boreSightLock = func {
   var Estado = RadarStandby.getValue();

   if ( Estado != 1 ) {

   if(getprop("instrumentation/radar/selected") == 1){

      targetList= props.globals.getNode("ai/models/").getChildren("multiplayer");
      foreach (d; props.globals.getNode("ai/models/").getChildren("aircraft")) {
         append(targetList,d);
      }
      foreach (d; props.globals.getNode("ai/models/").getChildren("tanker")) {
         append(targetList,d);
      }

      foreach (m; targetList) {
          var string = "instrumentation/radar/ai/models/"~m.getName()~"["~m.getIndex()~"]";
          var string1 = "ai/models/"~m.getName()~"["~m.getIndex()~"]";
          if (getprop(string1~"radar/in-range")) {

            hOffset = getprop(string1~"radar/h-offset");
            vOffset = getprop(string1~"radar/v-offset");

            #really should be a cone, but is a square pyramid to avoid trigonemetry
            if(hOffset < 3 and hOffset > -3 and vOffset < 3 and vOffset > -3) {
               if (locking == 11){
                  setprop(string~"radar/boreLock",2);
                  setprop("instrumentation/radar/lock",2);
                  # setprop("sim[0]/hud/current-color",1);
                  locking -= 1;
               }
               elsif (locking ==1 or locking ==3 or locking ==5 or locking ==7 or locking ==9 ) {
                  setprop("instrumentation/radar/lock",1);
                  setprop(string1~"radar/boreLock",1);
               }
               else {
                  setprop("instrumentation/radar/lock",0);
                  setprop(string~"radar/boreLock",1);
               }

               if (found != m.getIndex()) {
                  found=m.getIndex();
                  locking=0;
               }
               else {
                  locking += 1;
               }
               settimer(boreSightLock, 0.2);
               return;
            }
         }
      }
      setprop(string~"radar/boreLock",0);
      locking=0;
      # setprop("sim[0]/hud/current-color",0);
   } # from getprop
   } # from Estado

   locking=0;
   # setprop("sim[0]/hud/current-color",0);
   found =-1;
   setprop("instrumentation/radar/lock",0);

   settimer(boreSightLock, 0.2);
}


setlistener("ai/models/model-added", MPjoin);
setlistener("ai/models/model-removed", MPleave);
settimer(MPradarProperties,1.0);
settimer(boreSightLock, 1.0);

If I'm understanding the coding correctly,  it presently has a narrow detection 'cone',  it's actually a skinny pyramid.   But why not open it out wider and shorten it's detection range to about 8 kilometers while setting flags within it's coding to operate the alignment of ground gun's barrels and enable firing when targets are within range.

On the Sopwith Strutter,  would you like to try it out to see if I missed something in the gun animation?    It is presently working the turret with the gun submodels enabled and Bombable functional.

Dernière modification par LesterBoffo (2014-12-02 21:17:31)


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#6 2014-12-02 22:07:23

5H1N0B1
Developpeur
Inscription : 2012-08-07
Messages : 597

Re : An AI weapons request.

Once I did correction on the barrel itself, there is 2 things that can be done :
1-Allow multi turret firing to one target. So we have to define a distance to make the bullet converge on the target. The initial goal is to make the B29 tower.
2-Couple it with the radar, without cone (or with wider) and this is do able...The initial goal was to make a Phalanx...

Also I would  be pleased to test your plane smile

Best Regards

5H1N0B1

Hors ligne

#7 2014-12-03 18:02:04

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

Re : An AI weapons request.

So I've uploaded the Sopwith 1&1/2 Strutter to my file "hangar",  please excuse the adverts,  mediafire works for me.

sopwith_strutter

this model is largely unfinished, so but should fly and shoot.

Meanwhile I'm dithering about with animating a static ground vehicle into an MP usable and drivable AA gun platform.


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#8 2014-12-03 20:55:54

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

Re : An AI weapons request.

Thornycroft 13 pounder AA truck.

  fgfs-screen-132.jpg

  It is drivable, and the gun follows the view.   now to get the gun submodels to work with the turret animation.   Although I'm not sure how to make the view stay in-line with the modelled gunsight, which is offset to the right side of the gun body about 0.23 meters.  Maybe I'll have to just use the gun barrel itself.  interrogation

I was online for a few minutes and noticed, we get just about all the direction and elevation information we could want for aiming from the property tree,  ai/models/multiplayer/..  would this be easier to implement than doing a 'radar' script for animated static objects?


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#9 2014-12-03 22:29:56

5H1N0B1
Developpeur
Inscription : 2012-08-07
Messages : 597

Re : An AI weapons request.

First of all, I worked on your aircraft : be pleased to have a working turret.
Anyway, the center of the view is the same as the heading rotate center for the 3D animation, but it's not the same as the pitch rotate center for the 3D animation...So it can be strange when looking up...you will have to play with view.
I work on the .nas, on the views and also the -set.xml : I delete the view reference and put it on view.xml...it's working as log as you have ;

 <sim include="Systems/views.xml">

. I also added a 180 offset on your 3D turret object to synchronize it with the view.
You can be find your model here : sopwith

About the radar thing it's lot more work to achieve this, and fisrt I have to try to make it fireable...

Hors ligne

#10 2014-12-04 16:16:27

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

Re : An AI weapons request.

Got the Sopwith fixes, yeah  that's much better,  thanks!

I applied them to the turret of the Thornycroft truck..

   

Flash required

  So how does one alias the submodels' animation to the working turret's movement?

Dernière modification par LesterBoffo (2014-12-04 16:38:09)


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#11 2014-12-04 17:30:39

Helijah
Administrateur
Lieu : Chartres
Inscription : 2011-12-14
Messages : 2 030
Site Web

Re : An AI weapons request.

Hey LesterBoffo,

I Like so much the speed change of the engine. Can you give me this for my Citroën 2 Cv smile

Regards Emmanuel


Quelques avions pour FlightGear
http://helijah.free.fr

Hors ligne

#12 2014-12-04 18:05:57

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

Re : An AI weapons request.

Sure thing,  it will be a slightly bigger file size with two set files though,  if you want to keep the original's FDM's.    I can animate the gear shifter also.

  Give me a couple days,

BTW here's a link to the VW-Kombi of Isiah Prestes Hangar that I've added the Alral gears to.

  Volkswagen Kombi bus


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#13 2014-12-05 08:42:32

5H1N0B1
Developpeur
Inscription : 2012-08-07
Messages : 597

Re : An AI weapons request.

For the submodels we are working on it ... the B17 will become soon, very cool !! smile

Hors ligne

#14 2014-12-06 04:41:40

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

Re : An AI weapons request.

Here's quick question,  how does one go about making a sound .xml expand the dynamic pitch range so the .wav file matches that of an engine that idles at 800 rpm and has a maximum rpm of nearly 6000?  I've been tinkering with Helijah's request all night and I'm stumped as how to make the rpm pitch follow the engine rpm up the scale,   the rpm pitch levels out at about just below 4000 rpm while the rpm climbs higher.

It's very annoying.


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#15 2014-12-07 18:12:00

LesterBoffo
Créateur
Lieu : Oregon, USA
Inscription : 2013-07-15
Messages : 56

Re : An AI weapons request.

Deux Chevaux  with four speed transmission with reverse.  Coding is in place to make  rain wipers work, animate the canvas roof, and I've got the turn signals working.

Deuche with gears


Antique Aircraft, GA Types, MP Carrier ships and Carrier Aircraft developer.

Hors ligne

#16 2014-12-07 20:54:34

5H1N0B1
Developpeur
Inscription : 2012-08-07
Messages : 597

Re : An AI weapons request.

Great !
I'm still working on the firing thing...it's a little difficult...

Hors ligne

Pied de page des forums

Propulsé par FluxBB 1.4.8