You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.

#1 Re: Support » Built in cheat search not working properly » 2021-02-17 14:43:40

Ok, so, what is the recommended settings for using cheats? Cause when I attempt to freeze the values for a particular game, the pointer relocates the addresses for that value. I'm trying to avoid this. This works well in an older save state, where I can freeze the values, and the values stay frozen, but not in a fresh new game.

#2 Support » Built in cheat search not working properly » 2021-02-11 21:19:40

Bnthomason
Replies: 3

Hello. I have a problem when adding cheats via cheat search. The addresses are being found, and are being updated like normal, but when I try to freeze an address using the built in cheat search, the freeze is ignored and the cheat is ignored. I use cheat engine and it works fine this way, but certain cheats don't work with cheat engine, or else, I'm too dumb with pointer scanning (I can't pointer scan, and don't have the time and patience to learn).

I'm trying to perform a cheat that was performed a long time ago with the same emulator. Do anything in the Emulator Settings could change the function of cheat freezing?

Edit: I'm using the nightly build from 6 months ago

#3 Re: Support » My Desmume is acting very very strangely » 2021-02-06 20:08:25

I'm having a similar problem. It bugs out randomly, not just during loading zones. It will play for at least 1-2 minutes before freezing gameplay. I can reset and it will reset the game, but the cycle continues. I am using a version which was stable before, so I'm not sure why it's no longer stable. Maybe because I upgraded my hardware? How do I post a log file?

I am using 0.9.12 Git version

#4 Re: General » freelook Lua script » 2019-05-02 07:27:49

local table = {-1};
cooldown = 0;
if table[1] == -1 then
   for k = 0, 15 do
       k = input.get(k);
         KeyID = k;
         print("Found suitable keyboard, id ", k);
         break;
    end
else
    print ("Using manually set keyboard, id ", KeyID);
end
if KeyID == -1 then
    print("No suitable keyboard found!");
    while true do
        emu.frameadvance();
    end
end
while true do
    local key = input.get(KeyID)
    if key["0"] and cooldown==0 then --0 Key
        cooldown = 20;
        print("0 key");
    end
    if key["numpad0"] and cooldown==0 then --numpad 0 Key
        cooldown = 20;
        print("numpad 0 key");
    end
    if key["numpad+"] and cooldown==0 then --numpad + Key
        cooldown = 20;
        print("numpad+ key");
    end
    if key["A"] and cooldown==0 then --A Key
        cooldown = 20;
        print("A key");
    end
    if key["backspace"] and cooldown==0 then --backspace Key
        cooldown = 20;
        print("backspace key");
    end
    if key["space"] and cooldown==0 then --spacebar Key
        cooldown = 20;
        print("spacebar key");
    end
    if cooldown>0 then cooldown=cooldown-1 end
    emu.frameadvance();
end

-- A full list of keys can be found here: http://tasvideos.org/LuaScripting/TableKeys.html

Case Solved

#5 Re: General » freelook Lua script » 2019-05-01 20:24:32

windwakr wrote:
Bnthomason wrote:

So, how would I reverse or change the controller assignments?

For example, in some games, when you push the L or R stick right, the camera pans in the opposite direction.

If both the up/down and left/right of the stick are inverted you can try using the dpad to set a negative scale. If you only need one axis inverted then you're on your own. The code's quite ugly but there are comments by the bits of code handling each button/stick. You should be able to slap(or remove) a '-' in there somewhere to invert the axis you need.


edit:
For example, to invert just the left/right of the left stick you'd change "MoveRight(-key.x * movscale);" to "MoveRight(key.x * movscale);". For up/down on the right stick you'd change "pitch = (pitch + (key.r * rotscale)) % 360;" to "pitch = (pitch + (-key.r * rotscale)) % 360;"

Hey, so... how would I input keyboard values in addition to the Joystick?

For example, I would like the NUMKEYs to have certain positions.

I believe what I need to do first is add below joyID something like Keyboard?

Here's what I have so far:

KeyboardID = -1; --Keyboard ID to use. The script will attempt to find a suitable Keyboard, but you can manually set this if you wish

...

while true do
    local key = input.get(KeyboardID)

Haven't had a chance to test this yet.

What are your thoughts or suggestions to make this work?

EDIT: I'm so close to figuring it out.

local table = {-1};
if table[1] == -1 then
   for k = 0, 15 do
       k = input.get(k);
         KeyID = k;
         print("Found suitable keyboard, id ", k);
         break;
    end
else
    print ("Using manually set keyboard, id ", KeyID);
end
if KeyID == -1 then
    print("No suitable keyboard found!");
    while true do
        emu.frameadvance();
    end
end

#6 Re: General » freelook Lua script » 2019-04-21 18:54:05

windwakr wrote:
Bnthomason wrote:

So, how would I reverse or change the controller assignments?

For example, in some games, when you push the L or R stick right, the camera pans in the opposite direction.

If both the up/down and left/right of the stick are inverted you can try using the dpad to set a negative scale. If you only need one axis inverted then you're on your own. The code's quite ugly but there are comments by the bits of code handling each button/stick. You should be able to slap(or remove) a '-' in there somewhere to invert the axis you need.


edit:
For example, to invert just the left/right of the left stick you'd change "MoveRight(-key.x * movscale);" to "MoveRight(key.x * movscale);". For up/down on the right stick you'd change "pitch = (pitch + (key.r * rotscale)) % 360;" to "pitch = (pitch + (-key.r * rotscale)) % 360;"

I figured that part out to invert just the x axis movement

xpos = xpos - fX


Now, the camera's also inverted (only the X axis (Left and Right))

I'm having an issue where when I simply input this:

function Rotate(angle,x,y,z)
    local s = math.sin(math.rad(angle));
    local c = math.cos(math.rad(angle));
    return {(1-c)*x*x+c

instead of

function Rotate(angle,x,y,z)
    local s = math.sin(math.rad(angle));
    local c = math.cos(math.rad(angle));
    return {(1-c)*x*x-c

The camera would flip and invert everything when looking up or down. Left and right works fine with this code.

I tried combinations of changing the other ones from - to + or + to -, but nothing seemed to work.

Then it clicked that if I invert every single one, it should possibly invert the camera look. So I tried this:

    return {(1-c)*x*x-c, (1-c)*y*x+s*z, (1-c)*z*x-s*y, 0,
            (1-c)*x*y-s*z, (1-c)*y*y-c, (1-c)*z*y+s*x, 0,
            (1-c)*x*z+s*y, (1-c)*y*z+s*x, (1-c)*z*z-c, 0,
            0, 0, 0, 1};

And all that did was make the camera collapse, expand, invert, etc whenever I turn the camera (Even the Z axis, but only slightly)

#7 Re: General » freelook Lua script » 2019-04-21 17:34:58

windwakr wrote:
Flyhngon wrote:

Total coding noob here... I'm trying wrap my head around how to use lua code, and I can't wrap my head around how to get the freelook script to work. I get that I actually have to adjust some things in the code myself, but I'm unclear about what values need changing, and no matter what I do the code stops running because register3devent is a nil value..? Even when I think I'm defining it correctly?

Freecam is a feature I'd really like, but I'm too tech-illiterate to wrap my head around how the lua script works, even with the instructions given on the github and in the script itself.. help?

You need a recent-ish build of the emulator.

Bnthomason wrote:

Hey, what emulator build are you using, and how would I get this to work with a 9.12 emulator with decent speed and graphics?

https://desmume.org/download/
Scroll down to "Official Nightly Builds"

So, how would I reverse or change the controller assignments?

For example, in some games, when you push the L or R stick right, the camera pans in the opposite direction.

#8 Re: General » freelook Lua script » 2019-04-16 18:42:56

Hey, what emulator build are you using, and how would I get this to work with a 9.12 emulator with decent speed and graphics?

#9 Support » lua51.dll is not found. » 2019-04-16 14:46:28

Bnthomason
Replies: 1

Hello, I'm having a problem with lua51 on stable releases and source code. I downloaded and compiled a source code binary, as well as the lua binary within it at the same time, but when I set my path to direct to lua's containing folder, it still show the error: lua51.dll was not found.

Do I need some kind of Microsoft Redistrubable or a package to make this work? I have c++ 2010 64 bit and 2010 x86. I tried this on multiple emulators, including 64 and 32 bit emulators.

I have a feeling that I have forgotten a key step, but there's hardly any documentation out there to explain how to set this up!

EDIT: I forgot to mention a few things

I am running windows 10 pro x64 bit, if that could make a difference.

I've tried using Source Forge's 5.1.5 dll of lua51.dll, still no dice

I have set the path to the containing folder of lua51.dll.

I have put lua51 in the directory of the emulator as well.

I have tried many versions of 9.11, 9.12, and 9.7, no dice.

Could a program redistributable be conflicting with the dll?

Do I need to reset my PC again to make it work?

Board footer

Powered by FluxBB