Druid_ Posted March 6, 2011 Posted March 6, 2011 Thought it might be a good idea for mission builders to share some mission templates/addons. By this I mean things like creating loops, tanker orbits, airfield attacks, Helicopter troop dropping ..etc , but all in the form of an example mission that can be easily added then changed to suit in your own mission. This could also save hours of pain trying to achieve something that someone has already done. Builders can go through the ME GUI and maybe learn a thing or two along the way, I know I have by looking at others mission files. i7-7700K : 16Gb DDR4 2800 Mhz : Asus Mobo : 2TB HDD : Intel 520 SSD 240gb : RTX 2080ti: Win10 64pro : Dx10 : TrackiR4 : TM Warthog : ASUS ROG SWIFT PG348Q
Druid_ Posted March 6, 2011 Author Posted March 6, 2011 (edited) MULTIPLE TANKER REFUELLING AREAS Built this mission addon as its unreal for a tanker to stay in one position especially if, you the player, is short of fuel. I thought it would be nice if you could have several refuelling areas for the tanker and you as the player/client could ask him to relocate to an area closer to your position. START YOUR BUILD WITH THIS AS YOUR TEMPLATE AND MOVE THE WAYPOINTS INTO POSITION AS REQUIRED ONCE YOU COMPLETE YOUR BUILD. PLEASE AVOID USING FLAGS 90-93 (else you’ll bugger it all up). Set up your mission with a number of refuelling areas and by use of your Radios you can ask the tanker to relocate to any one of those areas. He will leave his current area and reposition to requested area. In this mission example the refuelling orbits are waypoints (as shown in GUI Map) 1-2, 3-4, 5-6 & 7-8 (4 areas in total). Please refer to the mission brief in the .miz file for more information on this template/add-on. Note: If you check the Advanced/Orbit STOP CONDITION you will see a tick next to the User Flag. I unticked it but the GUI still shows it as ticked (i.e. True) this is NOT the case (a GUI bug I’m afraid). p.s. I have included an a10 Player behind tanker so you can try it out. Tanker relocate addon.miz Edited March 7, 2011 by Druid_ i7-7700K : 16Gb DDR4 2800 Mhz : Asus Mobo : 2TB HDD : Intel 520 SSD 240gb : RTX 2080ti: Win10 64pro : Dx10 : TrackiR4 : TM Warthog : ASUS ROG SWIFT PG348Q
MadTommy Posted March 6, 2011 Posted March 6, 2011 (edited) Random Mission Framework Druid great idea... however there is one massive draw back, there is no way to integrate or import other peoples trigger systems. You have to copy them manually or use them in isolation to anything else. I have tried adding one part of a mission to another via editing the mission file when you unzip the miz.. but i failed to do this without corrupting the mission. That aside still great to share ideas etc. ____________________________________________________ From: http://forums.eagle.ru/showthread.php?t=67560 Ok, here i'm sharing a mission framework I've created. This will always be 'work in progress'. If i wait for it not to be to share, it'll never be shared. ;) This is not for the uninitiated mission maker, this is in fact pretty complicated. To be honest, i expect it to be a little daunting to the majority as you have not built up the trigger system from scratch, please ask any questions you may have. Main Goal: This structure allows you to make a mission that can be played over and over again, and you won't know what the next task is or where the potential threats are. With 256 variations this should work well. The mission should also always be balanced, as there are NO random triggers, you can control the mission precisely. Explanation: (excuse me if this is a little long winded, it's not easy to explain) This is a template for a mission structure. To be honest it is not random, it is in fact very structured with equal odds of any one scenario be active. It will allow for a minimum of 256 different scenarios from one mission. It allows for 12 tasking, any 3 of which will be run in any one running of the mission. At the mission start there is a pool of 4 tasks, any one of these has a 1 in 4 chance of being selected. Once this task has been completed there is a another pool of 4 tasks, of which there is a 1 in 4 chance of selection. This occurs 3 times, i.e the 3 tasking per mission. There is also a system to allow for a pool of 4 mission threats & environments. There is a 1 in 4 chance of these being selected. So this gives you 1/4 x 1/4 x 1/4 x 1/4 = 256 variations. If you follow it as i intended. It can of course be used in different ways. And please alter it as you wish. The template has 1 player & 7 client slots included. So it can be a SP or MP 8 coop mission. This of course can be expanded. I have provided an excel sheet to go along with it, this should help you understand it a lot. The excel file has two sheets, one called Logic has the template trigger system written out. In order to make the mission you have to add all the taskings yourself, and all the tasking success criteria. And all the threat & environment (group activations) too. Where this is required there is red font. I have also colour coordinated trigger types to help make it easier to follow. Most of the 'message to all' are just place holders for mission creation. The second sheet, called Data, is what i use to add the missions & threats. It helps me keep track what has been placed. This is basically empty, be ready to be used with this template. It may be of no use to you. As i said if you like the look of it and have further questions post away, but at this stage i won't spend ages explaining the details of the template unless there is genuine interest in it. Its just too complicated. I hope if you are familiar with triggers & the editor and with the help of the excel file this might help you create some diverse missions. If you have any suggesting for better way of doing things i'd love to hear them. But please remember this framework is designed to work under all the betas and MP environment, so i have tried to use a fool proof trigger structure. The excel has been attached as a zip due to attachment constraints. I can't attach the same files to two posts.. so you can download them from the linked thread. Edited March 6, 2011 by MadTommy i5-3570K @ 4.5 Ghz, Asus P8Z77-V, 8 GB DDR3, 1.5GB GTX 480 (EVGA, superclocked), SSD, 2 x 1680x1050, x-fi extreme music. TM Warthog, Saitek combat pro pedals, TrackIR 4
Grimes Posted March 6, 2011 Posted March 6, 2011 (edited) Scalable Randomization Scalable Randomization There are several methods available to create randomization to your missions. Mad Tommy posted on one way, I'll post on another..... and Speed will probably show up with a lua script that is better than both :D In the attached file I included 3 basic examples. All revolve around the same principle, but are executed slightly differently from one another. The big difference between this randomization and the randomization posted by Mad Tommy is that this is scalable and is determined at mission runtime. Advantages Easy to understand Easy to reproduce Can Execute more than once Can be used with any number of choices With all of these examples it is possible to write the requiring conditions differently than how they are presented. I almost always write my randomization triggers assuming that I might use them more than once within a mission. As a result they often have 1 or 2 more triggers and conditions implemented that are not necessary if the triggers are to be used only once. One Time Random Choice This method needs 1 trigger to start it and 1 trigger for every choice Usually I like to use a Once> Time More 10 seconds> Set All Flags that need to be true Once> Flag X is True && Random 10%> Flag X Off and activate group A Once> Flag X is True && Random 10%> Flag X Off and activate group B Multiple Choice Sometimes you might want to select several different groups to activate, but you want it limited to a specific amount. In the example in the file there are 6 total groups to choose from and it will randomly choose 4 of them. As always a trigger is needed to start the randomized choice. I added an end trigger: Once> Flag 21 is More than 3> Flag 20 Off The Choices Once> random10% && Flag is 20 is true> Flag 21 Increase 1 (+1) && Action A Once> random10% && Flag is 20 is true> Flag 21 Increase 1 (+1) && Action B ...... The choices will all execute whenever they are randomly executed. Each time they run it increases flag 21 by a value of 1. By default flag 21 starts at 0. Once 4 choices are made flag 20 gets turned off by the end trigger. Thus no more choices are made. Multiple Group Random Choice This method was extensively used in creating On Station. Each randomly selected task was within a randomly selected group. Each group can be chosen more than once and I implemented conditions preventing a group from being chosen if all its options within were already triggered. As always a trigger is needed to make the first selection. Also included is a trigger used for whenever another choice needs to be made. Select Group 1 Switched Condition> Flag 30 is True && Random 10% && Flag 119 is False> Flag 30 off, Flag 110 On Select Group 2 Switched Condition> Flag 30 is True && Random 10% && Flag 129 is False> Flag 30 off, Flag 120 On Sub Choices Once> Flag 110 is True && Random 10%> Flag 110 Off, Flag 111 On Once> Flag 110 is True && Random 10%> Flag 110 Off, Flag 112 On Once> Flag 110 is True && Random 10%> Flag 110 Off, Flag 113 On .... To prevent the group selection from being chosen if all sub-choices are made Once> Flag 111 is True && Flag 112 is True && Flag 113 is True> Set Flag 119Scalable Randomization Template.miz Edited March 7, 2011 by Grimes edit... or Druid will post one. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Druid_ Posted March 7, 2011 Author Posted March 7, 2011 another RANDOM TASK GENERATOR using SCRIPTS The following script will generate a random table every time the mission is run. local tasktotal = 10 -- change this number to the number of random tasks you want to generate. user_task = {} for x = 1,tasktotal do user_task[x] = x end function randomiseTable(tableName) local temp_table = {} local index = -1 math.randomseed( os.time() ) while #tableName > 0 do index = math.random(1,#tableName) table.insert(temp_table,tableName[index]) table.remove(tableName,index) end return temp_table end user_task = randomiseTable(user_task) The table is then used to set flags upon which you can set triggers. trigger.setUserFlag(user_task[1], true) table.remove(user_task,1) if #user_task < 1 then -- last task has been set i.e. No more tasks. trigger.setUserFlag(999,true) end Attached is a mission example. A complete explanation is written in the mission brief. Suffice to say I have made it easy to understand and use (hopefully).random task table lua.miz 1 i7-7700K : 16Gb DDR4 2800 Mhz : Asus Mobo : 2TB HDD : Intel 520 SSD 240gb : RTX 2080ti: Win10 64pro : Dx10 : TrackiR4 : TM Warthog : ASUS ROG SWIFT PG348Q
Speed Posted March 7, 2011 Posted March 7, 2011 (edited) Druid, you created this yourself, huh? Awesome! I'm really glad someone else other than myself is actively scripting. On the way, I will be updating my destroyed map object script, making public a message input and output function library (part of which Grimes is using in On Station v5), and finally releasing autoarty. autoarty is my biggest project right now. It's a script that causes artillery to automatically engage targets in range, lead them if they are moving, and take steps to correct for the undershoot problem which occurs at higher altitudes. So artillery will actually take an active role in battles now. Much of the script is done already, but it's a pain to implement for a large mission, and I am taking steps to ease this pain before I release it. Druid, would you like me to create a quick lua function guide since ED seems occupied at the moment? Edited March 7, 2011 by Speed Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc.
Druid_ Posted May 12, 2011 Author Posted May 12, 2011 (edited) Utilising the F10 Other menu effectively ---------------------------------------. For single player missions (F10 other menu only works for Host in ver 1.1.0.7) it is nice to involve the player in decision making and interactive communications. This is done by the mission builder through use of the F10 other menu in missions. (you can use this for Co-op MP missions, just remember Host does the radios) Using the current GUI in ME means that you have to select transmit and select F10 again to see a user created sub-menu. e.g 1. OPS MENU 2. TANKER MENU selecting 2. (F2) you might like to display another sub-menu. This means deleting all of the current menu, adding your sub-menu then the player has to hit F10 again to view this new sub-menu (i.e TANKER MENU). I didn't like this so reverted to lua for a solution and found it in the bottom 2 commands shown at the bottom of this post. However, I went a step further to tidy up and produce a more efficient and 'quicker' method by putting all of the menus in script. creating a menu is as easy as ftenMenuItems = {'Hawg task complete', 'Say again', 'OPERATIONS MENU', 'TANKER MENU'} then displaying the menu and setting appropriate flags (in this case 201 to 204) for i=1,#ftenMenuItems do RadioCommandDialogsPanel.addOtherMenuItemUserFlag(ftenMenuItems[i], 200+i) end then to remove the menu do for i=1,#ftenMenuItems do RadioCommandDialogsPanel.removeOtherMenuItem(ftenMenuItems[i]) end Once any single F10 menu item is selected use the following commands to instantly pop up the commands menu, display the F10 Other menu and your now added sub-menu. RadioCommandDialogsPanel.setShowMenu(true) RadioCommandDialogsPanel.selectMenuItem(10) Here is an example of this menu system (I tied it in with my texaco tanker relocate mission in post #2)F10 other menu popup lua.miz Edited May 18, 2011 by Druid_ added example .miz i7-7700K : 16Gb DDR4 2800 Mhz : Asus Mobo : 2TB HDD : Intel 520 SSD 240gb : RTX 2080ti: Win10 64pro : Dx10 : TrackiR4 : TM Warthog : ASUS ROG SWIFT PG348Q
Cibit Posted May 12, 2011 Posted May 12, 2011 Some clever people about in these parts:thumbup: i5 8600k@5.2Ghz, Asus Prime A Z370, 32Gb DDR4 3000, GTX1080 SC, Oculus Rift CV1, Modded TM Warthog Modded X52 Collective, Jetseat, W10 Pro 64 [sIGPIC][/sIGPIC] Adding JTAC Guide //My Vid's//229th AHB
McVittees Posted May 13, 2011 Posted May 13, 2011 On the way, I will be updating my destroyed map object script, making public a message input and output function library (part of which Grimes is using in On Station v5 Will this allow you to destroy buildings before the start of a missions or dare i hope it's something allowing destroyed objects to be tracked between missions? [sIGPIC][/sIGPIC] "Great minds think alike; idiots seldom differ.":pilotfly: i5 3750K@4.3Ghz, MSI Z77A GD55, 8GB DDR3, Palit GTX 670, 24" Benq@1920*1080, X52 Pro, Win 7 64bit.
WildFire Posted June 9, 2011 Posted June 9, 2011 (edited) Druid, I am using your random table script and I have a question. Say I set up a few groups/locations to be triggered at the beginning of my mission. Say if group1 activates, flag 500 goes on, group2 is flag 501 and so on... Can I assign a variable to them so that the task will select whichever group went active? Somehow automatically select the active group so other scripts know which coordinates to broadcast...? I guess Im looking for something like: Tank1={unit1,unit2,unit3.....} Tank2={ '' } Tank3={ '' } if flag#=0, flag#+1 for flag500, flag501, flag502 taskname=flag# set task 1= "taskname or maybe just a getvariablename statement of somekind, but I would have to associate the flag to the specific group, i.e. flag501=tank1, then it would be get flag#, settask1=flag#..... I still would have no way to pass on the group id to speeds script, but I could just write seperate radio messages for each flag, which is perfectly fine. sorta.... lol. I dont know the language for this game, yet. obviously... Edited June 9, 2011 by WildFire Little more specific...
Druid_ Posted June 9, 2011 Author Posted June 9, 2011 ^replied via PM i7-7700K : 16Gb DDR4 2800 Mhz : Asus Mobo : 2TB HDD : Intel 520 SSD 240gb : RTX 2080ti: Win10 64pro : Dx10 : TrackiR4 : TM Warthog : ASUS ROG SWIFT PG348Q
Recommended Posts