Skip to main content

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

Update done. Should be MUCH easier to code for now

Hi again! So i figured asking would be better than bashing my head against a wall but: im curious as to how one would go about having an unknown contact become a named one without making a new contact. if it's something you also don't know don't mind it, was just a curiosity.

Set the name of the 'member' to unknown, then later, just replace that member with one with a name. So create it with the name unknown, then later remove it and replace it with one with a name. 

The name of the contact is made by checking all the members keys, and just using the one that isnt you. So if a conversationg has two members: 'mc' and 'unknown', and the phone owner is 'mc' the contact is 'unknown', as thats the one that doesnt match the phone. If you then remove the unknown member and replace it with a member called 'sarah' it will now use that as the contact name. 

But as youre still using the same conversation, just changing the other member, it will still keep all the history. 

Let me know if you need an example in code, im just on my phone atm so cant do one right now.

(3 edits)

Here, throw this in (change the member name of 'mc' if that isnt your phones name) and it will add a convo with a changing name:


default unknown_convo = [

    {"ember":"Hey"},

    {"mc":"Hey who is this"},

    {"ember":"Ember"},

    {"mc":"OH! Ill update your name"},

    {"code":"""

mc_ember_convo['members'].pop('unknown', None)

mc_ember_convo['members']['ember']= {'profile':'addaprofilepic.png'}

"""},

    {"mc":"done"}

]

default mc_ember_convo = build_conversation(

    unknown_convo,

    member("mc"),

    member("unknown", profile = "test/mc_profile.png")

)

You can obviously replace it from wherever you want, i just showed it being done in the phone here. 

oooh! got it! thank you so much! ^^

so i didn't want to make a whole new comment to ask this but, i know there's the code: allow_continue = True to use in order to get to a label that you used in the old demo, but i was wondering if there was another that could be used.

i'm trying to switch between regular renpy labeling & dialogue and the phone. i'm making it where you need to check the phone conversations in order to continue with the renpy portion.

i'm probably making it more complicated than necessary aha... ;;

Do you have the latest version? In test_char_4 there are 3 examples on how to do this :) Not all of these functions exist in older versions. 



Noticed right after I sent the comment. I've been tinkering with it and found something that can work. Thank you for all the work you've been putting into this!

Also, somewhat unsure if I'm the one making a mess of the code you presented but I've noticed that after I did the contact name change, whenever I leave the chat, it shows this instead of the changed name "Junichi"

Its been changed to a group chat so its using the group chat name, this means there is either 1 member, or 3+. Make sure that when you remove a member you add another one, and if you add another one you remove the original one. If you shift+o for the console (this causes a rollback so make sure you click to advance dialogue once before you do) and type conversation_name['members'] (obv replace conversation_name with what its actually called) then it will print the members out for you, and you can check.

Ah, I feel like I'm going crazy. I know I saw in a rpy file there was a way to add a new contact in without having them there originally from the start but now I can't find it to reference. Could you provide the code again, please? I feel bad that I keep bugging you with such little things :(

Its in this comment thread :) Scroll up a little ^ 

(2 edits)

Just to add, ive created some helper functions to add a member, remove a member, and rename a member. Will be in the next release, so should be a lot easier soon :) If there's anything else you're struggling with, please let me know

I'd rather add helper functions for common use cases than have people getting frustrated :)

Oh no. I didn't mean the change the name. I meant let's say you start off with two contacts in the beginning, but then you make a friend later and want to add them in as a contact. names are changed to fit my story but i believe the original names were mc and kesash and this was supposed to add them in as a new contact

$ cliff_kiana_conversation['members']["mc"] = {"disable_messaging": False, "profile":"test/mc_profile.png"}