From 0ac2463df83a9ebc23ff2b0d8c5c9ab4a914acf6 Mon Sep 17 00:00:00 2001
From: inuNorii <19881900+inuNorii@users.noreply.github.com>
Date: Thu, 12 Oct 2023 12:24:03 +0200
Subject: [PATCH] Release v0.4.2
---
AC6_TGA.CT | 226 +++++++++++++++++++++++++++++++++++++++++++++------
CHANGELOG.md | 10 +++
README.md | 2 +-
VERSION | 2 +-
4 files changed, 215 insertions(+), 25 deletions(-)
diff --git a/AC6_TGA.CT b/AC6_TGA.CT
index 746abcd..8127960 100644
--- a/AC6_TGA.CT
+++ b/AC6_TGA.CT
@@ -6,7 +6,7 @@
0
- "Open - The Grand Archives v0.4.1 - ARMORED CORE VI v1.02 / App Ver. 30"
+ "Open - The Grand Archives v0.4.2 - ARMORED CORE VI v1.04 / App Ver. 40"
Auto Assembler Script
{$lua}
@@ -26,8 +26,8 @@ if not getAddressSafe(process) then
end
game_title = "ARMORED CORE VI FIRES OF RUBICON"
-game_ver = "1.02" -- app ver. 30
-table_ver = 0.041
+game_ver = "1.04" -- app ver. 40
+table_ver = 0.042
ce_ver = 7.5
local version_url = "https://raw.githubusercontent.com/The-Grand-Archives/ARMORED-CORE-VI-CT-TGA/main/VERSION"
@@ -2103,7 +2103,7 @@ Credits are listed on the Github!
1337271464
- "Weapon Info"
+ "ChrWeaponModule"
1
@@ -12219,7 +12219,7 @@ end
1337213382
"Item"
- ItemDropdown
+ ITEM_ID
1
1
4 Bytes
@@ -12245,17 +12245,8 @@ end
1337213387
- "Type"
- 0:Weapon
-1:Protector
-2:Accessory
-4:Goods
-5:Fcs
-6:Booster
-7:Generator
-8:Expansion
-15:None
-
+ "EquipType"
+ ITEM_TYPE
0
Binary
4
@@ -12325,13 +12316,11 @@ local function get_type(id)
fcs = {0x50000000, "Fcs"},
booster = {0x60000000, "Booster"},
generator = {0x70000000, "Generator"},
- expansion = {0x80000000, "Expansion"}
+ invalid = {0x7FFFFFFF, "None"}
}
- if id >= types.expansion[1] then
- return types.expansion
- elseif id >= types.generator[1] then
- return types.generator
+ if id >= types.invalid[1] then
+ return types.invalid
elseif id >= types.booster[1] then
return types.booster
elseif id >= types.fcs[1] then
@@ -12362,7 +12351,7 @@ for i=0,inventoryNum do
local itemType = get_type(itemId)
itemId = itemId - itemType[1]
local quantity = readInteger(item + 8)
- if itemId ~= 0xFFFFFFFF and itemId ~= nil and quantity ~= nil then
+ if itemId <= 0x7FFFFFFF and itemId ~= nil and quantity ~= nil then
print(string.format("#%d | Type: %s | ID: %d | Quantity: %d", i, itemType[2], itemId, quantity))
end
end
@@ -12603,7 +12592,7 @@ RemoveItem_data:
dd 00000000
dd 00000001
{$lua}
-local func_addr = AOBScanModuleUnique(process,"8b f2 ?? 8b e9 ?? 85 c0 74")
+local func_addr = AOBScanModuleUnique(process,"?? 83 ec ?? 8b f2 ?? 8b e9 ?? 85 c0 74") - 8
function RemoveItem(idx, quantity)
if quantity ~= nil or quantity <= 1 then
@@ -49903,6 +49892,183 @@ disableMemrec(memrec)
+
+ 1337276029
+ "Misc"
+
+ 1
+
+
+ 1337276030
+ "DLRTClassRTTIFinder - for RE / table developemt"
+ Auto Assembler Script
+ {
+ Author: Dasaav
+ 2023-10-09
+}
+{$lua}
+if syntaxcheck then return end
+
+[ENABLE]
+namesVftDLRT = {}
+mutexStructDissectDLRT = mutexStructDissectDLRT or createSemaphore(-1)
+local namesDLRT = {}
+local allVftAddr = {}
+
+local function locateTextSections()
+ local base = getAddress(process)
+ if not base then return nil end
+ local header = base + readInteger(base + 0x3C)
+ local numSections = readShortInteger(header + 0x6) - 1
+ local sections = header + readShortInteger(header + 0x14) + 0x18
+ local result = {}
+ for i=0,numSections do
+ local cur = sections + i * 0x28
+ if readQword(cur) == 0x747865742E then
+ local textSection = {}
+ textSection.beginAddr = base + readInteger(cur + 0xC)
+ textSection.endAddr = textSection.beginAddr + readInteger(cur + 0x8)
+ table.insert(result, textSection)
+ end
+ end
+ return result
+end
+
+local function processDLRTAddress(addrStr)
+ local addr = getAddress(addrStr)
+ if not addr then return end
+ local ppvft = addr + readInteger(addr + 3) + 7
+ local pvft = readPointer(ppvft)
+ if not pvft then return end
+ local vft = readPointer(pvft)
+ local pname = addr + readInteger(addr + 20) + 24
+ local name = readString(pname, 256, false)
+ if vft and name then
+ namesDLRT[vft] = name
+ table.insert(allVftAddr, vft)
+ end
+end
+
+local function processVftAddress(addrStr)
+ local addr = getAddress(addrStr)
+ if not addr then return end
+ if bAnd(readByte(addr + 2), 0x38) ~= bAnd(readByte(addr + 9), 0x38) then return end
+ local vft = addr + readInteger(addr + 3) + 7
+ table.insert(allVftAddr, vft)
+end
+
+local function bindClosestVftNames()
+ table.insert(allVftAddr, 0)
+ table.sort(allVftAddr)
+ for i,addr in ipairs(allVftAddr) do
+ local name = namesDLRT[addr]
+ if name then
+ local closest = allVftAddr[i - 1]
+ if not namesDLRT[closest] then
+ if (addr - closest) < 0x8FF then
+ namesVftDLRT[closest] = name
+ end
+ end
+ end
+ end
+end
+
+local function registerDLRT()
+ namesDLRT = {}
+ local textSections = locateTextSections()
+ if not textSections then return false end
+ local memscan = createMemScan(nil)
+ createFoundList(memscan)
+ local signature1 = "48 8B 05 ?? ?? ?? ?? 48 85 C0 75 05 E8 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? 48 89 48 38 48 8D 0D ?? ?? ?? ?? 48 89 48 40"
+ for i,section in pairs(textSections) do
+ memscan.firstScan(soExactValue, vtByteArray, rtRounded, signature1, nil, section.beginAddr, section.endAddr, "", fsmNotAligned, nil, true, true, false, false)
+ memscan.waitTillDone()
+ local results = memscan.getAttachedFoundlist()
+ if results then
+ results.initialize()
+ local count = results.getCount() - 1
+ for i=0,count do
+ processDLRTAddress(results.getAddress(i))
+ end
+ results.deinitialize()
+ end
+ memscan.newScan()
+ end
+ local signature2 = "?0001001 00?????? 01001??? ???????? ???????? ???????? ???????? 00???101 10001101 01001???"
+ for i,section in pairs(textSections) do
+ memscan.firstScan(soExactValue, vtBinary, rtRounded, signature2, nil, section.beginAddr, section.endAddr, "", fsmAligned, "1", true, false, false, false)
+ memscan.waitTillDone()
+ local results = memscan.getAttachedFoundlist()
+ if results then
+ results.initialize()
+ local count = results.getCount() - 1
+ for i=0,count do
+ processVftAddress(results.getAddress(i))
+ end
+ results.deinitialize()
+ end
+ memscan.newScan()
+ end
+ bindClosestVftNames()
+ memscan.destroy()
+ return true
+end
+
+function lookupDLRT(address)
+ if not address then return nil end
+ local vft = readPointer(address)
+ if not vft then return nil end
+ return namesVftDLRT[vft]
+end
+
+function sdOverride(structure, address)
+ mutexStructDissectDLRT.acquire()
+ local t = createTimer(getMainForm())
+ local addr = address
+ t.Interval = 100
+ t.OnTimer = function (timer)
+ timer.destroy()
+ if not address then
+ mutexStructDissectDLRT.release()
+ return
+ end
+ local count = structure.Count
+ if count and count > 0 then
+ count = count - 1
+ structure.beginUpdate()
+ for i=0,count do
+ local elem = structure.getElement(i)
+ if elem and elem.getVartype() == vtPointer then
+ local inst = readPointer(address + elem.getOffset())
+ local name = lookupDLRT(inst)
+ if name and elem.getName() == "" then
+ elem.setName(name)
+ end
+ end
+ end
+ structure.endUpdate()
+ end
+ mutexStructDissectDLRT.release()
+ end
+ return false
+end
+
+if registerDLRT() then
+ lookupCallback = registerStructureNameLookup(lookupDLRT)
+ sdCallback = registerStructureDissectOverride(sdOverride)
+end
+
+[DISABLE]
+mutexStructDissectDLRT.release()
+sleep(100)
+unregisterStructureNameLookup(lookupCallback)
+unregisterStructureDissectOverride(sdCallback)
+namesVftDLRT = {}
+
+
+
+
+
@@ -52073,6 +52239,20 @@ int on_disable() {
542C92B0:IA-C01F: OCELLUS
542C9314:IB-C03F: WLT 001
FFFFFFFF:None
+
+ 1
+
+
+ 1337276031
+ "ITEM_TYPE"
+ 0:Weapon
+1:Protector
+2:Accessory
+4:Goods
+5:Fcs
+6:Booster
+7:Generator
+15:None
1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f771ed..5f0cc61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,16 @@
# Changelog
## [Unreleased]
+## [v0.4.2] - 2023-10-12
+### Added
+ - by [Dasaav](https://github.com/Dasaav-dsv):
+ - Debug Stuff -> Misc -> DLRTClassRTTIFinder - for RE / table development
+### Changed
+ - Supported game version to executable 1.04 / app ver. 40
+ - EquipInventoryData dropdowns and script
+ - Renamed "Weapon Info" to ChrWeaponModule
+ - RemoveItem AOB improved
+
## [v0.4.1] - 2023-09-22
### Changed
- Supported game version to executable 1.02 / app ver. 30
diff --git a/README.md b/README.md
index b72c967..a43c60e 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ If it doesn't work, try this [alternative invite](https://discord.gg/2RTW6BFgeX)
### Requirements
Cheat Engine: [7.5](https://github.com/cheat-engine/cheat-engine/releases)
-Game: Executable v1.01.2 / App Ver. 22
+Game: Executable v1.04 / App Ver. 40
## How to use
diff --git a/VERSION b/VERSION
index bcab661..e677480 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.041
\ No newline at end of file
+0.042
\ No newline at end of file