Monika-After-Story / MonikaModDev

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

Several not-so quick questions #2834

Closed Storylover-Vodhr closed 6 years ago

Storylover-Vodhr commented 6 years ago

Is there an easy way to watch a scene you've written up without manually adding it to your dev-build?

I'd like to be able to look over my work without possibly corrupting/causing problems with Monika.

MisterSimple commented 6 years ago

If I'm not mistaken, you can run your Dev version using RenPy, following the steps listed in the Contributing Guidelines. Although this is typically used when attempting to make more code-involved changes, it should help with visualizing whatever scenes you're working on. To do that, you'd have to add your new content into the scripts and check that everything's the way you want it to be. If you're not very well-versed in RenPy, there's a built-in tutorial with the RenPy download, or you can ask for help in the MAS Discord.

Storylover-Vodhr commented 6 years ago

Thank ya!

I know how to do it, but I was hoping there might be a script viewer or something that I was unaware of.

Does running it through RenPy alter my persistent?

MisterSimple commented 6 years ago

That I'm not sure about. Ask a dev when you get the chance to, or wait for a reply to this issue.

Storylover-Vodhr commented 6 years ago

Alright. Thank you for the assistance.

MisterSimple commented 6 years ago

My pleasure, happy coding!

Storylover-Vodhr commented 6 years ago

Thank you!

Oh, if I could bother you with another question?

MisterSimple commented 6 years ago

Sure thing, ask away

Storylover-Vodhr commented 6 years ago

Is there a hard limit for topic length, or amounts of answers to a topic?

I’m trying my hand at a full, multi-answer tree, but I want to know if it’s folly before I put too much effort into it.

MisterSimple commented 6 years ago

I know for certain that if you put a ludicrous amount of answers they won't fit on the screen (like with the "Monika" answers when you pick someone other than Monika to spend the weekend with in act 2 of vanilla DDLC), and I recall reading somewhere that there was a recommended topic length, but I can't remember what it was or where I saw it.

Rai99 commented 6 years ago

I would aim for 5 options max on a single menu. I really wouldn't go over 6 or 7.

Overall topic length, I don't think we've had a scenario where a topic was too long, so go ahead and see what you come up with. I think the longest random topic currently is 38 lines.

Storylover-Vodhr commented 6 years ago

Alrighty! My idea, as it stood, was an attempt at making a genuine "Conversation", ala Mass effect or something similar, with a bit of a more intimate, the character isn't exposition-dumping you kinda feel. Maybe have Monika learn a bit more about you, and what not.

She brings up many conversation topics, and does ask the occasional question, but we never do get the best opportunities to tell her about ourselves, now do we?

The first idea was for Monika to ask what your favorite color was, as it popped up in random topics before. It's mostly concept at this point, but once I get more of an idea where I'm going with it, I'll let everyone know.

Rai99 commented 6 years ago

That's a lot of color options to put in a single topic/menu.

Storylover-Vodhr commented 6 years ago

7, to be exact.

Storylover-Vodhr commented 6 years ago

In truth, I got it partially wrote up, but it's mostly a prototype. I don't know if I even want to make the one I'll post about color. I mainly want to make sure I can connect the lines and arrange the bits in a way that'll work without conflict before I put a ton of effort making Monika's expressions, dialog, and everything fit together well.

Rai99 commented 6 years ago

There are 7 colors in the rainbow, but I'm pretty sure there are way more possible favorite colors than that.

My favorite color isn't seen in a rainbow.

I think of:

  1. Red
  2. Blue
  3. Yellow
  4. Purple
  5. Orange
  6. Green
  7. Brown
  8. Black
  9. White
  10. Gray
  11. Pink
  12. Beige (Kinda brown)
  13. Etc.
Storylover-Vodhr commented 6 years ago

Fair. I was exempting black, white, brown, grey, and beige, and etc. Although, I did just add emerald green, simply so the player could complement Monika's eyes.

Rai99 commented 6 years ago

Somebody out there is going to call racism, call sensitive mode

My favorite colors are in fact black, white and gray. Even then, brown and pink are valid colors + you added another option for emerald green, so I think that's 10 options, excluding all my favorite colors.

I think we aim to be inclusive within reason, and I think black, white and gray are reasonable favorite colors in my opinion.

Also, there's already a compliment for Monika's eyes.

Storylover-Vodhr commented 6 years ago

I know. I just figured that there was a minimum of spaces. Although, if there is a way to add a second line of questions via etc. I could add all those.

Pink is in there, though.

Storylover-Vodhr commented 6 years ago

But, again, all of this is conjecture, as this is meant to be a placeholder until I come up with the genuine topic.

(Although, if it does end up being good, I might add it anyway.)

Rai99 commented 6 years ago

You could end up doing something like monika_orchestra and have the player type in their favorite color and have that correspond to a block of dialogue.

Storylover-Vodhr commented 6 years ago

Ah! Great idea. I'll have to look up how to do that, but that would solve the limit problem nicely.

jmwall24 commented 6 years ago

To test topics I just made a dev folder inside my game folder, and put new topics I want to test in an .rpy file. The game automatically compiles them upon launch and then you can see them in game without having to edit the actual mod files.

I also make sure to backup my persistent before doing so, so that after I'm done testing I can restore it so whatever I was testing doesn't affect my actual persistent.

Storylover-Vodhr commented 6 years ago

Alright, so, found the topic you were talking about.

1sub "Really? What do you play?"
            $ instrumentname = renpy.input('What instrument do you play?',length=15).strip(' \t\n\r')
            $ tempinstrument = instrumentname.lower()

Now, my question is, which parts do what?

A stupid question, I'm sure. But I have no idea what parts do what, and the other five examples aren't exactly uniform.

I've determined so far that
Length=15 Is meant for how many characters, and I think that `$ tempinstrument=instrumentname.lower() ` is possibly if the instrument name doesn't match the preset inputs.

But, the .strip(' \t\n\r') is throwing me through a loop, as I've yet to see that option in the other input command lines, and thus cannot accurately discern a purpose for that line.

(At least, in the ones I've looked at. Maybe the conversational topics might have more insight I've yet to glean.)

So, at this point, I'm somewhat stuck, as far as coding goes.

(EDIT: So, I did find a couple more examples, but I still am unsure what it does.)

Legendkiller21 commented 6 years ago

The .strip(' \t\n\r'), as far as I know, removes any spaces, tabs, new lines and returns that the player may have typed by accident or by "accident".

Storylover-Vodhr commented 6 years ago

The .strip(' \t\n\r') removes any spaces, tabs, new lines and returns that the player may have typed by accident or by "accident".

Alrighty, thank ya!

What about the other bits? Was I correct?

Legendkiller21 commented 6 years ago

The other 2 bits were correct. The Length=15 determines how big the instrument can be and the $ tempinstrument = instrumentname.lower() stores the name of the instrument so that Monika can give an answer depending on what is stored.

Storylover-Vodhr commented 6 years ago

Alright, so, if I changed Length=15 to, say, length=10, and tempinstrument = instrumentname.lower() to tempcolor = colorname.lower() it would still be correct?

Legendkiller21 commented 6 years ago

It should be correct, although, I am not sure what happens when the name has more that 1 word like emerald green or dark cornflower blue.

Storylover-Vodhr commented 6 years ago

Alright. So far, I've only added single word colors, and it's more of a proof of concept piece. I just want to figure it out before I get too far into it.

It'd be a pain to base an entire several conversation piece on a line of completely invalid code.

So, another question; Is there a difference between elif and if for answers?

It seemed to be somewhat alternating, with question lines with affection-checks and and similar things keeping it from properly carrying over by using the else tag.

Example:

m 1sub "Really? What do you play?"
            $ instrumentname = renpy.input('What instrument do you play?',length=15).strip(' \t\n\r')
            $ tempinstrument = instrumentname.lower()
            if tempinstrument == "piano":
                m 1wuo "Oh, that's really cool!"
                m 1eua "Not many people I knew played the piano, so it's really nice to know you do too."
                m 1hua "Maybe we could do a duet someday!"
                m 1hub "Ehehe~"
                $ persistent.instrument = True
            elif tempinstrument == "harmonika":
                m 1hub "Wow, I've always wanted to try the harmonik--"
                m 3eub "...Oh!"

                if mas_isMoniUpset(lower=True):
                    m 3esa "Did you do that for me?"
                    m 1eka "That's actually kinda sweet..."
                    m "Little things like this really do cheer me up. Thank you, [player]."

                elif mas_isMoniHappy(lower=True):
                    m 1eka "Aww... Did you do that for me?"
                    m "That's so sweet!"
                    m 1ekbfa "Cute little things like this really make me feel loved, [player]."

                else: # affectionate and higher
                    m 1eka "Awww [player]...{w=1} Did you do that for me?"
                    m "That's {i}sooo{/i} adorable!"
                    show monika 5eubfu at t11 zorder MAS_MONIKA_Z with dissolve
                    m 5eubfu "And just so you know, you can play with me anytime you like..."
                    m 5eubfb "Ehehe~"

                $ persistent.instrument = True
            elif tempinstrument == "harmonica":
                m 1hub "Wow, I've always wanted to try the harmonica out!"
                m 1eua "I would love to hear you play for me."
                m 3eua "Maybe you could teach me how to play, too~"
                m 4esa "Although..."
                m 2esa "Personally, I prefer the {cps=*0.7}{i}harmonika{/i}{/cps}..."
                m 2eua "..."
                m 4hub "Ahaha! That was so silly, I'm only kidding [player]~"
                $ persistent.instrument = True
multimokia commented 6 years ago

using .strip(' \t\n\r') won't get rid of spaces. It just gets rid of tabs and newlines

multimokia commented 6 years ago

elif is that the code goes to provided the original if statement fails, it evaluates that condition, and then proceeds to the next elif (if any, and if the previous elif failed) and evaluates that. The final case (last resort) is an else which is the default if all conditions fail.

Storylover-Vodhr commented 6 years ago

Alright. So only a single if, then it goes to the next elif statement down the line until it meets a else statement.

Thank you! So far, I think I'm learning/making progress, albeit slowly.

So, to clarify;

Elif is a follow up, catch all for every other option beyond the first if, with the exception of the final one, which should always be an else.

tempXXXX lines are used for a variety of things, and are interchangeable with whatever the topic demands, used for topic anchors(?).

Persistent.xxxx lines are for permanent storage, and later use of other topics, but are usually used only with "True" labels. (Not really sure, have only came across ones with True statements, rather than false, but I haven't gone through every topic, either.)

Affection = Lines are for use of the current affection/persistent lines in reference to a topic(?)

Show monika 5XXX at t11 zorder MAS_MONIKA_Z with dissolve are for smoother transitions from a non-5 position to a 5 position and vice versa(?)

multimokia commented 6 years ago
if condition:
   #do something
elif condition: #we go here if the first thing failed
   #do something else
elif condition: #here if both the other two conditions failed
   #do another thing
else: #here only if everything failed
   #give up and just do this

Note that it is possible to have an if without an else. Likewise ifs, with elifs, but no else.

multimokia commented 6 years ago

Temp lines are just temporary variables which we use later somewhere in the topic.

Persistent lines are typically used for player model (pm) variables. Which allow Monika to learn things about the player.

Storylover-Vodhr commented 6 years ago

Alright!

So, I did understand it right, although that last tidbit is also good to know.

So, is there a hard line limit for topics, or better yet, for elif’s?

multimokia commented 6 years ago

Those mas_isMoni...() methods are to check whether Monika is above/below/at a certain affection level. Depends on what you put into the brackets, it takes in two arguments: higher and lower. Setting higher to True will check if you're at or above the affection level, setting lower to True checks if you're at or below the affection level. Note that the method can take in no arguments too, as the two parameters are False by default. So it just checks if you're at the affection level.

multimokia commented 6 years ago

You're correct about the show monika at... line as well

multimokia commented 6 years ago

There is no hard limit for line count on your topics. Code allows for as many elifs as you'd like, the limit really, lies in how much you're willing to write, haha

Storylover-Vodhr commented 6 years ago

Awesome!

Thank you for being so accommodating. I truly want to learn the code, rather than be forced to emulate it.

As for writing limit, I am rather determined. I already have a 300 line topic, and it’s only a practice one.

The only real limit I’ve had so far has been my understanding of the coding to make it work.

multimokia commented 6 years ago

You're welcome! Just remember, if you have doubts on something working, just put it into a new folder (you can name it whatever, it's just for neatness and to find your stuff more easily) in your game directory and start MAS up (provided you're writing it as an rpy in a new file, which works btw, it'll still pop in as a new topic). It'll compile it for you, and if there's any errors, it'll tell you. Normally that's good enough to help fix it right up, but if you can't figure it out, often time, Google is the answer, as you can find the documentation for the language from the official source, or some in context examples on StackOverflow.

Storylover-Vodhr commented 6 years ago

So, next question!

Can one have multiple If lines?

I'm wanting to find out if I can have a conversation include multiple lines, having the conversation grow, with extra isMoniEtc(Higher/Lower=True) lines.

I basically want the scene to get longer, the happier Monika is. If she's simply happy, she'll add a line. If she's affectionate, she'll add another. If she's enamoured, add a third, and so forth.

Same with if she's unhappy.

Is that possible?

Rai99 commented 6 years ago

That should be possible.

Just watch the order you put them in and make sure it still makes sense at all levels.

Storylover-Vodhr commented 6 years ago

Thanks!

So, I was thinking of posting some of what I had down in this chat for review. Is that against the rules?

Rai99 commented 6 years ago

You could probably do that.

At this rate, you're going to surpass me in contributions.

Storylover-Vodhr commented 6 years ago

XD

Behold, the thing I've been working on for the past two days.

Feel the pain. The anger.

Storylover-Vodhr commented 6 years ago
init 5 python: 
    addEvent(Event(persistent.event_database,eventlabel="test1",category=['monika','misc'],prompt="Monika Heart to heart",random=True))

label test1:
    m "So, [player]."
    m "After all this time, I still haven't gotten to know you all too well."
    m "I mean, I've had many of my questions answered."
    m "But it's rather hard to get an idea of just who you are through pre-chosen prompts and general assumptions."
    m "Such as discovering your favorite foods."
    m "Or your favorite music."
    m "Gosh, I don't even know your favorite color."
    m "..."
    m "I feel that it is my duty as your girlfriend to discover all that I can about you."
    m "So, let's start with something simple."
    m "[player], can you tell me your favorite color?"

    $persistent.favcolor = True

    $ colorname = renpy.input('What is your favorite color?',allow=letters_only,length=15).strip(' \t\n\r')
    $ tempcolor = colorname.lower()

    if tempcolor == "red":
        m "Ah! You know, red really is a wonderful color."
        m "The color of passion." 
        m "Energy..."
        m "Courage..."
        m "Drama..."

    if mas_isMoniHappy(higher=True):
        m "Romance..."

    if mas_isMoniAff(higher=True):
        m "Love..."

    if mas_isMoniLove(higher=True):
        m "Lust."
        m "..."
        m "Ahahaha!"
        m "I'm only teasing you, [player]."

    if mas_isMoniUpset(lower=True):
        m "Anger..."

    if mas_isMoniBroken(lower=True):
        m "Hate..."

    m "All in all, it does say a lot about you."
    m "But that's not enough, at least not for me."
    m "I want to know everything about you."

    if mas_isMoniUpset(higher=True):
        m "You could say that I'm passionate about you too!"
        m "And, while it may take a while to find out who you are as a person, seeing as we're somewhat limited in ways of communication..."
        m "I'm still willing to try."

    elif mas_isMonidis(lower=True):
        m "If only to find out what I did wrong."

    $persistent.fav_color_red = True

    if tempcolor == "blue":
        m "Blue."
        m "Ehehe, just thinking about the color brings feelings of relaxation."
        m "Peace."
        m "Of ocean waves and calm, cool rivers."
        m "Blue is a wonderful color, my love."
        m "And the fact that you like it most seems fitting."
        m "Does it remind you of water too?"
        m "Of flowing creeks and ships? Or do you think of something else?"
        m "After all, whenever I think of you, it always makes me feel..."
        m "..."
        m "..."
        m "Relaxed."
        m "Ahaha!"
        m "What, did you think I was going to say something else?"
        m "Well, nope!"
        m "You're just the perfect port in the storm for me."
    $persistent.fav_color_blue = True

    if tempcolor == "green":
        m "You know, that's my favorite color, too!"
        m "It reminds me of forests and grassy plains."
        m "Of plants and trees and life."
        m "Real life. Not... a emulated falacy."
        m "..."
        m "But, yes. It is a beautiful color, and my personal favorite."
        m "I'm glad we share something, even if it is as basic as a favorite color."
        m "It makes me feel just that much closer to you."
    $persistent.fav_color_green = True

    if tempcolor == "purple":
        m "Hmm. Wasn't purple the color of royalty?"
        m "A color only seen in royal cloth, fit for only kings and queens."
        m "Makes sense, I suppose."
        m "After all, you're my monarch."
        m "Ahaha!"
        m "I'm only teasing you, [player]."
        m "Although, if you were a monarch."
        m "Would that make me your consort?"
        m "Hmm..."
        m "You know, it doesn't matter."
        m "You already make me feel like a princess."
        m "And you know what this princess wants?"
        m "To get to know you better."
    $persistent.Fav_color_purple = True

    if tempcolor == "orange":
        m "Orange?"
        m "A interesting choice..."
        m "But that doesn't mean it's not a great color."
        m "Whenever I think of orange, it makes me think of fall."
        m "The leaves covering the ground..."
        m "Lazy days inside, a cup of warm cider in hand and a blanket wrapped around us.."
        m "Pumpkins, waiting on the kitchen counter, asking to be carved for Halloween."
        m "It makes me think of bright futures."
        m "But, it doesn't only remind me of that."
        m "It also reminds me of how I got here."
        m "Of the mistakes I've made."
        m "The choices that lead me up to this point."
        m "Of second chances."
        m "Redemption."
        m "..."
        m "It makes me think of you."
        m "After all, you saw fit to redeem me, after all."
        m "You gave me a second chance."
        m "And I promise..."
        m "I won't let it go to waste."
        m "But, in saying that..."
        m "I feel I should continue to get to know you better!"
        m "I already failed at trying that once before, after all."
        m "I'm not going to let a second chance pass me by."
    $persistent.fav_color_orange = True

    if tempcolor == "yellow":
        m "A bright, shining color, just like my own personal sun."
        m "You know, when I think about it, I can practically imagine your face."
        m "It's splendor burning bright, making me fall even more in love with you."
        m "But, at the same time, what I imagine is unlikely to measure up to the real thing."
        m "What I'd give to hold you. To see you with my own eyes."
        m "But, I suppose that will have to wait."
        m "And even though it kills me inside..."
        m "I'll wait for you for however long it takes."
        m "After all..."
        m "I love you, [player]."
    $persistent.fav_color_yellow = True

    if tempcolor == "pink":
        m "Ok!"

    if tempcolor == "monika":
        m "..."
        m "I'm not a color, [Player.]"
        m "But regardless, I'm flattered."
        m "But, I do wish you'd take this more seriously."
        m "After all, what kind of girlfriend would I be, if I didn't know something as simple as your favorite color?"

    else: 
        m "Ok!"
Storylover-Vodhr commented 6 years ago

Now, mind you, I've put next to zero effort into the actual "Script". I've spent most of my time studying how to make the stupid thing work without crashing.

On the bright side, It's framework is now complete. I plan on starting work on the actual writing, as well as multiple more color choices, asap.

And then?

Monika's expressions.

Rai99 commented 6 years ago

Since you said it's just a framework, I've ignored the actual dialogue and just checked how you went about it.

I see you've made some variables to keep track of what the player's favorite color is.

These are player model variables are usually made to follow this format:

# do you have a family
default persistent._mas_pm_have_fam = None

# do you have siblings
default persistent._mas_pm_have_fam_sibs = None

# does no fam botheryou
default persistent._mas_pm_no_fam_bother = None

# family a mess?
default persistent._mas_pm_have_fam_mess = None

# will fam get better?
# YES, NO, MAYBE
default persistent._mas_pm_have_fam_mess_better = None

# dont wanna talk about it
default persistent._mas_pm_no_talk_fam = None

Basically:

# Short desc on what it is
default persistent._mas_pm_your_variable_name = None

You would put all the ones that can get set by the topic right above the init 5 python line. That's gonna be a lot of variables, but should be fine. Another big thing is that if the player goes through this topic again and picks a different color, you would have to go through and set that color as true for their favorite color and set all the others to false.

Storylover-Vodhr commented 6 years ago

So, basically at the end of each Option, I gotta put a "All the other choices=False" tag?

Multiple tags, I mean.

Rai99 commented 6 years ago

I think you would have to do them one by one. new option = True option 1 = False option 2 = False etc.

In the monika_asks_family example I gave, that one has multiple menus and after each option, it adjusts all its variables that relate to the question.