[DevLog #3] On Cosmetics


Hi, cuties! Glimmer here. It’s been a while, hasn’t it?

One idea Canni had early on for Cosmic Latte was that the characters should have alternate cosmetics (think: skins) that can be used for different occasions. For example, we have a Halloween analogue that we’re calling “Nightmare”, and characters that are attending this can have their own fun costumes. Or, why not have a fancy outfit for a formal dance event? How cute would that be!

Ren’Py is pretty robust when it comes to implementing this kind of concept. You can have a displayable that can change based on a Python function, and conditional switches that can decide which image to show at a given time. These are both very powerful indeed, so let’s think about what else we will need to do with this system…

Well, we want to be able to do cosmetic switching on the fly. And we want to be able to do it when new cosmetics are added, even ones that the base game don’t know about. Mod support is one of the top priorities for CL, so it’s really important that that one wacky Romana skin where she’s dressed as Jolyne Cujoh will just… work. Even with your three year old save file from day one.

And, of course, I want to make it as seamless as possible for the team to work with when writing scripts.

The dynamic displayable is really cool, and in fact it should be able to get the job done! I created a function which takes the character, and their current expression/emotion. It will then check their selected cosmetic, and return the relevant image path. Then, I set up a function that will initialize every character with a dynamic displayable that calls this function.

Now when you show a character (using a normal show statement), it will magically show them in the correct cosmetic! And all a script writer has to do now is set the current cosmetic, and the images will immediately change. User added cosmetics will also have to insert their cosmetic into the global cosmetics list for them to work this way. Overall, I’m very pleased with how it works.

The performance didn’t seem to be too hindered by this new system. I’m impressed with the robustness of the engine. The only thing I had to do was disable an honestly great feature of Ren’Py– image prediction. With Ren’Py constantly trying to predict what is essentially a moving target, it was doing a lot of unnecessary image loading. But, once I manually disabled prediction for the character images specifically, everything was working smoothly.

Getting the actual DLC/mod content working was a whole other story, though…

Anyways I know this was a bit of a ramble, but I just wanted to share a really cool feature of Ren’Py, and how we are managing to use it in Cosmic Latte. Love you all, and I hope to share more soon! <3