Jump to content

Recommended Posts

Hopefully this thread can serve as a resource for in-game editor tips and resources.

 

____________________________________________________________________

 

 

Adding Custom Information via Prepare Flight into the Abris

Adding additional information is actualy quite easy.

 

1. Start "Prepare Mission"

2. Add the info you want in the ABRIS (MENU>PLAN>ADD INF)

3. Save the information (MENU>CONTROL>DTB>SAVE; then select ADDITIONAL INFO with the arrows and press SAVE).

4. Exit the mission

5. Save mission

(unknown forum source, thanks)

________________________________________________________________

Effective Ranges and munition quantity of in game assets: NOTE: THESE FIGURES ARE FROM FC1 AND MAY BE INACCURATE

 

(This info was from unknown source.. thanks!)

Smersh, Grad will fire a spill taking 40 secs / 20 secs respectively then will reload (about 15min?) before firing again.

Gvozdika - 6 rnds per min

Akatsia - 4 rnds per min

Msta - 8 rnds per min

Bereg - 10 rnds per min

Nona - 8 rnds per min

 

Max ranges

Artillery/Rockets

Smersh 70km

Grad 20km

MLRS 31km

M109 15nm

SAU Berg 18.5nm

SAU Gvozdika 15nm

SAU Akatsia 15nm

SAU Msta 15nm

SAU Nona 5.5nm

 

Naval artillery

Ticonderoga 14.5km

Perry 14.5km

Moscow 20km

Neustrashimy 21.5km

Rezky 21.5km

Albatros 6km

Molniya 15km

 

Tanks - all 2400m

APC cannon - all 1000m

APC missiles

M2 3000m (7 shots)

BMP3 4000m (9 shots)

BMP2 4000m (5 shots)

BMP1 3000m (6 shots)

BMD1 3000m (3 shots)

 

AA against ground targets

Shilka 1800m

Gepard 2900m

Vulcan 2800m

Avenger 1300m

Tunguska 1400m

________________________________________________________________

 

Blank Template Mission with triggers set for 4 scenarios all with a 25% chance of occurring, but no two will occur at once. i.e make a mission where there are 4 different scenarios possible, with one being chosen randomly and the mission start.

 

Template Mission Download

 

________________________________________________________________

Edited by MadTommy
typo

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

Link to post
Share on other sites
  • 4 weeks later...
  • Replies 209
  • Created
  • Last Reply

Top Posters In This Topic

Tweaking AI behaviour

 

Get AI to illuminate and mark targets.

 

Heres what i do:...

 

1. Su25T with SAB-100 illumination flare bombs, S-8TsM smoke rockets & mercury targeting pod. (depending on what you need)

2. Set Task to AFAC

3. Set Skill to Excellent (on normal... they rarely did as they were asked)

4. Set Target to both Point and Vehicles (planes had mix of flares and smoke rockets, and they illuminated the area and marked targets with smoke.

5. Make sure they fly over the target using waypoints. (sounds obvious, but..)

6. Altitude was at 2,500m (adjust this if the planes are not seeing their targets)

 

I had two Su25T flying a loop dropping flares and marking targets just as i wanted.

 

Tweaking enemy helos and ground attack aircraft so they don't become a show stopper.

 

There are several ways to do this:

 

Skill level: that's obvious, but I don't see huge effects, and it applies to everything they do.

 

Load outs: the less AGTMs they have the less threat to the play they will be.

 

Targeting: this is a biggie. If you check the helicopter box they are going to go after the player unless they are really really distracted. With A10s and SU25s this is a show stopper, because you have no defense really. Very very hard to shoot down fixed wing with our AGTMs. The helos will defend themselves without helicopters checked, but only if you are straight in their face. They won't hunt you.

 

 

The AI ability to lock and shoot at the player overmatches our ability to do the same. Their missles seldom loose track, though they do miss.

 

So it's important to tweak your enemy helos to make a mission the most fun and doable. The Hind is the most tweakable because of it's many loadouts.

 

I got an Mi-8 to do a credible looking turn, flare, and pause over a building to simulate putting troops on a rooftop by using four waypoints:

 

The first is the "line up" waypoint, altitude 100m, speed 150, as a "fly over."

Second is 600m online, "fly over," altitude 100m, speed 50 at a 35 degree angle to the left.

Third is a "fly over, altitude 100m, distance 300m, speed 20, at about 20 degrees to the right - basically forcing it to do a hard wingover, which looks like a reverse to flare.

Fourth is a "fly over" with a speed of zero some 600m distant from the last waypoint.

 

What happens is the bird comes in and starts to slow at the first waypoint in prep for the second.

 

At the second she'll try to slow down to that 20kph and point at the third waypoint.

 

This is the money maker, as it'll go nose high, rotate right, nose down to correct for altitude, and then flare hard to slow down, coming to a near stop before continuing on.

 

It then passes through that waypoint, rotates and hovers at the last one a safe distance away.

 

The frustrating part is that it's not an exact science, and it took a lot of tinkering to get the darned thing to do the flare-stop in the right spot.

 

Now if we can get a fast rope....

 

Oh, and I cheated on the troops by having them magically appear on the rooftop based on time.

 

Then again, storming a building is all about timing, right?

 

:)

 

:pilotfly:..

Edited 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

Link to post
Share on other sites
  • 2 weeks later...

Put a farp ANYWHERE:

 

ScreenShot_478.jpg

 

Stumbled on this by accident. Usually you get the "Terrain is too steep" warning on much of the map.

 

Pick your country, choose static objects, ground vehicles, place it whereever (the relief shading and lines are inaccurate, I use mouse alt), then change it to a heliport.

 

You can't drag it once it's placed, but it's there.

Edited by EvilBivol-1

E8600 Asus P5E Radeon 4870x2 Corsair 4gb Velociraptor 300gb Neopower 650 NZXT Tempest Vista64 Samsung 30" 2560x1600

Link to post
Share on other sites
  • 8 months later...

Mission Editor - Hot Tips

 

I've discovered a few tricks over the time while building missions.

No need to keep the secrets I've learned if it can help you others. :)

 

---------------------------------------------------------------

Q: "Loading and testing takes too long time!!"

A: Efficient Editing 101 - view world while editing;

This method is very effective if you need to place units precisly.

You will run two instances of DCS - one SP and one MP.

Preparation; Set up DCS/FC2 to run in Windowed mode - set window size to 3/4 of your desktop.

  • Start a DCS:BS in MP mode, keep it ready for loading a mission
    (You need to start DCS in MP before DCS in SP if you plan on using TrackIR / Hotas that hooks into the DCS.exe)
    Do not close it.
  • Start DCS:BS Mission Editor secondly - edit your mission.
    SAVE the mission.
  • Without closing the SP
    - Load the mission in MP as Server, use F2/F7 etc to view your unit positions.
  • In the SP editor
    - Adjust your Units position. Or add new one's.
    - Do NOT save while mission is loaded and running in MP.
  • Disconnect from your MP Server mission.
  • SAVE your mission in SP Editor.
  • LOAD mission again to review changes.

SP-MPsetup1.thumb.jpg.651cb91f988ef6da8808564d113f4707.jpg SP-MPsetup2.thumb.jpg.0d6c7d190b9cf169d3cd72e4844e0438.jpg SP-MPsetup3.thumb.jpg.60929078202da329bf9db84fc8e26a1b.jpg

(Fun-Fact: CoBa was killed by the Gepard 3 times without spotting it)

---------------------------------------------------------------

 

Q: "I have 6562 units and using F7 to review all takes FOREVER!!".

A: Quickly Jump to Unit of Interest:

 

In MP while reviewing mission;

- Bring up F10 map.

- Find unit of interest - click on the Unit it in map.

- Press F7 - and you are looking at your unit.

Or F2 for airunit

Or F12 for static object.

 

---------------------------------------------------------------

 

Q: "I have 6512 units hiding them all takes forever!

...... plus I cannot see them while I EDIT!!!!".

A: Quickly Hide all units after Edit:

 

Review the "How to hide all units" in this old topic - ignore the other stuff.

HOW-TO Prepare your mission

 

In short it means;

- Use Winrar and Assign all .MIZ files to Winrar.

- Open Missionfile in Winrar - doubleclick mission in the archive - open it in Notepad++.

- Use the Search and Replace for "hidden = false" with "hidden = true"

- Close and save on exit from Notepad++.

- Close archive (automaticly saves).

 

---------------------------------------------------------------

Q: "I want to check for some condition OR another condition.

But it seems like all the Mission Editor can do is AND in the conditions!?"

 

A: "OR"-condition hack for triggers;

By default all conditions are using the AND statement.

However - You can "hack" you mission-file and change it into OR if you like.

 

Here's a sample;

1. Create a mission with a normal AND condition.

AND-OR-hack.thumb.jpg.2ac5a2f9d654959070cb9bccfcc08497.jpg

Normally the above statement will be evaluated as "Group1 dead AND Group2 dead" etc.

 

2. Save the mission and open the mission in Notepad++

Change the AND statements into OR

OR-Before.thumb.jpg.f4c7504ce717f14cba27d3c708adfdca.jpg OR-After.thumb.jpg.05499187224abbb7d016d34451dcbb60.jpg

3. Test the mission - now you can see that only 1 group needs to be dead;

OR-is-Working.thumb.jpg.2251dcba9f4dce3204ca6b596f691302.jpg

NOTE - if you save the mission again in the Editor it WILL revert to "AND" again. So be sure that this is one of the last things you do.

 

Another sample of advanced "AND->OR" hacking;

If you have a MP map with 8 players and need to check if *any* 2 are in a Zone at the same time.

How to check for 2 players in a Zone; http://forums.eagle.ru/showpost.php?p=809924&postcount=23

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites

---------------------------------------------------------------

GENERAL FAQ / Random Question's from members

---------------------------------------------------------------

 

Q:"Is there anyway that if all groups of units are destroyed in a certain area to trigger an message telling the pilot he has done a good job?

I think i have figured out how to do it if there's only one group of units in the area but not if there are 2 groups of units or more........ Is it even possible?"

 

A: "Group Dead" is the only practical solution in this situation.

You can also use "Unit Dead".

Picking "some" being dead can become really complex - so sticking to a whole group is most often the easiest solution.

 

Here's an example - all the evaluation uses the "And" operator (there is no "Or" operator in the Editor).

If group "this" dead - and if that other group is dead - and if that third group is dead;

GroupDead.jpg.942067b7ad647328e523d8eed1dda419.jpg

EDIT; It is possible to "Hack" your mission file to support OR. See OP.

 

Q: "When I have a SAM somewhere and you fly towards it in your Shark you will be able too see an blue circle on your abris.

How do i make this circle disappear from the abris? kinda spoils the fun of the mission."

 

A: "Hidden on Map" - it's a checkbox per unit. It hides it on the ABRIS - but also within the Mission Editor.

HiddenTicBox.jpg.3e9f2ed96eeb4853f6c508b721a9aa52.jpg

If you wish to see it in the Editor and hide all units afterwards use the trick "Quickly Hide all units after Edit"

 

Q: "I got a Flight from an other base. Is there anyway to trigger an message that if this unit is engaged by AA a message appears?

Or, next best thing, to make an trigger if he passes an certain way-point?"

 

A: You could use "Unit Damaged" trigger - but then it's about to get blown out of the skies - too late probably.

The "next best thing" is the only practical solution.

Create a "Trigger Zone" and use a "Unit inside Zone" to trigger when it passes that point.

Free hint - note the sound added to the action to get the Players attention;

UnitInZoneMessage.thumb.jpg.ad0e5ba0ad40850c0903864c1cda9fd2.jpg

 

Q: "Is it possible to have different types of units within one group of units?"

A: Yes - different types such as "Russian ZU-23" and a "Russian T80U" can be mixed.

- Units of different type and same class & country can be mixed.

- Different Countries or Coalitions cannot be mixed, no.

- Different Classes cannot be mixed (Air vs Ground), no.

 

Q: "The random function isn't what I expected. Any alternatives?"

A: Check out Grimes "Random Occurrence Generator" alternatives here; http://forums.eagle.ru/showpost.php?p=803600&postcount=22

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites

Mini Tutorial 1 - FLAGS and ACTIVATE

 

Q: "How to achieve certain conditions to be met, and get a group of units to start doing something?

For example, if flight A flies over point 5 i would like artillery group B to pound point 6 for either X amount of time or until an other condition has been met."

A: You probably want to start exploring FLAGS and ACTIVATE GROUP.

Here's a sample scenario.

- Pilot #551 Reaches an area (within 3 km) of an Artillery Group.

- The Commander radio's some information on which group they will Attack by dropping a WP marker in front of it.

- The group has to leave, but calls in some Su-25's for assistance.

- The pilot #551 and the Su25-group starts hitting the remaining targets.

triggers-art1.thumb.jpg.7a8eb543e242fdf442dce832226d50b8.jpg triggers-art2.thumb.jpg.e89b336dba8c2452a77ddeabe9468844.jpg triggers-art3.thumb.jpg.0affb58f7b13291cf25fe35539713b4b.jpg triggers-art4.thumb.jpg.56e04fde3f4f82fc863982378bd7a2b2.jpg

 

Here's a quick overview over the trigger sequences.

Triggerlist1.jpg.2eb9d2e3a4ac70d85dd0ce15c235ea88.jpg Triggerlist2.jpg.825029ac2d78a328a0b0595baa42a98e.jpg Triggerlist3.jpg.ab9348c56e219d896681535e6cf02d52.jpg

The first Trigger;

- A zonecheck for a specific Pilot inside zone AND a FLAG#99 to be Not Set/False. This means if you have several triggers (for several pilots) it will only trigger for the First pilot (and not anyone else straying into the Zone later). FLAG#99 is set to true a bit later.

 

The second trigger;

- Activates all the things that needs to start at the same time.

- R-Artillery group is being activated (allowed to fire). Notice that is was placed on the map as "Delayed 23:00:00" and "Visible before start".

This means it's visible - but inactive - it wont fire on anything.

Triggers1.jpg.b9ff82aafb7a788c4a9cb93e1d45dd24.jpg

 

The next trigger;

- Some delayed radio-chatter.

 

The last trigger;

- Pulls out "R-Artillery" by deactivating them.

- It activates a "R-Artillery (moving)" group.

Why?

Because if you want to have some units in a specific position - manually placed and good looking - they cannot have any waypoints. Waypoints override any manual positioning you have done for the 3D-world.

 

So we use 2 groups to emulate the artillery;

- 1 for firing and looking good.

- The other for the retreat and waypoints.

Triggers2.thumb.jpg.53d2ddee6c2af5c7c955c4c792d9eb0e.jpg Triggers3.jpg.e6166d2be33289b9aa2ec871999a3c58.jpg

Notice the difference in who's visible during start - and notice that both are set to being Inactive "23:00:00".

 

Targeting.

It's a bit hard to see in the pictures - but;

- "R-Artillery" doesn't attack on random.

- It doesn't attack the closest target either (AI normally attacks the frst target it sees).

It has a Target-point set. It will obey this when it becomes active.

Triggers1.jpg.b9ff82aafb7a788c4a9cb93e1d45dd24.jpg

 

It's probably a bit easier to see how targeting works if you look at the Su-25's;

Triggers4.thumb.jpg.0a800b7746a689babaa9b7756f2c0ae6.jpg Triggers5.thumb.jpg.d31a4cd75e8e13d456d163c05e866937.jpg

They got several Target-zone set - and they are set further out than the waypoint.

- The target zone must contain some valid targets as set in the target-list.

- The pilots need some time to spot the targets - but the targets must also be within their visibility (According to the AI skills).

If those goals are met they will commence attack-runs until they run out of ammo, die or are distracted in other ways.

 

Mission is attached for those who wish to study FLAGS and other methods. :)

TRIGGER-SyncedAction.miz

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites

A new hawt tip added regarding "OR"-condition.

---

Q: "I want to check for some condition OR another condition.

But it seems like all the Mission Editor can do is AND in the conditions!?"

 

A: "OR"-condition hack for triggers;

By default all conditions are using the AND statement.

However - You can "hack" you mission-file and change it into OR if you like.

(See OP for details)

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites

Thx for the help, Panzertad !!

 

I would like to add an 'altitude trigger'.. If someone of my friends or me, take 300 mts high, I added a small comment requesting the pilot to recover a low altitude for security (There is a lot of traffic, mi28, hinds, etc, etc)

 

The problem is that, if I raise 300 mts, the 'altitude trigger' appears to all the integrants of the mission and I would like to appears only to the pilot who has passed the 300 mts altitude.

 

It's possible?

 

Thnx in advance

[sIGPIC][/sIGPIC]

Link to post
Share on other sites

Few questions:

 

What exactly do you mean by mts? I assume meters AGL but just for clarity. :)

 

Also, could you give an example of the trigger rules you use for that? I think it should be possible through a simple set of AND operations - with the one drawback that you'll have to make a ful set for each pilot, but I may have misunderstood.

[sIGPIC][/sIGPIC]

Daniel "EtherealN" Agorander | Даниэль "эфирныйн" Агорандер

Intel i7 2600K @ 4.4GHz, ASUS Sabertooth P67, 8GB Corsair Vengeance @ 1600MHz, ASUS GTX 560Ti DirectCU II 1GB, Samsung 830series 512GB SSD, Corsair AX850w, two BENQ screens and TM HOTAS Warthog

DCS: A-10C Warthog FAQ | DCS: P-51D FAQ | Remember to read the Forum Rules |

|
| Life of a Game Tester
Link to post
Share on other sites
Thx for the help, Panzertad !!

 

I would like to add an 'altitude trigger'.. If someone of my friends or me, take 300 mts high, I added a small comment requesting the pilot to recover a low altitude for security (There is a lot of traffic, mi28, hinds, etc, etc)

 

The problem is that, if I raise 300 mts, the 'altitude trigger' appears to all the integrants of the mission and I would like to appears only to the pilot who has passed the 300 mts altitude.

 

It's possible?

 

Thnx in advance

 

If I understand you question correctly, then this is my answer to your dilemma;

- The CONDITION can be "Altitude > 300 m" AND "Pilot 1 inside Zone".

- Then the ACTION will affect EVERYTHING in the game (all players).

 

If you send a MESSAGE in the ACTION part of the trigger it will be sent to ALL players on the server.

In SP this is 1 player

In MP this is all players.

 

You can use the COALITION MESSAGE or COUNTRY MESSAGE - but that will require you do use different countries for each pilot.

 

Did I understand your question correctly? :)

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites

Workaround idea based on that - if Pilot 1 has callsign 325, make the action in Panzer's example be a radio call specifically saying something like "325, Magic, stay NOE to avoid detection".

 

That way, even though everyone would get the message (like would be the case for real life radio), those who are not 325 will know it's not about them.

[sIGPIC][/sIGPIC]

Daniel "EtherealN" Agorander | Даниэль "эфирныйн" Агорандер

Intel i7 2600K @ 4.4GHz, ASUS Sabertooth P67, 8GB Corsair Vengeance @ 1600MHz, ASUS GTX 560Ti DirectCU II 1GB, Samsung 830series 512GB SSD, Corsair AX850w, two BENQ screens and TM HOTAS Warthog

DCS: A-10C Warthog FAQ | DCS: P-51D FAQ | Remember to read the Forum Rules |

|
| Life of a Game Tester
Link to post
Share on other sites
Workaround idea based on that - if Pilot 1 has callsign 325, make the action in Panzer's example be a radio call specifically saying something like "325, Magic, stay NOE to avoid detection".

 

That way, even though everyone would get the message (like would be the case for real life radio), those who are not 325 will know it's not about them.

Yes, thats a very good workaround.

Remember to make sure the Player knows that he is #325 too then. :)

 

EDIT: Thats actually how it happens in real-life - so it would be fully acceptable to do it like that ;)

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites

Well, worst case scenario is some tosser will be at 200m AGL and think he was prompted to fly at a safer altitude even though the message wasn't for him. :P

[sIGPIC][/sIGPIC]

Daniel "EtherealN" Agorander | Даниэль "эфирныйн" Агорандер

Intel i7 2600K @ 4.4GHz, ASUS Sabertooth P67, 8GB Corsair Vengeance @ 1600MHz, ASUS GTX 560Ti DirectCU II 1GB, Samsung 830series 512GB SSD, Corsair AX850w, two BENQ screens and TM HOTAS Warthog

DCS: A-10C Warthog FAQ | DCS: P-51D FAQ | Remember to read the Forum Rules |

|
| Life of a Game Tester
Link to post
Share on other sites
Few questions:

 

What exactly do you mean by mts? I assume meters AGL but just for clarity. :)

 

Also, could you give an example of the trigger rules you use for that? I think it should be possible through a simple set of AND operations - with the one drawback that you'll have to make a ful set for each pilot, but I may have misunderstood.

 

 

Hi EtherealN, and thanks for your interest !!

 

The first one is yes, I used mts for meters, sorry about my english I'm spanish..:cry:

 

I let you the simple one, only for the unit 11:

CONTINUOUS(Altitude) -->Unit's Altitude higher than (11, 301) --> MESSAGE (Anapa ATC: Watch your altitude, descent to 150 AGL asap !! ATC, out)

 

I tryed for eight members and it's annoying.. ja ja ja.. when someone raises 301, the message shows to all.. I think there, is the trick... the message don't shows only for the pilot who raised 301, it rules for all.

 

And it's a lot of work, thats the reason I don't put the Trigger completely because I did one trigger, for each eight members with the possibilities for the rest of members, in conclusion, 8 by 8 possibilities are 64 possibilities for each one !!! 64 by 8 there are 512 lines of conditions... two days working! And doesn't works... oh!!

 

I worked as in the next way:

1/ The first unit, the 11, raises 301 and the rest not. --->Message

2/ The 2nd unit, the 12, raises 301 and the rest not. --->Message

3/ .................... 13 ......

4/ 14 .... the same with the 2nd group, 21, 22, 23, 24...

 

I continue giving possibilities (or trating to limitate the actions) with pairs,

- The 11, and the 12, raise 301 and the rest not....

 

Even it has, all the possibilities that can occurs.. and the problem is that the message is for all, or for the alliance, but not for exclusively the one (or whatever) who has raised 301 AGL.

 

I tryed with the first example, the one you had readed before, to all again.. (the eight pilots), and the same result (Well, of course, putting 8 conditione is rather better than 512, as in the frist try.. what lemmonhead!!! j j j

 

As I said, thanks for your interest, pair !!

 

Thanks again.

 

I 'll put a candle to the virgin Mary.... good luck, goood luck !!

[sIGPIC][/sIGPIC]

Link to post
Share on other sites

That's the question.. Panzertad!

 

I think the message is not for the pilot.. I didn't knew !! But I can see that there is the problem!!

 

Thanks

 

Editing: That's a great solution EtherealN.. great!! Thanks a lot pair of two!! Lots of thanks sincerely!

Edited by Achurro

[sIGPIC][/sIGPIC]

Link to post
Share on other sites

The first one is yes, I used mts for meters, sorry about my english I'm spanish..:cry:

 

All good - you should see my spanish. It's atrocious. :P

 

I let you the simple one, only for the unit 11:

CONTINUOUS(Altitude) -->Unit's Altitude higher than (11, 301) --> MESSAGE (Anapa ATC: Watch your altitude, descent to 150 AGL asap !! ATC, out)

 

I tryed for eight members and it's annoying.. ja ja ja.. when someone raises 301, the message shows to all.. I think there, is the trick... the message don't shows only for the pilot who raised 301, it rules for all.

 

Well, the thing is that since ATC communicates by radio, and all members of the flight are on the same frequency, if ATC wants to talk to one of them they'll talkt to all of them. That's why you use callsigns. A more realistic version of that radio call would be "347, Anapa, descend to 150 AGL."

 

I do understand that it can be a bit of a repetitive task to create triggers for each aircraft in the flight, but sadly that's the only way I can think of. And the fact that the message displays to everyone is just a realistic thing. There is no way for Anapa tower to talk to only me.

 

As I said, thanks for your interest, pair !!

 

See that Panzer? We're a pair! :D

 

Best of luck Achurro and hopefully you'll find a solution.

[sIGPIC][/sIGPIC]

Daniel "EtherealN" Agorander | Даниэль "эфирныйн" Агорандер

Intel i7 2600K @ 4.4GHz, ASUS Sabertooth P67, 8GB Corsair Vengeance @ 1600MHz, ASUS GTX 560Ti DirectCU II 1GB, Samsung 830series 512GB SSD, Corsair AX850w, two BENQ screens and TM HOTAS Warthog

DCS: A-10C Warthog FAQ | DCS: P-51D FAQ | Remember to read the Forum Rules |

|
| Life of a Game Tester
Link to post
Share on other sites
  • 3 weeks later...

Random Occurrence Generator

 

Sometimes in missions you want to randomly place threats and objectives. It helps the replay value if certain events or locations of targets happen at different times or areas. I'm looking at this from more of a future LO 2.0 perspective where having a mission which doesn't have a sam site in the exact same location everytime can add a little bump to a player sneaking behind enemy lines.

 

From my experimenting I've found 2 reliable ways to create a semi random event. Both of these methods are based around the idea of assigning an event to occur at x time into the mission or something to define the overall mission layout at the start of the game.

 

1. The "Lock" Method

This method is useful because you can define exactly how many conditions exist and it can be easily used if you want to set a random time for an event to occur.

 

It works by using a random variable to decide whether or not to pass through the "lock" to the next variable. For instance, on the first pass through if it returns "true" then it will execute the first condition. If the first pass is false it will continue to the next "lock" until a specific lock is termed "true"

 

In game trigger code...

Mission Start>Time is less (2)> Set flag 1 [On mission start is sets flag 1 true]

Once>Time is More (10) and Random(30) And Flag 1 (True)>Conditions 1 and Clear Flag 1

[Once the time is greater than 10 seconds AND if the random 30% chance is true AND flag 1 is true, it will activate specific groups]

Once>Time is More (20) and Random(50) and Flag 1 (True)> Conditions 2

Once>Time is More (30) and Flag 1 (True) > Condition 3 acts as a default condition.

 

In this example flag 1 acts as a safeguard, with it false none of the triggers will execute. So if you wanted an attack to spawn you can use "Time is More" and the lock method to define when the attack takes place (with the same groups) or to set unique groups to each. I general rule of thumb is to increase the chances of the random variable the further you get through each lock.

 

2. Continuous Random

I created this method because I was tired of the unseemly high probability that existed with the "Lock Method" of returning true values on first lock didn't feel very random to me. While testing it I had the first lock set to 20% and for whatever reason it returned true way more than 20% of the times I tried it. So with some thought I decided to do the opposite.

 

This method works by setting a larger sample size (more than just 1 random value) and giving it a lower probability each time its sampled. I randomly generate a true value for 2 different flags. When the sample is finished we compare the results and use it to create a "If-Case" like statement. In this instance the options are.

Flag 1 - Flag 2

True- True

True- False

False- True

False- False

 

Flag 0 is a between time condition. Its only if Time is More than 5 seconds and Time is Less than 20 seconds.

 

Once >Time is More (5) and Time is Less (20) > Set Flag (0) to True

Once> Time is More (20)> Clear flag 0

Continuous>Flag 0 (True) and Random (5) > Set Flag 1 True

Continuous>Flag 0 (True) and Random (5) > Set Flag 2 True

 

This trigger is used to check the results. In other words until flag 9 is true non of the conditions will be checked. Since flag 9 is set true after 22 seconds only 1 trigger below will execute.

Once>Time is more (22) >Set Flag (9)

 

Conditional Triggers would appear like

Once> Flag 9 (true) and flag 1 (true) and flag 2 (true)>Condition True -True

Once> Flag 9 (true) and flag 1 (true) and flag 2 (false)>Condition True -false

Once> Flag 9 (true) and flag 1 (false) and flag 2 (true)>Condition false -True

Once> Flag 9 (true) and flag 1 (false) and flag 2 (false)>Condition false -false

 

Since the assignment of flag 1 and 2 is continuous. You can add even more randomness to it by clearing said flags any time during or after contiously random timeframe.

The right man in the wrong place makes all the difference in the world.

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to post
Share on other sites
  • 2 weeks later...

Advanced Mission Trigger-hack sample.

Until (or rather if so) we get a better method of using "advanced statements" with AND OR groups, I've created another sample.

 

My Goal;

- To check if *any* 2 CLIENTS in a MP game is within a Trigger-Zone.

 

Pseudocode;

Or rather the simplest Method possible to create with DCS-editor code;

If InZone("MyZone", ID1 and ID2) or 
InZone("MyZone", ID1 and ID3) or 
InZone("MyZone", ID1 and ID4) or 
...
InZone("MyZone", ID1 and ID8) or 
...
InZone("MyZone", ID2 and ID3) or 
InZone("MyZone", ID2 and ID4) or 
InZone("MyZone", ID2 and ID5) or 
...
InZone("MyZone", ID3 and ID4) or 
...
InZone("MyZone", ID7 and ID8)
then Set Flag 2 = True

 

Process;

What I did this time is that I created a mission-trigger rule with a couple of the pilots/choppers. Saved the mission and started listing which other pilots / units ID I needed;

 

UnitID / Client Pilot

14 = aPilot #1

15 = aPilot #2

16 = aPilot #3

17 = aPilot #4

87 = aPilot #5

88 = aPilot #6

1229 = aPilot #7

1230 = aPilot #8

 

Next I copied the original trigger-statements, both the "conditions" and "trigfunc" one;

        conditions = 
       {
           [24] = "return(c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"15\", \"R-PlayerSpawned\") )",

and

     trigfunc = 
   {
       [24] = "if c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"15\", \"R-PlayerSpawned\") then a_set_flag(\"2\"); mission.trigfunc[24]='';end;",

From now on I worked in a scrapbook (two separate textfiles) and rewrote the statements. I know I'll need the code for later, hence this post ;)

 

In a rather "readable" format they ended up looking like this;

Conditions;

[size=1][24] = "return([/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"15\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"16\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"17\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"87\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"16\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"17\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"87\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"17\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"87\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"17\", \"R-PlayerSpawned\") and c_unit_in_zone(\"87\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"17\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"17\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"17\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"87\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"87\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"87\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"88\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"88\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"1229\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")[/size]
[size=1]))",[/size]

 

trigfunc;

[size=1][24] = "if (c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"15\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"16\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"17\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"87\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"14\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"16\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"17\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"87\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"15\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"17\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"87\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"16\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"17\", \"R-PlayerSpawned\") and c_unit_in_zone(\"87\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"17\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"17\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"17\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"87\", \"R-PlayerSpawned\") and c_unit_in_zone(\"88\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"87\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"87\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"88\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1229\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"88\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) or [/size]
[size=1](c_unit_in_zone(\"1229\", \"R-PlayerSpawned\") and c_unit_in_zone(\"1230\", \"R-PlayerSpawned\")) [/size]
[size=1]then a_set_flag(\"2\"); mission.trigfunc[24]='';end;",[/size]

Then finally it was shortened to *one* line for the mission-file (all other rules are "one liners") - and pasted back into the mission-file.

 

Here's a quick peek at what it looks like in the editor;

AdvancedTriggerHack-24.thumb.jpg.1178d28b620307dcdde9072002d4d6af.jpg

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites
  • 2 weeks later...

Here is a simple way to do the "or" modifier with triggers. Don't know why I didn't see this earlier...

 

For example you want to check whether Unit 1 or Unit 2 are death:

 

 

CONTINUOUS / FLAG IS FALSE (1) / SET FLAG (1)

FRONT CONDITION / UNIT ALIVE (Unit 1), UNIT ALIVE (Unit 2), TIME SINCE FLAG (1,1) / CLEAR FLAG (1)

ONCE / TIME SINCE FLAG (1,2) / MESSAGE ("Unit 1 or Unit 2 is death)

 

 

In the bold part you list the opposite of your "or" rules you want to check. So we want to check if one unit is death, then we list all the units as alive. Or we want to check if one unit is inside a zone, then we list all units as outside the zone.

Link to post
Share on other sites

Cheers Mbot, thats part of the triggers I've never really explored - the dreaded "Front Condition", because in plain English this doesn't make any sense to me - even after reading the manual nn-times.

 

What I also tried to acomplish - is to avoid having nn-amounts (8-16-32) of triggers just to check *one* Zone.

 

So I'll dig into it and see how complicated it gets, cheers bud ;)

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites

Well with this method, you have 3 triggers per zone you want to check. Keeps things very simple.

 

Font Condition simply means, the trigger fires each time one of it's rules changes from being false to true (and all the others being true). It won't fire if at mission start all rules are already true, then one has to go false first and then back to true again.

Edited by MBot
Link to post
Share on other sites
  • 2 months later...

FARP template

 

In response to problem thread, I dug up one of the templates I use for positioning FARP and nearby objects.

 

Basicly it's just a bunch of statics - a group, saved to a template - which then can be reused, repositioned, rotated, duplicated using the template mechanisms.

It saves me a few greifing moments when I try to visualize how the FARP will look when I place other objects.

 

I use this method myself - it's the closest you can get to get a "visual clue" about how large / position of a FARP in the ME.

(Until we get a 3d ME editor that is - hint to ED)

In "\Eagle Dynamics\Ka-50\BlackShark" you find a Templates.bs

 

1. Make a backup of Templates.bs

2. Download and use the attached Templates.bs

3. Start the ME,

- Place the dummy "FARP template", with pos/angle you want. (Template located at the Russian side in the attached template).

Drag it using the "unit #1" in that group.

Rotate it while "unit #1" is marked. Use the rotate wheel and rotate it.

* Extra tip - you can rotate *any* existing group in the game like this. Mark unit #1 in the group, select "Template" tool, use rotate wheel.

- Place the Real FARP object at the "central" position shown in the image- use the same Angle (degrees) for this as you set with the "dummy FARP".

- Place other objects.

4. Delete the "dummy FARP" group when complete.

templates.zip

1placetemplate.thumb.jpg.504f5639909190dd95d09b1a0db04a8d.jpg

2placefarp.thumb.jpg.fa7406d7bb39d686784b288b2d02b26a.jpg

3placeothers.jpg.f920c73869cb6a683b64b35694600c4f.jpg

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to post
Share on other sites

Hi all again!

 

I'm looking for an special trigger... I would like to play an environmental sound of battle engagement while the group enter in a zone. Ok, no problem it runs but only one time... and I would like to make it constat. Its to say, when the sound file has finished, loop it again, when the four Akulas are at zone.

 

I have tryed with CONTINUOUS, and it give me a Runtime error.. oops!!

I have tryed with the rest of possibilities, and it souds only one time... snif!!

 

Some help please?

 

Thanks in advance

[sIGPIC][/sIGPIC]

Link to post
Share on other sites
That is hot. This better get added as an official feature in the BS-FC2.0 compatibility patch.

 

+1

 

 

And another quick question: If I set a condition, UNIT OUTSIDE ZONE, and the unit became dead IN the zone, then it will handled as outside the zone, am i right? If yes, then the moment it considered to be outside, is the moment when he dies (PilotKill) or when his plane crashes?

 

I know, this can be easily tested, but an official answer always helps :) Thank you!

[sIGPIC]http://www.forum.lockon.ru/signaturepics/sigpic5279_1.gif[/sIGPIC]

I could shot down a Kitchen :smartass:

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...