Quantcast

Jump to content

» «
Photo

Speed of rockets?

6 replies to this topic
antimonycat
  • antimonycat

    Player Hater

  • Members
  • Joined: 06 Mar 2008

#1

Posted 06 March 2008 - 01:06 PM

Is it possible to change the velocities of the rockets in SA (the RPG weapons and the ones on the Hydra/Hunter) or is it hardcoded?

Zyo
  • Zyo

    Homie

  • Members
  • Joined: 29 Oct 2007
  • Scotland

#2

Posted 07 March 2008 - 02:42 AM

I use GTASA ultimate editor and when editing specific weapon stats there is a field called "speed". According to the readme file this affects projectile velocity. I haven't experimented with it yet (and do not plan to), but this readme suggests that you can.


If I was going to experiment, this is what i would do

The data can be found in folder:
Rockstar Games\GTA San Andreas\data
filename:
weapon.dat

rocketlauncher properties are as follows
$ RLAUNCHER PROJECTILE 50.0 55.0 359 -1 7 rocket 1 75 0.42 0.0 0.05 1 0 1.0 1.0 11 19 12 (14) 99 15 99 48214

I have bracketed the relevant number to highlight it - the brackets do not belong in the line.

The number 14 represents the "speed" stat of the rocket launcher. I have noticed that other weapons eg 9mm have speed stats of about 6. If you want to change the speed of the rockets i suggest you alter this number to a higher/lower one.

Good luck, and let us know what happens if you try this.

pinky
  • pinky

    "Tooled up and chibbin' ye, ya Bass".

  • Members
  • Joined: 06 Jan 2005

#3

Posted 07 March 2008 - 12:15 PM

QUOTE (zyonig @ Mar 7 2008, 02:42)
I use GTASA ultimate editor and when editing specific weapon stats there is a field called "speed". According to the readme file this affects projectile velocity. I haven't experimented with it yet (and do not plan to), but this readme suggests that you can.


If I was going to experiment, this is what i would do

The data can be found in folder:
Rockstar Games\GTA San Andreas\data
filename:
weapon.dat

rocketlauncher properties are as follows
$ RLAUNCHER PROJECTILE 50.0 55.0 359 -1 7 rocket 1 75 0.42 0.0 0.05 1 0 1.0 1.0 11 19 12 (14) 99 15 99 48214

I have bracketed the relevant number to highlight it - the brackets do not belong in the line.

The number 14 represents the "speed" stat of the rocket launcher. I have noticed that other weapons eg 9mm have speed stats of about 6. If you want to change the speed of the rockets i suggest you alter this number to a higher/lower one.

Good luck, and let us know what happens if you try this.

I think that is just the speed for a part of the animation as i have been trying to up rocket speed for a long time to no avail.
I am sure it is exe controlled.

Zyo
  • Zyo

    Homie

  • Members
  • Joined: 29 Oct 2007
  • Scotland

#4

Posted 07 March 2008 - 03:31 PM

Ok I went ahead and tested my theory. Turns out that changing the "speed" data does not affect the speed of the projectile.

Guess you can't always trust the readme file. sad.gif

Here's what it says

"Speed
This is the speed that the weapons ammo moves at."

pinky
  • pinky

    "Tooled up and chibbin' ye, ya Bass".

  • Members
  • Joined: 06 Jan 2005

#5

Posted 07 March 2008 - 06:04 PM

QUOTE (zyonig @ Mar 7 2008, 15:31)
Ok I went ahead and tested my theory. Turns out that changing the "speed" data does not affect the speed of the projectile.

Guess you can't always trust the readme file. sad.gif

Here's what it says

"Speed
This is the speed that the weapons ammo moves at."

Yeah, thought so. Been trying to increase thier speed since I started using the SCM hook to remove the aircraft speed limit, thye missiles can't keep up and make dogfighting pointless.

Sacky
  • Sacky

    IV's Limit Adjuster

  • Members
  • Joined: 10 Nov 2006

#6

Posted 08 March 2008 - 05:39 AM Edited by Sacky, 08 March 2008 - 06:09 AM.

You should be able to adjust the speed by modifying a constant float within the memory, simply breakpoint the rocket structure and look at where the x/y/z values are being read and written to.

(I took the liberty of doing it for you:)

X Values:

0x56A4BC (Read)
0x15611B7 (Read)
0x739826 (Write)

So this is the part where it writes the x/y/z values:

QUOTE
.text:00739826 mov    [ebx], eax                      ; RocketX
.text:00739828 mov    ecx, [esi+4]
.text:0073982B mov    eax, [esp+144h+var_C8]
.text:0073982F mov    [ebx+4], ecx                    ; RocketY
.text:00739832 mov    edx, [esi+8]
.text:00739835 mov    [ebx+8], edx                    ; RocketZ


EDIT:

OK this is the value you need to change:

QUOTE
.text:00738FAD fmul    ds:Gravity


If you NOP this line (6 bytes) the rocket flys at virtually unlimited speed tounge.gif , but then again you can't just modify the whole gravity float to just get a decent rocket velocity can you? Well I can show you a way around that, I'll just write up some code now...

CODE
float* fNewGrav = (float*) malloc(sizeof(float));
*fNewGrav = 0.008f; // Modify this to change the missile velocity
DWORD dwPtr = (DWORD) fNewGrav;
char* cBytes = (char*)&fNewGrav;
BYTE bChange[] = { cBytes[0], cBytes[1], cBytes[2], cBytes[3] };
Patch(0x738FAF,bChange);


Very interesting to see the missiles fly at really fast and slow speeds

jackusCTB
  • jackusCTB

    Peon

  • Members
  • Joined: 29 Jun 2012
  • Belgium

#7

Posted 16 January 2013 - 03:19 PM

Sorry for the MASSIVE bump, but I find this thread very interesting. Is there a way to apply Sacky's script? Thanks.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users