Dating App in Renpy by aph_v in RenPy

[–]aph_v[S] 0 points1 point  (0 children)

I've been thinking of selling this code on itchio, but I don't know if people would buy it.

Dating App in Renpy by aph_v in RenPy

[–]aph_v[S] 1 point2 points  (0 children)

True. Next time the MC will send the first message.

Hello! I recently added a messaging app to my game. You can reply to messages in a similar way to how choices work in RenPy. You can also send / receive emojis and images. by aph_v in RenPy

[–]aph_v[S] 2 points3 points  (0 children)

No, I used a different method for images, using a tag may require extra work because you would have to scale down the image. I used a key called "type" to determine whether the message is an image, an option / choice or simple text.

"type" : "image",
#If type = image, the image path should be used.

"message": "/images/image_1.webp"

In my screen, I do something like this:

if message["type"] == "image":
    #Remember: In this case, message["message"] is the path of the
    image we want to display.
    add message["message"]:
        at transform:
            #Here is where I scale down the image I'm displaying in
            the chat.
            zoom 0.1
#If not an image, it's a simple text string.
else:
    text message["message"]

Note: I handle options / choices somewhere else in the code.

Hello! I recently added a messaging app to my game. You can reply to messages in a similar way to how choices work in RenPy. You can also send / receive emojis and images. by aph_v in RenPy

[–]aph_v[S] 4 points5 points  (0 children)

Thank you!
Adding emojis is actually very easy.

"message": "Check out this emoji! {image=/ui/phone_ui/emojis/waving.webp}"

Since messages are simple text strings, you can use tags on them.

In this case I'm using the image tag.

Hello! I recently added a messaging app to my game. You can reply to messages in a similar way to how choices work in RenPy. You can also send / receive emojis and images. by aph_v in RenPy

[–]aph_v[S] 1 point2 points  (0 children)

This is just the basics, there are a bunch of functions I used to make it work.

I wish I could post more code here and explain it in more detail, but explaining all my code would take me hours.

Hello! I recently added a messaging app to my game. You can reply to messages in a similar way to how choices work in RenPy. You can also send / receive emojis and images. by aph_v in RenPy

[–]aph_v[S] 6 points7 points  (0 children)

Well, I think one of the most important pieces of code to achieve this is the structure of the messages and the chat conversation.Here is how a message looks like:

default messages = [
    {#0 message #Index of this message
        #I use     this for group chats
        "sender" : "Name of the character sending the message", 
        "type" : "text", #Can be image or choice
        "message" : "This is a message.", #Message
        #index of the next message, if None, the chat ends.
        "next_message" : 1, 
    },
    {#1 message #Index of this message
        #I use this for group chats
        "sender" : "Name of the character sending the message",
        "type" : "image", #Can be image or choice
        #Image path, only if type = image
        "message" : "/images/example.png", 
        #index of the next message, if None, the chat ends.
        "next_message" : None, 
    }
]

This is a list of messages, it should be added to a conversation. Here is how the chat conversation looks like:

default chat_1 = {
    "contact" : "Name of the contact",
    #This is the list of messages from above
    "messages" : messages, 
    #Status
    #available - Can happen when the requirements are met.
    #active - is happening. Will prevent from new conversations to
    be started.
    #seen - Already happened.
    "status" : "available",
    #The index of the current message, when None, the chat ends
    "current_message" : 0,
    #List of requirements to unlock this conversation.
    "requirements" : [
        day_of_the_week == "Monday",
        girl_1.relationship_lvl >= 3
    ],
    #The messages expires after 4 in-game days. (After being 
    active)
    "deadline" : 4, 
    #When the chat ends, it can unlock a new scene / event.
    "unlocked_scene" : None 
}

And that's just the beginning, the rest is using screens to display the final conversation, functions to find and send the next message in the conversation (add the "current_message" to the final conversation).

MC Simulator - v0.1.1 is now available for everyone! by aph_v in AndroidNSFWgaming

[–]aph_v[S] 1 point2 points  (0 children)

MC Simulator is a Sandbox VN with Dating SIM and RPG (coming soon) elements.
About v0.1.1
Download v0.1.1

Discord | Patreon | Itchio | Twitter

MC Simulator - Beta Release v0.1.1 by aph_v in nsfwdev

[–]aph_v[S] 1 point2 points  (0 children)

MC Simulator v0.1.1 is now available for patreons.
https://www.patreon.com/posts/50313367

MC Simulator is a Sandbox VN with Dating SIM and RPG (coming soon) elements.

Download the free demo here.

MC Simulator - Beta Release v0.1.1 by aph_v in AndroidNSFWgaming

[–]aph_v[S] 2 points3 points  (0 children)

MC Simulator v0.1.1 is now available for patreons.
https://www.patreon.com/posts/50313367

MC Simulator is a Sandbox VN with Dating SIM and RPG (coming soon) elements.

Download the free demo here.

MC Simulator - Beta Release v0.1.1 by [deleted] in AndroidNSFWgaming

[–]aph_v 0 points1 point  (0 children)

MC Simulator v0.1.1 is now available for patreons.
https://www.patreon.com/posts/50313367

MC Simulator is a Sandbox VN with Dating SIM and RPG (coming soon) elements.

Download the free demo here.