Quantcast

Jump to content

» «
Photo

Brokenfish's Speedometer

  • This topic is locked This topic is locked
35 replies to this topic
spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#1

Posted 15 July 2005 - 04:56 AM Edited by spaceeinstein, 01 September 2005 - 04:05 PM.

CONVERTED FOR SAN ANDREAS!

Created by Brokenfish for Vice City. Converted by spaceeinstein for San Andreas. This is a script mod that displays the speed of any vehicles in about miles per hour.

Please download Barton's mission builder using Craig's link. You have to download Hammer89's GXT editor. Find the GXT string "HOSP_1". Edit the text to "MPH". Save the GXT. It should display the speed in numbers next to the MPH.

CODE
004F: create_thread ££SPEED

------------

:SPEED
0001: wait  50 ms
00D6: if  0
00DF:   actor $PLAYER_ACTOR driving
004D: jump_if_false ££SPEEDLAST
03C0: @0 = actor $PLAYER_ACTOR car
00D6: if  0
00DB:   actor $PLAYER_ACTOR in_car @0
004D: jump_if_false ££SPEED
02E3: @1 = car @0 speed
0011: @1 *=  2.25;; floating-point values
008C: @1 = float_to_integer @1
0086: $SPED =  @1;; floating-point values only
04F7: status_text $SPED  0 line  4 'HOSP_1';; MPH
0002: jump ££SPEED

:SPEEDLAST
0001: wait  250 ms
0151: remove_status_text $SPED
0002: jump ££SPEED

ThAtSgOtTaHuRt
  • ThAtSgOtTaHuRt

    T_G_H

  • Members
  • Joined: 31 Jul 2003

#2

Posted 15 July 2005 - 05:12 AM Edited by ThAtSgOtTaHuRt, 15 July 2005 - 05:26 AM.

sweet, just what I was looking for. good work. rah.gif

although the NRG tops out at 80MPH on your speedo and the HYREA tops out at 120MPH. can ya boost the number up a bit to make it more realistic? - like multiply it by 2.25 then NRG will top out at 180 (sounds about right)

but then again after I did that I end up going 40MPH when the bike is rolling at a jogging pace.

what to do what to do?

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#3

Posted 15 July 2005 - 10:41 PM Edited by spaceeinstein, 15 July 2005 - 10:49 PM.

It's like that, somehow. It does that in Vice City for the Skimmer only but somehow in San An, it does that in almost any vehicles. I changed the value to 2.0 (original one).

sighko
  • sighko

    Player Hater

  • Members
  • Joined: 23 Dec 2004

#4

Posted 15 July 2005 - 11:09 PM

works PERFECT been waiting for a digital speedo to put in my script...BIG UPS!

RainingAcid
  • RainingAcid

    Hustler

  • Members
  • Joined: 28 Mar 2005

#5

Posted 16 July 2005 - 02:48 AM

Is locks up when I try to add it to SA-Back to reality.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#6

Posted 16 July 2005 - 05:18 AM

The size limit for the first four segments is 2MB (or 200,00 something), so if you go over that, the game crashes.

yfbc.
  • yfbc.

    Player Hater

  • Members
  • Joined: 26 Jun 2005

#7

Posted 16 July 2005 - 05:42 PM

It worked when i added it to SA - back to reality, although it doesnt always show because of the petrol bar and when it does the petrol bar doesnt

The_Grudge
  • The_Grudge

    » The_Grudge «

  • BUSTED!
  • Joined: 08 Jan 2005

#8

Posted 17 July 2005 - 04:45 PM

Any way to make this display KPH?

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#9

Posted 17 July 2005 - 04:56 PM Edited by spaceeinstein, 17 July 2005 - 04:58 PM.

Change 0011: $SPED2 *= 2.0;; floating-point values.
to this 0011: $SPED2 *= 4.0 ;; floating-point values

O yea, I will update the code to include local instead of global variables later on.

The_Grudge
  • The_Grudge

    » The_Grudge «

  • BUSTED!
  • Joined: 08 Jan 2005

#10

Posted 17 July 2005 - 06:10 PM

QUOTE (spaceeinstein @ Jul 17 2005, 18:56)
Change 0011: $SPED2 *= 2.0;; floating-point values.
to this 0011: $SPED2 *= 4.0 ;; floating-point values

O yea, I will update the code to include local instead of global variables later on.

Thanks, but I already figured that out.

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#11

Posted 17 July 2005 - 06:13 PM

The speedometer is updated so it can have the same speed as the other speedometer.

Alick
  • Alick

    L)VE

  • Members
  • Joined: 16 Jul 2005

#12

Posted 17 July 2005 - 06:52 PM

cool looks great in game

ripple
  • ripple

    Rat

  • Members
  • Joined: 13 Jun 2005

#13

Posted 21 July 2005 - 08:20 PM

Trouble shooting needed smile.gif

I tried to combine this with Greg's SA Opened Up mod. The speedometer works, but.....when I start a new game, I get that big text message on screen which says "When your health reaches 0 you will be sent to the hospital" (or something like that), but the text message does not dissappear--it just stays there. Any ideas?

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#14

Posted 22 July 2005 - 11:18 PM Edited by spaceeinstein, 22 July 2005 - 11:47 PM.

So terribly sorry about ignoring this. You have to download a GXT Editor and find "HOSP_1". Edit the text to "MPH". I will update first post later today.

Ok post updated. Anyone who installed this mod should install it again since I updated the code also.

ripple
  • ripple

    Rat

  • Members
  • Joined: 13 Jun 2005

#15

Posted 22 July 2005 - 11:59 PM

No problem Space. Thanks for the update. I edited it to reflect KPH

QUOTE
0011: @1 *=  3.621024;; floating-point values
008C: @1 = float_to_integer @1
0086: $SPED =  @1 ;; floating-point values only
04F7: status_text $SPED  0 line  4 'HOSP_1';; KPH


Is this right?

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#16

Posted 23 July 2005 - 02:29 PM Edited by spaceeinstein, 23 July 2005 - 02:36 PM.

Change to 4.0

ripple
  • ripple

    Rat

  • Members
  • Joined: 13 Jun 2005

#17

Posted 23 July 2005 - 05:06 PM

Thanks Space. The reason I was asking was because intially I changed it to 4 as per your previous instructions and....well, CJ was riding on the bicycle and doing 80 kph just cruising, which I thought was fast because I never went that fast on my bike tounge.gif

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#18

Posted 24 July 2005 - 04:56 AM

Yea, I know. GTA is a whacky place. It's normal for the bike to go that fast.

akboy
  • akboy

    Player Hater

  • Members
  • Joined: 02 Jul 2005

#19

Posted 24 July 2005 - 12:27 PM

Note: 1 kph = 1,61 mph.

But if your multiplier for mile is 2.0, the multiplier for kph is 3.22 (2.0 * 1.61).

In the handling.cfg, Hydra max speed is 200 kph (I take the hydra because he can take this max speed). Without multiplier, the game draws 75.

-> 200/75 = 2.67 (kph multiplier)
-> 2.67/1.61 = 1.66 (mph multiplier)


What do you think about that?

spaceeinstein
  • spaceeinstein

    巧克力

  • Members
  • Joined: 17 Jul 2003
  • None

#20

Posted 24 July 2005 - 03:28 PM

The speed I have now is based on Spooky's speedometer. Its max speed for the Hydra is 168MPH so I synced it with it.

bear052303
  • bear052303

    Player Hater

  • Members
  • Joined: 27 Aug 2005

#21

Posted 27 August 2005 - 01:47 PM

i got this error message:
ERROR: Parameter 1 not set.
Command: 004D: JUMP_IF_FALSE ’’SPEEDLAST
please help, thanks

Private_Paula
  • Private_Paula

    Player Hater

  • Members
  • Joined: 30 Aug 2005

#22

Posted 01 September 2005 - 12:47 PM Edited by Private_Paula, 02 September 2005 - 05:11 AM.

it seems to work, but i can“t find anything even close to "HOPS_1" in the GXT file. (or the text it shows in game)

can you please tell me where to find it (is it a table, entry or value)? i“m using sagxtedit if this is helping.

EDIT: forget it, i found it.


Kremit
  • Kremit

    Maximum Modifier

  • Members
  • Joined: 11 Jun 2003

#23

Posted 05 April 2006 - 05:20 PM Edited by Kremit, 05 April 2006 - 05:29 PM.

QUOTE
Note: 1 kph = 1,61 mph.


I think ya got that backwards... 1 kph = 0.621371192 mph...
or... 1 mph = 1.609344 kph

So, here's a chart of conversion multipliers to one's disposal..


CODE
    MPH     ||      KPH
     1.0    ||   1.609344
    1.25    ||    2.01168
     1.5    ||   2.414016
    1.75    ||   2.816352
     2.0    ||   3.218688
    2.25    ||   3.621024
     2.5    ||    4.02336
    2.75    ||   4.425696
     3.0    ||   4.828032
    3.25    ||   5.230368
     3.5    ||   5.632704
    3.75    ||    6.03504
     4.0    ||   6.437376
    4.25    ||   6.839712
     4.5    ||   7.242048
    4.75    ||   7.644384
     5.0    ||    8.04672


No more guesstimation or approximations... rah.gif

Kremit
  • Kremit

    Maximum Modifier

  • Members
  • Joined: 11 Jun 2003

#24

Posted 05 April 2006 - 05:42 PM

QUOTE (bear052303 @ Aug 27 2005, 13:47)
i got this error message:
ERROR: Parameter 1 not set.
Command: 004D: JUMP_IF_FALSE ’’SPEEDLAST
please help, thanks

can only take a couple guesses here as this isn't my code of knowledge...

However, I would have to guess one of the following may be your issue...

A) You do not have a Speedlast section.

CODE
:SPEEDLAST
0001: wait  250 ms
0151: remove_status_text $SPED
0002: jump ££SPEED


B) You do not have a valid if statement, or perhaps no action after the if statement.

CODE
00D6: if  0
00DF:   actor $PLAYER_ACTOR driving


C) You do not have 0 defined.

CODE
03C0: @0 = actor $PLAYER_ACTOR car



Basically, it's saying: "If the player character is in a car, then the character's action is driving.. Otherwise, he's on foot." Now if he's driving, it continues downward to calculate his speed. If not, it kicks over to Speedlast section and removes the mph block.

Wish I could help you more, but I'm not sure what your code looks like and as I've said, this isn't one of my stronger languages.... confused.gif

the_king
  • the_king

    "Rollin's a ritual" "Smokin's a style&q

  • Members
  • Joined: 07 Jun 2005

#25

Posted 18 April 2006 - 05:46 AM

If this mod was converted from vc to san andreas, does anyone happen to know where I can find the VC version?

Kremit, I dont think bear052303 is pursuing that error question any more, it's been a few months since this topic has had any replies. confused.gif

stan101
  • stan101

    Rat

  • Members
  • Joined: 23 Jun 2005

#26

Posted 21 April 2006 - 03:16 AM

Does this work for Vice City?

Martin12345678910
  • Martin12345678910

    Tune It Up!!!!

  • Members
  • Joined: 28 Jan 2005

#27

Posted 06 May 2006 - 07:33 AM

any pics for it?

stan101
  • stan101

    Rat

  • Members
  • Joined: 23 Jun 2005

#28

Posted 07 May 2006 - 12:41 AM Edited by stan101, 07 May 2006 - 12:46 AM.

Ok, i just got GTA SA and i'm modding, it works, but i need to know the default speed multi-plier in mph... in numbers like:
2.24? this is just an example in gta vc, still working on sa.......

user posted image

see the the speedometer is differet than the main.scm code.. so how do we get the main.scm to work in the speedometer.. i want to convert it myself.

Martin12345678910
  • Martin12345678910

    Tune It Up!!!!

  • Members
  • Joined: 28 Jan 2005

#29

Posted 07 May 2006 - 03:42 AM

looks cool can some one post a file for it so you dont have to do this to get it to work as i tried to get it to work and i cant open the main.scm file

and if someone posts it can they make it in KPH and MPH please

Thanks

ms.cooldude
  • ms.cooldude

    The power is in your hands

  • Members
  • Joined: 24 Oct 2005

#30

Posted 07 May 2006 - 07:44 AM

I can see why this speedometer is much better than the ones you add to the SA directory cos they slow my pc down by a bit




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users