You are not logged in.  

{{model.title}}

Customizing Your Mission with agHTMConfig.lua

All of the information required to run an AGHTM mission, is stored in a separate file named agHTMConfig.lua that is included in the mission, and is loaded after the agHTM script has been loaded. This file contains all of the information that potentially changes from mission to mission, and provides a very flexible way to fully customize nearly every aspect of your own AGHTM missions. This file is always used in conjunction with agHTM, and is kept separate from the agHTM script so it can easily be modified without modifying the agHTM script for every mission.

The agHTMConfig.lua file included in the AGHTM download, as well as all of our missions in the mission bundles, contains all of the default values that allow the mission to run out of the box. The configuration file contains information about pickup locations, audio file references for all messaging, navigation frequencies and audio file information for up to four navigation beacons per location, and some other metadata used by AGHTM while the mission is running.

How to Use agHTMConfig.lua

The process for customizing your missions with agHTMConfig.lua involves making a copy of the file and modifying it, then replacing the file embedded in the mission with the new file. This file would go into your Assets\Scripts folder, alongside your Mission.lua file. if you were using the methodology laid out in the Mission.lua and Structuring Your Code section of this documentation. If you are not following that pattern, you can make your copy anywhere on your hard drive where you will be able to locate it. If you have followed the steps for Using AGHTM in a New or Existing Mission, or if you started with any of the premade AGHTM Mission Templates, you will have a trigger that loads the configuration file. Choose that trigger, and under its Do Script File action, select your new or updated agHTMConfig.lua file.

Careful What You Wish For

While the entire experience can be fully customized, some changes will require a bit more work. For example, if you want to change the names of any or all of the pickup locations, you will need to update all of the audio files that use that pickup location name in the audio. This includes the inbound and outbound messages and passengers aboard message, as well as the ATC landing and departure clearance messages. The message text for these audio clips is very specific and should be duplicated to align with the onscreen messaging. All of the messaging text is included in the AGHTM Library Contents. This can be a rather large undertaking, especially if you want to update all pickup locations, so the voices match, but it is possible and AGHTM was designed to consume it automatically if you make the effort of creating those files.

Updating and Modifying Audio Clips

If you choose to update or replace any of the audio clips, the easiest way to do it, is to create a new audio file with the same name as the existing file being used. You can then simply reload that audio clip in the trigger that loads that file and your file will now be included in the mission. You should also update any corresponding entry in agHTMConfig.lua that references that file to update the duration to match the duration of your audio clip. This way, the text message will be displayed for the same duration as your audio clip. All text used in the default messaging can be found in the AGHTM Library Contents section so you can use it as a guide when recording your own audio files. Your messages should always use this text, replacing the obvious placeholders, like location name for example.

Every audio clip used in AGHTM has an entry in agHTMConfig.lua. That entry contains a key, which is the name of the audio file being used, and a duration in seconds for the audio clip. If you choose to record a new clip, and give it a name other that what AGHTM is expecting, you will need to update that corresponding clip's entry to reflect your new file's name in the key. This filename is case-sensitive and should match your imported file's name including the extension. You will also need to be sure to load the audio clip into your mission using the Mission Start trigger created as part of setting up AGHTM, or found in the mission bundle missions, or premade mission templates.

Default agHTMConfig.lua File Contents

Below you can see the details of the default agHTMConfig.lua file that is included in the AGHTM download. For detailed information on the different elements in the configuration file, and what each property corresponds to when the mission is run, check out the AGHTM Scripting Reference.

Default agHTMConfig.lua:
-- AGHTM Initialization Script
-- This should always be loaded after agHTM, but before your Mission.lua file.

agHTM.audioKeys = {
["start1"] = {
audioKey="CheckingIn.ogg",
duration=4
},
["start2"] = {
audioKey="Start2.ogg",
duration=1
},
["start3"] = {
audioKey="Start3.ogg",
duration=6
},
["start4"] = {
audioKey="Start4.ogg",
duration=2
},
["start5"] = {
audioKey="Start5.ogg",
duration=6
},
["start6"] = {
audioKey="Start6.ogg",
duration=8
},
["start7"] = {
audioKey="Start7.ogg",
duration=8
},
["landed1"] = {
audioKey="Landed1.ogg",
duration=6
},
["landed2"] = {
audioKey="CheckingOut.ogg",
duration=2
}
}

agHTM.pickupZones = {
[1] = {
name="ALPHA Station",
activated=false,
audioKey_Inbound="InboundAlpha.ogg",
audioDuration_Inbound=3,
audioKey_Loaded="LoadedAlpha.ogg",
audioDuration_Loaded=4,
audioKey_Departure="DepartAlpha.ogg",
audioDuration_Departure=3,
audioKey_ATCLand="ATCLandAlpha.ogg",
audioDuration_ATCLand=3,
audioKey_ATCDepart="ATCDepartAlpha.ogg",
audioDuration_ATCDepart=3,
navBeaconFileKey="l10n/DEFAULT/A.ogg",
navBeaconTZName="TZ_Alpha",
navBeaconFrequency1=34100000,
navBeaconModulation1=1, -- 0=AM, 1=FM
navBeaconFrequency2=30100000,
navBeaconModulation2=0, -- 0=AM, 1=FM
navBeaconFrequency3=811000,
navBeaconModulation3=1, -- 0=AM, 1=FM
navBeaconFrequency4=1011000,
navBeaconModulation4=0, -- 0=AM, 1=FM
navBeaconPower=1000,
navBeaconName="Beacon_Alpha",
minCargoWeightToAdd=70,
maxCargoWeightToAdd=100
},
[2] = {
name="BRAVO Station",
activated=false,
audioKey_Inbound="InboundBravo.ogg",
audioDuration_Inbound=3,
audioKey_Loaded="LoadedBravo.ogg",
audioDuration_Loaded=4,
audioKey_Departure="DepartBravo.ogg",
audioDuration_Departure=2,
audioKey_ATCLand="ATCLandBravo.ogg",
audioDuration_ATCLand=3,
audioKey_ATCDepart="ATCDepartBravo.ogg",
audioDuration_ATCDepart=3,
navBeaconFileKey="l10n/DEFAULT/B.ogg",
navBeaconTZName="TZ_Bravo",
navBeaconFrequency1=34200000,
navBeaconModulation1=1, -- 0=AM, 1=FM
navBeaconFrequency2=30200000,
navBeaconModulation2=0, -- 0=AM, 1=FM
navBeaconFrequency3=821000,
navBeaconModulation3=1, -- 0=AM, 1=FM
navBeaconFrequency4=1021000,
navBeaconModulation4=0, -- 0=AM, 1=FM
navBeaconPower=1000,
navBeaconName="Beacon_Bravo",
minCargoWeightToAdd=70,
maxCargoWeightToAdd=100
},
[3] = {
name="CHARLIE Station",
activated=false,
audioKey_Inbound="InboundCharlie.ogg",
audioDuration_Inbound=3,
audioKey_Loaded="LoadedCharlie.ogg",
audioDuration_Loaded=4,
audioKey_Departure="DepartCharlie.ogg",
audioDuration_Departure=2,
audioKey_ATCLand="ATCLandCharlie.ogg",
audioDuration_ATCLand=3,
audioKey_ATCDepart="ATCDepartCharlie.ogg",
audioDuration_ATCDepart=3,
navBeaconFileKey="l10n/DEFAULT/C.ogg",
navBeaconTZName="TZ_Charlie",
navBeaconFrequency1=34300000,
navBeaconModulation1=1, -- 0=AM, 1=FM
navBeaconFrequency2=30300000,
navBeaconModulation2=0, -- 0=AM, 1=FM
navBeaconFrequency3=831000,
navBeaconModulation3=1, -- 0=AM, 1=FM
navBeaconFrequency4=1031000,
navBeaconModulation4=0, -- 0=AM, 1=FM
navBeaconPower=1000,
navBeaconName="Beacon_Charlie",
minCargoWeightToAdd=70,
maxCargoWeightToAdd=100
},
[4] = {
name="DELTA Station",
activated=false,
audioKey_Inbound="InboundDelta.ogg",
audioDuration_Inbound=3,
audioKey_Loaded="LoadedDelta.ogg",
audioDuration_Loaded=4,
audioKey_Departure="DepartDelta.ogg",
audioDuration_Departure=3,
audioKey_ATCLand="ATCLandDelta.ogg",
audioDuration_ATCLand=3,
audioKey_ATCDepart="ATCDepartDelta.ogg",
audioDuration_ATCDepart=3,
navBeaconFileKey="l10n/DEFAULT/D.ogg",
navBeaconTZName="TZ_Delta",
navBeaconFrequency1=34400000,
navBeaconModulation1=1, -- 0=AM, 1=FM
navBeaconFrequency2=30400000,
navBeaconModulation2=0, -- 0=AM, 1=FM
navBeaconFrequency3=841000,
navBeaconModulation3=1, -- 0=AM, 1=FM
navBeaconFrequency4=1041000,
navBeaconModulation4=0, -- 0=AM, 1=FM
navBeaconPower=1000,
navBeaconName="Beacon_Delta",
minCargoWeightToAdd=70,
maxCargoWeightToAdd=100
},
[5] = {
name="ECHO Station",
activated=false,
audioKey_Inbound="InboundEcho.ogg",
audioDuration_Inbound=3,
audioKey_Loaded="LoadedEcho.ogg",
audioDuration_Loaded=4,
audioKey_Departure="DepartEcho.ogg",
audioDuration_Departure=2,
audioKey_ATCLand="ATCLandEcho.ogg",
audioDuration_ATCLand=3,
audioKey_ATCDepart="ATCDepartEcho.ogg",
audioDuration_ATCDepart=3,
navBeaconFileKey="l10n/DEFAULT/E.ogg",
navBeaconTZName="TZ_Echo",
navBeaconFrequency1=34500000,
navBeaconModulation1=1, -- 0=AM, 1=FM
navBeaconFrequency2=30500000,
navBeaconModulation2=0, -- 0=AM, 1=FM
navBeaconFrequency3=851000,
navBeaconModulation3=1, -- 0=AM, 1=FM
navBeaconFrequency4=1051000,
navBeaconModulation4=0, -- 0=AM, 1=FM
navBeaconPower=1000,
navBeaconName="Beacon_Echo",
minCargoWeightToAdd=70,
maxCargoWeightToAdd=100
},
[6] = {
name="OLYMPIA Base",
activated=false,
audioKey_Inbound="InboundOlympia.ogg",
audioDuration_Inbound=3,
audioKey_Loaded="",
audioDuration_Loaded=10,
audioKey_Departure="",
audioDuration_Departure=10,
audioKey_ATCLand="ATCLandOlympia.ogg",
audioDuration_ATCLand=3,
audioKey_ATCDepart="",
audioDuration_ATCDepart=10,
navBeaconFileKey="l10n/DEFAULT/FOB.ogg",
navBeaconTZName="TZ_Olympia",
navBeaconFrequency1=34600000,
navBeaconModulation1=1, -- 0=AM, 1=FM
navBeaconFrequency2=30600000,
navBeaconModulation2=0, -- 0=AM, 1=FM
navBeaconFrequency3=861000,
navBeaconModulation3=1, -- 0=AM, 1=FM
navBeaconFrequency4=1061000,
navBeaconModulation4=0, -- 0=AM, 1=FM
navBeaconPower=1000,
navBeaconName="Beacon_Olympia",
minCargoWeightToAdd=70,
maxCargoWeightToAdd=100
}
}

agHTM.playerUnitName = "Easy Rider-1-1"
agHTM.flightName = "Easy Rider"
agHTM.takeoffObjectGroupName = "" --"OLYMPIA-1"
agHTM.landingObjectGroupName = "" --"OLYMPIA-2"
agHTM.startMessageDelay = 15
agHTM.showZoneEntryExitMessages = false
agHTM.landingZone = "TZ_LANDING"
agHTM.endMissionOnFinalLanding = true
This site is built with a responsive design LGMDSMXS