User Files from TASeditor

Upload All User Files
1 2
7 8

#639020551590702241 - TAStudio Output Logger Framework v0.95

TAStudioLogger.lua
27 downloads
Uploaded 29 days ago by TASeditor (see all 192)
A framework for your writing your own script to streamline logging memory values and outputting them in TAStudio and saving and loading them with branches as well as script starting and closing.
Version 0.95, not fully done yet. Runs in Bizhawk 2.11

Not working

Branch action undo and branch reordering, it messes up the files and logs.

Features

GUI

It consists of a dropdown list with the branches and the time difference compared to the current section start, a number below 0 means the branch is faster than the current input.
The list is opened by clicking the '▲'-button and clicking on an item from the list selects the given branch as the branch to compare against.
Next to it are '-' and '+'-button to just decrement and increment the branch index by 1.
The 'Best'-button selects the branch with the shortest time between the section start marker and the section end marker, with the same notes as the the current section markers.
Finally the text next to it is the current section start markers text with the time difference to the selected branch at the end, a value below 0 means the current input is faster.

Sections

Sections are marker that don't start its note with "-" or aren't empty. Name the markers individualy - like "Level 1 Key", "Level 2 Key" and so on, or the section find algorithm might fail.
The sections are used to offset the index for relative branch comparison and to display the time difference.

Logs

A log consists of its name, a function how to retrieve the logs values from games memory and a list containing each logged value.

Branch Logs

When saving a branch the current values are saved into a branch log. And loading a branch loads the branch logs values into the current log.

Old Logs

The old logs are the logs with the values from the last input change, which means the old logs are only updated with current logs values when playing back over ungreenzone frames.
It also gets updated by loading branches.

Printers

Those define how to output the values from the logs into TAStudio cells as text and as color.

How to write a script

Since this is a framework, it is not meant to be run in the Lua Console, instead you need to write your own script.
It is surpsingly easy to write a script!
Firstly start from this:
require("TAStudioLogger") -- Or navigate with relatives paths to to the folder where TAStudioLogger is
-- Write your loggers below here:

-- Write your printers below here:

InitializeLogger() -- Needed to load files and setting up variables and callbacks

while true do
	
	UpdateLogger() -- Logs values
	
	emu.yield()
end

Adding a logger

The Loggers take the form "AddLogger(<loggername>, <addressexpression>)".
'loggername' is just a string. It's the name of the logger to be used in the AddPrinter function.

'addressexpression' is either a function that returns a number - in most cases from a memory.read_.. function,
a number of the adress (returns 1 byte unsigned only),
or a string with shorthand expression: "<size>@<address>",
where 'size' is the size of the address (same as in memory.read_.. functions for Bizhawk) and 'address' is the memory address to log.
There are string shorthand form expressions for:
  • "<addr1>+<addr2>" for adding two values - value1+value2,
  • "<addr1>#<addr2>" for multiplying the first value by 256 and then add the second value - value1*256+value2,
  • "<addr1>+<addr2>#<addr3>" for adding the first two values, multiplying by 256, then add the third value - (value1+value2)*256+value3

Examples:
AddLogger("XSpeed", function() return memory.read_s16_le(0x000D56) end)
AddLogger("MidAirFlag", 0x000D7B)
AddLogger("YSpeed", "s16_le@0x000D5A")
AddLogger("XPosition", "u16_le@0x000C29+u8@0x000D61#u8@0x000D50")

Adding a printer

Printers are written as follows: "AddPrinter(<columnname>, <valueexpression>[, <colorexpression>][, <textexpression>][, <digits>])".
'columnname' is the name of the new column added to TAStudio by the script or an existing button column.

'valueexpression' can be
  • just a string of the name of one of your Loggers,
  • a function that takes 'index' as a parameter and returns a number, like:
function(index) return GetBranchLogValue("XPosition", index) end.%%%
  • or a shorthand form string like "<shorthand>,<logname>[,<norm>]",
    where 'shorthand' is the function. It can be of the following:
    • "diff" for 'Difference' function, difference to last frame; e.g.: "diff,XVel"
    • "branchval" for 'GetBranchLogValue' function, value from the log in the selected branch; e.g.: "branchval,XVel"
    • "branchdiff" for 'BranchDifference' function, difference to last frame in the selected branch log; e.g.: "branchdiff,XPos"
    • "branchcomp" for 'BranchCompare' function, subtracts the value in the branch log from the current log; e.g.: "branchcomp,XPos"
    • "relbranchcomp" for 'RelativeBranchCompare' function, does BranchCompare, but with marker offsets, if a marker with the same note is found in the branch; e.g.: "relbranchcomp,XPos"
    • "oldval" for 'GetOldLogValue' function, value from previous playback, the values also change from branch loading; e.g.: "oldval,XVel"
    • "olddiff" for 'OldLogDifference' function, difference to last value from the previous playback; e.g.: "olddiff,XPos"
    • "oldcomp" for 'OldLogCompare' function, subtracts the value in the old log from the current log; e.g.: "oldcomp,XPos"
'logname' is the name of one of your logs, so is the optional parameter 'norm'.
You can normalize - multiply the return value of above functions by the sign of 'norm' - by adding a 3rd parameter, e.g.: "branchcomp,XPos,XVel"

'colorexpression' can be
  • an number 0xAARRGGBB, a string "#AARRGGBB" expressing a color value or from the predefined Colors table - Colors.white, gray, red, green, blue, yellow, magenta, cyan, orange, purple.
  • a table with log values as the key and a color as the value, e.g.:
colortable = { }
colortable[1] = 0xFFE0E0E0
colortable[3] = 0xFFE04090
colortable[8] = 0xFFFF1050
  • a function that takes 'value', 'index' as parameters and returns a color, e.g.:
function(value, index) if value == 15 then return Color(index, 0xFF8080FF ) end end
  • or the shorthand form string in the form "<condition[,param]>;<function[,params]>;<defaultcolor>". The functions are
    • ColorGradient function, "gradient,<maxvalue>[,<startcolor>][,<endcolor>][,<minvalue>][,<exponent>]"
      for example "gradient,20,0xFFFF0000,0xFF00FF00,1.15,5", use "gradientabs" for absolute values,
    • "table,<tablename>" e.g.: "table,colortable". The table must be global.
Additionally another parameter 'defaultcolor' can be passed in the shorthand form string to decide which color to use when the returned value is nil, e.g.: "gradient,50;0xFFFFEEEE".

'textexpression' is optional,
  • if left out or passed nil as the parameter it displays the value of the 'valueexpression',
  • a string that is printed, useful with the conditional expression further down,
  • a table with log values as the key and a color as the value, e.g.:
texttable = { }
colortable[1] = "stand"
colortable[3] = "walk"
colortable[8] = "jump"
  • a function that takes 'value' as a parameter and 'index' optionally and returns a string, like:
function(value) return value < 15 and "invincible" or "" end
  • a shorthand form string in the form of "<condition[,param]>;<function[,param]>"
    • "modform[,param]" to display the log values as <value>/<param>..":"..<value>%<param>. If left out 'param' is 256
    • "modformh[,param]" to display modform as hexadecimal,
    • "modformdh[,param]" to display only the remainder as hexadecimal, those functions have an optional parameter for the divisor, e.g.: "modformh,16"
    • "hex[,param]" to display the value as hexadecimal, with an optional parameter for the size, e.g.: "hex,4".
    • "table,<tablename>" e.g.: "table,exttable". The table must be global.
  • or pass in 'false' as a boolean to display no text.
Text wont be displayed in button columns.

Furthermore both 'colorexpression' and 'textexpression' as a shorthand form string can have an additional expression at the beginning to have a condition when to print text or color the cell.
Options for that are:
  • "onchange" to output when the value from the 'valueexpression' has changed sinced the last frame.
  • "when[,param]" to output when the value from the 'valueexpression' is equal to 'param', default 0.
  • "whennot[,param]" to output when the value from the 'valueexpression' is not equal to 'param', default 0.
  • "whenabove[,param]" to output when the value from the 'valueexpression' is above 'param', default 0.
  • "whenbelow[,param]" to output when the value from the 'valueexpression' is below 'param', default 0.
When one of those expression used alone for the textexpression shorthand form, it will display the value from valueexpression under the given condition. Like those:
  • "when,1;0xFF8040FF;0xFFFFFFFF" colors the cell when the value is 1 otherwise the cell is colored white.
  • "whenabove;dmg" prints "dmg" in the cell when the value is above 0.
  • "whennot" prints the values from 'valueexpression' when the value is not 0.

Examples:
AddPrinter("XVel", "XVel", "gradientabs,704,0xFFFF0000,0xFF00FF00,0,1.5", nil, 4)
AddPrinter("dXV", "diff,XSpeed,XSpeed", "whennot;gradient,64,0xFFFF0000,0xFF00FF00,-64;0xFFFFFFFF", "onchange" ,3)
AddPrinter("P1 Y", "WeaponsOnScreen", weaponcolors)

A finished script might look like this: UserFiles/Info/639020550928746688

#638757648157501502 - TAStudio Output Logger Demo Script

KirbyLogger.lua
155 downloads
Uploaded 2/21/2025 8:00 PM by TASeditor (see all 192)
For Kirby's Adventure.
Save this script into the same folder as UserFiles/Info/638757645500544857.
Load KirbyLogger.lua into the Lua Console.
Open TAStudio and run the script.

#638757645500544857 - TAStudio Output Logger Framework

TAStudioLogger.lua
114 downloads
Uploaded 2/21/2025 7:55 PM by TASeditor (see all 192)
A framework to streamline logging memory values and outputting them in TAStudio and saving and loading them with branches as well as script starting and closing.
Version 0.9, not fully done yet. Runs in Bizhawk 2.10

To get started:
This script is not meant to be run in the Lua Console!
Save this lua script in your lua folder and make a new empty lua script.
In the new script copy the following:
require("TAStudioLogger")

-- Add your loggers. e.g.: AddLogger("XSpeed", function() return memory.read_s8(0x1234) end)
-- Or AddLogger("Grounded", function() return memory.read_u8(0xABCD) & 2 end)

-- Add your printers, e.g.: AddPrinter("XSpd" "XSpeed", function(index, value) return ColorGradient(index, math.abs(value), 100 0xFFFF0000, 0xFF00FF00) end)
-- Or AddPrinter("P1 A", "Grounded", 0xFFE0A3014)

InitializeLogger()

while true do
	
	UpdateLogger() 
	
	-- Add your own usual lua functionality

	emu.frameadvance();
end
Load your scipt into the Lua Console and run it with TAStudio open.

#638735711231534860 - Kirby's Adventure TAStudio Logger

Kirby's Adventure.lua
157 downloads
Uploaded 1/27/2025 10:38 AM by TASeditor (see all 192)
Branch comparision not working properly for some reason

#638148493737002445 - NES-Pack -8f

NESPack-v04_-8f.fm2
In 01:36.890 (5823 frames), 15520 rerecords
Game: NES-Pack ( NES, see all files )
222 downloads
Uploaded 3/19/2023 7:02 PM by TASeditor (see all 192)
-8f in One Way Door

#638147520972770742 - NESPack

NESPack-v04.fm2
In 01:37.020 (5831 frames), 12992 rerecords
Game: NES-Pack ( NES, see all files )
228 downloads
Uploaded 3/18/2023 4:01 PM by TASeditor (see all 192)
improved Collector by .05s, lost .28 in Kitchensink. The rocket after after second switch doesn't let me grab the gem. Conveyor is also a stage with much waiting involved.

#637895214307794367 - TAStudio Tetris lua script

TAStudioTetris.lua
System: Nintendo Entertainment System
239 downloads
Uploaded 5/30/2022 3:30 PM by TASeditor (see all 192)
You can now play Tetris in TAStudio.
Any NES game with 2 controllers plugged in. Open TAStudio. Playing field height is movie lenght.
Arrow key move the piece, Z and X rotate it.

#637878210941873737 - Beethoven - The Ultimate Canine Caper! (USA)

Beethoven - The Ultimate Canine Caper! (USA) TAS.bk2
In 04:28.610 (16143 frames), 70580 rerecords
273 downloads
Uploaded 5/10/2022 11:11 PM by TASeditor (see all 192)

#637878209001595255 - Beethoven - The Ultimate Canine Caper! (USA) lua script

Beethoven - The Ultimate Canine Caper! (USA).lua
239 downloads
Uploaded 5/10/2022 11:08 PM by TASeditor (see all 192)
Basic output logger. Press Comma and Period to change the branch.

#637845317771599773 - TAStudio output logger example script

Kirby's Dream Land 3 (USA).lua
250 downloads
Uploaded 4/2/2022 9:29 PM by TASeditor (see all 192)

#637838987827862295 - GBA LEGO Bionicle Lua Script

LEGO Bionicle (USA) (En,Fr).lua
Game: Lego Bionicle ( GBA, see all files )
235 downloads
Uploaded 3/26/2022 1:39 PM by TASeditor (see all 192)
TAStudio coloring, map generator and drawing it on canvas. Works on Bizhawk 2.3.2

#637838986040538042 - GBA LEGO Bionicle -60f

memory2-legobionicle.bk2 (1).bk2
In 07:06.540 (25476 frames), 64129 rerecords
Game: Lego Bionicle ( GBA, see all files )
237 downloads
Uploaded 3/26/2022 1:36 PM by TASeditor (see all 192)
-60f from published run after pushing the 2nd boulder onto the switch. Nothing else changed. May not be optimal.
Initially this trick was found when the first published run got submitted.

#52354090797179302 - Gimmick! lua

Gimmick!.lua
1065 downloads
Uploaded 1/5/2019 6:20 PM by TASeditor (see all 192)

#52354072408445236 - Gimmick! sections 1 and 2 WIP

Gimmick TAS.fm2
In 02:47.210 (10049 frames), 19052 rerecords
Game: Gimmick! ( NES, see all files )
1 comment, 940 downloads
Uploaded 1/5/2019 6:19 PM by TASeditor (see all 192)
5f in first section
+3f in second section, due to some time dependend behaviour of the game physics. If I delay 1f in first section I don't lose frames.

#51620369168057608 - Donald Land lua

Donald Land.lua
Game: Donald Land ( NES, see all files )
843 downloads
Uploaded 12/3/2018 5:17 PM by TASeditor (see all 192)
Output logging stuff

#50288574833160475 - Donald Land ACE generator

DonaldLand4playerACEgenerator.lua
Game: Donald Land ( NES, see all files )
825 downloads
Uploaded 10/4/2018 5:49 PM by TASeditor (see all 192)

#49956245481476145 - N64 Chameleon Twist Map collision lua script

Chameleon Twist (USA) canvas.lua
914 downloads
Uploaded 9/19/2018 6:37 PM by TASeditor (see all 192)
Some things not displayed correctly, due to scaling, yet.
Also better visualization for polygon heigth and steepness is needed.

#48887243862025673 - GBC Pokemon Platinum (bootleg)

Kou Dai Yao Guai - Bai Jin Ban TAS.bk2
In 02:14.930 (8059 frames), 30269 rerecords
939 downloads
Uploaded 8/2/2018 3:12 PM by TASeditor (see all 192)
-142f from published run, old one didn't use BIOS

#47426935381925227 - SAI v3.1 3-2

Super Adventure Island (USA) v3_1.bk2
In 15:59.900 (57689 frames), 350045 rerecords
987 downloads
Uploaded 5/28/2018 8:50 PM by TASeditor (see all 192)
  • -9f in 3-1 to v3.0
  • -18f in 3-2 to v3.0
  • -139f total to v3.0, -988f to published.
Project has been updated to BizHawk 2.2.2 and now starts on the same frame as snes9x.

#45830021035144282 - GB Lion King updated lua script

Lion King, The (USA).lua
939 downloads
Uploaded 3/17/2018 10:48 PM by TASeditor (see all 192)

#45830007688951778 - GB Lion King "king" WIP

Lion King, The (USA) TAS.bk2
In 05:52.970 (21082 frames), 34374 rerecords
865 downloads
Uploaded 3/17/2018 10:47 PM by TASeditor (see all 192)

#44847733385309806 - KDL3 unfinished lua script

Kirby's Dream Land 3 (USA).lua
1010 downloads
Uploaded 2/1/2018 5:06 PM by TASeditor (see all 192)

#42160205269731287 - Kao the Kangaroo finished

Kao the Kangaroo TAS new2.bk2
In 14:12.300 (50906 frames), 231203 rerecords
981 downloads
Uploaded 10/3/2017 4:18 PM by TASeditor (see all 192)

#41476169331335733 - Kao the Kangaroo World 3

Kao the Kangaroo TAS new2.bk2
In 14:42.120 (52687 frames), 182109 rerecords
860 downloads
Uploaded 9/2/2017 8:57 PM by TASeditor (see all 192)
Better damage boosts and clipping glitch + punch boosts

#40738458392079952 - Auto analog input lua (canvas path works)

AutoInput.lua
System: Nintendo 64
945 downloads
Uploaded 7/31/2017 3:36 PM by TASeditor (see all 192)
1 2
7 8