Select Character?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
Hasu
Newbie
Posts: 5
Joined: Wed Jan 23, 2013 4:04 pm
Contact:

Select Character?

#1 Post by Hasu »

Just say u can choose one character from two main character pictures that u will play, but whoever character that u choose, the story will gonna be the same. Does anyone know how?
Thank you ><!

Blue Lemma
Forum Founder
Posts: 2005
Joined: Sat Jan 25, 2003 2:32 pm
Completed: ToL, Shoujo Attack!, Lemma Ten
Projects: [RETIRED FROM FORUM ADMINISTRATION - CONTACT PYTOM WITH ISSUES]
Contact:

Re: Select Character?

#2 Post by Blue Lemma »

I'm a little confused... Do you mean when you select a character, the only thing that will change is the name and/or side image/other graphics?
“Among those who dislike oppression are many who like to oppress.”
- Napoleon Bonaparte


I've retired from forum administration. I do not add people to the "adult" group, deactivate accounts, nor any other administrative task. Please direct admin/mod issues to PyTom or the other mods : )

Tsuyuri
Regular
Posts: 30
Joined: Thu Jan 03, 2013 1:57 pm
Contact:

Re: Select Character?

#3 Post by Tsuyuri »

mmm I think you need to make a variable (or what is the right term?) to show the specific images then, a standard and 'alternative set' so to speak~

please forgive my horrible coding (it was the first time I tried anything code-wise since that is done by someone else in my project) but here is a example
# The game starts here.

label start:
$ playchar = False
Narrator "Who will you play?"

menu:
"Character 1":
jump chartest

"Character 2":
$ playchar = True
jump chartest1


label chartest:
show eileen
e happy "Hey this is me!"

jump scene1

label chartest1:
show eileen

e concerned "But this is me if I picked the other me"

jump scene1

label scene1:
show eileen

if playchar:
e happy "It worked~"

e concerned "that it did"
what I basically tried to do was have the image that shown to be different depending on the choice you picked earlier (in this case poor eileen from the tutorial was used ^^) the difficult part is that for every text bit or event cg that would show up (or art of the protagonist in general) you would need to add the 'playchar' thing in this case.

so if you picked option 2 (your alternative character) it would show their art stuff (I guess you would need to make two versions of playchar, one for each~ so that the protagonist their text wouldn't show on the alt look protagonist if you were to play the alternative protagonist)

uguu... coding sure is challenging *nod nod*
*hopes someone more experienced can simplify the process~

User avatar
azureXtwilight
Megane Procrastinator
Posts: 4118
Joined: Fri Mar 28, 2008 4:54 am
Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
Projects: At Regime's End
Organization: Memento-Mori VNs, Team Sleepyhead
Location: Yogyakarta, Indonesia.
Contact:

Re: Select Character?

#4 Post by azureXtwilight »

I think it's easier to use condition switch. In fact, someone made a tutorial about it:

http://lemmasoft.renai.us/forums/viewto ... 51&t=19063
Image

User avatar
Hasu
Newbie
Posts: 5
Joined: Wed Jan 23, 2013 4:04 pm
Contact:

Re: Select Character?

#5 Post by Hasu »

Blue Lemma wrote:I'm a little confused... Do you mean when you select a character, the only thing that will change is the name and/or side image/other graphics?
hmm it suppose to be like this
Image
in the beginning player can choose one of the character, but the story will goes the same, only cg will make it different.
If name, I have found codes to let player choose their own name :)

User avatar
Hasu
Newbie
Posts: 5
Joined: Wed Jan 23, 2013 4:04 pm
Contact:

Re: Select Character?

#6 Post by Hasu »

Tsuyuri wrote:
# The game starts here.

label start:
$ playchar = False
Narrator "Who will you play?"

menu:
"Character 1":
jump chartest

"Character 2":
$ playchar = True
jump chartest1


label chartest:
show eileen
e happy "Hey this is me!"

jump scene1

label chartest1:
show eileen

e concerned "But this is me if I picked the other me"

jump scene1

label scene1:
show eileen

if playchar:
e happy "It worked~"

e concerned "that it did"
how does we define the playchar?
and should I define chartest and chartest1 too?
u right coding is really hard T T and thx a lot for the code, it's not horrible at all xd, it just my brain is loading slow 8D
sorry guys>< I'm really a beginner about coding

User avatar
Hasu
Newbie
Posts: 5
Joined: Wed Jan 23, 2013 4:04 pm
Contact:

Re: Select Character?

#7 Post by Hasu »

azureXtwilight wrote:I think it's easier to use condition switch. In fact, someone made a tutorial about it:

http://lemmasoft.renai.us/forums/viewto ... 51&t=19063
Though it is not what I meant, this code will be useful in the future :lol: thx a lot
aa!we come from the same country o.o

Tsuyuri
Regular
Posts: 30
Joined: Thu Jan 03, 2013 1:57 pm
Contact:

Re: Select Character?

#8 Post by Tsuyuri »

playchar and chartest were just examples I used~ in this case chartest is just a label to start a scene while playchar would show the additional expression of eileen

actually I think the condition switch they linked is what you're looking for~
image Hasu = ConditionSwitch (
"Hasu1", "Hasu1.png",
"Hasu2", "Hasu2.png",
)
if you were to use that you could pretty much make a condition switch that can serve for the purpose of altering the art of the heroine~

I'm interested in your situation because I got the same sort of scenario (but for me the story of the protagonists are different so I can do something simple like)
label start:

scene bg nightsky
Narrator "who are you going to pick?"
menu:
"Tsukino Emiko":
jump Emiko_intro

"Hasegawa Hayate":
jump Hayate_intro

label Emiko_intro:

Emi1 "It's me Emiko~"

return

label Hayate_intro:

Ha "It's me Hayate!"

return
basically for now I'll be using different labels what in essence would be simply a different version/variation of the script for each protagonist but this likely would be worth more effort than it's worth if only character art changes in your story, so perhaps finding someone who could help you define the condition switch you need to help get the character art for a character set (the above example would only show one image from the switch (the condition example I linked) so you'd need two condition switches, one for heroine A and one for heroine B, but how to 'trigger' the condition switch is something I don't know ^^

note: I'm just experimenting with ideas alongside you, better to wait for those with experience to pop in~


*tries to keep brain from being fried*

User avatar
Hasu
Newbie
Posts: 5
Joined: Wed Jan 23, 2013 4:04 pm
Contact:

Re: Select Character?

#9 Post by Hasu »

I still really need to explore. well I will try to figure it out, maybe it's also use ui function o.o. thx for sharing ur ideas Tsuyuri>< don't hesitate to come if I ask for more question ahahah. oh and I'm looking forward to your game.

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Select Character?

#10 Post by AERenoir »


Post Reply

Who is online

Users browsing this forum: No registered users