Forums » Air Combat & Civil Aviation » Air Combat - General » Helicopters » Comanche Gold Modding Breakthrough -- Triggers Active Topics You are not logged in. [Log In] [Register User]
Page 3 of 4 < 1 2 3 4 >
Topic Options
Rate This Topic
Hop to:
#3167293 - 12/28/10 04:22 PM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
DavidC99 Offline
Junior Member

Registered: 12/16/10
Posts: 74
The difference is that we might be able to do some of these things by adding new units, waypoints, and triggers. wink

Not sure if we can get 2-7's out there in melee maps. I know 2-7 isn't spawned when he's placed in coop maps, but he may be left alone on melee maps. Would be wild if we all had 2-7's at the start. biggrin
_________________________
DavidC99


Top
#3168816 - 12/31/10 04:14 AM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
DavidC99 Offline
Junior Member

Registered: 12/16/10
Posts: 74
Timers / Counters

By now I'll assume that extraction and repacking of map files are basic knowledge (although it's not always that easy).

Let's say we want a custom sound to play when the player passes a waypoint. Let's also say that five seconds after the player passes the waypoint, we want him to receive a text radio message. First we play the sound file as already demonstrated:

Code:
if
waypoint, P, A1
then
pend, cust11.wav, 0


You'll have to replace cust11.wav with the name of your custom sound file.

Now we need some way of keeping track of time based on this trigger. Therefore, we add the following trigger next:

Code:
if
waypoint, P, A1
then
clearcounter


This sets up a timer when the player crosses Waypoint 1. Now we need to use the timer, so we write a third trigger:

Code:
if
waypoint, P, A1
and
counter, 5
then
text, 1


Remember to have your radio message, RM01, defined in the .INF file (as shown previously) or else this won't display.

This checks that the player has already passed Waypoint 1, and it checks the value of the counter. Five seconds would have had to go by before this trigger's payload is carried out, if all went well.

ufolev, since you're working on maps, let me know if you have any trigger ideas or questions about them. In fact, if you want some simple triggers cooked up for you, I might be able to help out.
_________________________
DavidC99

Top

#3168827 - 12/31/10 05:08 AM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
ufolev Offline
Member

Registered: 03/19/08
Posts: 223
hi Davi,

After your appearance as mission maker I understood how limited are my
knowledges :-(
But I will be happy if I learn from your suggestions above how to put
some simpliest event trigger in my mission and this will be enough to me.

ufo :-)

Top
#3168856 - 12/31/10 06:33 AM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
DavidC99 Offline
Junior Member

Registered: 12/16/10
Posts: 74
If you change your mind and want more complex triggers written, let me know. I'd be happy to try to help.
_________________________
DavidC99

Top
#3170575 - 01/03/11 05:31 AM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
DavidC99 Offline
Junior Member

Registered: 12/16/10
Posts: 74
By request...

Tracking

This will show how to cause enemy units to track the player.

Let's say that after the player crosses Waypoint 3, we want an enemy group of Hokums to track the player's movements.

Code:
if
waypoint, P, A3
then
route, H, WP


This is all there is to the trigger itself. It checks if group P, the player, has crossed waypoint 3. If he has, then the group H is routed to the player's location. Route is also used to route units to waypoints. If we wanted them to go to waypoint 3 instead, we could have easily done this:

Code:
if
waypoint, P, A3
then
route, H, A3


Unfortunately, Novalogic ripped out the option to group units in the editor. This means, by default, the game won't know who you mean by specifying group H. There are a few ways around this:

  1. Either use the Goal checkboxes in the mission editor to make your own limited groupings;
  2. Hex edit the .POS file to change the object's group ID;
  3. Or else use a program to edit the .POS file and allow you to change the group ID.
The first option is sufficient if you have one group to make and you don't want complicated triggers. By designating something as an enemy goal, it is given a group ID of E. By making something a goal for the player, it is given a group ID of G. If both are used, the mission editor writes triggers automatically to win if G is destroy and lose if E is destroyed.

This can be changed by the modder by simply editing the triggers in the .MIS file. Thus, you can actually make group E a group of enemy Hokums by selecting them all as enemy goals. Then delete the default trigger for group E, which should look like this:

Code:
if
destroyed, E
then
lose


Substitute it with something like this:

Code:
if
waypoint, P, A3
then
route, E, WP


The second option, the one involving hex editing, is fine for a simple switch, but is tedious and not the way to go for a real mission which involves complicated groupings.

The third option is the preferred method. I have a custom program I've written that can group units, but it's not complete and requires some manual effort to figure out what object is what. I plan on releasing something to the public once I make it easier to use (and even then it won't be super easy). In the meantime, if someone wishes for me to group something for them before I'm done (which should hopefully be soon -- like hopefully by the weekend), I'd definitely consider doing it for them.
_________________________
DavidC99

Top
#3173652 - 01/06/11 11:44 PM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
DavidC99 Offline
Junior Member

Registered: 12/16/10
Posts: 74
I have not completed the tool, yet, and I'll need some time to come up with a straightforward design. So far, when completed, it should allow you to alter the following for each object:
  • Group IDs.
  • Team/Side.
Deloros' idea of placing other objects in custom missions which the editor doesn't support is entirely possible. I invented Super 2-7, a highly armored version of the normal 2-7, except I made it so that we don't get along. You can see 2-7, a Frogfoot, and me, all engaged in a free-for-all. Yes, a free-for-all! wink



Although not entirely related, the following is a screenshot of me firing loads of hellfire missiles at Super 2-7 in what appears to be bullet time. biggrin



Custom missions should get a whole lot more interesting if people can take the time to make them.
_________________________
DavidC99

Top
#3173726 - 01/07/11 03:18 AM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
ufolev Offline
Member

Registered: 03/19/08
Posts: 223
Hello David,

Will Your new tool for mission editing be separated from the Original Mission Editor
or it will be some kind of Moded Super Mission Editor ?

ufo ?

Top
#3173739 - 01/07/11 04:00 AM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
DavidC99 Offline
Junior Member

Registered: 12/16/10
Posts: 74
It would be separate from the mission editor. The way it would work is by analyzing, providing you with the list of objects in your mission, allowing you to make changes to these object properties, and then editing (or even patching, if you will) the exported custom mission file(s) in question. The editing is actually not that difficult. The triggers are actually harder to write once you get used to it. smile As soon as you repack the patched file(s) back into your PFF/MRF, you're good to go.

In theory, we might be able to make our own mission editor. It's certainly possible, and I already have a general idea of what it would take, but it's still a lot of work. If we had a volunteer who could handle the graphical user interface, I'd consider working on a backend for it.
_________________________
DavidC99

Top
#3175309 - 01/09/11 09:26 AM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
RobDog Offline
Junior Member

Registered: 01/05/11
Posts: 2
Loc: Tampa Bay Area / Florida / USA
DavidC99,

Had a great time in Co-op last night with you and fly. I'll look over this existing information and tools and get up to speed before moving forward with what we were discussing.

Thanks for all the hard work on this,
Rob

Top
#3175499 - 01/09/11 02:22 PM Re: Comanche Gold Modding Breakthrough -- Triggers [Re: DavidC99]
DavidC99 Offline
Junior Member

Registered: 12/16/10
Posts: 74
I had fun, too, and your plan to look over everything sounds great. I've finished the tool mentioned above, but it's being tested by someone. I think what we discussed may still be the route to go, however.

Unfortunately, there are still things regarding the editor and mission files about which I'm still unsure. The main things I'd like to learn right now are:
  • The rest of the .pff file format. I have the basics, but there are still some bytes of which I'm unsure.
  • JIM files. Lots to learn on those.
  • How objects know which entries in the AI list are the ones to use for when they die. We'd need this to build the AI list properly. (Of note, while the regular missions appear properly done, the mission editor that we use creates duplicate entries in an inefficient manner. Go figure.)
After I have all of this, it appears I may actually be able to do a huge portion of the project.
_________________________
DavidC99

Top
Page 3 of 4 < 1 2 3 4 >
Topic Options
Rate This Topic
Hop to:

Moderator:  RacerGT 
 

Forum Use Agreement | Privacy Statement
Copyright 1997-2013, SimHQ Inc. All Rights Reserved.