spaceeinstein Posted March 25, 2015 Share Posted March 25, 2015 (edited) Introduction In GTA III, car alarms have a distinct alarm sound but in GTA: Vice City car alarms are simply repeated horns of the car. This mod recreates GTA III's car alarms in Vice City. See the Settings section below if you want to customize the pitch of the alarm of any cars. In addition, when thunder is occurring, there is a chance that it will set off all car alarms for three seconds. The louder the thunder, the higher the chance. Debug mode can be toggled by typing "THUNDER". When enabled, the screen displays text with four values that are used to determine the trigger to set off car alarms during a thunderstorm. The values are the game time when thunder occurs, the lightning type, random number generator, and random number limit for the lightning type. This mod utilizes CLEO Library for Vice City. Thanks to Victor_Knight for suggesting thunder-triggered alarms and Mr. Jago for suggesting using GTA 2's car alarm sound. Installation Download the mod at GTAGarage. Download LithJoe's Audio Editor at http://www.gtagaming.com/downloads/gta-vice-city/tools/573. In your Audio folder, make sure to remove the read-only option on sfx.SDT and sfx.RAW. Run the editor and open sfx.SDT. Find sfx00052 and replace it with the audio supplied in the download. Download CLEO for Vice City at http://cleo.li/. From the CLEO download, copy VC.CLEO.asi into Vice City's folder. If CLEO.asi already exists in the folder, you must delete that file. From this mod download, place the CLEO folder containing SEAlarm.cs and SEAlarm.dat into Vice City's folder. This mod has been tested only on VC v.1.00 US. Please post any troubles you have with installation. This is my first mod release that involves editing the audio file. Settings The SEAlarm.dat file is a plain text file allowing you to change the pitch of the alarm for any vehicles. The file already contains the default pitch values from GTA III. Each line contains the vehicle's model index, which can be referenced from default.ide, and the pitch of the alarm. Vehicles that do not appear in the file will use the default pitch from the game. Vehicles that have a siren do not have an alarm so the pitch value changes the pitch of the siren instead. The default lines are: 130 9935131 9935132 10928133 9935134 8941135 11922138 8941139 12220140 9935141 9935143 13400144 9935145 13600148 8000149 9935150 8543151 9935152 9935154 9935158 9935159 10123161 10554162 8000163 9935166 9935167 7500168 9935169 8935170 8935171 17000172 9935173 9935174 9935175 9935178 9935179 9935185 9935186 9935187 9935188 9935189 13400191 9935192 9935193 9935196 9935197 9935198 9935200 7948201 9935204 9935205 9935206 9935207 9935208 9935209 9935210 9935211 9935212 9935213 9935215 9935216 9935219 9935221 9935222 9935224 9935225 9935226 9935228 9935229 9935230 9935232 9935233 9935234 9935235 9935 Locations These are some of the locations of alarmed cars in the original game. Admiral at Diaz's Mansion/Vercetti Estate Banshee behind the Washington Beach Pay n Spray Infernus in North Point Mall Several random cars, four along Ocean Drive Videos Source {$CLEO .cs}// change alarm05DF: write_memory 0x5F0457 size 1 value 0xB0 virtual_protect 1 // use siren sound instead of horn05DF: write_memory 0x5F046D size 1 value 0xB4 virtual_protect 1 // use siren pitch instead of horn05DF: write_memory 0x5F02F9 size 4 value 0 virtual_protect 1 // remove pause after each play05DF: write_memory 0x98410C size 4 value 4646 virtual_protect 1 // alarm sfx (id 52) sample loop end// alarm sfxconstSFX_INDEX = [email protected]_MEM = [email protected]_VAL = [email protected]_INDEX = 0while SFX_INDEX = #LANDSTAL #VICECHEE >= PITCH_MEM then PITCH_MEM -= #LANDSTAL PITCH_MEM *= 28 PITCH_MEM += 0x6AD1B4 05DF: write_memory PITCH_MEM size 4 value PITCH_FREQ virtual_protect 0 end end 0A9B: closefile PITCH_DAT_FILEend Edited September 22, 2016 by spaceeinstein Jago, Apu889, Shagg_E and 19 others 22 Link to comment Share on other sites More sharing options...
SilverRST Posted March 25, 2015 Share Posted March 25, 2015 Holy sh*t, a veteran came back into the modding! Nice to see someone is making mods/scripts for older GTA. comet_ and Snoops27 2 Link to comment Share on other sites More sharing options...
Silent Posted March 26, 2015 Share Posted March 26, 2015 Do you think III maybe handled it the same way you did? Also, no love for VC CLEO 1.1.1.7? Link to comment Share on other sites More sharing options...
spaceeinstein Posted March 27, 2015 Author Share Posted March 27, 2015 It's good to be back The function that controls III's car alarm is very similar to VC. I think it's named cAudioManager::ProcessVehicleSirenOrAlarm. For III v1.0 it is located at 0x56C420, and for VC v1.0 it is located at 0x5F0240. The main differences for VC from III are the different SFX it chooses to play and a delay each time a SFX is played. There are other differences that I wasn't able to understand but just modifying those two is enough to produce the effect from III. I used 1.1.1.6 because I had always used that version for my CLEO mod releases. Is the newer version recommended over this version? Link to comment Share on other sites More sharing options...
Silent Posted March 27, 2015 Share Posted March 27, 2015 Is the newer version recommended over this version? Well, I fixed a notorious Load Game crash and also made VK keys test work somewhat properly. Link to comment Share on other sites More sharing options...
spaceeinstein Posted March 27, 2015 Author Share Posted March 27, 2015 I've updated the mod to include CLEO v1.1.1.7. Blackbird88, Jago and Silent 3 Link to comment Share on other sites More sharing options...
Victor_Knight Posted March 28, 2015 Share Posted March 28, 2015 (edited) If I may put my two cents in, is it possible to make alarm 'screaming' on several randomly choosed vehicles during a thunderstorm? Edited March 28, 2015 by Victor_Knight lopezloo 1 Link to comment Share on other sites More sharing options...
spaceeinstein Posted March 28, 2015 Author Share Posted March 28, 2015 That's a great idea. But I have no clue how thunder is handled or how alarms can be triggered. Link to comment Share on other sites More sharing options...
Blackbird88 Posted March 30, 2015 Share Posted March 30, 2015 Looks like that Alarm sound dates back to GTA1 where it even changed pitch randomly. Link to comment Share on other sites More sharing options...
-Quantum- Posted March 30, 2015 Share Posted March 30, 2015 (edited) For San Andreas do it you must Edited March 30, 2015 by -Quantum- Silent 1 Link to comment Share on other sites More sharing options...
spaceeinstein Posted April 3, 2015 Author Share Posted April 3, 2015 I don't much about SA but others are free to use my code. The code for my mod is here. Link to comment Share on other sites More sharing options...
Inadequate Posted May 7, 2015 Share Posted May 7, 2015 Hi spaceeinstein. I know this topic is for the Car Alarm script but you can update your Vice City: Get Drunk script to CLEO v1.1.1.7, please? Link to comment Share on other sites More sharing options...
spaceeinstein Posted August 8, 2015 Author Share Posted August 8, 2015 @inadequate, the mod should work with CLEO v1.1.1.7. Just don't copy the CLEO.asi file. @Victor_Knight, would you like thunder-activated alarms to be released with this mod? When thunder is occurring, there is a ~33% chance that it will set off all car alarms for three seconds. Shagg_E, Silent, Jago and 2 others 5 Link to comment Share on other sites More sharing options...
Claude_Lib Posted August 8, 2015 Share Posted August 8, 2015 Looks awesome but I didn't hear the thunder, the alarm should be triggered by thunder, not lightning. Link to comment Share on other sites More sharing options...
Shagg_E Posted August 8, 2015 Share Posted August 8, 2015 There is a script in the D-Box(scripts pack by DimZet), which gives the sound of thunder. Link to comment Share on other sites More sharing options...
Claude_Lib Posted August 8, 2015 Share Posted August 8, 2015 Wait, you mean VC never had a thunder roar? Damn Link to comment Share on other sites More sharing options...
uncaged Posted August 8, 2015 Share Posted August 8, 2015 Nice! Would LOVE to have it for III and SA Link to comment Share on other sites More sharing options...
gts. Posted August 8, 2015 Share Posted August 8, 2015 Nice! Would LOVE to have it for III and SA This. Link to comment Share on other sites More sharing options...
Inadequate Posted August 8, 2015 Share Posted August 8, 2015 @inadequate, the mod should work with CLEO v1.1.1.7. Just don't copy the CLEO.asi file. Nope, doesn't work even only copying the script and the fxt file. Link to comment Share on other sites More sharing options...
spaceeinstein Posted August 10, 2015 Author Share Posted August 10, 2015 @inadequate, does the mod work for the prior CLEO version? The mod relies a lot on using a specific main.scm. I'll try to get some time to rewrite the mod so that it doesn't rely on that file. @Claude Liberty, thunder in the game is oftentimes faint to hear. My code in the video detects any thunder that occurs; it doesn't detect lightning. I have changed my code by doing away with the 33% chance and instead use the loudness of the thunder to determine the chance of setting off the alarm. The louder the thunder, the higher chance the alarm will set off. Jago and Gummy 2 Link to comment Share on other sites More sharing options...
Jago Posted August 10, 2015 Share Posted August 10, 2015 (edited) Found a little thing that should help: I compared the car alarm sounds from GTA2 and GTA III and found that GTA2's (256 kbps) was higher quality than III's (158 kbps). Here's a download with both of them clearly labeled so you can compare. It's not that big of a boost but it shouldn't be too much trouble to put in the mod and it should import fine. Edited August 10, 2015 by Mr. Jago Link to comment Share on other sites More sharing options...
spaceeinstein Posted August 10, 2015 Author Share Posted August 10, 2015 (edited) @Mr. Jago, thanks for the suggestion. It will be in the next update. Something I want to ask you all, would you like hurricane weather to be disabled for this mod? Thunderstorms do not occur during hurricane weather, only regular rainy weather. Rainy weather occurs between the unlocking of the mainland and the final mission. Any other time only hurricane weather occurs. Edited August 10, 2015 by spaceeinstein Shagg_E 1 Link to comment Share on other sites More sharing options...
Silent Posted August 10, 2015 Share Posted August 10, 2015 Not for the main release, as this starts to be too far fetched from the original concept. Though if it'd be separate, maybe... Shagg_E 1 Link to comment Share on other sites More sharing options...
Victor_Knight Posted August 19, 2015 Share Posted August 19, 2015 Nice to see some updates, couldn't wait to try it. But don't know why, car is not screaming for some reason after several thunder passes. The longest try was about 8 minutes and nothing happened Here's the save I used with the nearest position to vehicle with alarm (alarm appears randomly each time). The thunder was called by save editor and by 'catsanddogs' also, but both methods seemed to be equal. Of course I didn't forget to install all the stuff before testing. Link to comment Share on other sites More sharing options...
spaceeinstein Posted August 19, 2015 Author Share Posted August 19, 2015 Sorry, there's a mistake in the code that I overlooked. Can you test this out for me? If it works, I will release this update. You can type THUNDER to enable debug mode. The values are the thunder time, lightning type, random number generator, and random number limit for the thunder type. If type > 9 and RNG Link to comment Share on other sites More sharing options...
Victor_Knight Posted August 19, 2015 Share Posted August 19, 2015 Yep, sure. Now it became definitely better - alarm goes wild sometimes but only when "thunder" typed as I noticed. Link to comment Share on other sites More sharing options...
spaceeinstein Posted August 19, 2015 Author Share Posted August 19, 2015 Does it go off without debug mode? I've made it so the alarm doesn't go off too often so it can take a while to test it. Link to comment Share on other sites More sharing options...
Victor_Knight Posted August 21, 2015 Share Posted August 21, 2015 So today I decided to make a deeper testing of it and found that car really screams without debug mode. It was about 4 or 5 times in half an hour - a good result as it seems to me. Great work! As a suggestion, if you're interested: it would be nice to see ability to equip any selective vehicle with the alarm and turn it on when leaving or off when getting in. Just like another insane idea. Link to comment Share on other sites More sharing options...
spaceeinstein Posted September 22, 2016 Author Share Posted September 22, 2016 Version 3 update: Any pause between playing the alarm sound has been removed. The pitch of the alarm for all cars now matches GTA III. You can customize the alarm pitch of any cars by editing the SEAlarm.dat file. Blackbird88, SarahPilko and Shagg_E 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now