![]() ![]() |
![]() Post #21 | |
![]() Devil's Advocate ![]() Posts: 413 From: CA US Joined: 26-July 09 ![]() | Can't! Dunno what the problem is! ![]() And if I do then I can't use Ryosuke's missiles anymore... -------------------- ![]() |
![]() Post #22 | |
Ameteur Member Posts: 54 Joined: 8-January 11 ![]() | +1. Ryosuke's missiles is the first of the reasons why i not using cleo4. Realtime map/mouse fix is the second ![]() Also i hope this mod can be possible to make cleo3-compatible. And i hope Alien eventually fix all compatibility bugs too. This post has been edited by ThirteenAG: Jan 30 2011, 07:26 AM |
![]() Post #23 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | @Deji: I tried it (bit-clearing), but it don't work for money.dff. So I decided to replace the unused pickup (gta3_bonus) with money model. And I changed the script (I rewrited it). I destroyed original pickups and created objects. Then I going throu the pool of dyn-objects and checked was it picked or no. Yeah, sounds not vey good (and noob method maybe), but it works more stability then previous script. I also made a real "landing" on the ground - an object has the same XY angle as the ground under it. This post has been edited by DK22: Jan 30 2011, 05:18 PM |
![]() Post #24 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | Oh nice. Would like to find out how you did that ![]() -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #25 | |
![]() Devil's Advocate ![]() Posts: 413 From: CA US Joined: 26-July 09 ![]() | lol ground angle... I think a real easy way is to attach a car and let it fall on the ground then find the angle of the car, but let's hope DK's method is better. ![]() -------------------- ![]() |
![]() Post #26 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | I've been doing a lot of work on GTAG v2's database. I've figured that 05FF and similar opcodes test whether the actor is within an angled area. Those "height" and "depth" claims are completely wrong. But since I've done so much work on the GTAG v2 Database, I won't be making any more updates to the current one until GTAG v2 is up ![]() -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #27 | |
Ameteur Member Posts: 38 Joined: 16-January 11 ![]() | - Message Deleted This post has been edited by methodunderg: Feb 8 2011, 04:14 AM |
![]() Post #28 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | Hi. This post has been edited by DK22: Dec 23 2011, 12:56 AM |
![]() Post #29 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | It's good.. you need to make sure there's nothing in vicinity of where you are creating the objects, though.. because cars are being replaced by pickups for me. -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #30 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | I think that opcode IsAnythingInCube wouldn't help, have you any ideas? |
![]() Post #31 | |
Ameteur Member Posts: 38 Joined: 16-January 11 ![]() | I think that opcode IsAnythingInCube wouldn't help, have you any ideas? I've seen v2.0 on your blog; when are you going to release? Looks much better ! I'm finding the game crashes, when I jump out of the car during mission, to go pickup weapon or money off someone that I've done a drive-by on, or a ped I've run over in the car. Might be a conflict with other scripts; anyone else having the same problems? |
![]() Post #32 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | Yeah, I'm working on real weapon-drop. And I don't want to speak about 1.0/1.1 problems, 'cause 2.0 is coming. |
![]() Post #33 | |
![]() Actually living entity Posts: 143 From: Earth Joined: 15-January 11 ![]() | Hey DK, hope you dont mind.. I've read some topic on Sanny Builder Forums some time ago, about using 2D shadows as light reflection. Combined with Wessers fix for the world coords lag and some code of 'Turn Inticators' mod, I was able to create me a 'vehicle_TailLight' script. Now that I got your gta_iv_lights script from an inofficial source (cant download from / register on the russian website, google translator messes things up) I noticed you are using the exact same thing. Anyways, here is what I did to make those two tail light shadows fade intensity (independently from each other) when the ground distance increases: SANNY while true if Player.Defined(0) then if and Actor.Driving($PLAYER_ACTOR) 84C8: not actor $PLAYER_ACTOR driving_flying_vehicle 84A7: not actor $PLAYER_ACTOR driving_boat 89AE: not actor $PLAYER_ACTOR driving_train not actor.DrivingVehicleType($PLAYER_ACTOR #VORTEX) then 03C0: 0@ = actor $PLAYER_ACTOR car 0A97: 1@ = car 0@ struct { // - Is taillight intact? (found on sannybuilder forums) // - Dunno how to check if lights are active, though. 0A8E: 2@ = 1@ + 0x5A0 // int 0AA8: call_function_method 0x6C2130 struct 2@ num_params 1 pop 0 3 3@ 0AA8: call_function_method 0x6C2130 struct 2@ num_params 1 pop 0 2 4@ if OR 3@ == 0 4@ == 0 then } // - Get vehicle coordinates offset of rear light (Method from 'Turn Inticators' mod by Den_spb) 0A8E: 2@ = 1@ + 0x22 // int 0A8D: 2@ = read_memory 2@ size 2 virtual_protect 0 //model index 2@ *= 4 2@ += 0xA9B0C8 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0 //CModel 2@ += 0x5C 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0 //vehicle struct 2@ += 12 0A8D: 7@ = read_memory 2@ size 4 virtual_protect 0 //x offset 2@ += 4 0A8D: 8@ = read_memory 2@ size 4 virtual_protect 0 //y offset 2@ += 4 0A8D: 9@ = read_memory 2@ size 4 virtual_protect 0 //z offset // - Create extra light coronas, as like those which appear when breaking 0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 7@ 8@ 9@ if 847A: not actor $PLAYER_ACTOR driving_bike then 04D5: create_corona_at 1@ 2@ 3@ radius 0.15 type 0 flare 0 RGB 120 0 0 end if not 7@ == 0.0 then 7@ *= -1.0 0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 7@ 8@ 9@ if 847A: not actor $PLAYER_ACTOR driving_bike then 04D5: create_corona_at 1@ 2@ 3@ radius 0.15 type 0 flare 0 RGB 120 0 0 end end // - Create light reflection on ground, decreasing intensity at increasing hight 8@ -= 0.05 0811: 0@ = actor $PLAYER_ACTOR car_nosave for 20@ = 0 to 1 if not actor.DrivingVehicleType($PLAYER_ACTOR #FIRELA) then 7@ *= -1.0 0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 7@ 8@ 9@ 02CE: 11@ = ground_z_at 1@ 2@ 3@ 050A: 12@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 1@ 2@ 11@ if not 12@ > 5.0 then 0087: 13@ = 12@ // (float) 13@ -= 3.4 13@ *= -1.0 13@ *= 2.0 12@ += 0.23 if not 0.0 >= 12@ then 0087: 10@ = 7@ if 7@ > 0.0 then 10@ -= 0.1 else if 0.0 > 7@ then 10@ += 0.1 else 20@ += 1 end end 13@ *= 10.2 0092: 13@ = float 13@ to_integer if 13@ > 250 then 13@ = 250 end if not 13@ >= 0 then 13@ = 0 end 0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 10@ 8@ 0.0 016F: create_shadow_type 3 rotation 0.0 size 12@ 255 13@ 0 0 at 1@ 2@ 3@ end end end end // - Create flash light to illuminate peds and vehicles //8@ -= 0.35 //0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 0.0 8@ 9@ //09E5: create_flash_light_at 1@ 2@ 3@ RGB_mask 120 0 0 radius 3.0 end end 003D: end And implemented into your script: SANNY ... CAR_LIGHT_INTENSITY = 150 // Èíòåíñèâíîñòü ïðîåêöèè (0-255) ... CAR_LIGHT_R = 0x40 //R ... CAR_LIGHT_OFFSET_FROM_DUMMY_X = 0.15 // Ñìåùåíèå ïðîåêöèè ïî îñè Y îòíîñèòåëüíî îãíÿ.  âåðñèè 1.0 ýòîò ïàðàìåòð áûë ðàâåí 0.0, ÷òîáû ïðîåêöèÿ ïðè ñêîðîì äèæåíèè íå "óõîäèëà" î÷åíü äàëåêî CAR_LIGHT_OFFSET_FROM_DUMMY_Y = 0.3 // Ñìåùåíèå ïðîåêöèè ïî îñè X îòíîñèòåëüíî îãíÿ. ... shadowIntensity = 0x96 // Èíòåíñèâíîñòü ïðîåêöèè (0-255) ... SANNY // Car Lights if 0AE2: 3@ = random_vehicle_near_point 0.0 0.0 0.0 in_radius SEARCH_RADIUS find_next false pass_wrecked true then repeat 0441: 30@ = car 3@ model 0AB1: call_scm_func @isModelBikeOrQuad num_params 1 model 30@ store_to 21@ 0AB1: call_scm_func @isModelTrailer num_params 1 model 30@ store_to 22@ if or 22@ == true 21@ == true 0A01: model 30@ car then 0A97: 10@ = car 3@ struct 0A8E: 30@ = 10@ + 0x584 0A8D: 30@ = read_memory 30@ size 4 virtual_protect false // - Is taillight intact? (found on sannybuilder forums) // - Dunno how to check if lights are active, though. //0A8E: 2@ = 10@ + 0x5A0 // int //0AA8: call_function_method 0x6C2130 struct 2@ num_params 1 pop 0 3 4@ //0AA8: call_function_method 0x6C2130 struct 2@ num_params 1 pop 0 2 6@ if //OR //4@ == 0 //6@ == 0 08B7: test 30@ bit 2 //Actor.InCar($PLAYER_ACTOR, 3@) then 0A8E: 30@ = 10@ + 0x22 0A8D: 30@ = read_memory 30@ size 2 virtual_protect false mul(30@, 4) inc(30@, 0xA9B0C8) 0A8D: 30@ = read_memory 30@ size 4 virtual_protect false inc(30@, 0x5C) 0A8D: 30@ = read_memory 30@ size 4 virtual_protect false inc(30@, 0xC) 0A8D: 14@ = read_memory 30@ size 4 virtual_protect false inc(30@, 4) 0A8D: 15@ = read_memory 30@ size 4 virtual_protect false inc(30@, 4) 0A8D: 16@ = read_memory 30@ size 4 virtual_protect false //dec(15@, CAR_LIGHT_OFFSET_FROM_DUMMY_Y) // UOKKA'S EDITS.. for 17@ = 0 to 1 14@ *= -1.0 0407: store_coords_to 11@ 12@ 13@ from_car 3@ with_offset 14@ 15@ 16@ 02CE: 4@ = ground_z_at 11@ 12@ 13@ 050A: 6@ = distance_between_XYZ 11@ 12@ 13@ and_XYZ 11@ 12@ 4@ if not 6@ > 5.0 then 0087: 7@ = 6@ // (float) 7@ -= 3.4 7@ *= -1.0 7@ *= 2.0 6@ += 0.23 //6@ += 0.43 if not 0.0 >= 6@ then // using multiply ground distance to fake intensity fade. //7@ *= 11.0 7@ *= 9.0 0092: 7@ = float 7@ to_integer if 7@ > 255 then 7@ = 255 end if not 7@ >= 0 then 7@ = 0 end 0087: 8@ = 14@ if and // Åñëè íå ìîòîöèêë è íå êâàäðîöèêë 21@ == false 22@ == false 14@ <> 0.0 then if 14@ > 0.0 then dec(8@, CAR_LIGHT_OFFSET_FROM_DUMMY_X) else inc(8@, CAR_LIGHT_OFFSET_FROM_DUMMY_X) end else inc(17@) 8@ *= -1.0 end 6@ /= 4.0 0063: 15@ -= 6@ 0407: store_coords_to 11@ 12@ 13@ from_car 3@ with_offset 8@ 15@ 16@ 005B: 15@ += 6@ 6@ *= 4.0 { 0174: 4@ = car 3@ Z_angle if 4@ > 180.0 then 4@ -= 180.0 else 4@ += 180.0 end div(4@, 57.2957795) } // - change offset_ShadExp to offset_Handman // - Single headlight (like on Bikes) would be nice! //0A8C: write_memory 0x707A1F size 4 value 0xC40404 virtual_protect true // 1 = Car shadow // 2 = Bike shadow // 3 = Hand/Man // 4 = Heli shadow // 5 = Headlights on road // 6 = Blood // 7 = //016F: create_shadow_type 5 rotation 4@ size 6@ CAR_LIGHT_INTENSITY 7@ CAR_LIGHT_G CAR_LIGHT_B at 11@ 12@ 13@ 016F: create_shadow_type 3 rotation 0.0 size 6@ CAR_LIGHT_INTENSITY 7@ CAR_LIGHT_G CAR_LIGHT_B at 11@ 12@ 13@ end end end // DEFAULT.. { if or // Åñëè ìîòîöèêë èëè êâàäðîöèêë 21@ == true 22@ == true then 016F: particle 3 rot 0.0 size CAR_LIGHT_SIZE_BIKE CAR_LIGHT_INTENSITY CAR_LIGHT_R CAR_LIGHT_G CAR_LIGHT_B at 11@ 12@ 13@ else 016F: particle 3 rot 0.0 size CAR_LIGHT_SIZE CAR_LIGHT_INTENSITY CAR_LIGHT_R CAR_LIGHT_G CAR_LIGHT_B at 11@ 12@ 13@ mul(14@, -1.0) 0407: store_coords_to 11@ 12@ 13@ from_car 3@ with_offset 14@ 15@ 16@ 016F: particle 3 rot 0.0 size CAR_LIGHT_SIZE CAR_LIGHT_INTENSITY CAR_LIGHT_R CAR_LIGHT_G CAR_LIGHT_B at 11@ 12@ 13@ end } end end until 8AE2: not 3@ = random_vehicle_near_point 0.0 0.0 0.0 in_radius SEARCH_RADIUS find_next true pass_wrecked true end // Emergency lights projections for 0@ = 0xC3E058 to 0xC3EF58 step 0x3C // ïåðåáîð êîðîí 0A8E: 8@ = 0@ + 0x38 // Óêàçàòåëü íà Entity(èãðîâîé ñóáüåêò), ê êîòîðîìó ïðèöåïëåíà êîðîíà 0A8D: 1@ = read_memory 8@ size 4 virtual_protect false 0A8D: 28@ = read_memory 0xB74494 size 4 virtual_protect 0 // Óêàçàòåëü íà ïåðâûé ýëåìåíò â ïóëå òðàíñïîðòà 0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0 0A8D: 24@ = read_memory 0xB74494 size 4 virtual_protect false inc(24@, 8) // Ìàêñèìàëüíîå êîë-âî ýëåìåíòîâ â ïóëå òðàíñïîðòà 0A8D: 24@ = read_memory 24@ size 4 virtual_protect false mul(24@, 0xA18) 005A: 24@ += 28@ if and // Åñëè äàííûé Entity - àâòîìîáèëü... 002D: 1@ >= 28@ 8025: not 1@ > 24@ then 0AEB: 7@ = car_struct 1@ handle 0441: 30@ = car 7@ model if or 0A01: model 30@ car 30@ == #COPBIKE // HPV1000 then 0A8E: 8@ = 0@ + 0x0 0A8D: 21@ = read_memory 8@ size 4 virtual_protect false // X ïîçèöèÿ êîðîíû inc(8@, 4) 0A8D: 22@ = read_memory 8@ size 4 virtual_protect false // Y ïîçèöèÿ êîðîíû inc(8@, 4) 0A8D: 23@ = read_memory 8@ size 4 virtual_protect false // Z ïîçèöèÿ êîðîíû 0A8E: 8@ = 0@ + 0x2C 0A8D: 4@ = read_memory 8@ size 1 virtual_protect false // Red inc(8@) 0A8D: 15@ = read_memory 8@ size 1 virtual_protect false // Green inc(8@) 0A8D: 6@ = read_memory 8@ size 1 virtual_protect false // Blue if 23@ > 0.2 then if 0137: car 7@ model == #COPBIKE // HPV1000 then if and // Åñëè ýòî íå êîðîíà ïåðåäíåé ôàðû 21@ < 0.2 21@ > -0.2 then continue end end // UOKKA'S EDITS.. 0407: store_coords_to 19@ 10@ 11@ from_car 7@ with_offset 21@ 22@ 23@ // Ïîëó÷àåì ìèðîâûå êîîðäèíàòû 02CE: 5@ = ground_z_at 19@ 10@ 11@ 050A: 5@ = distance_between_XYZ 19@ 10@ 11@ and_XYZ 19@ 10@ 5@ if and not 5@ > 10.0 0ABD: vehicle 7@ siren_on then 5@ += 0.23 if not 0.0 >= 5@ then // using multiply ground distance to fake intensity fade. 5@ *= 2.0 if 5@ > 255.0 then 5@ = 255.0 end if not 5@ >= 0.0 then 5@ = 0.0 end 0073: 4@ /= 5@ 0073: 15@ /= 5@ 0073: 6@ /= 5@ 016F: create_shadow_type 3 rotation 0.0 size shadowRadius shadowIntensity 4@ 15@ 6@ at 19@ 10@ 11@ end end // DEFAULT.. { 0407: store_coords_to 19@ 10@ 11@ from_car 7@ with_offset 21@ 22@ 23@ // Ïîëó÷àåì ìèðîâûå êîîðäèíàòû 016F: add_shadow_type 3 rotation_factor 0.0 shadowRadius shadowIntensity RGB 4@ 15@ 6@ at 19@ 10@ 11@ } end end end end Well ehm, I would say, this is a request ![]() -------------------- |
![]() Post #34 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | @uokka Thats an old code... I rewrited it. I made that tailights use one shadow, not two. And it has unique texture, not just round. And I used Wesser's code too. But I believe that shadow, created in CAutomobile::preRender wouldnt go away from car on high speed. Also, these shadows are not 2D. They created with im3DRender. |
![]() Post #35 | |
![]() Actually living entity Posts: 143 From: Earth Joined: 15-January 11 ![]() | yeah, I saw your video.. Those new tail light textures are looking good ![]() Well youre the man, and I have no idea what you just said.. ![]() However, wouldnt it look much more realistic if using two shadows, as the vehicles having two tail lights? Would also be an advandage to GTA IV.. in my opinion. ![]() QUOTE And I used Wesser's code too. But I believe that shadow, created in CAutomobile::preRender wouldnt go away from car on high speed. Ehm, thats what Wessers fix fixes, right? ![]() Sorry I dont know anything about memory structure and stuff.. ![]() This post has been edited by uokka: Nov 24 2011, 08:42 PM -------------------- |
![]() Post #36 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | Its something hard - to check if baclights are turned on (actually, - to check if vahiclelights_on texture is active). Because when camera is on front of a car, then game sets the state "off" for backlights. You can simply check this - just get in car, then try to rotate camera around car. And when you will look to the side of car, you could see how the game changes "vehiclelights_on" to "vehiclelight_off". Btw vehiclelights_on/off are textures which used by lights in active/non-active state. For original vehicles, they could be find in vehicle.txd. And also I wanted to make that rear stop-lights are used only when break pedal used. I mean I wanted to make 2 types of lights, stop-lights and nightly backlights, which work indepenentially. But I can't find needed things in .exe. Maybe Deji could help... And yes, thats Wesser's fix. But just remember - the same shadow creates as headlight for player's vehicle, and it looks like really attached to that vehicle. (but really its not attached - it created in world coors too). Two tailights would be more realistic, but I dont think it will be so nice in SA game. |
![]() Post #37 | |
![]() Actually living entity Posts: 143 From: Earth Joined: 15-January 11 ![]() | Thanks for quick reply.. So you couldn't find a workaround for those limitations, yet. I used some code which checks if the tail lights are intact (not damaged), so the light reflection would not be turned of when you look at the car from the front. (But I think the tail lights are not even damageable.. ![]() The downside is that the light reflection is visible at any time for any vehicle.. Even if the engine is turned off and no driver is sitting in the car. Anyways, what about checking if theres a driver, the engine state and the day time? Still not perfect, but maybe a step foward. Im looking foward to your version 2.0, and I will defenetly edit it to use two lights, for my personal preference.. ![]() Give it a try some time, Im sure you'll like it. -------------------- |
![]() ![]() |