Page 1 of 1

AI to code scripts for Moho?

Posted: Mon Nov 02, 2026 2:01 pm
by Lychee
I know that as soon as the term "AI" is mentioned, especially in the artistic realm, people tend to bristle.
I am the first to criticize anything "generative" where no creative effort is made, and art is reduced to a quickly disposable commodity.

That said, AI can also be a tool to make life easier, in that context, I’ve recently been considering using it to help write LUA scripts.
Since I’m not a programmer and don’t have much time to dedicate to learning it, I thought this might be a way to finally bring to life some tools I’ve long envisioned but never managed to create myself.

Have you ever used "vibe coding" tools, and if so, have you considered applying them to Moho?
If you have any knowledge on the subject, I would love to hear your advice.

Re: AI to code scripts for Moho?

Posted: Mon Nov 02, 2026 3:56 pm
by synthsin75
Unless you're doing something very simple, I'm not sure I'd suggest someone with zero programming knowledge to use AI. But with at least a little programming experience or for fairly simple tasks, I think it can be very useful.

I've used Grok and Gemini, the free versions, to help code in Lua. It can save a ton of time, but there are also some huge pitfalls. Maybe these don't exist for paid-for and more purpose-built AIs. These free AIs sometimes forget which language you're programming in, for example, switching to Python while coding in Lua. They can "hallucinate" methods for the Moho API, and often need to be pointed back to mohoscripting.com several times. And they can cycle back to trying failed solutions they already suggested, like they forgot.

I even had one that kept reintroducing a bug, I repeatedly told it how to avoid, and altering working but unrelated code while being asked to make specific, isolated changes.

So in my experience, which is by no means extensive, it really helps to know enough to correct obvious mistakes these AIs are prone to. Or... I'm just too cheap to use a better, newer AI.

Re: AI to code scripts for Moho?

Posted: Tue Nov 03, 2026 2:00 am
by Lychee
The problem is that I have neither the time nor the motivation to learn programming.
Just the thought of looking at lines of code or learning a machine language makes my head spin.
The ability to use a human language to design programs is something that should have been invented a long time ago.

And yet, I have ideas that I believe might interest the community.
For instance, I have an idea for a tool, simple on paper, that could be a huge help in designing and manipulating "body turns":

https://www.lostmarble.net/forum/viewto ... 42#p222842

As you can see, I previously suggested this here to those who are proficient in coding, but it seems I wasn't able to convince them, which is why I now want to bring it to life using AI.
Having a script to create this type of tool would make my life a lot easier.

For now, I already know how to build a new types of body turns using current tools, but either it only works partially due to Moho’s limitations, or I can find a workaround, though that would come at the cost of significant construction complexity:

https://www.lostmarble.net/forum/viewtopic.php?t=38416

Re: AI to code scripts for Moho?

Posted: Tue Nov 03, 2026 8:49 am
by Maestral
Lychee wrote: ↑Tue Nov 03, 2026 2:00 am ...
The ability to use a human language to design programs is something that should have been invented a long time ago.
...
You're describing a translator.

There are so many translators available, enabling you to communicate with foreigners, but you would still not be able to write proper literature in that given foreign language. As Wes described, even though he's familiar with coding, the same applies here. As is, those "translators" are made by humans, and most likely humans experienced in coding. What are the chances that your prosaic descriptions will be translated successfully into the desired outcome?

Back in the Flash days of animation, a friend's friend wanted to give it a go with animation. He used Flash through coding and wanted to learn more.
I gave him a simple scene with simple shapes, depicted through a storyboard, made a few pointers on how it's usually done and gave him some room. After a while, he was significantly behind my expectations and didn't want any additional help. Next time I was more discreet, but he noticed me and asked whether he could do it his way. Sure.
In a flash, he was done, but he made it through coding.

Now, imagine this guy among other animators in a team or studio. I mean, it might work till some changes or adjustments are needed. And then, what?

Your examples are excellent and intriguing, but what do you think - how often would such rigs be deployed or required?
There are several webinars (not just for Moho) where production pipelines are explained thoroughly, and the impracticality of the 360 rigs was explained. In a couple of these, it was even seen as a not advisable route. I believe things should evolve and progress, but how well do you know the origin(s) of the Moho limitations? Could it be these, bothering you, are just
the tip of an iceberg? Perhaps we should just dust off our whips and charge at Moho developers?

The whole thing about "moving pictures" relies on optical illusion (xy fps), and you're troubling yourself with ironing wrinkles that were meant to be there from the very beginning.

On a side note...
I don't know if you have, but I have seen several 2D animations made with AI, and they looked great. I mean, only once I read the posted comments and pointers within, I realise it was AI. Even AI relies on these wrinkles x)

Re: AI to code scripts for Moho?

Posted: Tue Nov 03, 2026 9:20 am
by hayasidist
Lychee wrote: ↑Tue Nov 03, 2026 2:00 am The ability to use a human language to design programs is something that should have been invented a long time ago.
it was. it's called Cobol (first released 1960) and Cobol Report Writer (first released in 1963) and they were as close to natural language as the technology then allowed. (No I wasn't there to witness it, but I did have the dubious pleasure of using it some decades later.) They're still around today.
OK, so pedants will argue (and I'd agree with them) that it's not free-form natural language, but it does give some indications of how to approach the use of AI for writing programs - IOW avoid "natural" language because of its propensity for creating unforeseen ambiguities / misunderstandings and focus on using well defined keywords.

I've seen several cries for help about "my script won't work" which would be better stated as "I've typed my design requirements into my AI thingy of choice and this is what it generated, but it doesn't do what I expected it to do."
To which the answer is "re-specify your requirements in words that someone (something) that has some, but not complete, grasp of what you're saying can understand so that they might actually be able to translate what you want into code." (And, having spent time as a systems designer, I know how hard it is to write a specification that is correctly translated by experienced human coders into what you think you wrote.)

So, whilst the idea of cutting code might turn you off, if you actually want to be able to specify what a program has to do, you need the same skills of unambiguously defining (the task-appropriate mix of) sequence, selection and iteration so that your AI tool can correctly process your design; it's "programming" but just using a different (higher-level) language.


My bottom line on this (with today's AI): using AI today is as if you're talking to a teenager who kinda knows what they're doing but lacks the nous to tell you you're unclear (or just plain wrong), but it will interpret what you said as it thinks is right and will confidently present you with the finished "perfect" output. Which it almost always ain't.

(Fast forward a few years / decades - IMO, that teenager has matured and will argue rationally with you and it will deliver a more refined solution to the problem you've stated. But we're not there yet.)

Re: AI to code scripts for Moho?

Posted: Tue Nov 03, 2026 1:46 pm
by synthsin75
hayasidist wrote: ↑Tue Nov 03, 2026 9:20 am My bottom line on this (with today's AI): using AI today is as if you're talking to a teenager who kinda knows what they're doing but lacks the nous to tell you you're unclear (or just plain wrong), but it will interpret what you said as it thinks is right and will confidently present you with the finished "perfect" output. Which it almost always ain't.
That's also been my experience. AI confidently claiming every version is "complete and production-ready" when it is far from it.

Re: AI to code scripts for Moho?

Posted: Tue Nov 03, 2026 2:04 pm
by synthsin75
Lychee wrote: ↑Tue Nov 03, 2026 2:00 am The problem is that I have neither the time nor the motivation to learn programming.
Just the thought of looking at lines of code or learning a machine language makes my head spin.
The ability to use a human language to design programs is something that should have been invented a long time ago.

And yet, I have ideas that I believe might interest the community.
For instance, I have an idea for a tool, simple on paper, that could be a huge help in designing and manipulating "body turns":

https://www.lostmarble.net/forum/viewto ... 42#p222842

As you can see, I previously suggested this here to those who are proficient in coding, but it seems I wasn't able to convince them, which is why I now want to bring it to life using AI.
Having a script to create this type of tool would make my life a lot easier.

For now, I already know how to build a new types of body turns using current tools, but either it only works partially due to Moho’s limitations, or I can find a workaround, though that would come at the cost of significant construction complexity:

https://www.lostmarble.net/forum/viewtopic.php?t=38416
For scripts that complex, it could be very hard to even describe it to an AI, in a useful manner, without some understanding of the Moho API. But it never hurts to try, if you have the time and understand that it be will likely be frustrating and might not work at all.

AIs, like computers in general, are really pretty stupid compared to humans. They seem smart because they can look up huge amounts of information very quickly and often seem to offer good answers. But like with generative AI, you often have to tell it what "not to do," like creating deformed hands (even if this is hidden in the AI training). It's not smart enough to know that on its own.