#TypeScript Transpiler and API

7 messages · Page 1 of 1 (latest)

vagrant tide
#

Hey @near palm, @trim pulsar, @obtuse glade , @hearty vortex and any other fellow Balatro enjoyers/devs.

I've been brainstorming some new big mod ideas and ways to enhance the Balatro modding experience and I think creating a TypeScript wrapper for the modding framework could be the move. (I like and know typescript much more than Lua. And its personally what I would feel most comfortable in, in terms of creating a easy to use/understand modding API)

The primary goal would be to provide a more developer-friendly experience for mod creators by taking advantage of TypeScript's static typing, top-notch IDE support, and powerful tooling while still working with existing mods. This wrapper should prioritize three key aspects:

  1. Compatibility: Ensuring seamless integration with existing mods and the Balatro game itself. (Ex: Missing Card art/assets/ 'ERROR' cards)

  2. Documentation: Once I write it, I'll go ahead and write up a detailed documentation sister site that will explain how to use the API and all of its features.

  3. API Design: An intuitive, user-friendly API that abstracts away the complexities of Lua and lowers the threshold of knowledge necessary to create cool mods. Ideally i want someone with no programming experience to be able to create their dream joker without having to learn how to program or use Lua.

#

I've been digging into the great work that StinkFire has already done on the Balatro TS project, and it's a solid foundation to build upon. The project structure, mod loading/unloading, event system, UI framework, and data management all pass my sniff test and look like a great starting point.

However, before i get hyper-focused on writing out the code, I want your opinions as modders/developers/players on a few things.

  1. Fork or Fresh Start: Should I fork StinkFire's project and build on top of it, or start from scratch to have more control over the design and implementation? What are your thoughts on the groundwork that he's layed out?

  2. Build Process and Tooling: What improvements can I/we make/want to the build process and tooling to streamline the mod development workflow? Are there any specific pain points you guys are experiencing?

  3. Any other opinions would be appreciated, things we like about what we have now, things we wish were different, etc.

I'm really excited to hear your thoughts and ideas on this and I'm looking forward to hearing back from yall and making something cool.

https://github.com/DigitalEthosGlobalGaming/balatro-modding-ts

GitHub

Contribute to DigitalEthosGlobalGaming/balatro-modding-ts development by creating an account on GitHub.

obtuse glade
# vagrant tide I've been digging into the great work that StinkFire has already done on the Bal...

Sorry for being super late

  1. I don't have the skills to tell you if the codebase is already well done or not :/

  2. The only problem I have with balamod is checking if injecting code is going to crash the game, maybe you can "convert" and pro check if code in going to work because it's a string. Being able to generate code that revert the injection would be really appreciated too

  3. As I said, I'm not competent enough to tell you what's wrong or good tbh (if you were talking about forking)

I have some questions too, will you base it on steamo or balamod or both ?
Also did it generate lua or are you using a TS/JS interpreter lib inside balatro?

#

I don't think my answer will help you much, but I've tried to do the best I can with my limited knowledge in TS

#

I don't think anyone here really knows how to do TS, I think that's why they didn't answer you sorry MenheraDown3

vagrant tide
#

It's no problem, me and stink will handle code, I appreciate you responding.

I think it'll be my main responsibility to handle the front end and documentation, Ive never written a transpiler before so the questions on how it functions on the low level and it's interactions with other mod loaders are gonna be better answered by @trim pulsar

trim pulsar