Changing quantity on a table with the Lua script.

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
kurankeita
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 »

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(ctCE67,(float)6.7)
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:

_MonHP00:
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

_MonHP01:
cmp [rdx+000236e4],ecx
jns _MonHP02

mov [rdx+000236e4],ecx

_MonHP02:
cmp [rdx+000236e8],ecx
jns _MonHP03

mov [rdx+000236e8],ecx

_MonHP03:
cmp [rdx+000236ec],ecx
jns _MonHP04

mov [rdx+000236ec],ecx

_MonHP04:
cmp [rdx+000236f0],ecx
jns _MonHP05

mov [rdx+000236f0],ecx

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

xor rcx,rcx

_MonHP06:
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.
Attachments
GalCiv3_GalacticCivilization3-Retribution_v3-50_Steam_Fennix102_PF_CE67_S34_AOB_T20.CT
(32.55 KiB) Downloaded 48 times

TimFun13
Expert Cheater
Expert Cheater
Posts: 1354
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 6

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

Post by TimFun13 »

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.

Post Reply

Who is online

Users browsing this forum: No registered users