Jump to content

Trigger Template Generator


Recommended Posts

I've been programming a simple windows application via VB.Net that outputs text identical to the mission code found in a .miz file. The purpose is to make it easier to create complex trigger algorithms much quicker than doing it in the editor.

 

I started writing the app while making my capturing maykop mission. I'm not sure if anyone ever saw it in the code but there was on trigger than had well over 300 conditions that needed to be true. The trigger basically asked if the airbase was clear of all ground forces after a team captured the base. This trigger was critical as it was a "reset switch" to the entire mission. So instead of having to click several hundred times to create the trigger, I wrote a little app and just copied and pasted the results into the mission file. Some editing was needed afterward in the mission editor to make it work.

 

TriggerGen.jpg

 

Some tasks are incredibly complex and near impossible to do. For instance there is no feasible way for me to know a units id number. However it can use a place holder unit ID and you simply need to go into the editor and change it.

 

This is meant as a tool to assist mission designers in building their missions triggers, it is NOT going to become a whole new mission editor. The designer must still place all of their own units.

 

So are there any requests for specific sets of triggers to be added?

The current features implemented/being added are.

 

-Any number of units inside or outside of a zone for a single trigger.

-Respawn capability for AI (spawns a new AI group once the previous one is dead)

-Random 4 Spawing (uses the random function to choose 1 in 4 groups of AI to spawn)

  • Like 1

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

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Just 2 words: IN-CREDIBLE! :D

 

I went to a fortune teller and she told me that this tool will become HUGE thing after user´s suggestions :music_whistling:

 

Now here´s is my first one (it´s 5.30 am and I´m going soon to work, so it´s a simple one):

 

I´ve seen in the screen shot that you ask for the number of units. I suppose that it´s for repeating those setting as many times as units we input. You coud add an option radio button with "AND" and "OR" + "unit name" inputbox and add the number after the unit name name:

 

Would be something like this:

 

Number of units: 15

Unit name: StrikeUnit

Zone number: 3

AND:

OR: X

 

So result should be:

zone=3

predicate = "c_unit_out_zone"

unit = StrikeUnit1

 

zone=3

predicate = "c_unit_out_zone"

unit = StrikeUnit2

 

zone=3

predicate = "c_unit_out_zone"

unit = StrikeUnit3

 

etc, etc

 

and after that, replace the AND for OR (because we´ve chosen OR radio button).

 

Great work Grimes, really...

 

OMG, I´m late for work... see you later guys... :pilotfly:

Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee.

Churchill´s answer: If you were my wife, I´D DRINK IT!

Link to comment
Share on other sites

It can be done, but unit names don't matter. The triggers look at it from a "unit 1, unit 2, unit 3" and seem to be named in the order they are placed in the mission file. I don't know what happens if you have 50 units and you delete unit # 23 if that unit name gets replaced when you put another one in the mission. Furthermore it doesn't exactly say at any point that unit 2 is a T-72.

 

Perhaps I should explain exactly how I've been using it.

 

Two different areas of the mission file deal with triggers. "trig" and "trigrules" As far as I can tell "trig" deals with the actual trigger logic and "trigrules" is what the mission editor looks for to display the triggers in the editor. So far this tool just writs new trigrules because once you open the mission up in the editor it automatically writes all of those triggers to the rest of the file anyway.

 

I first create placeholder triggers in the mission editor. They are just empty and nameless. Sometimes I make it the exact amount I need, other times I go a little overboard so there is a buffer in case I need to group other triggers with it.

 

edits.jpg

 

 

I get something that looks like this. Trigger 1 is a display message and trigger 2 is a completely empty trigger. My program is designed to replace either the entire trigger, just trigger rules, or just trigger actions via copy and pasting the new information in there.

 

When you open the mission in the editor all of the new trigger info is saved and applied to the mission resulting in time being saved or feelings of acute carpal tunnel.

 

I've often just made a trigger once in the editor, made a bunch of blank copies and copied over the blank triggers with the desired trigger rules. This also works for aircraft waypoints, payloads, and attack zones. But you gotta be careful to copy only a specific part of aircraft info as you can easily overwrite some of the other info... resulting in 30 aircraft all with tail #1.

  • Like 1

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

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

It's nice, i had similar idea, but i wanted write completely new trigger editor.

My requirements are simple.

It should extract units on both sides and group them by type (group, air, sea ...)

At the beginning when i create trigger on one client aircraft, i should be able clone it by one button click to all client aircrafts on the one side.

It should contain also generating simple trigger pattern for random group generation. (I mean the flags should be used automatically and validated they are not used for anything else)

 

I'm c++ developer, no VB, currently using Qt 4.6 Framework. Unfortunately i'm too busy to start write it. If anyone has same plans lets start it together.

  • Like 1

LockOn SVK Squad bomber.

 

"Flight sim is not about to know everything about aircraft, but to know which button must be pressed in crucial time." - dead virtual pilot

Link to comment
Share on other sites

Or question to ED. If you plan improve trigger editor, stop us before we start write new external application. At least you have a lua parser, could you publish it as an opensource library?

LockOn SVK Squad bomber.

 

"Flight sim is not about to know everything about aircraft, but to know which button must be pressed in crucial time." - dead virtual pilot

Link to comment
Share on other sites

Yeah I am. I just got in the starcraft 2 beta. So that will be my excuse for not getting much of anything else in life accomplished for..... at least a few weeks. :D

  • Like 1

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

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Yeah I am. I just got in the starcraft 2 beta

 

Wow...I remember playing to the first part of Starcraft... I sucked of course but it was very fun. I always liked the Terran ;)

 

If you have a few minutes... switch to "Off topic ON" mode and post your impressions about it here. Then swith OT OFF again hehehehehe....

 

Good luck !!! (I would need it, no doubts!)

Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee.

Churchill´s answer: If you were my wife, I´D DRINK IT!

Link to comment
Share on other sites

I'm rewriting the whole application to make it easier to add more triggers to it. I originally made it so each type of trigger is predefined causing alot of code duplication.

 

Heh, maybe a tread in off-topic is warranted for SC2 comments...

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

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 8 months later...

Guys, how to open *.MIZ files? What kind of editor are you using (I don't mean obviously the ME in game).

 

I am wanting to learn what the proper syntax looks like for goals and triggers in missions, as I think that will carry over to the mission generator in DCS Warthog.

 

Ripcord

[sIGPIC]sigpic65507_1.gif[/sIGPIC]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...