Changing quantity on a table with the Lua script.

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
What is cheating?
What is cheating?
Posts: 1
Joined: Sat Jun 08, 2019 5:00 am
Reputation: 0

Changing quantity on a table with the Lua script.

Post by kurankeita » Sat Jun 08, 2019 3:39 pm

Hello, everyone, I am currently trying to change the quantity of the constants used in the script for basic and special resources on this table for Galactic Civilizations 3. I have never heard of Lua scripting until I wanted to change the quantity and began to google around. Not very productive on my end. I have been looking at the Lua script, and I have no idea what is written and how to change them.

// Constants used in the script (that can be changed)
define(ctMCRE,#67000000) // Minimum Credits
define(ctMMSS,#20000) // Minimum Settlers/Soldiers
define(ctMBRS,#10000) // Minimum Basic Resources
define(ctMSRS,#5000) // Minimum Special Resources

When I first looked at this, I thought that just changing the numbers in the parenthesis would do the trick, but that didn't work. I then looked for MBRS because it was for the resources I wanted, but then saw this:

cmp dword ptr [iEnableMBR],0
je _MonHP05 // Jump if feature is disabled

mov ecx,ctMBRS
cmp [rdx+000236e0],ecx
jns _MonHP01

mov [rdx+000236e0],ecx

cmp [rdx+000236e4],ecx
jns _MonHP02

mov [rdx+000236e4],ecx

cmp [rdx+000236e8],ecx
jns _MonHP03

mov [rdx+000236e8],ecx

cmp [rdx+000236ec],ecx
jns _MonHP04

mov [rdx+000236ec],ecx

cmp [rdx+000236f0],ecx
jns _MonHP05

mov [rdx+000236f0],ecx

cmp dword ptr [iEnableMSR],0 // new (s3.0)
je _MonHP0X // Jump if feature is disabled

xor rcx,rcx

cmp dword ptr [rdx+rcx*4+000238c4],ctMSRS
jns _MonHP07

mov dword ptr [rdx+rcx*4+000238c4],ctMSRS

Yeah, I got no idea how this works, lol. With the limited knowledge, I found, I can only assume that those in the brackets are the destinations of the code and not actually how to change them? I have not downloaded Lua, because I really don't know how to use it, and I thought it would just be best to ask for help. I would like to ask for help in changing the quantity of the basic resources from 10 to 100 and the special resources from 5 to 50. Any help would be appreciated.
(32.55 KiB) Downloaded 115 times

User avatar
Posts: 1626
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 597

Re: Changing quantity on a table with the Lua script.

Post by TheyCallMeTim13 » Sat Jun 08, 2019 11:06 pm

This is an Auto Assembler script, not Lua. But you need to figure out what address holds the quantity amount, and see where it's accessed. Based on the descriptions what you have posted will only work on "Special Resources" with the mov dword ptr [rdx+rcx*4+000238c4],ctMSRS.
CE wiki - Tutorials CE wiki - Auto Assembler Basics - CE wiki - Lua Basics If it's not a Personal Message don't PM me, use the forum. I ignore PMs that should be asked on the forum.

Post Reply

Who is online

Users browsing this forum: No registered users