Skip to content

Post Mortem

Ars Paradox edited this page Nov 10, 2024 · 8 revisions

Post Mortem, Right

It's 12:11 AM as of writing 'this', but I really want to see this project to its conclusion.

Anyway, you're probably here from the Mod Page wondering why the hell would a mod requires an SDK.

So, ready for a Post-Mortem Rant from an Unhinged Maniac???

Why No Sane Developer Touched This Mod

And why the original dev was a freaking mad lad

See, you might think that the hard part would be the GUI... I think so too when I tried this. I thought that this mod is just some obscure niche and people just don't care enough about it.I mean, it could be part of the reason, yknow? So like, I thought to myself...

How hard can it be right?

I thought the hard part would be the GUI. It's, well, it's certainly custom and not really supported by Minecraft.

But uhh...

Ahaha... Oh boy, it's not about the GUI, GOD it's not about the GUI.

You know the fun part about the Mob Talker Mod? Users can create their own script. You know, the script, like Renpy's .rpy file.

Give it away Andr

Screenshot 2024-11-03 202431

So yeah, you have to recreate THAT if you want to revive this mod. Create a scripting language that can Interop with JAVA, in MINECRAFT. This is the single, most Hostile environment to run anything other than a sandbox game. Like, oh my god...

So you know what that means for me?

That's right, I have to make a Fucking DSL That Interops With Java

See, a sane experienced well adjusted developer would have a better use for their time than attempting to pull something like that. Hence why this project is abandoned. There's just... no reason to put all that work on creating a DSL specifically designed for minecraft only for it to become obsolete the next year when Minecraft decided to switch from Posestack to GuiGraphics to handle rendering. FUCK!

How Lua Made Me Question My Sanity

And How I Developed A Deep Hatred For Java

Anyway, despite the red flags, I push on blindingly with Zero Experience in Java. I look for the most obvious answer. Use another Scripting Language made by people who are obviously smarter than me.

LUA

So, I decided to try and get Lua integration. I mean who doesn't like Lua? Every game uses Lua, even Roblox use Lua. It's simple, lightweight, and perfect for a lot of things.

So I decided to try and get Lua to interop with Java.

Once again, I discovered why NO ONE attempted to revive this mod.

Lua is a bloody Interpreted Language and Java is Compiled Langauge. You know what happens? THAT'S RIGHT!!!

STACK OVERFLOW, IN JAVA

That just doesn't happen. You don't get a Stack Overflow in Java. If this is a game, I deserve an achievement. how BADLY do you have to FUCK UP to get a Stack Overflow in JAVA?!

Anyway, turns out, Java tried to run everything in the script at once and it's near impossible to tell it. "Jesus fuck, slow down, holy shit, wait for user input dammit!"

Anyway, after about 4 days trying to get Lua and Java to interop nicely...

I failed miserably!!! Did rollback like 4 times, immortalized my failure with a branch called Luaing. Because not only Lua doesn't play nice with Java, MINECRAFT ITSELF messes with the Path file, because once the game is started, all those files gets sent somewhere else.

And the 'require' to import stuff thingy in Lua just doesn't work. Because again, pathing in Minecraft is FUCKED

Holy shit... This is hard...

Dark Knight Of The Weeb

And All Of Google's Lies

After the failures with Lua. I take a step back and think clearly...

See, I thought I can do Java because I have Kotlin Android Programming Experience. BUT NO, GOOGLE LIED TO ME!!! Google said 'Aww, look at you, so smart being able to use LiveData and ViewModel correctly', WELL GUESS WHAT!?

That shit is premade!!! I know NOTHING about Inheritance, Interface, and all the concepts of OOP. I just know how to make an android!

So in other words...

I have no experience in Java I have no experience in Lua

People smarter than me, godlike modders out there, must have attempted this and they all failed.

So you know what? There's no fucking way I can do this.

So I closed IntelliJ and gave up.

...

Is what I would do if I'm a well adjusted human being with a healthy sleeping schedule and an actual life. But I am a degenerate who wants to turn Minecraft into a Galge game.

Python My Lord And Savior

And How I Fixed My Relationship With Json

So I think about it some more. Obviously, people smarter than me have tried to interop Java with Lua and none of them succeeded/have better things to do with their life.

So I open up VS Code and turn to the language that I am somewhat fluent in. Python.

I decided to make a Visual Novel engine in Python and then reverse engineer that to Java. I took a peek at Renpy and tried to do it differently.

See, I need to compile this shit. This script needs to be compiled to something, because java has no patience and wants everything compiled.

That's when it came to me,

Finite State Machine

That's PURE FUCKING DATA

No syntax, no bullshit integration, just DATA

So there it is, I just have to create a bunch of python function resembling a Scripting DSL that can then be transpiled into a BEAUTIFUL JSON FSM.

Yeah, just an FSM in Json, have Minecraft read FSM.

EASY RIGHT!?

NO IT'S NOT!!!

THIS MEANS I HAVE TO MAKE A DEVELOPMENT FRAMEWORK AND AN SDK!!!

This is a Whole Ass FRAMEWORK for Single a Minecraft Mod. Holy Fucking SHIT! Who the fuck has the time to do this?! I'm not stupid enough to put this much effort on a mod!!!

Jesus...

A Tool For Everyone

How Hard Can It Be~?

Anyway, yeah, so I make an SDK. I designed a nice little Scripting Language made out of some Python Function and witch craft... It looks like this:

vn.initialize()
    vn.start()
    vn.label("start")
    vn.show(c,"normal")
    vn.say("???","Hmm?")
    vn.say(None,"The girl standing before you was strange. She looks like a human wearing a creeper hoodie, is she lost?")
    vn.say("???","Oh, a player, hey")
    vn.choice({
        "hi": "Hi?",
        "who": "Who are you?",
        "engarde": "EN GARDE!!!"
    })

    vn.label("hi")
    vn.addVar("aff", 5)
    vn.show(c,"happy")

Oh beautiful isn't it? It then transforms into an FSM using some backflipping code and all that jazz. I don't want to relieve it, god finetuning this sonnuva bitch is the worst...

Like, there are 4 versions of this FSM, 2 were written by an AI before I grow enough braincell to ditch AI and do it myself. The last version looks so hacky it felt like it's hanging by Ductape and Prayers. But it works.

Anyway, so, yeah, since I have made an SDK, I have to straight up make a VN Engine, in Python. Yknow, for debugging.

It's fun, don't get me wrong. (It's not, why did I pick this for my first java and mod project? Why can't I just make something normal like a big sword mod?)

In any case, I've finished the SDK. Now to recreate the thing in Python into Java! Of course, it's gonna be so easy, because I already have the code in Python, making it in Java should be a breeze!!!

That was sarcasm. It's just another nightmare.

Sunbathing In The Edge Of Hell

How It Feels Like To Sidestep A Problem

Minecraft just LOVES to play hide and seek with all my files. Like holy shit, you can FORGET how path file works because everything is no longer where you put it. Config file, Asset directory, have I mentioned that the render texture method only works on stuff in Asset Directory?

Integration with Minecraft is painful, oh my god, thank fuck I didn't even attempt to do Lua integration if getting Java to read plain Json would become this sort of nightmare...

Not to mention debugging and testing. Having to wait sixty seconds to boot up minecraft just to see if the code runs? Yeah, fuck no, I'd like to have as little as that please.

But in the end, I fucking did it. And holy shit, I can't believe I put this much work for a mod...

Then I play it

Then realized...

Oh no, the UI doesn't support Multi-Character Support... And it's impossible for script maker to tell the engine where to put images, scaling, oh no....

FUCK!!!

GOD, THIS IS A NIGHTMARE!!!

Why is this a thing!? Why can't Minecraft Be Normal!?

Playing Tetris On A Render System

Blit Go BRRRR~

Anyway... I bang my head again trying to work this out...

I suck at math, so, let's not do math... I'm not even going to try to understand how those calculations works.. Not to mention that I need to make an EASY way for Script Maker to put pretty anime waifus on screen!!!

Okay... I do have to use math...

 ___ ___ ___ ___ ___
|___|___|___|___|___|
|___|___|___|___|___|
|___|___|___|___|___|

Okay so, all images and all screens will be defined by their aspect ratio WxH

And like, there we have a 5x3 screen

And like... 3x2 images means that it looks like a horizontal lego brick

So now I just have to make a logic that fits the thing in this thing

Because there's only so much way you can fit a 3x2 images inside a 5x3 rectangle

Yeah...

So in the DSL, determining position should be like:

(Screen Ratio, Size, Coordinate Position) -> (5x3,3x2,2x1)

OR

(Preset) -> (LEFT)

 ___ ___ ___ ___ ___
|___|HHH|HHH|HHH|___|
|___|HHH|HHH|HHH|___|
|___|___|___|___|___|
Pictured (5x3,3x2,2x1)

And then I code the calculation in Minecraft!! Whatever that Blit BS is...

So after way, way too many times rebooting minecraft, I fuckin did it. A Grid Based System exactly like I envisioned. It skipped all the pixel measurements and whatever the fuck, and just... (3x5,3x2,2x1) and done. You want something more detailed?

(16x9,5x8,7x1) This the default Center Sprite positioning + dimension

(16x9,5x8,3x1) Left

(16x9,5x8,11x1) Right

Anyway, ya'll script maker don't have to worry about custom positioning for the standard vertical anime girl cute sprite. Somewhat...

Script Writing

Embracing That Degenerate Life

It's really done and honestly, I'm spent. I think I will settle with just this. I will now do what I was supposed to do, creating a Mob Talker Script.

My Masochist Ass is working on Animation and Custom GUI System right now...

I have no interest on making a PG or Safe version of this script. Nah fam, I'm here for degenerate purposes. That's why I am NOT claiming that there will be a 'default' or 'official' script

There will be no official version of this mod. Everyone is free to fork and contribute to this mod. Make wild things everyone, stuff that will make Microsoft Regret Ever Making Minecraft Their IP.

With Chaos and Mayhem

Signed - Iteranya, A Humble Toy Maker