Write into shared memory space?

legar

New Member
Hi,

I would like the change the value of normalizedCarPosition. Is it possible to change the values in the shared memory?
 

legar

New Member
I just wanted to make a single player teleportation mod to easily practice some corners. I guess it's not possible without reverse engineering (and assuming it's not legal...)
 

legar

New Member
I'm curious how you guys add new functions. I don't really know much about low-level programming or modding in general. For example to change x/y/z position of the car, one of the addresses for the code is (I guess):

Code:
acs.exe+353954 - F3 0F11 81 C0000000   - movss [rcx+000000C0],xmm0
Do you somehow write into the memory address of AC with C (is that even possible?), compile it to pyd and call it from python? Are the any examples for this that I can look into?

EDIT: Normally you would do some reverse engineering to find the addresses, use pointers to access those from within C/C++, compile it into a DLL and inject it into the executable. Is this similar to what the CSP team did?

Thanks
 
Last edited:

fughettaboutit

aka leBluem aka Please Stop This
Moderator
CSP hooks away some functions to point to its own, so basically yes.

Those new python functions are integrated into CSP, no user-defined stuff possible. I cant say if only changing position in memory would work, but i would say just use this be happy:
ac.ext_takeAStepBack(amount)

It works with "new ai behaviour" on and a working AI line, Hotlap mode (or Practice too?), maybe its broken with latest csp versions, but should work with 0.1.75 and lower
 
Top