Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Setting temporal multiplier for a float value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Foxglaw
How do I cheat?
Reputation: 0

Joined: 12 Feb 2025
Posts: 2

PostPosted: Wed Feb 12, 2025 6:09 am    Post subject: Setting temporal multiplier for a float value Reply with quote

I'm very new to cheat engine so I'm sorry if I call things with a different name. I've been trying to set a temporal multiplier script for the game Production Line and I just gave up. I attached and image with the 4 lines that are making me crazy.

I just want a script that set multiplier for my investigation points per minute ([rcx+00000104]). But when I do that, it overwrites my progression on the investigation (xmm6) and it ends up making an exponential "multiplier" instead of a linear multiplier.

Please help :? [/img]



imagen_2025-02-12_070332358.png
 Description:
 Filesize:  4.32 KB
 Viewed:  8802 Time(s)

imagen_2025-02-12_070332358.png


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4695

PostPosted: Wed Feb 12, 2025 1:02 pm    Post subject: Reply with quote

Is [rcx+104] your investigation points or your investigation points per minute? There's a big difference.

You didn't post the script you tried.

If [rcx+104] is your investigation points, then multiply xmm6 by some amount before the `addss` instruction. Inject at the `addss` instruction and write this code:
Code:
...
alloc(investigationPointsMult,4)

registersymbol(investigationPointsMult)  // so you can modify this from the address list

newmem:
  mulss xmm6,[investigationPointsMult]
  addss xmm6,[rcx+00000104]
  jmp return

investigationPointsMult:
  dd (float)2
...


If [rcx+104] is your investigation points per minute (first derivative), then xmm6 is related to the second derivative and this gets more complicated. Ideally you'd find a better injection point: inject at where the value is read from and used to modify the investigation points, then multiply the read value by some amount (same as above).
Try the first script before doing this.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Foxglaw
How do I cheat?
Reputation: 0

Joined: 12 Feb 2025
Posts: 2

PostPosted: Wed Feb 12, 2025 4:12 pm    Post subject: Reply with quote

[quote="ParkourPenguin"]Is [rcx+104] your investigation points or your investigation points per minute? There's a big difference.

You didn't post the script you tried.

If [rcx+104] is your investigation points, then multiply xmm6 by some amount before the `addss` instruction. Inject at the `addss` instruction and write this code:
[code]...
alloc(investigationPointsMult,4)

registersymbol(investigationPointsMult) // so you can modify this from the address list

newmem:
mulss xmm6,[investigationPointsMult]
addss xmm6,[rcx+00000104]
jmp return

investigationPointsMult:
dd (float)2
...[/code]

If [rcx+104] is your investigation points per minute (first derivative), then xmm6 is related to the second derivative and this gets more complicated. Ideally you'd find a better injection point: inject at where the value is read from and used to modify the investigation points, then multiply the read value by some amount (same as above).
Try the first script before doing this.[/quote]


Honestly I don't know if if that are my investigation points per minute or my current progress for the investigation. I tried finding the investigation points per minute with no luck. I found that code finding the current progress for an investigation and "Find out what writes to this address" and it appears just one.

My final code was this:
[code][ENABLE]
alloc(newmem,2048,"ProductionLine.exe"+1D172F)
label(returnhere)
label(originalcode)
label(exit)

alloc(Ten,4)
Ten:
dd (float)10.0

newmem:


fld [rcx+00000104]
fmul [Ten]
fstp [rcx+00000104]

originalcode:
addss xmm6,[rcx+00000104]

exit:
jmp returnhere

"ProductionLine.exe"+1D172F:
jmp newmem
nop 3
returnhere:

[DISABLE]
dealloc(newmem)
"ProductionLine.exe"+1D172F:
addss xmm6,[rcx+00000104]
//Alt: db F3 0F 58 B1 04 01 00 00[/code]


I tried your code and it says there's an error on the line jmp return.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4695

PostPosted: Wed Feb 12, 2025 4:36 pm    Post subject: Reply with quote

Foxglaw wrote:
Code:
returnhere:
Jump to whatever name the return label was given

Also I'd recommend using the "full injection" template over the "code injection" one

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites