p00r Posted May 7, 2006 Share Posted May 7, 2006 can it be done that cars have manual gears? thnx p00r Link to comment Share on other sites More sharing options...
Y_Less Posted May 7, 2006 Share Posted May 7, 2006 Not through mission coding, but look around for the cam hack mods. Link to comment Share on other sites More sharing options...
PLPynton Posted May 8, 2006 Share Posted May 8, 2006 (edited) well, it can be done through coding. pretty original idea. you are lucky 'cause it is an easy task. i will grab some coffee first. edited: here's the code :TESTERE03A4: name_thread 'TESTERE' :TESTERE000001: wait 150 ms00D6: if 0 0256: player $PLAYER_CHAR defined004D: jump_if_false ££TESTERE0000D6: if 0 00DF: actor $PLAYER_ACTOR driving004D: jump_if_false ££TESTERE05 04F7: status_text $EEA 0 line 1 'PL_H5' 04F7: status_text $EEB 0 line 2 'PL_H5' 03C0: @0 = actor $PLAYER_ACTOR car00D6: if 2 81F3: NOT car @0 airborne84A7: NOT actor $PLAYER_ACTOR driving_boat84C8: NOT actor $PLAYER_ACTOR driving_flying_vehicle004D: jump_if_false ££TESTERE05 02E3: @1 = car @0 speed0013: @1 *= 3.6;; floating-point values 0090: $EEA = float_to_integer @1 008A: $EEB = @2;; integer values and handles00D6: if 0 84A4: NOT @2 == 0;; integer values OR floating-point values004D: jump_if_false ££TESTERE06 0085: @3 = @2;; integer values and handles0093: @3 = integer_to_float @30007: @5 = 6.0;; floating-point values0063: @5 -= @3;; floating-point values 0013: @5 *= 18.0;; floating-point values 02F7: @9 = sinus @5;; floating-point values0013: @9 *= 150.0;; floating-point values 000F: @9 -= 10.0;; floating-point values0087: @5 = @1;; floating-point values only0063: @5 -= @9;; floating-point values 02F7: @4 = sinus @5;; floating-point values0007: @5 = 1.0;; floating-point values0063: @5 -= @4;; floating-point values 0087: @4 = @5;; floating-point values only0013: @4 *= 250.0;; floating-point values 0093: @6 = integer_to_float @20073: @4 /= @6;; floating-point values 088B: set_vehicle @0 form_drag_multiplier @40050: gosub ££TESTERE0700D6: if 3 00E1: key_pressed 0 1680E1: NOT key_pressed 0 480E1: NOT key_pressed 0 14004D: jump_if_false ££TESTERE0500D6: if 0 04A4: @2 == 1;; integer values OR floating-point values004D: jump_if_false ££TESTERE0200D6: if 1 04B1: @1 > 1.0;; integer values OR floating-point values84B1: NOT @1 > 15.0;; integer values OR floating-point values004D: jump_if_false ££TESTERE0204BA: set_car @0 speed_instantly 6.0 0002: jump ££TESTERE05:TESTERE0200D6: if 0 04A4: @2 == 2;; integer values OR floating-point values004D: jump_if_false ££TESTERE0300D6: if 1 04B1: @1 > 10.0;; integer values OR floating-point values84B1: NOT @1 > 38.0;; integer values OR floating-point values004D: jump_if_false ££TESTERE0304BA: set_car @0 speed_instantly 12.0 0002: jump ££TESTERE05:TESTERE0300D6: if 0 04A4: @2 == 5;; integer values OR floating-point values004D: jump_if_false ££TESTERE0500D6: if 1 04B1: @1 > 1.0;; integer values OR floating-point values84B1: NOT @1 > 15.0;; integer values OR floating-point values004D: jump_if_false ££TESTERE0504BA: set_car @0 speed_instantly 0.0 :TESTERE0501C3: remove_references_to_car @0;; Like turning a car into any random car00D6: if 080E1: NOT key_pressed 0 8004D: jump_if_false ££TESTERE1000D6: if 080E1: NOT key_pressed 0 9004D: jump_if_false ££TESTERE200002: jump ££TESTERE00:TESTERE06088B: set_vehicle @0 form_drag_multiplier 2.70002: jump ££TESTERE05:TESTERE0700D6: if 0 84A4: NOT @2 == 5;; integer values OR floating-point values004D: jump_if_false ££TESTERE08000B: @9 += 15.0;; floating-point values00D6: if 004B1: @1 > @9;; integer values OR floating-point values004D: jump_if_false ££TESTERE080890: $EEA 32 :TESTERE080051: return:TESTERE10000A: @2 += 1;; integer values00D6: if 004B5: @2 >= 5;; integer values OR floating-point values004D: jump_if_false ££TESTERE000006: @2 = 5;; integer values0002: jump ££TESTERE00:TESTERE20000E: @2 -= 1;; integer values00D6: if 084B5: NOT @2 >= 0;; integer values OR floating-point values004D: jump_if_false ££TESTERE000006: @2 = 0;; integer values0002: jump ££TESTERE00004E: end_thread that is just a prototype however pretty acurate simulation of manual gear box. next and previous radio station keys will shift gears up and down. gear 0 is simply automatic gear box and 1-5 are manual gears. you can already break fast by shifting gears down. you will get better head start from manual gearbox than it was with automatic, as well as general acceleration and top speed. the kick is better as usually when starting from 2nd gear. placed 2 digital counters: for speed in kmph and gear. the speed indicator blinks when you are at the optimal speed to shift gear up. you have to reduce gear when driving up some hill, you cannot start like from 5th gear... i could do perfect gear box simulator reading velocity vector and reacting with opposite forces but without a code to read top speed of model it does not have any sens. the other way to map it for all ID is not a solution here. Edited May 8, 2006 by PLPynton Link to comment Share on other sites More sharing options...
pinky Posted May 8, 2006 Share Posted May 8, 2006 Couple of questions for you. I don't have any real SCM editing knowledge so I may be off here, I take the gear changes are currently at preset speeds in your script. If possible could you use the top speed flag and divide by the cars gear ratio amount set in it's own handling file. This would give a more dynamic approuch as all vehicles would then be more unique to thier own settings and gear ratios of a sort can be configured into the handling. Secondly, you should make this into an SCM download as their will be plenty of demand for it. Even better if it's part of an SCM hook. Good job. Link to comment Share on other sites More sharing options...
PLPynton Posted May 8, 2006 Share Posted May 8, 2006 (edited) Couple of questions for you.I don't have any real SCM editing knowledge so I may be off here, I take the gear changes are currently at preset speeds in your script. If possible could you use the top speed flag and divide by the cars gear ratio amount set in it's own handling file. This would give a more dynamic approuch as all vehicles would then be more unique to thier own settings and gear ratios of a sort can be configured into the handling. Secondly, you should make this into an SCM download as their will be plenty of demand for it. Even better if it's part of an SCM hook. Good job. actually i am not using linear base. I have created sinusoidal (up to 90degree) as it should pass between all the car in their range. then for each gear placed on sinusoide i have one place as optimal speed. optimal speed place is then spreaded +-90 degree as reversed sinus to create relation of gear ratio and rpm. these 5 points and their shifted "holes" are going on each other a bit to relate to more vehicles, more than 1. i have done that only because i cant read top speed from level of script. creating manual gear basing on vectors, accelerations, momentums, frictions for infernus would be easier and shorter however only 3-4 other cars will be able to follow. the rest of vehs will simply lose a lot of or even be unable to drive at 50% of top speed. you see the problem is that i can read handling.cfg but script can't so well. at present day i can only memorize all values of top speed for cars what is simply insane. and futhermore dividing speed range by 5 gears gives you effect like: you are starting sharp from 5th gear. in solution which i chose there will be more points which are bringing that thing close to manual gear. sorry i have no time to post downloadable version, i do not know even where. besides that is a prototype which just died because of lack of resources. but if enyone like it he can take it as his own solution or add to own mod... be my guest i do not have nothing against since one can have some fun. thanks for appreciations Edited May 8, 2006 by PLPynton Link to comment Share on other sites More sharing options...
Sweet J Lou Posted May 14, 2006 Share Posted May 14, 2006 What Game is this for? If It's for SA then can someone post the VC code and vice-versa. Really Cool, I've been thinking about this for ages but I never got around to starting it. Link to comment Share on other sites More sharing options...
Y_Less Posted May 14, 2006 Share Posted May 14, 2006 As far as I can see there are no game specific OpCodes, so it should work on both. Link to comment Share on other sites More sharing options...
p00r Posted May 15, 2006 Author Share Posted May 15, 2006 WOW that's amazing, thank you vvvvvveeeeerrrryyy much, this is like the next gta. Are there Karma points in this forum? Thank you PLPynton, a sinusoide solution, youre THE coder, not some other megalomaniacs that tells people to search. THANK YOU, from p00r Link to comment Share on other sites More sharing options...
PLPynton Posted May 16, 2006 Share Posted May 16, 2006 i am glad you like it. i am wondering if one tested that with all cars? these slow and heavy like rhino. Link to comment Share on other sites More sharing options...
BMWPower Posted May 16, 2006 Share Posted May 16, 2006 I'm trying to compile it with BW mission builder and i got an error: Can't compile Label not found: LABEL01C37D: Link to comment Share on other sites More sharing options...
PLPynton Posted May 16, 2006 Share Posted May 16, 2006 (edited) I'm trying to compile it with BW mission builder and i got an error: Can't compile Label not found: LABEL01C37D: it is not my foult. maybe not even yours. the best way would be to restart machine and decompile again your original game scripts. these wrong names for labels in jumps come from decompiling not compiling as far as i know. anyway i have had same stories few months ago and that is exactly what i did. i am not sure if i reinstalled MB edit: you have downloadable mod version here Edited May 16, 2006 by PLPynton Link to comment Share on other sites More sharing options...
jeffery818 Posted May 16, 2006 Share Posted May 16, 2006 Where do I put this code? Link to comment Share on other sites More sharing options...
PLPynton Posted May 16, 2006 Share Posted May 16, 2006 Where do I put this code? what are you doing in mission moding if you do not know that? there is a link in previous post. cut Link to comment Share on other sites More sharing options...
BMWPower Posted May 17, 2006 Share Posted May 17, 2006 I found this post, and fixedthe the problem, but when i tried to compile again.. http://www.gtaforums.com/index.php?showtop...0entry2943941 Label not found: PROJECT_1: I opened original scm, and everything is like in the original scm, buti don't know where is the problem. Link to comment Share on other sites More sharing options...
PLPynton Posted May 17, 2006 Share Posted May 17, 2006 (edited) I found this post, and fixedthe the problem, but when i tried to compile again.. http://www.gtaforums.com/index.php?showtop...0entry2943941 Label not found: PROJECT_1: I opened original scm, and everything is like in the original scm, buti don't know where is the problem. i posted above somewhere a downloadable version of mod. if you still have issues to implement code into your script check your source. try to decompile original scripts and after process is ended just use find option to look for keyword label this keyworld shoud be found only once in decompiled script. if you see it more than once your decompilation process failed. if label is missing: like this what you mentioned it is probably your fault and you deleted it. maybe you even tried to paste code between thread which advise to see wozi and thread which handles the basketball (LITCAS and PROJECT). below original end of LITCAS and beggining of PROJECT. in that case just bring back what is gone. :LITCAS_42 004E: end_thread :PROJECT_1 03A4: name_thread 'PROJECT' 0006: @10 = 0 ;; integer values 0004: $1929 = 0 ;; integer values 0004: $1930 = 1 ;; integer values 00D6: if 0 0039: @10 == -1 ;; integer values 004D: jump_if_false ££PROJECT_10 0107: @0 = create_object #WOODENBOX at 0.0 0.0 0.0 0107: @9 = create_object #WOODENBOX at 0.0 0.0 0.0 :PROJECT_10 0001: wait 0 ms Edited May 17, 2006 by PLPynton Link to comment Share on other sites More sharing options...
BMWPower Posted May 18, 2006 Share Posted May 18, 2006 (edited) I compiled it, everything is ok, but i wanted to shift the gear, and the game crashes. Do i have to change the controls, because my buttons for changing the radiostations are 'R' and 'E'. And is there a way to get this mod working with B2R mod? Greetz, BMWPower Edited May 18, 2006 by BMWPower Link to comment Share on other sites More sharing options...
PLPynton Posted May 18, 2006 Share Posted May 18, 2006 (edited) once again here is the link to compiled script which works. if it does not work in your case only: try if you have last update for sascm, try if you pasted it corectly if create thread is present and so on. if you still have problems then decompile my files and see where to put it. Edited May 18, 2006 by PLPynton Link to comment Share on other sites More sharing options...
jeffery818 Posted May 18, 2006 Share Posted May 18, 2006 Where do I put this code? what are you doing in mission moding if you do not know that? there is a link in previous post. cut Obviously, im in the mission modding forum because I want to use the codes in this forum and I don't want huge all in one mods. I want to combine multiple codes and make my own SCM. Link to comment Share on other sites More sharing options...
PLPynton Posted May 18, 2006 Share Posted May 18, 2006 Obviously, im in the mission modding forum because I want to use the codes in this forum and I don't want huge all in one mods. I want to combine multiple codes and make my own SCM. ok ok. together with other threads in between, does not matter where actually. next time you gonna have to be very specified as i see some logical paradox between your question and last post. Link to comment Share on other sites More sharing options...
tomworld10 Posted September 18, 2006 Share Posted September 18, 2006 Hi, @PLPynton : I really love this mod !!!! Is it really surprising ??? It's (kind of) very realistic, and is some crazy piece of code !!!!! But I can't add it to B2R the way it is now. I'd like to try to fix some things before. Let's get started : I think you've noticed, that in the original game CJ (I don't remember but I think Tommy use to s well in VC) changes gears by himself on manual all cars (there isn't automatics according to handling.cfg). If you havn't grab a car find a long straitght line and look at the little jumps the car do. To see in original game in which gear your are grab GTA: San Andreas Speedometer by spookie. You're probably thinking :"Yes, then what ???" Well I thought that since spooky's speedo knows where the gear handle is, there might be a way of knowing it throught scm, and maybe you could then find a whole new handfull of car's transmission opcodes, or maybe not.... Well that's all for now. Have fun Link to comment Share on other sites More sharing options...
Demarest Posted September 18, 2006 Share Posted September 18, 2006 Memory reading/writing by way of SCM is only available in VC for now. I think Y_Less is close to making it a reality in SA, but it requires the input of others... or something. Link to comment Share on other sites More sharing options...
PLPynton Posted September 18, 2006 Share Posted September 18, 2006 yeap, Dem is right i have had a quite silly problem to read vehicle max speed and prior to everything else its gear. it can be done thru DMA but i think the only windown to it would be: 1. mess on scripted DMA 2. mess around hardcoded using secret windows available thru known opcodes like 0A1F. i know it is silly but let me explane to you: everybody thinks is all about stats but let us be realistic 466 is handling multiplier for all game vehicles (if you look thru exe) and decreased makes "drive on ice effects" while increased makes your handling sharp. it needs testing but i tell you all that is the way we can COMPLETELY define new mehanics regardless to exe file or internal resources. P.S. if you like to try mind that you have to tract some "stats" like floats and access them thru float commands however it is int base of that float that is going to be changed. like reverse and i do not know how to explane it in english but apply some value on stat 466 and check how everybody is driving now. Link to comment Share on other sites More sharing options...
tomworld10 Posted October 6, 2006 Share Posted October 6, 2006 Hi, Well guys I'm sorry but it seems I'm too dumb to understand DMA and memory hacking through stats, and I've got no idea how memory hacking should be done but with what pdescobar found wouldn't it be possible ? Well I'm really sorry I didn't even look for, didn't even try I'm just stuck with that tutorial and it's now too late to give up.... Anyway as C2H5OH (and other molecules) is(are) controlling my brain I probably just don't want this particular topic to get on page two... Actualy I just want to know if now that you guys found that we (hum you) can mess up with memory hacking it did chnge anything ? I realize now that it is a stupid question because if you did you probably would have told us but I'm just asking.... Ignore this if you think I'm just talking sh*t... Have fun (because I think anything more I'll be telling will be crap...) Have fun (and even if I saying it everytime I do mean it, life isn't worth it without fun...) Link to comment Share on other sites More sharing options...
PLPynton Posted October 7, 2006 Share Posted October 7, 2006 apparently we cannot access memory from script using original opcodes outside some range and within this range there is no vehicle handling table,just a part of vehicles.ide what means that it still cannot be done. another way would be to use patch that adds these 3 opcodes (is included in new SB). then it is possible (check original topic of pdescobar where i posted address of veh table). speaking about devil: not dumb, no. C2H5OH does not work well for mem investigations because hydrogenium and oxygenium are out of the limit for hex. you have to use actinium, borum, carbonium, deuterium, europium, fluor based substances to accelerate perception processes. Link to comment Share on other sites More sharing options...
Demarest Posted October 7, 2006 Share Posted October 7, 2006 apparently we cannot access memory from script using original opcodes outside some range and within this range there is no vehicle handling table,just a part of vehicles.ide what means that it still cannot be done. another way would be to use patch that adds these 3 opcodes (is included in new SB). then it is possible (check original topic of pdescobar where i posted address of veh table). speaking about devil: not dumb, no. C2H5OH does not work well for mem investigations because hydrogenium and oxygenium are out of the limit for hex. you have to use actinium, borum, carbonium, deuterium, europium, fluor based substances to accelerate perception processes. While we're on the subject of mem-hacking and in the presence of somebody whose clearly dones some legwork, I have a question the answer to which would help Windshield out quite nicely: Is the memory address for current/max air known? If so, are they within stat processing range? Right now, I've got Windshield shutting itself off anytime the player is in the water simply because the air meter is technically a matter of life or death. Link to comment Share on other sites More sharing options...
PLPynton Posted October 7, 2006 Share Posted October 7, 2006 Dem, what is windshield? new project of yours or? sorry for offtopic but you have to be kidding us. you know max breath meter gets computed from lung capasity, is it some kind of test or what? the only thing i can help you is current. it is under stats (see original topic). Link to comment Share on other sites More sharing options...
Demarest Posted October 8, 2006 Share Posted October 8, 2006 (edited) Windshield is an alternative user interface for SA. It uses Thirst For Blood's UI, but adapted for SA's far more diverse circumstances. I've been test driving it during the SA min kill competition. You can see promo shots there. I'm glad you enjoyed me "joke/test", but knowing how to determine current lung capacity is not the same as determining current air level. By all means work up a routine to prove me wrong. I want to be wrong. I want there to be a way for SCM to know what your current air level is. the only thing i can help you is current. it is under stats (see original topic).Um... that's exactly what I was asking for. And since it wasn't published before, what's with the "you should know better" tone? Knowing lung capacity and knowing current air are not the same thing. The info you provided in the stat thread IS however. Thank you for that. Edited October 8, 2006 by Demarest Link to comment Share on other sites More sharing options...
mcfee Posted December 2, 2006 Share Posted December 2, 2006 Could somebody please put up a main.scm (for san andreas) with the manual gears installed along with which keys you press to change. Thanks Link to comment Share on other sites More sharing options...
-/TNT\- Posted December 2, 2006 Share Posted December 2, 2006 Bumpage! Lawl... If you follow the instructions, it is very easy to do it yourself. The buttons that are used to change the gears are Radio next station and Radio previous station. Link to comment Share on other sites More sharing options...
GTA_gangstar Posted December 3, 2006 Share Posted December 3, 2006 can someone make it where you have to use a clutch 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