The online racing simulator
Searching in All forums
(51 results)
redruM69
S2 licensed
Best Math answer evar! 8/10
redruM69
S2 licensed
Im not using a module, just some delcarations at the top, and a couple of subs:


Declarations:

Private Const PROCESS_ALL_ACCESS = &H1F0FFF
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function CloseWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Private Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

SUBS:
Sub WriteAInt(Address As Long, Value As Integer)

Dim hwnd As Long, pid As Long, pHandle As Long

hwnd = FindWindow(vbNullString, "Live For Speed")
If (hwnd <> 0) Then
GetWindowThreadProcessId hwnd, pid
pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (pHandle <> 0) Then
WriteProcessMemory pHandle, Address, Value, 1, 0&
End If
CloseHandle pHandle
End If


End Sub

Sub WriteAIntSINGLE(Address As Long, Value As Single)

Dim hwnd As Long, pid As Long, pHandle As Long

hwnd = FindWindow(vbNullString, "Live For Speed")
If (hwnd <> 0) Then
GetWindowThreadProcessId hwnd, pid
pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (pHandle <> 0) Then
WriteProcessMemory pHandle, Address, Value, 4, 0&
End If
CloseHandle pHandle
End If



End Sub

then all I do is call the sub when I need something written:


Call WriteAIntSINGLE(GTRimWidthRearAddress, 0.1905)
Call WriteAInt(CarType1MinCylAddress, &H1)

(Really it doesnt matter if I push hex, or an integer, they both work)

BTW, I havent worked with my code in a LOOOONG time, and am stale....
However it appears my WriteAIntSINGLE sub writes 4 bytes, as my WriteAInt only writes 1
Last edited by redruM69, .
redruM69
S2 licensed
LFSTweak works with just Singles, no Doubles.... Maybe that is your issue?
redruM69
S2 licensed
Quote from keltern :How come I can modify the XRT, but nothing else? The XFG and XRG don't get the number of cylinders or the volume i set!
Wtf?
The XRT is all out moddable, but not the other two..
Any ideas?

Change the cartype of the XFG/XRG to "GT", or "Touring Car". These cartypes have less restrictions.
redruM69
S2 licensed
Quote from ste__811 :sorry if this question has been answered elsewhere

i open the program edit the variables and press save this gives me a .twk file what do i do with this file

thanks
ste

twk files just save your settings, so you can reload them again later...
redruM69
S2 licensed
Quote from hrtburnout :@ RedruM : What about :shhh:?

Cmon now... try to beat my time.. LFSTweak ONLY.
No cartype mods
redruM69
S2 licensed
Quote from hrtburnout :I had no mods like those three! I didn't even know such mods exist!

I swear

What about cartype modifications?
redruM69
S2 licensed
Quote from hrtburnout :You mean me? I'm just a fast driver
edit : 5.50!

Cmon now, LFSTweak ONLY... no windmod/frictionmod/gravitymod/etc.
redruM69
S2 licensed
6.92 :o
redruM69
S2 licensed
7.08
redruM69
S2 licensed
Here we go:
redruM69
S2 licensed
I dont have a screenshot, but I have reached 7.16
redruM69
S2 licensed
Quote from dragon13 :http://d.recosoft.net/screen/winhex.jpg
found the line 56100c
http://d.recosoft.net/screen/winhex%200d.jpg
edit it
http://d.recosoft.net/screen/winhex%20error.jpg
scroll down a bit..... and a error

Very odd indeed. It almost seems like something is intercepting, and stopping ram from being edited. Can you go to your taskmgr, and take a screenshot of the processes running?
PM it to me, rather than post it here. Once we figure out a solution I'll post it
Last edited by redruM69, .
redruM69
S2 licensed
Quote from dragon13 :http://d.recosoft.net/screen/LFS%20hex.jpg
do i need to edit that code ?

http://d.recosoft.net/screen/lfs%20tweak.jpg
lfs tweak en lfs whit turbo on in lfs tweak but not in lfs :S

OK I think I see whats going on from the 2nd screenshot. LFSTweak doesnt understand commas as decimal places. Switch to "dots", (ie 1.06 instead of 1,06) and give it another shot.

Also, the first screenshot is the wrong address... Not sure how to use Hackman, but you need to go to the address "56100C".
The Hex editor I use is WinHEX
redruM69
S2 licensed
Quote from KeiichiRX7 :need weight to reproduce other cars, sorry to complain but thats kind of neccisary

When the variable is found, it will be re-added.
redruM69
S2 licensed
Quote from dragon13 :i got one.
but i am not really good whit stuff like this

memory address 56100C (In RAM) should be 0C
Change it to 0D and see if the GTi has a turbo

Post your results.
Also, can you post a screenshot of LFSTweak running?
redruM69
S2 licensed
Quote from dragon13 :i did that to :P
lfs tweak just doesnt apply the settings i want

Do you have a hex editor? You could try changing something manually.
redruM69
S2 licensed
Quote from dragon13 :i have done that a few times but whit out any effect :S

Try redownloading Patch V and reinstalling it.
redruM69
S2 licensed
Quote from dragon13 :i have tryed lfs tweaked but nothing happens ingame :S
i changed some things but that car is still the same

Make sure you pit, and then unpit for the changes to take effect.


Quote from Berseker_d :Thanks a lot but the app don't run propperly in my PC

Make sure you have LFS Set to English. You may even need to set Windows to English also. Please post results.


Quote from Moonclaw :This really looks like a half-assed work when I compare to previous lfstweaks, not only is it more limited but has plenty of bugs that seem random.

Thats because it IS half assed.
A lot of the code was scrapped and re-written in this version. The detection code is buggy, I agree. It will get fixed with time. Hopefully I will be at least able to add Weight back into it. I also plan on adding some car-type limitation changing to it.


Quote from rc10racer :Finaly got it working and viper sent me a setup for tweak and this happens

Interesting.. Was the twk file from the same version of LFSTweak? Prior twk files will be incompatible.


Quote from LFSn00b ::weeping:

Can you translate that error to English? Or did you already get this fixed?
Last edited by redruM69, .
redruM69
S2 licensed
Quote from sil3ntwar :cool always wanted a program that says checking status im guessing its checking lfsworld of something but cant connect from my pc?

Try switching to the GTi/GT/GTT, also make sure you are running in English.
LFSTweakS2 (Old release for LFS v0.5V)
redruM69
S2 licensed
Here it is folks.

LFSTweak for Patch V
It now has Licence Protection. If you don't not have an S2 or S1 license, LFSTweak will not function.

It still only works for the 3 cars GTI, GT, Turbo
Some things have been removed: No more weight, sound "raspyness" or flywheel weight.

Download
Link: http://www.beardness.com/LFSTweakS2V.zip
Mirror: Download link

Problems?
You may need to install 2 OCX Files and the VB6 runtimes:
http://www.ascentive.com/support/new/images/lib/COMCTL32.OCX
http://www.ascentive.com/support/new/images/lib/COMDLG32.OCX
http://www.microsoft.com/downl ... 9a79d5&DisplayLang=en

Make sure you set your Langauge to English in LFS if you have oddball issues

Thats about it for now!
ENJOY!!

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

Additional
This application has been permitted to be released to the public only becaues it contains license protection.
We will not permit applications to be released that give more content to the demo.
If you are a demo user and do not like this - tough. LFS only charges for content, if you could make infinite cars in the demo, this would remove an important benefit of owning a license.

Regards

The Moderation Team
Last edited by Bob Smith, . Reason : cleaned up post and added info
redruM69
S2 licensed
Release in less than 5 hours.
redruM69
S2 licensed
Quote from lehegarat :I'd like to know to..

hrtburnout: did you use Quick Memory Editor? I only get Search Error when searching for 57B0D2. What data type is it?

Help a non-hacker here!

thats an ADDRESS not a string
redruM69
S2 licensed
Quote from sil3ntwar :never said anything about modifying the carfile. Modifying the carfile would just be silly.

......and why again is this silly? :rolleyes:
You replied to a post that said "The other cars are encrypted", implying that the cars are NOT encrypted...
When in fact they ARE encrypted, exactly as he said. It is the carFILE that is encrypting, so ya, you DID say something about modifying the carfile.

Quote from sil3ntwar :i wouldnt tell anyone anyway.

Ya but I will....... Mem address 57B0D2, change to 0A
redruM69
S2 licensed
Quote from sil3ntwar :shows how much you know about all this. I've been driving a v10 sauber since we got it. I would be very suprised if this program didnt cover more than the demo cars. Its his decision to what cars can be edited.

Herki is right.
You did not edit the Sauber itself.. You modified its carTYPE (Cartype 11), And changed the min/max cylinders to 10... forcing it to 10 cylinders. the actual carfile itself is not modifiable.

LFSTweak is not a cartype modifier, only carfile.
FGED GREDG RDFGDR GSFDG