TASEmulators / TASEmulators/BizHawk
Allow saving new branches via Lua?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
Surprisingly, as far as I can tell, there's not a way to create a new branch past slot 10 via Lua. To me, there should be an explicit function that creates a new branch like the + button in TAStudio.
If there is a way, it's not well-documented. savestate.save is seemingly ignored by TAStudio. savestate.saveslot can save up to 9 branches 10 branches (oops, bug fixed --yoshi), but anything outside of the range 1 to 10 is rejected.
And then there is tastudio.setbranchtext(string text, [int? index = nil]) which "adds the given message to the existing branch, or to the branch that will be created next if branch index is not specified". For a better API, queued naming seems like it should be deprecated in favor of a parameter in a branch creation function.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs, especially tastudio.setbranchtext, then trace how the TAStudio + button creates branches. Confirm the intended Lua behavior for branches beyond slot 10 and how branch naming should work; done means the API supports that workflow and its behavior is documented or covered by the relevant existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, lua
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100