Quantcast

Jump to content

» «
Photo

[AI] Force vehicle RPM to -----

12 replies to this topic
PlayPrey
  • PlayPrey

    string ScriptSkillLevel = "Low-Med";

  • Members
  • Joined: 02 Jul 2012
  • Norway

#1

Posted 25 June 2014 - 02:35 PM

When you sit in your car, you can hold the handbrake- and be able to do what you want with the RPM of the vehicle.

(Handbrake + Gas)

 

I know it is possible to read the RPM of a vehicle, but is it possible to set the RPM of a vehicle?


LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#2

Posted 25 June 2014 - 02:52 PM

When you sit in your car, you can hold the handbrake- and be able to do what you want with the RPM of the vehicle.

(Handbrake + Gas)

 

I know it is possible to read the RPM of a vehicle, but is it possible to set the RPM of a vehicle?

with the scripthookdotnet or native function i dont think so... by locating the memory offset from the vehicle to where the rpm is at then yes... if u know debugging and reversing then yeah

 

look here... http://www.gtamoddin...ddresses_(GTA4)

 

if u know the offsets then u can access the memory... i didnt see rpm so i guess ud have to find it yourself


LetsPlayOrDy
  • LetsPlayOrDy

    Lets mod or die!

  • Members
  • Joined: 24 Aug 2013
  • United-States

#3

Posted 25 June 2014 - 05:54 PM

Look in the source code of the Watch Dogs mod. There was a "set high rpm" option in there

PlayPrey
  • PlayPrey

    string ScriptSkillLevel = "Low-Med";

  • Members
  • Joined: 02 Jul 2012
  • Norway

#4

Posted 25 June 2014 - 06:13 PM

Look in the source code of the Watch Dogs mod. There was a "set high rpm" option in there

Could you link me the source code? The closest I got to a Watch Dogs script mod was this 'http://www.rinepim.c...mods.php?mod=13' but that mod don't have the source code public.


LetsPlayOrDy
  • LetsPlayOrDy

    Lets mod or die!

  • Members
  • Joined: 24 Aug 2013
  • United-States

#5

Posted 25 June 2014 - 06:16 PM


Look in the source code of the Watch Dogs mod. There was a "set high rpm" option in there

Could you link me the source code? The closest I got to a Watch Dogs script mod was this 'http://www.rinepim.c...mods.php?mod=13' but that mod don't have the source code public.
Use something like ILSpy.

LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#6

Posted 25 June 2014 - 06:18 PM Edited by LordOfTheBongs, 25 June 2014 - 06:30 PM.

 

 

Look in the source code of the Watch Dogs mod. There was a "set high rpm" option in there

Could you link me the source code? The closest I got to a Watch Dogs script mod was this 'http://www.rinepim.c...mods.php?mod=13' but that mod don't have the source code public.
Use something like ILSpy.

 

if it is an asi script that wont work but .net then yeah do this

 

edit: nm it is .net i just looked... interesting source too, most of the natives he uses i have never seen or used lol


Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013
  • Poland

#7

Posted 25 June 2014 - 06:54 PM Edited by Michael Wojtanis, 25 June 2014 - 06:56 PM.

Lord - what natives? :)

 

PS. About RPM - I force ped to use gas pedal max. You can make a half sin or cos function to force put gas pedal.


LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#8

Posted 25 June 2014 - 07:39 PM Edited by LordOfTheBongs, 25 June 2014 - 07:40 PM.

hmm i dont have your dll on hand but from what i remember is stuff like the nm_message native (natural motion)... but on that one, i have actually seen it before just have no idea how it works. Do you know what ur doing or are u copying the code from the sco and just relying on how r* used it? I did a little testing with it but gave up after a short time since i wasnt seeing results on screen. I was literally copying code from the sco and converting to c# and i couldnt see results.

 

But ones i never heard of are the move state ones, and u interact with the script via native functions... perhaps these are already wrapped in Script class and why i never noticed them. I just remember browsing and thinking that a bunch of these natives ive never used. Probably a few more i forgot to mention.


PlayPrey
  • PlayPrey

    string ScriptSkillLevel = "Low-Med";

  • Members
  • Joined: 02 Jul 2012
  • Norway

#9

Posted 25 June 2014 - 07:47 PM

Lord - what natives? :)

 

PS. About RPM - I force ped to use gas pedal max. You can make a half sin or cos function to force put gas pedal.

Could you share how you do that? I took a quick look myself for something like that but Im not finding anything.


PlayPrey
  • PlayPrey

    string ScriptSkillLevel = "Low-Med";

  • Members
  • Joined: 02 Jul 2012
  • Norway

#10

Posted 02 August 2014 - 02:59 PM

Bump, Micheal Wojtanis it would be great if I could look at the source me code for the watch dogs mod you have, you will get credit for any mod I would make with help from the source code.

 

Thank you.


InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#11

Posted 02 August 2014 - 03:45 PM

hmm i dont have your dll on hand but from what i remember is stuff like the nm_message native (natural motion)... but on that one, i have actually seen it before just have no idea how it works. Do you know what ur doing or are u copying the code from the sco and just relying on how r* used it? I did a little testing with it but gave up after a short time since i wasnt seeing results on screen. I was literally copying code from the sco and converting to c# and i couldnt see results...

Wojtanis, I am curious about these "nm" natives as well. Please educate us? :)


jenksta
  • jenksta

    Player Hater

  • Members
  • Joined: 22 Dec 2008
  • United-Kingdom

#12

Posted 02 August 2014 - 09:05 PM

The NM natives are to build a command buffer to interface with the games natural motion engine. Basically you start off by creating a command buffer using CREATE_NM_MESSAGE, then you create your message using the SET_NM_MESSAGE_(FLOAT/INT/BOOL/VEC3/INSTANCE_INDEX/STRING) natives to set the commands and their values (The natives take an index to an array of string messages which can be found here http://pastebin.com/0g219J7e (so 'stopAllBehaviours' would be index 0, 'start' would be index 2, e.t.c.)),  then you use the SEND_NM_MESSAGE native to send the command buffer to the peds fragInstNM command handler (Which means the ped has to be using the fragInstNM physics (aka ped must be in ragdoll state), force that using SWITCH_PED_TO_RAGDOLL if required).

  • InfamousSabre likes this

InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#13

Posted 02 August 2014 - 11:57 PM

Very interesting. I'll have to mess around with those some time.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users