Posts for MUGG


Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
MLSS Script v0.2
- Snake Game: Fixed that loading a savestate while playing would mess up the game.
- Snake Game: Fixed that the winning condition depended on the snake's length rather than the number of fruits collected.
- Snake Game: Fixed that collecting a fruit while holding into the other direction would cause the fruit to vanish without spawning another one.
- Snake Game: Input is now buffered.
- Snake Game: Sped up the beginning speed by 1.
- Mush Calculator: Replaced old Mush power values with the new ones.
- Leading zeroes are now applied by string.format(), to speed up the script some.
Sorry, release date inside the lua file is wrong lol. (I'm not used to this kind of release-information keeping but it's fun) Edit: Found another bug in my snake game, expect some sort of fix later. :)
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
There is a trick in the game where you can press two directions to go diagonally (even when it should not be possible). The input has to be done at exactly the same time, but with the AHK script it doesn't work.
Send {Right down} {Down down}
Send {Right up} {Down up}
would make the game assume that you pressed right, and then down, thus you die. I have not been able to find a solution so I might forgo the trick. Edit: Nevermind, it seems to work with SendInput. I'm going to have to splice the levels though because I can't be bothered waiting 2 hours for the run to (not) sync.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I'm not in as bad a mood as I was before, btw. I accepted what happened, I'm just curious what's going to happen in the show's future. But: I don't like the pattern of having bad characters become good in the blink of an episode. I hope Tiara isn't just completely brainwashed to good now... At least have them jump to their old personality from time to time. Idk. Her bad behavior having been caused by her mother whom we've not seen before - and I didn't appreciate her personality, it seemed childish - seemed too abrupt and unbelievable 109 episodes late into the show. And although I'm not in a bad mood anymore, I can say that I still have mixed feelings and feel rather concerned. Maybe I just need to see the "next CMC episode", but that may not even happen until late in 2016 next season ...
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Thanks pack. Someone else also recommended it to me so now I'm using it. In fact I have already done a WIP. And here the autohotkey script: Link. Basicly I press "9" on the title screen and it goes. All sleep times have been tweaked to make the run sync. It seems the game is laggier when it "resets" - it runs smooth when it is closed and restarted fresh after every attempt at running the script. And about that, the script has currently only a very slim chance at syncing (maybe about 3%) so I'm thinking about splitting the run in two. Link to video solarplex: Thanks for this info. I think that would come in handy, but I have no experience how to use cheat engine and all that. That would require some serious work, I would believe, for such a little experiment I was doing. But I will keep it in mind for the future, definitely appreciated. --- Btw, I remember from when I was a kid there was one more level at the end (with cannons) but seems like it isn't present in this version from archive.org. Or maybe they removed/added the cannons in the last level in this version (so there is a v1.0 shareware and v1.1 shareware - but this is just speculation, as I have absolutely no way of confirming this since there is no information on the internet). Of course I would have loved to see the 20 registered levels, but it seems I will never get to see them in my life.
Post subject: Keyboard Macro TASes
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Since everyone is probably ignoring the other topic I made, I'm going to make this one with a more significant title. To get to the point: I'm working on a keyboard macro that completes a Windows shareware game. I have not heard about anyone who has done this before so any ideas/thoughts? I feel like the game I'm trying to run is simple enough that desyncs are rare. The problem is that playback may not be completely consistent - as in, you have to insert some leeway sleep time for the game to execute a keystroke. I'm using Autohotkey (AHK). In this image you can see, I'm giving the game 20 ms to start level 1, and from there I do something every 2 ms. Do you think this could be something worth of publishing to TASvideos? After all, the game is being played back with keystrokes. (Probably I should mention I'm emulating the Windows XP in Virtualbox because I have no other means of running the game.)
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
This is Windows game from 1995 by Ugly Dog Software. The objective is to move across a field and clear all white tiles without dying (by enemies or by falling off), then getting to the goal tile to finish the level. The shareware version has 10 levels. The registered version supposedly has 20 more levels. Unfortunately, information about the game on the internet is very sparse right now. In fact, there seems to be nothing but this Archive.org link (where you can download the game) which I recently found - hence why I'm now posting about it. The game company is not mentioned on the internet anywhere, either, btw. This game, like I have the impression with other PC games from that era, seem to run only in 32-bit Windows, so I was forced to use Virtualbox to play it again. Now I was planning on making a theoretical TAS by using input macros. Which made me think, why have I not heard about input macros in context with TASing before? Is it too unreliable? I think if it works at least somewhat reliably, I would like to use them one level at a time and record videos that I can put together. One level would only take 3~10 seconds. If someone can recommend me some input macro tool I can use under Windows XP or give me other advice, I would appreciate it.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
BioSpark wrote:
I found the code that calculates mush badge damage. Here's the exact calculation: (Normal * 0x33 + Super * 0x33 + Ultra * 0x40 + Max * 0x4C) / 0x100 So if you want to make your calculations more precise, here are the exact values: Normal: 51/256 Super: 51/256 Ultra: 64/256 Max: 76/256
That's nice, can you find the values for the Japanese version as well? Are they Normal: 20/256 Super: 25/256 Ultra: 30/256 Max: 51/256 ? MLSS Script v0.1 Newer version of the script, now with a little game where the objective is to get 100 fruits without dying. Let me know what you think. You can also find my TODO in the download to get an idea of what's left to do.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Thanks I got it to work. You can see here http://pastebin.com/TxhgSXBC (expires in 30 days) the usage of drawButton() and drawDisplayBox(). (Let's use this opportunity to ask another question: How to best give a value (a certain amount of) leading zeros?)
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Here is my luascript I was working on MLSS Script Pre-v0.1 Feel free to play around with it and tell me what you like and what you don't like and how badly written my code is. I recommend you use Bizhawk 1.11.1 or 1.11.2, turn off the doube-click fullscreen (Config>Display>Window tab) and use mGBA core since it appears to be faster than VBA-Next.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Sorry, I have no in-battle addresses yet. I only know when the bros go into battle, the stats/HP/BP are written to somewhere else. You can edit your Pow before entering a battle and it will carry over into the battle. If you edit your stats and level up, the edits will get reverted (because the game uses hard coded stat progression). When I find any addresses I'll post here.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I'm kind of curious now, so I think I'll try to disassemble it more and make a damage prediction script
I will look forward to this. That will be very helpful. Feel free to edit the wiki as well if you want.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I need to call that custom function inside drawDisplayBox, at line 5. If I just name it function, I cannot call it at line 5. I have also tried naming it just a and writing just a at line 5 which didn't work. If you can, please give me an example code what I'm supposed to write.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Ok, I try:
drawDisplayBox(posx,posy,width,height,a())

	if X > posx and X < posx+width and Y > posy and Y < posy+height then
	
		if clicked and clickedFrames > 0 then 
			
			a()
			
		end
		
		boxSelected(posx,posy,posx+width,posy+height)
	else
		boxNormal(posx,posy,posx+width,posy+height)
	end
	
end

----------------------------------------------------------------------
local drawPosition = function()

	width=106
	height=35

	drawDisplayBox(PositionX,PositionY,width,height,a()

        -- this happens when clicking on the display:
			menuscreen=0 -- menu gets closed
			PositionY = PositionY + (Y-YBefore) -- enables dragging the display around
			PositionX = PositionX + (X-XBefore) -- "

	end
	)
	

	(...)

end
drawDisplayBox() is the new function I'm using. PositionX, PositionY, X, Y, XBefore, YBefore, clicked and clickedFrames are all global variables so I'm not passing such as parameters. It doesn't matter if using function() or a(), I'm still getting an error: LuaInterface.LuaScriptException: [string "main"]:564: '<eof>' expected near 'end' 564 is the line where the very last "end" of drawDisplayBox() is. Thanks everyone for helping me so far.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
	if X > PositionX and X <PositionX> PositionY and Y <PositionY> 0 then 
			
			menuscreen=0
			PositionY = PositionY + (Y-YBefore)
			PositionX = PositionX + (X-XBefore)

			if PositionY <0> 159-height then PositionY=159-height end
			if PositionX <0> 239-width then PositionX=239-width end
			
		end
		
		boxSelected(PositionX,PositionY,PositionX+width,PositionY+height)
	else
		boxNormal(PositionX,PositionY,PositionX+width,PositionY+height)
	end
This code is used in a lot of functions I'm using. The only thing that's different is the PositionY = PositionY + (Y-YBefore) PositionX = PositionX + (X-XBefore) part. Can I make the above code into a function and pass a custom function, like so?:
drawDisplayBox(posx,posy,width,height,a()
         PositionY = PositionY + (Y-YBefore)
         PositionX = PositionX + (X-XBefore) 
end)
I have not gotten this to work.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
client.SetGameExtraPadding() seems unusable to me, so I want to explain here why. I think I would have prefered a "client.SetGameExtraMargin()". http://i.imgur.com/25o20PR.png
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
zeromus wrote:
1. Test it yourself 3. We dont have a calendar
Your answer is completely useless to me. How am I, someone who isn't exactly an expert at Lua to begin with, supposed to know how to use that code because for all I know I could be using a wrong script and deem it on that when it doesn't work in any one Bizhawk release. And the release history doesn't list any previous dates so I can't easily find out what is the span of time until a next release can be expected. I have posted questions here for others to answer them, not so that others can make fun of me when I'm seeking advice.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
As for the effect of power, there is an attack algorithm. I could make a calculator that shows how much damage certain attacks do agains certain def, but I'm not sure if I can make it completely accurate. I will give it a try. As for stache, I think both bros' stache counts together and the sum has to be past a certain threshold in Little Fungitown before it even has any effect. I think. The script will make it possible to go to any room and edit any stat and money so you can test all this stuff for yourself. I don't know if I'll be able to make a "preview" of how much you would pay for a certain item given a certain stache value. As for lucky hits, it is RNG dependent. It will depend if I can figure out the RNG - luckily, it seems to have a pattern so making a "future RNG" display could be possible.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Episode 109 So I watched that episode just now. I feel extremely strange. I did not expect this to happen. I'm both happy, but also extremely disappointed because a major part of the show is just... over now, for me... And with MLP being a rather huge inspiration/thing in my life, and this having happened, I don't know what I'm going to do now. I will never look at the cutie mark crusaders or at Scootaloo the same way as I did before. Also, there is one pony-related thing I have always wanted to do, since 2011, but I have never gotten around to doing it. And now it is probably not going to happen (I don't want to say publicly what it was). When I started watching the show, the characters just grew to my heart and especially the CMC because they reminded me so much of what I still am (not knowing what to do in life). Scootaloo became my favorite character because of her being kind of a "third wheel" - we don't exactly know her family or origins - but still being so cool and acrobatic, and a pegasus to boot. But especially because of her admiration for Rainbow Dash (who didn't acknowledge her, calling her a squirt etc.). I looked forward to the show's development especially because I was thrilled to see what would happen to the CMC, and if Rainbow Dash ever realized Scootaloo's true feelings for her. That was the first huge thing that... you could say... kept me going, made me really excited to see more. I started reading fanfiction about Scootaloo (as strange as it may sound, I'm really grateful having done so, having gotten to know Scootaloo better, having seen the adventures she has been through even if it was only in fanon). That first thing was "crushed" by Sleepless in Ponyville. I have stopped reading fanfiction entirely since. I kept going to see more, however. I wanted to see what else will happen. Would Scoots learn to fly? What will RD and Scoots do? And of course, what will happen to the CMCs. Will they get their marks? Well, you know how that turned out now. That "second big thing" is crushed now too. This is not supposed to be a lousy "I'm leaving the fandom" speech or anything retarded like that, but I'm just saying. The big thing that has kept me going is now over. There is nothing for me to look forward too. The show is milked out. Finito. And that pony-related thing I have mentioned above is not going to happen now. I have thought hard about when or if or how I should do it, but now there is no reason to anymore because it got destroyed by canon now. I'm rather sad now. To say the least, it had to do with drawing and now it looks like I will never want to draw anything again anymore. That's going to be as far as I go with my writing. I'm done.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Questions
  • Lua client.SetGameExtraPadding() is in 1.11.1 or was it newly added in 1.11.2?
  • Can you record and play back controllers separately in TASStudio?
  • When is the next update after 1.11.2?
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I'm working on a new script and since people haven't been too excited, I thought I'm posting about it here too. So, if you have any wishes or ideas now is the time. I'm likely not going to change the script once it's done. What is it that you have always wanted to do? Have you wanted to go through walls or go to any room you want? What else?
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
The detour to the desert takes too long, imo. Also... *opens notes* Swiggler fight can be done in 2 turns with 4 fireflowers.
///// vs Swiggler,  doctor shroob with grey shroom(random),  doctor shroob with normal shroom(random)
~ Swiggler 200 HP
~ Doctor Shroob 46HP
~ THIS FIGHT REQUIRES 4 FIREFLOWERS!
-- hammer poison cloud with one pound (two hits)
Mario+b      fireflower [  58     3      0   ]
Luigi+b       fireflower [   57     4      0   ]
-- dodge shot
-- hammer defend big doctor shroob
Mario+b    fireflower [ 56     1      1    ]
Luigi+b     fireflower [ 29     0       0   ] everyone dead
~ gain 196 EXP,   140 COIN
I think the other two fights can be done reasonably fast with items on the way.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
MUGG wrote:
Here's an old shareware PC game (speaking Win95,98) I played back when I was a kid. I think it was among a bunch of other shareware games, but I don't know if the game appeared outside of Germany/Europe. There are boards and you are the ball. The objective is to clear all the white tiles on the board by passing over them, and then step on the green(?) goal tile (The start tile is purple(?)). The white tiles disappear shortly after being stepped on. Blue tiles are solid ground. There are also teleporters, blue tiles that disappear and reappear, enemies(?), tiles that shoot a projectile over and over... The background graphic is like the cosmos. The game had 10 levels or so - but I'm pretty sure it was only a shareware version. I think the game's name is "Tyler" or something, but I can't find screenshots for the game searching that name in google...
I finally found this game again in google images. I believe I have spent about 8 hours (accumulated over last few years) looking for it. https://archive.org/details/Tyler_1020 Game: Tyler Dev: Ugly Dog Software Published: 1995 (Windows) People: Phillip Tanner
"To finish a level, guide Tyler from the green tile to the red tile. In the process, you must destroy all of the gray tiles by touching them. When Tyler touches a gray tile, it begins to fade out. Don't linger too long! Other tiles blink in and out of existence, teleport Tyler to another tile, or otherwise make your journey more interesting and difficult. When you are on the red tile and have destroyed every gray tile on the level, hit the spacebar to advance. Remember, there is no time limit in Tyler. Take a few moments at the beginning of each level to familiarize yourself with the layout and plan your route."
Now it's time to TAS it ;) if or as soon as Hourglass can run it.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
How to use emu.yield()? (which supposedly makes scripts run even when the emu is paused) And is there a way to change Bizhawk's window width and height with lua?
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Script active problem: It looks like I found a bug for real this time.

print("Script is loaded")

event.onloadstate(function() 

print(emu.framecount())

end)


while true do


emu.frameadvance()
end
I'm on VBA-Next. When I run this code and load a state, it prints the framecount once, which is expected. But if I drag and drop the script into the lua console (as a habit to close and reopen the script - this being the only way you can do so in mGBA without crashing the emulator), it looks like subsequent loadstates will execute the print() command multiple times, even though the console says there is still only 1 script active. /// When the script is active and I drag and drop the file onto the console (which should close the script), the script still keeps going. If I drag and drop it again, it seemingly loads a 2nd instance of the script.
Script is loaded
16108
22136
16108
22136
16108
22136
16108
22136
Script is loaded
16108
16108
22136
22136
16108
16108
22136
22136
16108
16108
22136
22136
16108
16108
22136
22136
Script is loaded
16108
16108
16108
22136
22136
22136
16108
16108
16108
22136
22136
22136
Hex editor problem: One other error I found was in the hex editor, it seems the wrong character on the right is highlighted when clicking on a byte. http://i.imgur.com/hGHlej0.png Also, when I click on a character on the right, the character 3 spaces to the left gets selected instead of the character I clicked on. Both bugs have been reported as issues. Btw, I think a event.onloadstateimmediate() could be convenient (run code inside it before emulating the loaded frame). Is this possible? Or what alternative can I use?