Board index FlightGear Development AI Traffic

AI M1 Abram Tanks

Intelligent, computer controlled vehicles that drive/fly over the planet!

AI M1 Abram Tanks

Postby RobAndrew » Tue Dec 04, 2018 10:29 am

Hello there!

Not really sure where I should be posting this. I've asked the guys on discord but i haven't got much from there so I thought i'd ask here as well...

Basically, I'm trying to set up the bombable tanks. They work great and everything mostly, but I can't seem to change the Red livery on them to standard Camo

Image

I've clicked "Apply" but nothing seems to change this.

...I've also noticed how tall the engine smokestacks are-And how obvious they are! Now I've trawled through the M1 Bombable's files and see various parameters for Burning flames and fires, and have seen some set quite high, but none for engine smoke. (I have tried adjusting all of these, none seem to affect it. Maybe there's something in the nasal?) I know i'm looking for a <life> tag somewhere probably, and there are some in the fire-particles.xml which is set to 19. Again i've tried editing these and checking, but it hasn't changed anything.

Can anyone else shed some light on this?

Thanks
RobAndrew
 
Posts: 95
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: AI M1 Abram Tanks

Postby enrogue » Tue Dec 04, 2018 10:58 am

Just a quick look at the particles stuff:

There are a whole pile of parameters in AI/Aircraft/M1-Abrams-Bombable/m1-bombableinclude.xml, including changing the smoke type (it defaults to type 'flare')

The fire particle types are in AI/Aircraft/Fire-Particles/<smoketype>-particles.xml, and the lifetime is set by a property you can see in the xml (/bombable/fire-particles/flare-life-sec in the flare type case)

It *should* all be configurable in the bombable menu I think - I haven't looked at it in a while, so it may be that some stuff isn't working.

I'll have a look & see
User avatar
enrogue
 
Posts: 167
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

Re: AI M1 Abram Tanks

Postby RobAndrew » Tue Dec 04, 2018 11:41 am

Thanks very much. Looking at the "Bombable-include.xml" file, I see reference to SMOKE/CONTRAIL under INITIALISE ROUTINES but that's about it. It goes:

# SMOKE/CONTRAIL: Start a flare, contrail, smoke trail, or exhaust
# trail for the object.
# Smoke types available: flare, jetcontrail, pistonexhaust, smoketrail,
# damagedengine
bombable.startSmoke("flare", thisNodeName );

I won't say I know what to do with this, but thanks for taking a look anyway!

EDIT: Okay, My bad! Turns out, just like you said, it's in the Bombable settings, Under "Flares" That's what put me off! Didn't think it would be flare contrails! More like piston smoke!

I will say also about the colour scheme: I can get the Jeeps to change colour,but not the tanks.
RobAndrew
 
Posts: 95
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: AI M1 Abram Tanks

Postby enrogue » Tue Dec 04, 2018 12:51 pm

its affected by the flares setting because the nasal script in the bombable include file is setting it to the type 'flare'

you could change it to pistonexhaust & then it would be affected by the 'Piston Engine Exhaust enabled'

I'm not able to get bombable working correctly for all types of scenarios at the moment - what version of Flightgear are you running?
User avatar
enrogue
 
Posts: 167
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

Re: AI M1 Abram Tanks

Postby RobAndrew » Tue Dec 04, 2018 2:28 pm

I am running 2017.3.1. Looking at upgrading in 2019. It works brilliantly for me, except my F15's keep crashing!
RobAndrew
 
Posts: 95
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: AI M1 Abram Tanks

Postby enrogue » Tue Dec 04, 2018 3:41 pm

OK I have it working with 2018.2.3 but not with 2018.3.1RC or next - the bombable system doesn't seem to be attaching to the AI models - I'll have to look into any Nasal errors

With 2018.2.3 the repositioning of the AI ground vehicles/ships isn't working for me either, so to check the M1 I have to start at Sun Valley (KSUN). You're right about the colour not changing - I'll have a look at it to see if theres something about the Jeep vs the M1
User avatar
enrogue
 
Posts: 167
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

Re: AI M1 Abram Tanks

Postby enrogue » Tue Dec 04, 2018 6:05 pm

Quick update on the defaults for smoke lifetime in Bombable:

in Nasal/bombable.nas line 2169:

Code: Select all
      foreach (var smokeType; [
                ["fire",88, 3600],
                ["jetcontrail", 77, -1],
                ["smoketrail", 55, -1],
                ["pistonexhaust", 15, -1],
                ["damagedengine",  55, -1],
                ["flare",66,3600],
                ] ) {


So flare lifetime is 66 secs, pistonexhaust is 15 secs - these are written to the relevant properties in line 2187:

Code: Select all
             props.globals.getNode(""~life1_pp~smokeType[0]~life2_pp, 1).setDoubleValue(smokeType[1]);
User avatar
enrogue
 
Posts: 167
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

Re: AI M1 Abram Tanks

Postby RobAndrew » Tue Dec 04, 2018 6:17 pm

That's awesome! Thank you very much! I've just turned flare contrails off for now. Good luck with the Camo, I'm not really sure what to look for but would definitely help you if i did!
RobAndrew
 
Posts: 95
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: AI M1 Abram Tanks

Postby enrogue » Tue Dec 04, 2018 9:44 pm

A fix for the M1 camo/colour:

edit AI/Aircraft/M1-Abrams-Bombable/m1-bombableinclude.xml

line 22, comment it out so it looks like this:

Code: Select all
#          return;


lines 33-35 look like this:
Code: Select all
             base_color~".png",
             base_color~"2.png",
             base_color~"3.png");


but they need to look like this: (add the square brackets around the array)

Code: Select all
            [ base_color~".png",
             base_color~"2.png",
             base_color~"3.png" ]);


I compared the Jeeps code & found the difference - I've tested it as well (well - they go grey rather than red in any case it's better than red!)

If only it was going to be this easy to find out why bombable is not working in 2018.3 & above...
User avatar
enrogue
 
Posts: 167
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu


Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 5 guests

cron