Monika-After-Story / MonikaModDev

DDLC fan mod to extend Monika
http://www.monikaafterstory.com/
Other
1.18k stars 689 forks source link

idea/development helping #3182

Closed tsmafterlife closed 5 years ago

tsmafterlife commented 5 years ago

I know that this has been discussed on several different issues and opened threads on adding things to the room like pictures and different things. monika finished complete

i drew this and it brought me back to this conversation because i think it be cool to take a picture like this and downsize it and almost frame it and put it into monikas classroom. it would open up new stuff. but it brings me back to exactly how to do this. i know python and have worked with the base template that MAS uses but i do not exactly know how you guys get images to stay at a constant like the calendar and i doubt you code the calendar to be in every text. so my question is how would it be gone about. id code it and see if i can make it work for you guys and i know its something the community probably wants. kind of like your accessories post and how this topic has been discussed a lot. it cant be to hard its done for the promise ring and the plushy but not with classroom related pictures? Granted not everyone will want the same picture, but it cant be to hard to make where if you put a picture like the one i did and size it correctly and put it into a monika after story specific folder where the game reads it and adds it to the wall. even if you can only have one at a time. if the game can register gifts why not register a picture frame?

ThePotatoGuy commented 5 years ago

marking as duplicate of #312

get calendar on the wall

This is done with a custom screen that is added as an overlay. This is only because the calendar is clickable. A non-clickable item would be just added as an image, but there is no generic way of doing this (like how accessories are). All classroom visuals (like bday/o31/d25 stuff) are manually shown.

promise ring / plush vs classroom related pictures

All accessories are composited into Monika's sprite. This is so accessories move along with the sprite when opening talk menu/playing games/etc. If the picture is on the desk, then it makes sense as an accessory. If it's on the wall, then it cannot be an accessory cause that would break upon movement. This is also why when empy desk is shown, accessories are not, because empty desk is a separate sprite instead of a mode of Monika's sprite.

add pictures to the wall

I imagine its doable, but it's certainly not straightforward. Dynamically adding images is easy, but determining width/height and scaling appropriately is not, as far as I know. Would have to check if renpy stores metadata along with image objects. If not, then the other option is rendering each image to get its size, but that would be a performance nightmare on startup. Or perhaps we could use an external lib to get image metadata, but that could be even worse for perf if the lib is huge.

register gifts vs pictures

Gifts are detected solely by filename. The actual content of the gift doesn't matter, because actually checking if promisering.gift contained something ring-like isn't worth the time. The idea is that users could give whatever, and as long as the name matches, Monika would accept.

Pictures, on the otherhand, would not only need to be detected via filename, but also content/metadata to ensure that its actually a renderable picture. This is probably not too difficult to do, could potentially catch a renpy.show exception, but if that function doesnt actually handle the loading of the image, then we'd have to figure out some other way to test images before attempting to show them in-game.

So to sum:

  1. no framework for loading and showing pictures dynamically currently exists
  2. no confirmed way to test loaded images/prevent image crashes if given invalid images yet
ThePotatoGuy commented 5 years ago

and to clarify, the actual sprites for accessories are in the mod_assets folder, they are not added via the gifts.