View Full Version : Car milage
runeman
30th June 2008, 00:46
Well i'm looking for a odometer in miles, for each serperate car. I'd be really greatful, if someone could possibly write one for me? :)
::EDIT::
I just went through some of the insim php-5 help on the LFS manual. And I looked at it as almost if it was some other language, and come to find out it is. So.... Yeah. 0.o When it comes to computer language, I lack the knowlodge and skills to even come close, to understanding. :) Like I said I'd greatly appreciate it.
dougie-lampkin
30th June 2008, 02:35
Here's an app that will do it for you ;)
Edit your cfg.txt file in the LFS directory, to have this at the end. It will probably have lines like these, just overwrite them.
OutGauge Mode 2
OutGauge Delay 10
OutGauge IP 127.0.0.1
OutGauge Port 35555
OutGauge ID 2
Then, everytime you start LFS, start the exe file from the zip. Keep all 3 files together, but it doesn't matter where they are. All of the distances are stored as metres in odometer.odo, so you can see your distances for each car. The app shows you the distance in the current car since you started today, today's total distance, your total distance in this car, and your overall total distance, in miles to 2 decimal places. The total displays don't load until you get into a car either.
The only known problem is that the displays go a little wonky when you first get into a car, as in they'll show '0000', or else random 4 number strings. That will go away as soon as you drive, so I'm not too worried about that :shrug:
Any questions or problems, gimme a PM, or post here ;)
runeman
30th June 2008, 04:29
Thank you, very much appriciated :)
runeman
30th June 2008, 04:42
You should make a KM version and host it up on unofficial addons. Very nicely done, to tenth's.
runeman
30th June 2008, 04:47
Uh, I don't mean to be a bug. But the odometer goes up while specing someone elses car.
morpha
30th June 2008, 09:37
OutGauge needs a "SPECTATING" bit :shrug:
morpha
30th June 2008, 10:45
OutGauge always outputs data of spectated car.The point is, it doesn't tell the OutGauge application if the incoming data is from a spectated or the user's car.
For this kind of application InSim (or even OutSim?, don't remember the outputs) should be used, not OutGauge.
I disagree, using InSim for what could and should simply be solved by providing a bit more information with OutGauge packets (there is a spare byte, you know) is inefficient.
dougie-lampkin
30th June 2008, 12:24
I used OutGauge because I need the packets to come in at relatively small intervals. As I discovered in my cruise InSim, using large intervals means that the distance is out over a period of time. I'm not sure if it would time out the player if they received InSim events every 100 milliseconds, which I can do with OutGauge with no worries...
OutSim wouldn't do anyway, that only has g-force, acceleration, vector, etc.
I do agree though, a spectating bit would be nice ;)
It would be no problem to make a KM version, it already saves the distances in metres, and only converts to miles when it's displaying. I might add an option to switch between them :scratchch
Mithras
30th June 2008, 12:29
Extremely off-topic..
But I like how everybody has Alina avatars now. Way to copy :D
dougie-lampkin
30th June 2008, 12:31
I'm officially the 4th person to do so :nod:
Where's yours, may I ask? :really:
Mithras
30th June 2008, 12:56
I've gone a separate route :P
Currently scanning around my hard drive for a better one haha.
the_angry_angel
30th June 2008, 14:46
But I like how everybody has Alina avatars now. Way to copy :DI was wondering who she was.. cheers for clearing that up.
Back on-topic; there's nothing to stop you from using a mad hybrid of insim+outguage to acheive whats needed. However, in future versions of LFS the positioning packets reported by insim will come at a fixed interval.
runeman
30th June 2008, 20:42
Hmm, this is talk I do not understand. :( So.... yeah i'm lost.
dougie-lampkin
30th June 2008, 23:11
I've noticed a HUGE problem with it (well, not that big. Maybe just huge.). For every digit that is gained before the decimal point (eg, 1 --> 10), one is lost after it. So I've fixed it ;)
Just overwrite the exe and the dll over the existing ones you have, you can leave your existing settings file alone...
runeman
1st July 2008, 02:07
Trying it now.
Uhh it's not working, different outgauage settings maybe?
runeman
2nd July 2008, 02:04
Mmmk, It must be me.
OutGauge Mode 2
OutGauge Delay 10
OutGauge IP 127.0.0.1
OutGauge Port 35555
OutGauge ID 2
This is what I use.
dougie-lampkin
2nd July 2008, 02:44
Hmm, I haven't changed anything in it, except the way it displays decimals. Does it crash, or does nothing happen?
runeman
2nd July 2008, 03:13
The distance just shows up as question marks. Nothin else. Not 0 not anything.
dougie-lampkin
2nd July 2008, 03:18
And you are in-game, in a car? Did you get any message from windows asking to unblock network capabilities of the app?
runeman
2nd July 2008, 03:24
Firewall is turned off. So is windows security center. Also I got in a car. Notta. :shrug:
runeman
2nd July 2008, 03:30
List of steps please ? =D
dougie-lampkin
2nd July 2008, 12:57
I've no idea why it won't work for you, I've just ran it here and it's fine :shrug:
The steps are the same as the last version. Does the last version work for you still?
runeman
2nd July 2008, 17:24
Yep old version works.
Mikjen
4th July 2008, 06:47
? marks for me :)
dougie-lampkin
4th July 2008, 12:50
Strange, works here...does the mileage go up in the .odo file even though it won't display?
runeman
4th July 2008, 18:31
everything stays at 0. in odo.odo
dougie-lampkin
4th July 2008, 18:32
Very odd...just stick with the old one for now, I'll take a look later...
runeman
4th July 2008, 18:41
Ok I did an experiment, I edited the values all to 1500 (Which is 1 mile) and when I saved it. closed it. and opened the odo, it reset them all :shrug:
runeman
4th July 2008, 18:49
Will you please re-upload that file? I have a sneaking suspision thats it corrupted.
dougie-lampkin
4th July 2008, 20:06
Hmm, I've ran it here in debug mode, and it's doing the same thing :confused:
It is receiving OutGauge packets, yet it doesn't want to update the display, which is done in the same method as the OutGauge packets. Yet it doesn't crash, and the values don't update...Really weird, I have no idea what's wrong :schwitz:
runeman
8th March 2009, 05:06
Uh, I never was able to make one. :shrug:
dougie-lampkin
8th March 2009, 13:44
I'm looking back over the code now, and I really can't understand what the hell I was trying to do :schwitz:I never labelled or commented anything back then...If I get a chance sometime soon, I'll start it from scratch :thumb:
runeman
10th March 2009, 15:53
Thank you for your time.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.