adamapple wrote: ↑Thu Mar 29, 2018 10:39 pm
here is an auto assembler that sets color values to what you want in synthesis, you have to go into change script to change the values though, i could never figure out how to make it read a user set value
Code: Select all
[ENABLE]
aobscanmodule(INJECT,Atelier_Lydie_and_Suelle.exe,41 0F 11 85 98 00 00 00 0F) // should be unique
alloc(newmem,$1000,"Atelier_Lydie_and_Suelle.exe"+E5B48)
label(code)
label(return)
newmem:
code:
movups [r13+00000098],xmm0
mov [r13+00000098],#1 //set red to value
mov [r13+0000009c],#2 //set blue to value
mov [r13+000000a0],#3 //set green to value
mov [r13+000000a4],#4 //set yellow to value
mov [r13+000000a8],#4 //set purple to value
jmp return
INJECT:
jmp newmem
nop
nop
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 41 0F 11 85 98 00 00 00
unregistersymbol(INJECT)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: "Atelier_Lydie_and_Suelle.exe"+E5B48
"Atelier_Lydie_and_Suelle.exe"+E5B1D: 41 3B BE C0 01 00 00 - cmp edi,[r14+000001C0]
"Atelier_Lydie_and_Suelle.exe"+E5B24: 7C BA - jl Atelier_Lydie_and_Suelle.exe+E5AE0
"Atelier_Lydie_and_Suelle.exe"+E5B26: 33 F6 - xor esi,esi
"Atelier_Lydie_and_Suelle.exe"+E5B28: 41 8B 86 C0 01 00 00 - mov eax,[r14+000001C0]
"Atelier_Lydie_and_Suelle.exe"+E5B2F: 41 FF C7 - inc r15d
"Atelier_Lydie_and_Suelle.exe"+E5B32: 48 83 C5 38 - add rbp,38
"Atelier_Lydie_and_Suelle.exe"+E5B36: 44 3B F8 - cmp r15d,eax
"Atelier_Lydie_and_Suelle.exe"+E5B39: 7C 9C - jl Atelier_Lydie_and_Suelle.exe+E5AD7
"Atelier_Lydie_and_Suelle.exe"+E5B3B: 48 8B AC 24 D0 00 00 00 - mov rbp,[rsp+000000D0]
"Atelier_Lydie_and_Suelle.exe"+E5B43: 0F 28 44 24 20 - movaps xmm0,[rsp+20]
// ---------- INJECTING HERE ----------
"Atelier_Lydie_and_Suelle.exe"+E5B48: 41 0F 11 85 98 00 00 00 - movups [r13+00000098],xmm0
// ---------- DONE INJECTING ----------
"Atelier_Lydie_and_Suelle.exe"+E5B50: 0F 28 4C 24 30 - movaps xmm1,[rsp+30]
"Atelier_Lydie_and_Suelle.exe"+E5B55: 41 0F 11 8D A8 00 00 00 - movups [r13+000000A8],xmm1
"Atelier_Lydie_and_Suelle.exe"+E5B5D: 0F 28 44 24 40 - movaps xmm0,[rsp+40]
"Atelier_Lydie_and_Suelle.exe"+E5B62: 41 0F 11 85 B8 00 00 00 - movups [r13+000000B8],xmm0
"Atelier_Lydie_and_Suelle.exe"+E5B6A: 0F 28 4C 24 50 - movaps xmm1,[rsp+50]
"Atelier_Lydie_and_Suelle.exe"+E5B6F: 41 0F 11 8D C8 00 00 00 - movups [r13+000000C8],xmm1
"Atelier_Lydie_and_Suelle.exe"+E5B77: 49 8B 06 - mov rax,[r14]
"Atelier_Lydie_and_Suelle.exe"+E5B7A: 48 8B 48 48 - mov rcx,[rax+48]
"Atelier_Lydie_and_Suelle.exe"+E5B7E: E8 0D 6B FF FF - call Atelier_Lydie_and_Suelle.exe+DC690
"Atelier_Lydie_and_Suelle.exe"+E5B83: 33 D2 - xor edx,edx
}
Okay, bizarre problem. It's not working for purple. This is bizarre, because I found purple relative to red in addresses and your way SHOULD work, I can't find a typo, or anything, but for magical reasons it... doesn't effect purple. Fishing rod and imp's mischief, no dice on purple. I don't understand most of the assembly code, though (the ones where I edit the value are pretty intuitive, but the stuff near the bottom I've got squat) so I have no way to try and fix it. Just wanted to quote you and mention that uh, purple remains no dice.
As an (interesting?) aside, 4 bytes after purple are Mercury, Mars, Jupiter, Saturn, Sun, and Moons bonuses, in that order, 4 bytes apart each. So you can mess with those to raise something specific without effecting the color, if it ever matters (I have yet to get far enough for "trap" items where the best effect isn't the highest effect to be a thing so far). So if it's not super troublesome it might be worth adding those lines to your code, as well.
Also, this code doesn't increase the effect maximum (something that you hit on a few items, Angel's Ribbon and Energy Alliance being early examples, where no matter how you crank that number it won't go to max). The effect limit can be increased by using catalysts that have an Effect Limit +X bonus, which I appreciate finally knowing what the hell that is.