i've gotten this to work once before but i can't for the life of me remember how i did it since its been a little bit and i forgot to save the code, and every solution i find is for set player characters, but i have choices between a masculine and a feminine player character so i have to maintain that. i would also, if possible, like the option to be able to change expressions in between another character talking that isnt the player
i used these threads for help: viewtopic.php?f=8&t=28400 / viewtopic.php?t=29789
i pretty much specifically have a slightly modified (nothing except names) version of what OokamiKasumi posted.
i would prefer side images, and this code works so nicely for me because i understand how it works, i just need the side images to stay while other characters are talking and i can't quite figure out how to do that, and i feel like i'm missing something super simple.
i also tried adding something like this from the actual renpy documentation, but it just made the default character show up instead of the one that was chosen:
## Player Character
init:
$ yn = DynamicCharacter("pc_name",
image = "pc")
init python:
config.side_image_tag = "pc"
config.side_image_only_not_showing = False
getting side images to stay with character selection
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Re: getting side images to stay with character selection
side_image_tag should work as long as the image pc is itself dynamic.
Re: getting side images to stay with character selection
it DOES work, but it shows the pc when they shouldnt even be there, and again it only shows the default of male:
here i haven't even chosen which player character i want, and it shows him here
https://i.gyazo.com/25a567cfefd1d1d2131 ... 2faf6d.png
aaand this screenshot being when i picked the female option (as seen by "penny" as a default name), but the masc option is still there.
https://i.gyazo.com/feb30eb95325e03faa4 ... cd0f32.png
and if i have a "yn basic", it switches to the correct choice for that one line:
https://gyazo.com/326458dffe9ca78f2a9889c523f4221f
here i haven't even chosen which player character i want, and it shows him here
https://i.gyazo.com/25a567cfefd1d1d2131 ... 2faf6d.png
aaand this screenshot being when i picked the female option (as seen by "penny" as a default name), but the masc option is still there.
https://i.gyazo.com/feb30eb95325e03faa4 ... cd0f32.png
and if i have a "yn basic", it switches to the correct choice for that one line:
https://gyazo.com/326458dffe9ca78f2a9889c523f4221f
Re: getting side images to stay with character selection
Again, I don't know what your images look like so I can't say what the issue is, but it should work. *shrug* The fact that it works for the basic variant really points towards being an issue of image definitions rather than anything else.
Getting it to NOT show up should be similarly trivial -- you could show a null pc image (which will hide the side image when side_image_only_not_showing is True) or use a workaround character that doesn't have an image attribute.
Getting it to NOT show up should be similarly trivial -- you could show a null pc image (which will hide the side image when side_image_only_not_showing is True) or use a workaround character that doesn't have an image attribute.
Re: getting side images to stay with character selection
i don't know if this would be any help at all, i tried to look over it but nothing looks out of place to me but im not the most knowledgable person
so:
script.rpy
xLiveComposite.rpy:
so:
script.rpy
Code: Select all
## Player Character
init:
$ pc = DynamicCharacter("pc_name",
image = "pc")
init python:
config.side_image_tag = "pc"
config.side_image_only_not_showing = True
## Characters
# Jekyll and Hyde
define hj = Character("Jekyll", image = "jekyll")
define eh = Character("Hyde", image = "hyde")
define lc = Character("Lisa", image="lisa")
define lh = Character("Lucy H.", image="lucyh")
define gu = Character("Gabriel", image="gabriel")
# Frankenstein
define vf = Character("Victor", image="victor")
define hc = Character("Henry", image="henry")
define el = Character("Elizabeth", image="elizabeth")
define jm = Character("Justine", image="justine")
define tc = Character("The Creature", image="adam")
# Dracula
define cd = Character("Dracula", image="dracula")
define jh = Character("Jonathan", image="jonathan")
define mh = Character("Mina", image="mina")
define vh = Character("Van Helsing", image="van helsing")
define lw = Character("Lucy W.", image="lucyw")
define qm = Character("Quincey", image="quincey")
define js = Character("Jack", image="jack")
define rr = Character("Renfield", image="renfield")
# Start
label start:
$ gender = "male"
# Default; doesn't matter because it'll change with player choice.
#affection
#Affection points:
# Main Romances
$ hja = 0 #Jekyll
$ vfa = 0 #Victor
$ vha = 0 #Van Helsing
# Secondary
$ lha = 0 #Lucy Harris
$ ela = 0 #Elizabeth
$ lwa = 0 #Lucy Westenra
# Bad ends
$ eha = 0 #Hyde
$ tca = 0 #Adam
$ cda = 0 #Dracula
# gender
label gender:
scene bg street
show penny select at center
show penn select at right
with fade
menu:
"Now, who are you?"
"Masc?":
$ gender = 'male'
hide penny select with dissolve
show penn select at center with move
"Fem?":
$ gender = 'female'
hide penn select with dissolve
show penny select at center with move
# name
label name:
if gender == 'male':
$ pc_name = renpy.input("What is your name?", "Penn")
$ pc_name = pc_name.title()
$ pc_name = pc_name.strip()
elif gender == 'female':
$ pc_name = renpy.input("What is your name?", "Penny")
$ pc_name = pc_name.title()
$ pc_name = pc_name.strip()
# pronouns
default Their = "Their"
default their = "their"
default Theirs = "Theirs"
default theirs = "theirs"
default They = "They"
default they = "they"
default Themself = "Themself"
default themself = "themself"
default Them = "Them"
default them = "them"
default Theyre = "They're"
default theyre = "they're"
default TheyWere = "They were"
default theyWere = "they were"
label pronouns:
menu:
"I see! And your pronouns?"
"You use 'he.'":
$ Their = "His"
$ their = "his"
$ Theirs = "His"
$ theirs = "his"
$ They = "He"
$ they = "he"
$ Themself = "Himself"
$ themself = "himself"
$ Them = "Him"
$ them = "him"
$ Theyre = "He's"
$ theyre = "he's"
$ TheyWere = "He was"
$ theyWere = "he was"
"You use 'she.'":
$ Their = "Her"
$ their = "her"
$ Theirs = "Her"
$ theirs = "her"
$ They = "She"
$ they = "she"
$ Themself = "Herself"
$ themself = "herself"
$ Them = "Her"
$ them = "her"
$ Theyre = "She's"
$ theyre = "she's"
$ TheyWere = "She was"
$ theyWere = "she was"
"You use 'they.'":
$ Their = "Their"
$ their = "their"
$ Theirs = "Theirs"
$ theirs = "theirs"
$ They = "She"
$ they = "they"
$ Themself = "Themself"
$ themself = "themself"
$ Them = "Them"
$ them = "them"
$ Theyre = "They're"
$ theyre = "they're"
$ TheyWere = "They were"
$ theyWere = "they were"
"'I'm looking for [pc_name]. Did you see [them]? [TheyWere] driving [themself] to the hospital in Johnny's car. I wonder where [they] left [their] own car?'"
menu:
"Is this right? This can't be changed later."
"Yes.":
hide penny select with dissolve
hide penn select with dissolve
jump intros
"No.":
hide penny select with dissolve
hide penn select with dissolve
jump gender
label intros:
vf "victor frankenstein."
hj "henry jekyll."
vh "abraham van helsing."
menu:
"now choose who you want to start with"
"Victor":
jump frankenstart
"Jekyll":
jump jekyllstart
"Van Helsing":
jump vanstart
label frankenstart:
vf "words"
pc "words also :)"
vf "fds fddfifif"
menu:
"+3":
$ vfa +=3
jump vf2
"+2":
$ vfa +=2
jump vf2
"+1":
$ vfa +=1
jump vf2
label vf2:
if vfa >=2:
vf "words but AGAIN"
elif vfa <=2:
vf ":/"
return
label jekyllstart:
show hyde smirking
eh "fsdosdhfdf"
pc basic "fdshoudff"
pc "fdhouhdffdouhfdsohfsdohfdhfdf{w}fsdfd"
eh "vcovcuvcv"
eh "fdhofudhfdhff"
eh frowning "fdhouhdfdf"
return
label vanstart:
return
Code: Select all
init-1:
image side pc = "masc basic.png"
#This is yet another preset to keep from getting an error.
# ----------------------------------------------------
image side pc basic = ConditionSwitch(
"gender == 'female' ", Image ("fem basic.png"),
"gender == 'male' ", Image ("masc basic.png"),
"True", Image ("masc basic.png"),
)
Re: getting side images to stay with character selection
Well, yeah. So when side pc (which is a straight image, not a ConditionSwitch) should be showing, it's showing. It's behaving as it should.
Basically, make sure all pc images are ConditionSwitches. Use a dummy pc image to stop the side image from showing up when needed.
ETA: To elaborate just a little further, since you seem unclear on what side images actually do:
automatically shows the image side pc as a side image.
automatically shows the image side pc basic as a side image.
As you can see in your code, side pc is set to "masc basic.png", not a ConditionSwitch. side pc basic is a ConditionSwitch, which reacts to your variable. That's why one works and the other doesn't.
Basically, make sure all pc images are ConditionSwitches. Use a dummy pc image to stop the side image from showing up when needed.
ETA: To elaborate just a little further, since you seem unclear on what side images actually do:
Code: Select all
pc "fdhouhdffdouhfdsohfsdohfdhfdf{w}fsdfd"
Code: Select all
pc basic "fdshoudff"
As you can see in your code, side pc is set to "masc basic.png", not a ConditionSwitch. side pc basic is a ConditionSwitch, which reacts to your variable. That's why one works and the other doesn't.
Who is online
Users browsing this forum: No registered users