Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

TASToolKit Frame 1 DPad Loading Error #23

Open
LordDraXula opened this issue May 16, 2022 · 3 comments
Open

TASToolKit Frame 1 DPad Loading Error #23

LordDraXula opened this issue May 16, 2022 · 3 comments
Labels
bug Something isn't working scripts Issues/Features pertaining to Lua Scripts themselves
Milestone

Comments

@LordDraXula
Copy link
Collaborator

LordDraXula commented May 16, 2022

On Frame 1 the DPad value assigned for the player does not come out due to it's buffering.

This can be avoid by using the track load as a frame medium for example.

PAL
809bd730 -> 0xC -> 0x0 -> 0x2C
@LordDraXula LordDraXula added bug Something isn't working scripts Issues/Features pertaining to Lua Scripts themselves labels May 16, 2022
@malleoz
Copy link
Collaborator

malleoz commented May 18, 2022

Adding the following code to the beginning of onScriptUpdate in MKW_TAS_Toolkit.lua works.

local loadTime = ReadValue32(GetPointerNormal(0x9bd730, 0xc, 0x0, 0x2c))
if loadTime < 172 then return end

@malleoz
Copy link
Collaborator

malleoz commented May 18, 2022

This issue will be on hold pending the finalization of vabold's lua script cleanup branch.

@vabold
Copy link
Member

vabold commented May 19, 2022

Instead of calculating loadTime from the intro camera, let's instead check against the stage in Raceinfo. This is better because we can still use the original frame of input address, while not allowing inputs in the race camera.

PAL
809BD730 -> 0x28

Here is some quick pseudocode for the race stage.

enum RaceStage {
    INTRO_CAMERA = 0;
    COUNTDOWN = 1;
    NORMAL = 2;
    RACE_FINISH = 4;
};

@kierio04 kierio04 added this to the 4.0 milestone Jun 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working scripts Issues/Features pertaining to Lua Scripts themselves
Projects
None yet
Development

No branches or pull requests

4 participants