Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello! GL2 mod developer here. I was told about your mod by another friend of mine. Out of curiosity, I was wondering how you managed to get static poses working and how they adjust to OC adjustments? It's something I've wanted to implement into my own mod but I have to teach myself how to code in features. (Still learning currently ;-;)

I think it's so awesome how you managed to get them working! I would also like to have permission if I could study how you coded things in? I'm a visual learner so it would probably help a lot if I could study it to learn myself.

Thanks! And yes, happy to explain. The explanation is the whole trick and it's shorter than you'd expect.

A pose in GL2 is 81 numbers, the ones saveposestring writes. The mistake I made first - and the reason my mod chibified people's characters for a while - was thinking those 81 numbers are the pose. They aren't. Roughly half of them are the character: every xpos and ypos, every xscale and yscale, for hands, forearms, upper arms, thighs, shins, head and body. Plus the layer order, which is the very first number. Apply a preset pose as it is and you overwrite the player's proportions, their joint positions and their layer order with whoever the pose was originally made on. You get a different body doing the right pose.

So don't replace, merge. From the pose take the rotations, the skews and the hand shapes. Take everything else from the character being edited. That's the whole "adjusts to OC adjustments" part: the pose brings the attitude, the character keeps its body.

Two practical bits on top. I build the library for whichever character is being edited and rebuild it when you switch to another one, because the body numbers it has to wear are that character's. And I write the finished poses into pose slots the game isn't using and then tell the editor how many pages it has now, so the game's own picker draws them. That way I'm not faking a UI, I'm filling in one that already exists.

On studying the code: I'd rather not hand over the whole thing, but it would honestly be the least useful part for you. GL2MP isn't a modified GL2.swf - it's a separate program that loads the player's own copy and works on it from outside, so almost none of it would drop into a mod like yours. What transfers is what I just wrote.

Ask me anything specific though and I'll answer it properly, and if you get stuck on a piece, show me and I'll look at it. I'd rather do that than have you pulling apart a build.

One thing in return, if you don't mind: your team ships for Android. That's what people ask me for most and it's the part I know least about. Who should I be asking?

That's really fascinating!! And super insightful too! 

In regards to an android port, in short I use an app on my phone called APKTool M. I  send the SWF to my phone and use the app to look into the apk of GL2 and replace the SWF. 

I also clone the APK to make it a separate app and change the package name so it doesn't replace the base game. Tho I recommend making a custom keystore to there's no conflicting issues as that was a problem for Realms. I fully intend on making a tutorial on my YT for how I do that soon.

The only downside is I work with two files. One is the PC version and the other is the SWF extracted from the  mobile version. Unlike Gacha Club the PC version doesn't have everything mobile has as I'm sure you know.

That's really useful, thank you - and it tells me something I didn't realise. Your method repacks the game's APK because your mod is a modified SWF. Mine isn't: GL2MP is a separate AIR app that loads the player's own copy, and the AIR SDK builds Android APKs directly. So I'd ship my own app and never touch Lunime's APK at all, which also solves the copyright worry I had about Android.

Still plenty I don't know - how file picking works there, how it performs. But you just saved me from going down the wrong road. Do tell me when that YouTube tutorial is up, I'll watch it anyway.

Will do!! I'll reply to your comment when it's uploaded!