Posts for Pokota

Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Eirin's Shady New Drug is a Moriya Shrine Conspiracy in response to Yukari messing around again... I'm not as familiar with LoLK as I am with other games, how does shooting percentage affect score? E: Was confused for a bit since Reisen's barrier-bomb does not clear the screen when triggered
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Because that didn't occur to me - I was stuck in thinking using pairs was the only way to iterate reliably through the returned table since I couldn't know the bounds. Despite the upper bound being explicitly passed in the function call. It's really a good thing that I do this thread, since as it turns out y'all are pretty good at programming.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
A (temporary?) lua function that pulls ascii strings from memory. In practice, this is a wrapper for memory.readbyterange
Language: lua

function readAsAscii(address, length, domain) ret = "" q = memory.readbyterange(address-1, length+1, domain) for a,b in next,q do ret = ret .. string.char(b) end ret = bizstring.substring(ret,0,length) return ret end
address and length are adjusted by the wrapper to account for lua being 1-indexed while readbyterange returns a 0-indexed table.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Hello Kianotti15 Your submission to the workbench was cancelled by the judge, which is why there's no encode (video) of it. Please note that too many rejected runs will lead to your permission to submit runs to the workbench being restricted. In other words, if you submit a lot of runs that get rejected, you won't be able to submit runs. As Masterjun did in the submission thread, I'm going to point you to User Files, where you can upload your movie files without submitting them to the workbench, to the Super Mario World resources page, which has much useful information about the game, and to the Super Mario World discussion thread, where you can share your movies and get feedback.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Masterjun wrote:
Yes, there is client.SetClientExtraPadding and client.SetGameExtraPadding.
I would not suggest the latter as that will distort the emu surface rather than give extra blank space.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I'd advise checking the "Adventures in Lua" thread, there's some helpful stuff in there. To directly answer your question: you can either create a separate lua canvas object or you can set client extra padding and put gui.DrawNew("Native") in your main loop
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
WINNERS DON'T LOSE FROGS Now to actually make some commentary. I can't say anything that isn't biased since I love this game series, though... Question: Was it wise to skip the ending text the way you did? It's a neat thing you can do but in the notes you wrote that you avoided touching the ending trigger...
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I didn't know this table had an ending.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
The SNES port is missing the "Number Recycler" phase. The game difficulties vary between Normal and Practice. The math difficulty varies between 1 and 12, with 1 being simple addition and 12 (appearing to be) short division, but otherwise doesn't affect the solution speed in a TAS situation.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Out of curiosity, why does IBT work in AAMB but not the other Goodbye Galaxy games?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
MUGG wrote:
Isn't it supposed to be red text?
You need to assign the Alpha byte's value as well, so instead of 0xRRGGBB it's 0xAARRGGBB (Yes, this catches me off guard at times as well)
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Link to video
Language: lua

memory.usememorydomain("Combined WRAM") frequency = 2 keysArray = {} mode = "Stopped" key_on_screen = { [0] = "", [1] = "", [2] = "", [3] = "A", [4] = "B", [5] = "L", [6] = "R", [7] = "Up", [8] = "Down", [9] = "Left", [10] = "Right", [11] = "", [12] = "" } function initializeKeysArray() keysArray = joypad.get() end function setMode(newMode) mode = newMode end function simonSays() q = memory.read_u8(0x7E78) if not (q > 10 or q < 3) then r = key_on_screen[q] for i,v in pairs(keysArray) do keysArray[i] = false end keysArray[r] = true joypad.set(keysArray) end end function core() checkTime = emu.framecount() % frequency if (checkTime == 0) then if (mode == "Simon Says") then simonSays() end end end initializeKeysArray() controls = forms.newform(192,192,"MMBN3 Support") stop = forms.button(controls,"Stop",function() setMode("Stopped") end,5,5) simon = forms.button(controls,"Simon Says",function () setMode("Simon Says") end,5,35) while true do emu.frameadvance() core() end
Frequency 1 (60 Hz) is theoretically faster but fails if the requested button doesn't change.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I would expect that any change level routine refers to the 'current level' address for pointers rather than the game instantly changing the level to suit the address. It's what I'd do, at any rate. Are you freezing the address and then attempting to transition levels normally?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Yeah. It doesn't have to go on the Workbench to be shared with us, and if there's enough positive reception (and it's sufficiently optimized) it can get submitted to Workbench from there. (also: we need a more accurate name for the Workbench since it's not for WIPs (which outsiders would expect to see on a Workbench), but for submissions. Maybe "Judge Queue?")
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Biz is using a longer degree of precision.
    VBA prints: 1.79489673697e-009 
Bizhawk prints: 1.79489673696339E-09 
Do they draw right when Yoshi's standing in the same spot?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Thanks. I figured it was a simple something I'd forgotten about.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
In this specific instance I found the header in the System Bus domain, so I have a short-term workaround. Meanwhile, I've run into a new issue - I created a mode switcher but it throws an unhandled exception when I try to switch modes. Can I get a second pair of eyes to check for something stupid that I may have missed? The code is on github since it kinda would have eaten the full page.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Reading the contents of the header is more what I had in mind. I'll take a refresher course on Lua I/O, then, since that way I can do other neat things.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
So, question. Is there a function for reading specific bytes from the file on disk, or should I just use the lua IO functions? Alternatively, is there a lua function that exposes the SNES header?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I just love that going any lower% than this is exponentially longer. Despite the blast mask hovers, I still found this rather enjoyable. Is there no legal way to screw with the blast mask recharge timer?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
jmarvin_ wrote:
Impassioned wall'o'text defending this as a work of art
First of all, that's what Gruefood Delight is for. Our favorite rejected runs. Were it up to me, I would add this to Gruefood Delight if it got rejected. TASVideos isn't the be-all and end-all Ultimate Repository of TASes, nor is it the only place TASes are allowed to be. Not getting it published here is not a condemnation of the TAS itself, nor is it a death knell for either your community or ours. It's simply the judges saying "this isn't a TAS we are comfortable publishing formally."
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
A few notes. First of all: there are parts of this that are genuinely funny, such as falling out of a victory circle into the Temple of Time. If for no other reason, this should at least get Gruefood Delight just for that. Secondly: this is really hard to follow for a casual enjoyer of OOT like myself, even with the submission notes. Mostly because there's so much BA and RBA use. The commentated run is definitely going on my watch later list. Third (kind of coat-tailing on 2): At one point BA or RBA (I can't tell the difference) is used to refill bombs in the middle of a bomb hover sequence. Yet at one point you go into Lost Woods/Kokiri Forest and spawn a bunch of bomb drops. I assume that this is because (R)BA'ing the bombs would have been slower at that point since the drops were right there?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Welcome to Whose Triforce Is It Anyway! The game where all the categories are made up and the doors don't matter. Yes, the doors are about as important as my permanent record.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
so instead of typing up your argument and posting it that way, you typed up your argument, had Microsoft Mike read it aloud, and turned it into a video. ...do you have a complexity addiction, or did you just want to post a video?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I have no name wrote:
Pokota wrote:
Well, yes but not for those reasons. TP (and only TP) requires the presence of some ending, so that's the only one that has to be done from what is basically dirty SRAM (and NG+ situations like the TP route usually get exemptions anyway so long as the SRAM state can be validated, which is what the Neutral run would do anyway).
Well, TP can be done from one save- you'd do the neutral ending while meeting all TP requirements, and then load a save made during the run after Flowey to go do the TP exclusive stuff and reach Asriel. So it wouldn't need a full neutral playthrough and then a full pacifist playthrough.
Jenetrix wrote:
My only real other question is though, Would the differences in Neu/Gen be considered enough to get their own branches, or the same one?
And the answer to this is a resounding yes, due to the punch card glitch. Basically, stuff breaks when you trigger something with the punch card active, and unlike all other items, you can move for 1 frame after triggering it from the menu. Since it can't be obtained on a Genocide run and it can be used to walk around during cutscenes and be warped to the wrong place on a new screen, the fastest neutral route has very little Genocide overlap and instead a lot of overlap with pacifist. The neutral/pacifist difference is that neutral defeats the forced Vulkin for level 4 to speed up Asgore (pacifist can't) and pacifist does the Papyrus date while passing through Snowdin (neutral obviously wouldn't) and has the true lab/Asriel at the end. So my take is that pacifist and genocide would be the only branches necessary, as the pacifist run would contain everything that the neutral run would contain, and the genocide run hits everything else.
To clarify, you can't go onto Pacifist if you've killed anything as Undyne refuses to have anything to do with you at that point. So, either TP can be done from one save OR neutral defeats the forced vulkin for level 4 to speed up Asgore. That's the only difference between TP and Neutral. Is that correct?
Adventures in Lua When did I get a vest?