gvargas wrote: ↑Sun Nov 03, 2019 3:31 am
Thanks! Your code works as expect, now I need to narrow the items ids it adds to just materials and not all the dummies or empty slots...
EDIT: The LUA with the Quality didn't work so I'm going to stick with the first one...
Bah, trouble of doing things from my tablet at work. I checked through the code and had a typo on line 32.
local al = getAddressList()
local base = al.createMemoryRecord()
base.Description = "Container ID Codes (first 800 slots)"
base.IsGroupHeader = true
base.options = "[moActivateChildrenAsWell, moDeactivateChildrenAsWell, moRecursiveSetValue, moAllowManualCollapseAndExpand]"
local addr = "Atelier_Ryza.exe+0139AB08"
local IDValue = 0
local offsetID = 0x98c
local offsetQuality = 0x98e
local slotnum = 1
for i = 1, 800 do
local recID = al.createMemoryRecord()
local recQuality = al.createMemoryRecord()
local headertxt = string.format("Item ID Slot %d", slotnum)
local headertxt2 = string.format("Item Quality Slot %d", slotnum)
recID.Description = headertxt
recID.Address = addr
recID.OffsetCount = 1
recID.Offset[0] = offsetID
recID.appendToEntry(base)
recID.type = vtWord
recID.Value = IDValue
recQuality.Description = headertxt2
recQuality.Address = addr
recQuality.OffsetCount = 1
recQuality.Offset[0] = offsetQuality
recQuality.appendToEntry(base)
recQuality.type = vtWord
recQuality.Value = 999
IDValue = IDValue + 1
offsetQuality = offsetQuality + 0x42
offsetID = offsetID + 0x42
slotnum = slotnum + 1
end
Quality SHOULD work this time, or if it doesn't I officially need to wait to get home to figure out why. I'll try to crank one out that only uses the item ID's in the list without all the dummy ones. Probably just a bunch of elseif's.
Edit: Actually, I'm not sure how cheatengine handles elseif's and that's going to be a syntax nightmare without me being able to test the codes. I'll give it a crack tomorrow if you still need it then. Thought I Could just google it but the only examples of people using if/then's in cheat engine that I could quickly find weren't checking for the same kind of things so I don't wanna put out code and do bugtesting through you guys.
Edit2: Haaaaaaah mostly leaving this here for myself later. I found some examples of how cheatengine handles if's and made a set of codes that *should* only use valid trait ID's. Should. Also did some formatting to group the codes better. Try the below code at your own risk (though if you do, tell me if it works!). It's completely untested other than me doing a lot of ctrl+f and rereads to make sure I didn't have any typo's floating around.
local al = getAddressList()
local base = al.createMemoryRecord()
base.Description = "Container Codes (first 446 slots)"
base.IsGroupHeader = true
base.options = "[moActivateChildrenAsWell, moDeactivateChildrenAsWell, moRecursiveSetValue, moAllowManualCollapseAndExpand, moManualExpandCollapse]"
local baseID = al.createMemoryRecord()
baseID.Description = "Container ID Codes"
baseID.IsGroupHeader = true
baseID.options = "[moActivateChildrenAsWell, moDeactivateChildrenAsWell, moRecursiveSetValue, moAllowManualCollapseAndExpand, moManualExpandCollapse]"
baseID.appendToEntry(base)
local baseQ = al.createMemoryRecord()
baseQ.Description = "Container Quality Codes"
baseQ.IsGroupHeader = true
baseQ.options = "[moActivateChildrenAsWell, moDeactivateChildrenAsWell, moRecursiveSetValue, moAllowManualCollapseAndExpand, moManualExpandCollapse]"
baseQ.appendToEntry(base)
local addr = "Atelier_Ryza.exe+0139AB08"
local IDValue = 0
local offsetID = 0x98c
local offsetQuality = 0x98e
local slotnum = 1
for i = 1, 446 do
local recID = al.createMemoryRecord()
local recQuality = al.createMemoryRecord()
local headertxt = string.format("Item ID Slot %d", slotnum)
local headertxt2 = string.format("Item Quality Slot %d", slotnum)
recID.Description = headertxt
recID.Address = addr
recID.OffsetCount = 1
recID.Offset[0] = offsetID
recID.appendToEntry(baseID)
recID.type = vtWord
recID.Value = IDValue
recQuality.Description = headertxt2
recQuality.Address = addr
recQuality.OffsetCount = 1
recQuality.Offset[0] = offsetQuality
recQuality.appendToEntry(baseQ)
recQuality.type = vtWord
recQuality.Value = 999
IDValue = IDValue + 1
if IDValue == 208 then
IDValue = 237
elseif IDValue == 257 then
IDValue = 267
elseif IDValue == 280 then
IDValue = 289
elseif IDValue == 299 then
IDValue = 309
elseif IDValue == 324 then
IDValue = 329
elseif IDValue == 386 then
IDValue = 406
elseif IDValue == 436 then
IDValue = 456
elseif IDValue == 471 then
IDValue = 481
elseif IDValue == 493 then
IDValue = 503
elseif IDValue == 536 then
IDValue = 674
elseif IDValue == 677 then
IDValue = 678
elseif IDValue == 684 then
IDValue = 685
elseif IDValue == 691 then
IDValue = 692
end
offsetQuality = offsetQuality + 0x42
offsetID = offsetID + 0x42
slotnum = slotnum + 1
end