Author Topic: Simple addon for the Chopper in X4 V3.0 (Voice Messages)  (Read 1364 times)

Offline 4peterjan4

  • Rank: Private
  • *
  • Posts: 505
    • http://www.specialforces-clan.com
Simple addon for the Chopper in X4 V3.0 (Voice Messages)
« on: July 12, 2010, 01:51:17 pm »
Hey All,

With this tutorial you will have an cool sound addon to your chopper..

I will explain this step by step..

The first step.

Open up maps/mp/_helicopter_manned.gsc

Go to line 236 and you will see there is a line with this code.

Code: [Select]
chopper thread heli_existance();
You will have to add the following line under this.

Code: [Select]
chopper thread maps\mp\_heli_air::voice_heli();
So it looks like this.

Code: [Select]
chopper thread heli_existance();
chopper thread maps\mp\_heli_air::voice_heli();

Repeat those steps for maps/mp/_helicopter_unmanned.gsc ..

The only thing that is different that is the line number.

For this it is line 247.

After you have done this create a new .gsc file named _heli_air.gsc.

And past the following code into it.

Code: [Select]
voice_heli()
{
   self thread voice_heli_damage();
   self thread voice_heli_crashing();
   self thread voice_heli_leaving();
}

voice_heli_damage()
{
   self endon( "death" );
   self endon( "leaving" );
   self endon( "crashing" );

   wait 3.0;
   voice_heli_do("_inform_attack_scan");
  
   while(1)
   {
      wait 0.5;
      if (self.damageTaken > 0)
      {
         //TODO: call warning...
         break;
      }
   }
}

voice_heli_crashing()
{
   self endon( "death" );
   self endon( "leaving" );
   self waittill( "crashing" );
   voice_heli_do("_inform_hit_crash");
}

voice_heli_leaving()
{
   self endon( "death" );
   self endon( "crashing" );
   self waittill( "leaving" );
   voice_heli_do("_inform_return");
}


voice_heli_do(info)
{
   prefix = "";
   if ( self.pers["team"] == "allies" )
   {
      if ( game["allies"] == "sas" )
         prefix = "UK_rhp";
      else
         prefix = "US_rhp";
   }
   else if(self.pers["team"] == "axis")
   {
      if ( game["axis"] == "russian" )
         prefix = "RU_rhp";
      else
         prefix = "AB_ohp";
   }
  
   if ( prefix != "" )
      self thread maps\mp\gametypes\_battlechatter_mp::doSound( prefix + info  );
}

When you have done this move this file named _heli_air.gsc to maps/mp/ where you edited in the previous steps two other .gsc files.

Now its time to change and add something to the raw files.

Open up your folder with the X4 raw files.

Be sure you know what you are doing!

Download the file _heli_air.csv and paste it into your soundaliases folder thats located in the X4 raw folder.

Download Here[/color]

Normally the folder is located here :  ff/soundaliases

When you are finished with this you have to do one more thing.

Open your mod.csv thats located in the raw folder named ff.

Go to line 143 and add this line.

Code: [Select]
sound,_heli_air,,all_mp
If you have done this it should look like this..

Code: [Select]
sound,extreme,,all_mp
sound,_heli_air,,all_mp
sound,music,,all_mp
sound,nic,,,

Okay now you are ready to create the new mod.ff

After compiling it youre addon is ready!

I hope you enjoyed my tutorial.

If there are any questions give me an reply..

Greetings PhoeniX

Offline 4peterjan4

  • Rank: Private
  • *
  • Posts: 505
    • http://www.specialforces-clan.com
Re: Simple addon for the Chopper in X4 V3.0 (Voice Messages)
« Reply #1 on: July 12, 2010, 02:16:48 pm »
I have added an video to my xfire.

So you can watch the result  :)

Its only an small video ..

http://www.xfire.com/video/3068ad/

Greetings PhoeniX  :)

Offline Sammy

  • Rank: Private
  • *
  • Posts: 105
Re: Simple addon for the Chopper in X4 V3.0 (Voice Messages)
« Reply #2 on: July 12, 2010, 02:43:45 pm »
Got some footage of the Russkies & Brits?  Actually I would love to hear the voiceovers of the insurgents who somehow got ahold of a military chopper. "This is Ahmed, inbound and ready to attack the infidels." But I cant imagine Infinity Ward would have done something like that.  :D

Offline 4peterjan4

  • Rank: Private
  • *
  • Posts: 505
    • http://www.specialforces-clan.com
Re: Simple addon for the Chopper in X4 V3.0 (Voice Messages)
« Reply #3 on: July 12, 2010, 02:49:47 pm »
Quote from: "Sammy";p="34439"
Got some footage of the Russkies & Brits?  Actually I would love to hear the voiceovers of the insurgents who somehow got ahold of a military chopper. "This is Ahmed, inbound and ready to attack the infidels." But I cant imagine Infinity Ward would have done something like that.  :D

Hahahaha lmao

Should be funny yup  :P

Offline 105HolyMoly

  • Rank: Private
  • *
  • Posts: 188
    • http://holymolymods.com
Re: Simple addon for the Chopper in X4 V3.0 (Voice Messages)
« Reply #4 on: July 12, 2010, 11:42:21 pm »
8)  Quick note Phoenix..................... this needs to be changed:

sound,heli_addon,,all_mp

 To this:

sound,_heli_air,,all_mp

 Your not calling the csv if your using heli_addon


 :wink: Fred

Offline 4peterjan4

  • Rank: Private
  • *
  • Posts: 505
    • http://www.specialforces-clan.com
Re: Simple addon for the Chopper in X4 V3.0 (Voice Messages)
« Reply #5 on: July 13, 2010, 06:00:52 am »
Quote from: "105HolyMoly";p="34444"
8)  Quick note Phoenix..................... this needs to be changed:

sound,heli_addon,,all_mp

 To this:

sound,_heli_air,,all_mp

 Your not calling the csv if your using heli_addon


 :wink: Fred

Ah yep,

Thanks for the note Fred!

Greetings PhoeniX

Offline 4peterjan4

  • Rank: Private
  • *
  • Posts: 505
    • http://www.specialforces-clan.com
Re: Simple addon for the Chopper in X4 V3.0 (Voice Messages)
« Reply #6 on: July 13, 2010, 09:46:14 am »
Post updated!

Fixed a small bug.

The sounds were not working for the opfor now they do!

The only change is in the .csv file  :wink: .

Also removed some lines from the .csv file that were not related to this..

Again an small update on the .csv file..

Psi from the =lGwDl= clan reported an little issue when compiling the mod.ff

So when you already are using this addon and getting also an error while compiling just take the file i posted above and it should be fixed.  :wink:

Greetings PhoeniX

Offline 105HolyMoly

  • Rank: Private
  • *
  • Posts: 188
    • http://holymolymods.com
Re: Simple addon for the Chopper in X4 V3.0 (Voice Messages)
« Reply #7 on: July 13, 2010, 05:25:30 pm »
:!: Checked your new csv file and there is a problem with the way you copied and pasted it on the forum.................... Be very careful not to let the cursor start another line when you copy code. This adds a new line that the mod will not recognize. Usually and error with '   '  this involved......Cannot read such and such file or file name. The issue is between the # nationality code lines.......the space which actually is a line the mod is trying to read.

 I fixed the spaces and recopied the csv file: That's why I never like copying code off of a forum, sometimes this happens and is frustrating as hell to find out the problem!