Re: Valheim
Posted: Tue Feb 23, 2021 8:05 am
No idea why you're having problems with it, it's working fine for me.
(Mods can cause problems)
Can i take a look at your Script?
No idea why you're having problems with it, it's working fine for me.
Code: Select all
{ Game : valheim.exe
Author : Sigan
}
define(address,Player:UpdateAwake+14)
define(bytes,F3 0F 10 86 6C 06 00 00)
[ENABLE]
assert(address,bytes)
alloc(newmem,$1000,Player:UpdateAwake+14)
globalalloc(_localPlayer,4)
label(code)
label(return)
newmem:
mov [_localPlayer],rsi
code:
movss xmm0,[rsi+0000066C]
jmp return
address:
jmp newmem
nop 3
return:
[DISABLE]
address:
db bytes
// movss xmm0,[rsi+0000066C]
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: Player:UpdateAwake+14
24BDEC1C669: 00 00 - add [rax],al
24BDEC1C66B: 00 00 - add [rax],al
24BDEC1C66D: 00 00 - add [rax],al
24BDEC1C66F: 00 55 48 - add [rbp+48],dl
Player:UpdateAwake+2: 8B EC - mov ebp,esp
Player:UpdateAwake+4: 48 83 EC 30 - sub rsp,30
Player:UpdateAwake+8: 48 89 75 F8 - mov [rbp-08],rsi
Player:UpdateAwake+c: 48 8B F1 - mov rsi,rcx
Player:UpdateAwake+f: F3 0F 11 4D F0 - movss [rbp-10],xmm1
Player:UpdateAwake+14: F3 0F 10 86 6C 06 00 00 - movss xmm0,[rsi+0000066C]
// ---------- INJECTING HERE ----------
Player:UpdateAwake+1c: F3 0F 5A C0 - cvtss2sd xmm0,xmm0
// ---------- DONE INJECTING ----------
Player:UpdateAwake+20: 66 0F 57 C9 - xorpd xmm1,xmm1
Player:UpdateAwake+24: 66 0F 2F C8 - comisd xmm1,xmm0
Player:UpdateAwake+28: 0F 8A F5 00 00 00 - jp Player:UpdateAwake+123
Player:UpdateAwake+2e: 0F 87 EF 00 00 00 - ja Player:UpdateAwake+123
Player:UpdateAwake+34: F3 0F 10 86 6C 06 00 00 - movss xmm0,[rsi+0000066C]
Player:UpdateAwake+3c: F3 0F 5A C0 - cvtss2sd xmm0,xmm0
Player:UpdateAwake+40: F3 0F 10 4D F0 - movss xmm1,[rbp-10]
Player:UpdateAwake+45: F3 0F 5A C9 - cvtss2sd xmm1,xmm1
Player:UpdateAwake+49: F2 0F 58 C1 - addsd xmm0,xmm1
Player:UpdateAwake+4d: F2 0F 5A E8 - cvtsd2ss xmm5,xmm0
}
Code: Select all
// ORIGINAL CODE - INJECTION POINT: Player:.cctor+a4
I might take a look at it when i have some time, thanks for sharing the code .Sigan wrote: ↑Tue Feb 23, 2021 9:51 amI wasn't planning on sharing it, which is why it's an injection at a specific location rather than an aobscan or aobscanregion. It's barely tested... This is just a simple fix, though.
Yours, on the other hand, has this line:Code: Select all
{ Game : valheim.exe Author : Sigan } define(address,Player:UpdateAwake+14) define(bytes,F3 0F 10 86 6C 06 00 00) [ENABLE] assert(address,bytes) alloc(newmem,$1000,Player:UpdateAwake+14) globalalloc(_localPlayer,4) label(code) label(return) newmem: mov [_localPlayer],rsi code: movss xmm0,[rsi+0000066C] jmp return address: jmp newmem nop 3 return: [DISABLE] address: db bytes // movss xmm0,[rsi+0000066C] dealloc(newmem) { // ORIGINAL CODE - INJECTION POINT: Player:UpdateAwake+14 24BDEC1C669: 00 00 - add [rax],al 24BDEC1C66B: 00 00 - add [rax],al 24BDEC1C66D: 00 00 - add [rax],al 24BDEC1C66F: 00 55 48 - add [rbp+48],dl Player:UpdateAwake+2: 8B EC - mov ebp,esp Player:UpdateAwake+4: 48 83 EC 30 - sub rsp,30 Player:UpdateAwake+8: 48 89 75 F8 - mov [rbp-08],rsi Player:UpdateAwake+c: 48 8B F1 - mov rsi,rcx Player:UpdateAwake+f: F3 0F 11 4D F0 - movss [rbp-10],xmm1 Player:UpdateAwake+14: F3 0F 10 86 6C 06 00 00 - movss xmm0,[rsi+0000066C] // ---------- INJECTING HERE ---------- Player:UpdateAwake+1c: F3 0F 5A C0 - cvtss2sd xmm0,xmm0 // ---------- DONE INJECTING ---------- Player:UpdateAwake+20: 66 0F 57 C9 - xorpd xmm1,xmm1 Player:UpdateAwake+24: 66 0F 2F C8 - comisd xmm1,xmm0 Player:UpdateAwake+28: 0F 8A F5 00 00 00 - jp Player:UpdateAwake+123 Player:UpdateAwake+2e: 0F 87 EF 00 00 00 - ja Player:UpdateAwake+123 Player:UpdateAwake+34: F3 0F 10 86 6C 06 00 00 - movss xmm0,[rsi+0000066C] Player:UpdateAwake+3c: F3 0F 5A C0 - cvtss2sd xmm0,xmm0 Player:UpdateAwake+40: F3 0F 10 4D F0 - movss xmm1,[rbp-10] Player:UpdateAwake+45: F3 0F 5A C9 - cvtss2sd xmm1,xmm1 Player:UpdateAwake+49: F2 0F 58 C1 - addsd xmm0,xmm1 Player:UpdateAwake+4d: F2 0F 5A E8 - cvtsd2ss xmm5,xmm0 }
When I looked at that location, mine didn't have line a4, but a3. Based on the way your script is written, that shouldn't have mattered, but oh well. I probably could have injected my script there. Meh...Code: Select all
// ORIGINAL CODE - INJECTION POINT: Player:.cctor+a4
And, regarding mods, I only started using a couple mods today. This problem has been consistent prior to mods, however, on this most recent table, and most recent version of Valheim.
Edit: Just noticed you updated your ct to v2.3. I've been using v2.1.
I would have been surprised if there had been. I think it's just that the aobscan bytes aren't perfect. That's another reason an aobscanregion might be better. Not only would it allow for a quicker scan when looking for the right bytes, it would eliminate a lot of potential false positives, and you could have a more accurate string of bytes. If the region is large enough, it would serve the same purpose that an aobscan does, in that it's less likely for an update to the game to screw up the script. Regardless, this being early-access, that part might just be something we deal with as new updates to the game come out.
After running the game on Vulcan (0.146.8) and doing some testing, all options in tables 2.3 works correctly, including free crafting.kingjoffrey wrote: ↑Thu Feb 25, 2021 10:07 amSo far I've noticed the `Free Crafting/Upgrading/Building (You still need the Amount of the Items in your Inventory)` part to not work anymore.
If you open my script then you can see the original code if you scroll a bit down.
Code: Select all
Address: 17084015C7B
Code: Select all
Arry of Bytes: F3 0F 10 80 D4 01 00 00
Code: Select all
Code: movss xmm0,[rax+000001D4]
I didn't understand xDAkira wrote: ↑Sat Feb 27, 2021 1:44 amIf you open my script then you can see the original code if you scroll a bit down.
Code: Select all
Address: 17084015C7B
Code: Select all
Arry of Bytes: F3 0F 10 80 D4 01 00 00
(Didn't checked if it changed after the latest update)Code: Select all
Code: movss xmm0,[rax+000001D4]