[MOOSE] RAT - Random Air Traffic - Page 44 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 09-30-2019, 12:42 PM   #431
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,274
Default

Quote:
Originally Posted by SparxOne View Post
Even though it seems like the thread is a little left out, i'm still gonna try my luck.

I've been working with RAT for a few days now trying to get basic things working the way i need it, i've managed to get most of it working but few things remain unclear.

I've noticed that getting my C130 to commute to airports not having the parking area for them despawns them and doesn't allow them to respawn, i find this strange because after all the research i've made, i've read in the documentation that it is set by default that if there is no parking spot for a plane, it will spawn back in the air over the airport by default, which doesn't happen in my case.
I even found an option to "force" it to spawn in air if no parking spot, and even with that, as soon as the plane lands and despawns, it will never spawn back in, any idea what is going on here ?
Here are the pieces of code i've used :

Code:
local c130_1=RAT:New("RAT_C130_US_1")
c130_1:SetDeparture("Nellis AFB")
c130_1:SetDestination("Creech AFB")
c130_1:RespawnInAirAllowed()
c130_1:SetSpawnDelay(10)
c130_1:SetSpawnInterval(0.5)
c130_1:Uncontrolled()
c130_1:ActivateUncontrolled(1, 180, 120, 0.5)
c130_1:Commute()
c130_1:Spawn(1)
Yeah, a C130 is indeed too big for Creech. Therefore, DCS will despawn it without any event fired the moment it lands and it won't be possible to spawn it at Creech.

Hence, in this case, the option to commute is unfortunately not working. I'd suggest to take it out.

If you really want send a C130 to Creech, you can use c130_1:RespawnAfterLanding()

As to why a C130 is too big for Creech, that's something the DCS devs need to answer
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is offline   Reply With Quote
Old 10-01-2019, 03:43 PM   #432
SparxOne
Junior Member
 
Join Date: Nov 2015
Posts: 57
Default

Quote:
Originally Posted by funkyfranky View Post
Yeah, a C130 is indeed too big for Creech. Therefore, DCS will despawn it without any event fired the moment it lands and it won't be possible to spawn it at Creech.

Hence, in this case, the option to commute is unfortunately not working. I'd suggest to take it out.

If you really want send a C130 to Creech, you can use c130_1:RespawnAfterLanding()

As to why a C130 is too big for Creech, that's something the DCS devs need to answer
Hey thanks FunkyFranky

Thanks for the heads up on that option Will use that to suit my needs for now

I have so many questions regarding RAT and MOOSE as a whole, i've got so many things in my mind i'd love to set up and have this complexe mission but unfortunately this won't be possible, i have too little knowledge in the whole coding part of the work and know the ME too little too, unless i was being walked through every step of it to the end result, it would be hard and very time consuming to set up And i too also understand that nobody has time to individualy help someone go step by step to realise their work

Anyway, if i have small questions like that at some point, will come back here hopefully having an answer
Thanks again
SparxOne is offline   Reply With Quote
Old 10-21-2019, 09:14 PM   #433
assafm25
Member
 
assafm25's Avatar
 
Join Date: Oct 2012
Location: israel
Posts: 679
Default

Hi,
I am new to moose and to rat and have 1 question before i start dig over.
This support all airports in all the maps?
Also the Persian golf airports?
__________________


IAF Bell205
IAF Anafa

-----------------------
DCS World Modules: A-10C, FC3, MiG-21BiS, F-86, P-51, KA-50, UH-1H Huey, Mi-8, M2000K, Gazal, Bf109, Mig-15, Hawk and NTTR
-----------------------
My System - ASUS Maximus HERO iiiv, CoolMaster 120 Sadion Plus, I7 -6700K @4.0, G.Skill ddr4 16GB ram, Gigabyte GTX 1070 G1 , PSU Seasonic X-650W, OCZ 150 500Gb ssd drive X2, Seagate 7200 1T X2.
-------------
assafm25 is offline   Reply With Quote
Old 10-21-2019, 10:04 PM   #434
Rudel_chw
Veteran
 
Join Date: Nov 2013
Location: Antofagasta, Chile
Posts: 4,827
Default

Quote:
Originally Posted by assafm25 View Post
Hi,
I am new to moose and to rat and have 1 question before i start dig over.
This support all airports in all the maps?
Also the Persian golf airports?
I know that it works on all the maps, but I haven tried every airport, so I cant really say if it does indeed work on ALL airports

However, I've to say that this Script is so much fun and can be used on a lot of ways, for example on the PG map, I used a Template made by 8th Ball (https://forums.eagle.ru/showthread.php?t=223243) for an Oil Rig field and added the RAT script to have AI helo traffic between the Rigs, like this:



So, in addition to conventional airports, you can use it also on FARPs and heliports
Thanks a lot again to FunkyFranky for this amazing Script.


Eduardo
__________________
For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra
For Gaming: 27" Monitor - Ryzen 1500X - 32 GB DDR4 2400 - MSI GTX970 - SSD 480 GB - HDD 10 TB - Windows 8.1 Pro - Thrustmaster HOTAS Cougar - Oculus Rift CV1
Mobile: iPad Pro 12.9" of 128 GB
Rudel_chw is offline   Reply With Quote
Old 10-21-2019, 10:34 PM   #435
skunk160
Member
 
skunk160's Avatar
 
Join Date: Feb 2010
Location: UK/CO
Posts: 227
Default

care to share that script sir?
__________________
skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 16GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | PointCTRL | Delta Sim TM Slew | MFG Crosswind | Logitech G25| TM TH8 RS | NRG wheel | DSD Switch box | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2
//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745
skunk160 is offline   Reply With Quote
Old 10-21-2019, 11:59 PM   #436
Rudel_chw
Veteran
 
Join Date: Nov 2013
Location: Antofagasta, Chile
Posts: 4,827
Default

Quote:
Originally Posted by skunk160 View Post
care to share that script sir?
The real Script is RAT, which is a component of Moose ... you can check it on the first post of this thread.

If you meant the LUA where I make use of RAT, I've attached it to this post.

So that you can better understand my LUA file, there are four Oil Fields on @Eight Ball's template, named as shown here:



I placed on each field one or two supply ships, that go from rig to rig and then back to the 1st one, plus 2-6 helos UH-1 .. for example this is the largest Oil Field on that Map:



The Helos that appear on the above figure are actually not visible and are used just as templates by RAT .. when the mission is run, RAT spawns between 2-6 helos depending on the size of the Oil field.

Best regards,


Eduardo
Attached Files
File Type: lua RAT - Persian Gulf - Oil Platforms.lua (1.8 KB, 24 views)
__________________
For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra
For Gaming: 27" Monitor - Ryzen 1500X - 32 GB DDR4 2400 - MSI GTX970 - SSD 480 GB - HDD 10 TB - Windows 8.1 Pro - Thrustmaster HOTAS Cougar - Oculus Rift CV1
Mobile: iPad Pro 12.9" of 128 GB

Last edited by Rudel_chw; 10-22-2019 at 12:02 AM.
Rudel_chw is offline   Reply With Quote
Old 10-22-2019, 01:25 AM   #437
skunk160
Member
 
skunk160's Avatar
 
Join Date: Feb 2010
Location: UK/CO
Posts: 227
Default

Outstanding, thank you sir.
__________________
skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 16GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | PointCTRL | Delta Sim TM Slew | MFG Crosswind | Logitech G25| TM TH8 RS | NRG wheel | DSD Switch box | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2
//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745
skunk160 is offline   Reply With Quote
Old 10-22-2019, 04:39 AM   #438
assafm25
Member
 
assafm25's Avatar
 
Join Date: Oct 2012
Location: israel
Posts: 679
Default

Great work

Thank u for the info
__________________


IAF Bell205
IAF Anafa

-----------------------
DCS World Modules: A-10C, FC3, MiG-21BiS, F-86, P-51, KA-50, UH-1H Huey, Mi-8, M2000K, Gazal, Bf109, Mig-15, Hawk and NTTR
-----------------------
My System - ASUS Maximus HERO iiiv, CoolMaster 120 Sadion Plus, I7 -6700K @4.0, G.Skill ddr4 16GB ram, Gigabyte GTX 1070 G1 , PSU Seasonic X-650W, OCZ 150 500Gb ssd drive X2, Seagate 7200 1T X2.
-------------
assafm25 is offline   Reply With Quote
Old 10-22-2019, 06:04 PM   #439
assafm25
Member
 
assafm25's Avatar
 
Join Date: Oct 2012
Location: israel
Posts: 679
Default

Can i use scripting to crate RAT aircraft with random skin and plan model or should i crate plan object for each skin?
__________________


IAF Bell205
IAF Anafa

-----------------------
DCS World Modules: A-10C, FC3, MiG-21BiS, F-86, P-51, KA-50, UH-1H Huey, Mi-8, M2000K, Gazal, Bf109, Mig-15, Hawk and NTTR
-----------------------
My System - ASUS Maximus HERO iiiv, CoolMaster 120 Sadion Plus, I7 -6700K @4.0, G.Skill ddr4 16GB ram, Gigabyte GTX 1070 G1 , PSU Seasonic X-650W, OCZ 150 500Gb ssd drive X2, Seagate 7200 1T X2.
-------------
assafm25 is offline   Reply With Quote
Old 10-22-2019, 07:02 PM   #440
Rudel_chw
Veteran
 
Join Date: Nov 2013
Location: Antofagasta, Chile
Posts: 4,827
Default

Quote:
Originally Posted by assafm25 View Post
Can i use scripting to crate RAT aircraft with random skin and plan model or should i crate plan object for each skin?
To use RAT you need to define a "template" aircraft, that will be used by RAT to spawn units "cloned" from it. These clones can have random liveries, taken from a set that you specify. For example on the LUA file you can see these sentences:

Code:
local uh1_civil_skins={"Civil_1", "Civil_2", "Civil_3", "Civil_4", "Civil_5", "Civil_6"}

local uh1_fateh=RAT:New("RAT-uh1-fateh", "UH-1 Fateh")

uh1_fateh:Livery(uh1_civil_skins)

uh1_fateh:Spawn(6)
The first line defines a Set of liveries for my UH-1 .. the liveries must exist on your DCS Saved Games folder, for example on mine:



You can see that the names RAT uses for the liveries is in fact the folder name of each skin.

The second line, tells RAT to use my template unit RAT-uh1-fateh to create a new RAT helo, to be commanded by the DCS AI ... my template unit, on the Mission Editor, is this:



The third line makes the skin of this particular helo, be taken at random from the Set defined on the 1st line.

The last line tells RAT to create 6 helos like this, with random flightpaths for each. When they arrive to destination, another is spawn on its place, so that always there is 6 working this Oil Field.

Finally, on your mission you need just two triggers to activate the Script, the first loads the Moose framework (that includes the RAT component) and the second loads your specification LUA:



Give it a try, it is not too difficult and this thread has a lot of Questions & Answers if you just take the time to browse it.

Best regards
__________________
For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra
For Gaming: 27" Monitor - Ryzen 1500X - 32 GB DDR4 2400 - MSI GTX970 - SSD 480 GB - HDD 10 TB - Windows 8.1 Pro - Thrustmaster HOTAS Cougar - Oculus Rift CV1
Mobile: iPad Pro 12.9" of 128 GB
Rudel_chw is offline   Reply With Quote
Reply

Tags
moose, random air traffic, rat

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 08:59 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.