Advertisement
Sterkiherz

script

Feb 10th, 2024 (edited)
1,058
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 14.56 KB | None | 0 0
  1. #script code
  2. #--------------------------------------
  3. # The script of the game goes in this file.
  4.  
  5. # Declare characters used by this game. The color argument colorizes the
  6. # name of the character.
  7.  
  8. define e = Character("Eileen")
  9. define d = Character("Dog")
  10. define m = Character("Tuscon Rong")
  11. define m2 = Character("Tucson Rong", what_color='#add8e6')
  12. define s = Character("Mr. Sun")
  13. define n = Character(None)
  14.  
  15. define picked_up_ball = False
  16. define seen_ladder = False
  17. define threw_ball = False
  18. define dangans = False
  19.  
  20. # our main scene for this demo
  21. screen sun_n_friends:
  22.     imagebutton:
  23.         xpos 10
  24.         ypos 10
  25.         auto "mr_sun_%s.png"
  26.         action Jump ('sun')
  27.  
  28.     imagebutton:
  29.         xpos 200
  30.         ypos 200
  31.         auto "ladder_%s.png"
  32.         if seen_ladder == False:
  33.             action Jump ('ladder')
  34.         else:
  35.             action Jump ('seenladder')
  36.  
  37.     imagebutton:
  38.         xpos 800
  39.         ypos 400
  40.         auto "dog_%s.png"
  41.         action Jump ('dog')
  42.  
  43.     if picked_up_ball == False:
  44.         imagebutton:
  45.             xpos 90
  46.             ypos 500
  47.             idle "ball_0.png"
  48.             hover "ball_hover.png"
  49.             action Jump ('ball')
  50.  
  51.  
  52.  
  53.  
  54. label start:
  55.     # Here's where I'll declare my evidence
  56.  
  57.     # I've pulled out the multi-line evidence descriptions for the sake of readability
  58.     # That's not necessary, but do make sure that the info section is formatted as a list even if it's only one string
  59.     $ info_sun = ["This is the sun. Yeah, THE sun.", "Ironically, he's a pretty cool guy"]
  60.     $ info_ball = ["BALL!!", "(It's just a ball)"]
  61.     $ info_dog = ["Woof woof", "Arf arf", "Bark bork"]
  62.     $ info_badge = ["This is my attorney's badge.", "It's my proof of lawyerhood."]
  63.  
  64.     # Here are the profiles. They can be customized over in court_record.rpy
  65.         # Current format: short name, full name, occupation, info, image base name
  66.     $ p_eileen =  profile("Eileen", "Eileen", "Assistant", ["She'll be helping us out today."], "eileen")
  67.     $ p_dog = profile("Dog", "Baroness Doggetta von Pupperstein", "Dog", info_dog, "dog")
  68.     $ p_mr_sun = profile("Sun", "The Sun", "The Sun", info_sun, "mr_sun")
  69.     $ p_tucson = profile("Tucson", "Tucson Rong", "Defense Attorney", ["This is me."], "tucson")
  70.  
  71.     # more profiles to show multiple evidence pages
  72.     $ mikan = profile("Clementine", "Clementine Wormwood", "Former Assistant", ["This is my former assistant who was recently accused of murder.", "She's a bit clumsy, but her heart is in the right place.", "I'm sure she'd never hurt anyone!"], "mikan")
  73.     $ kuzu = profile("BB", "Boss Baby", "Yakuza", ["The yakuza is recruiting younger and younger these days.", "They're worse than the prosecution office."], "kuzu")
  74.     $ ibuki = profile("Josie", "Josie Jem", "Pop Star", ["A sweet girl full of energy and heart.", "I haven't heard her music yet, but I love a nice, wholesome pop song.", "I'm looking forward to seeing her up on stage."], "ibuki")
  75.     $ sonia = profile("Teena", "Teena Spi'rhit", "Princess", ["The elegant princess of Neh'vermind.", "", "...Do you think she'd go out with me?"], "sonia")
  76.     $ teruteru = profile("Terry", "Terry Yaki", "Chef", ["He's weird, but you can't hate his cooking." "Seriously, this guy makes the best tempura in town"], "teruteru")  
  77.     $ gundam = profile("Simon", "Simon Blackquill", "Prosecutor/Prisoner", ["Age: 28", "Gender: Male", "A skilled prosecutor known as the Twisted Samurai"], "gundam")
  78.     $ akane = profile("Pam", "Final Pam", "Athlete", ["I WILL FIX THE BABY"], "akane")
  79.  
  80.     #And here's the evidence:
  81.         #name, info, base name
  82.     $ e_ball = evidence("Ball", info_ball, "ball")
  83.     $ e_ladder = evidence("Stepladder", ["YOU'RE NOT MY REAL LADDER!!"], "ladder")
  84.     $ e_badge = evidence("Attorney's Badge", info_badge, "badge")
  85.  
  86.     # You can present evidence to NPCs. They don't respond to everything. Here's where you set the evidence they are interested in talking about
  87.     # note that these lists refer to whatever you've set as the evidence's base names
  88.     # each of these corresponds to a label below, ex. dog_badge
  89.     $ sunlist = ["ladder", "ball", "dog", "eileen", "tucson", "badge", "mr_sun"]
  90.     $ doglist = ["ball", "badge", "dog"]
  91.     $ eileenlist = ["eileen", "badge", "tucson"]
  92.  
  93.     n "Monday, 8:25 AM. Year: 201X. Location: Persons Park" (what_color="#7FFFA9")
  94.     m2 "(My name is Tuscon Rong. I'm a defense attorney and I'm in big trouble - my assistant has been arrested for murder!)"
  95.     m2 "(Thankfully, the agency has sent me a replacement. I won't let another assistant go to jail!)"
  96.     m2 "(Fourth time's the charm, right?)"
  97.     show eileen happy
  98.     e "Good morning. My name's Eileen. I'll be helping you out today."
  99.     hide eileen
  100.     show tucson
  101.     m "Nice to meet you."
  102.     m "...Wow, it's obvious our art assets weren't created by the same person."
  103.     hide tucson
  104.     m "I think I'll stay off-screen. That gives a cool 'first person' type of feel, anyway."
  105.     m2 "(That and I only have the one expression...)"
  106.     show eileen concerned
  107.     e "If you say so..."
  108.     show eileen happy
  109.     e "Anyway, let's try out the demo. If you need help, click the 'Assistant' button in the upper-right-hand corner."
  110.     hide eileen with fade
  111.  
  112.     # the items you start out with
  113.     $ my_evidence = [e_badge]
  114.     $ my_profiles = [p_tucson, p_eileen, p_dog, p_mr_sun]
  115.  
  116.     # your assistant (the "assistant" button goes to a label of the same name)
  117.     $ assistant = "eileen"
  118.  
  119.  
  120.  
  121. label park:
  122.     scene lovely_background
  123.  
  124.     #the buttons in the upper-right-hand corner
  125.     show screen evidence_menu
  126.  
  127.     #this tells the evidence screen where to go when it closes
  128.     $ current_scene = "park"
  129.  
  130.     # There's nobody to show evidence to on this screen
  131.     $ npc = False
  132.  
  133.     call screen sun_n_friends
  134.  
  135.  
  136. label sun:
  137.     $ npc = currentChar("sun", sunlist)
  138.     show sun
  139.     menu:
  140.         "Sun":
  141.             m "What's up, Sun?"
  142.             s "ME. HA HA HA"
  143.         "Ball" if threw_ball == True:
  144.             s "THAT DOG LOVES BALLS."
  145.             m "Too much! She won't drop it."
  146.             s "HERE'S ANOTHER ONE"
  147.             $ my_evidence.append(e_ball)
  148.             n "A fresh new ball added to the Court Record"
  149.         "Never mind":
  150.             pass
  151.     jump park
  152.  
  153.  
  154. label dog:
  155.     $ npc = currentChar("dog", doglist)
  156.     m2 "(The dog is barking... but thankfully, I can speak dog!)"
  157.     show dog
  158.     menu:
  159.         "BARK! WOOF, BARK! (What's wrong, girl?)":    
  160.             d "BOOF! (BALL?)"
  161.             m "She seems to want something..."
  162.         "ARF ARF *PANT* (Who's a good girl?)":
  163.             d "???"
  164.             m2 "(She doesn't know!? I'll have to show her some evidence!)"
  165.     jump park
  166.  
  167. label ball:
  168.     m "This is a nice ball. I'll pick it up just in case it's important to my murder case."
  169.     n "Ball added to Court Record."
  170.     $ picked_up_ball = True
  171.     $ my_evidence.append(e_ball)    
  172.     jump park
  173.  
  174. label ladder:
  175.     $ seen_ladder = True
  176.     m "(I came to this park last night and surreptitiously placed this stepladder in order to fulfill my long-time dream: Having a ladder-vs-stepladder verbal debate with my assistant!)"
  177.     m "*ahem*"
  178.     m "Say, Eileen... what would you call this object here?"
  179.     show eileen happy
  180.     e "You mean the stepladder?"
  181.     m "Aha! So you think it's a stepladder! But what if I said it's just a ladder?"
  182.     e "I would agree."
  183.     m "BUT IF WE EXAMINE THE FUNCTION OF THE DEVICE- huh?"
  184.     e "A stepladder is a type of ladder. You could refer to it either way."
  185.     show eileen concerned
  186.     e "I am a bit curious as to why it's been set up here in the middle of this park, though."
  187.     hide eileen with fade
  188.     m "Never mind... *grumble, mumble*"
  189.     m2 "(I'll add it to the Court Record so I remember to come pick it up again later.)"
  190.     $ my_evidence.append(e_ladder)
  191.     n "Stepladder added to Court Record"
  192.     jump park
  193.  
  194. label seenladder:
  195.     m "Ladder. Stepladder. The eternal question."
  196.     show eileen concerned
  197.     e "...?"
  198.     jump park
  199.  
  200.  
  201. # The sun's reactions to evidence
  202. label sun_ladder:
  203.     show sun
  204.     s "EVEN WITH THAT LADDER, YOU CAN'T REACH ME."
  205.     m "But I can dream, Mr. Sun. I can dream."
  206.     jump park
  207.  
  208. label sun_eileen:
  209.     show sun
  210.     s "I SEE YOU HAVE A NEW ASSISTANT, TUCSON."
  211.     m "This is Eileen. She's helping me get my previous assistant out of jail."
  212.     hide sun
  213.     show eileen happy
  214.     e "Actually, I'm here to help demonstrate the court record."
  215.     m "H-huh? You're really not going to help out in court?"
  216.     e "I can't make any promises. But if there's ever a version of this that includes a trial, I'd be happy to help."
  217.     jump park
  218.  
  219. label sun_ball:
  220.     show sun
  221.     m "What do you think of this?"
  222.     s "I LIKE IT. IT REMINDS ME OF ME."
  223.     jump park
  224.  
  225. label sun_dog:
  226.     show sun
  227.     m "Have you seen this dog before?"
  228.     s "IVE SEEN EVERYTHING UNDER THE ME. WHAT ABOUT THE DOG?"
  229.     m "Oh. Nothing, really. I just think she's a good dog."
  230.     s "I AGREE."
  231.     jump park
  232.  
  233. label sun_badge:
  234.     show sun
  235.     s "FLASHING YOUR BADGE AROUND AS USUAL, EH TUCSON?"
  236.     m "You know it!"
  237.     jump park
  238.  
  239. label sun_default:
  240.     show sun
  241.     s "I AM THE ALMIGTY SUN. BOW TO MY RESPLENDENCE."
  242.     m2 "(It seems like he doesn't have anything to say about this.)"
  243.     jump park
  244.  
  245. label sun_tucson:
  246.     show sun
  247.     s "I REMEMBER WHEN YOU WERE JUST A BOY-"
  248.     m "Wow, look at the time! Talk to you later, Mr. Sun!"
  249.     jump park
  250.  
  251. # consult Eileen
  252. label eileen:
  253.     show eileen happy
  254.     $ npc = currentChar("eileen", eileenlist)
  255.     menu:
  256.         "How does this work?":
  257.             m "Could you tell me more about this... 'court record' thing?"
  258.             show eileen concerned
  259.             e "That question is a bit concerning from a lawyer..."
  260.             show eileen happy
  261.             e "But I'm happy to explain. This is meant to replicate the feel of the Ace Attorney games."
  262.             e "You collect evidence by clicking on it and interacting with the characters on the scene."
  263.             e "When you speak to a character, a menu pops up with dialogue options. However, you can also choose to present them evidence by selecting that evidence in the Court Record and hitting the 'present' button."
  264.             show eileen vhappy
  265.             e "Why don't you try showing something to me?"            
  266.         "The murder case" if dangans == False:
  267.             $ dangans = True
  268.             m "Sssso, I have this murder case coming up..."
  269.             show eileen concerned
  270.             e "...About that. It seems like the demo doesn't go that far..."
  271.             m "What!? So I'm not going to be able to defend my assistant in court?"            
  272.             show eileen happy
  273.             e "That would seem to be the case, yes. I'm sorry. But I can show you something. Here."
  274.             $ my_profiles.append(mikan)
  275.             $ my_profiles.append(gundam)
  276.             $ my_profiles.append(kuzu)
  277.             $ my_profiles.append(ibuki)
  278.             $ my_profiles.append(sonia)
  279.             $ my_profiles.append(teruteru)
  280.             $ my_profiles.append(akane)
  281.             n "Eileen hands Tucson the files he forgot in the office."
  282.             e "As you can see, if you have more than eight profiles, the court record will have more than one page."
  283.             pass
  284.         "Never mind":
  285.             jump park
  286.     jump eileen
  287.  
  288. label eileen_default:
  289.     show eileen happy
  290.     e "There are a number of inventory screens that can be used in Ren'py games, but this one's unique feature is the ability to present evidence to NPCs."
  291.     e "If they don't have anything to say about the evidence, it'll go to a default response, like this one."
  292.     m2 "(In other words... you don't have anything to say about it.)"
  293.     jump park
  294.  
  295. label eileen_badge:
  296.     m "What do you think? It's my lawyer's badge."
  297.     show eileen concerned
  298.     e "Actually, I've been wondering... is that a real lawyer's badge?"
  299.     m "*gulp* Wh-what do you mean?"
  300.     e "I feel like Ive seen that design somewhere else..."
  301.     m "*double gulp* You've probably just seen a lot of defense attorneys."
  302.     e "And doesn't the lettering seem a bit shaky? It looks like it was written in marker."
  303.     m "That's a common misunderstanding. Here, I'll amend the Court Record to prove it."
  304.     $ e_badge.change(["This is my completely authentic lawyer's badge.", "It's definitely a real badge and not a toy from a vending machine that I wrote on with a Sharpie."])    
  305.     jump park
  306.  
  307. label eileen_tucson:
  308.     m "So I have this photo..."
  309.     show eileen vhappy
  310.     e "You're getting the hang of presenting evidence. Good job, Tucson!"
  311.     m2 "(She seems proud of me. Now I'm too self-conscious to ask if she thinks this is a good photo...)"
  312.     jump park
  313.  
  314. label eileen_eileen:
  315.     m "Tell me about yourself. If we're going to work together, I want to be friends."
  316.     show eileen happy
  317.     e "Well, I-"
  318.     m "Like what's your favorite Saturday morning children's show?"
  319.     m "Do you prefer burgers or ramen?"
  320.     m "Do you believe in justice, evidence, the truth, or your clients? How about ghosts?"
  321.     m "How about your tragic backstory? Were your parents neglectful, murderers, or both?"
  322.     show eileen concerned
  323.     e "..."
  324.     show eileen happy
  325.     "Let's keep a professional relationship."
  326.     hide eileen with fade
  327.     m2 "(Was it something I said?)"
  328.     jump park
  329.  
  330. # The dog's reactions to evidence
  331.  
  332. label dog_ball:
  333.     show dog
  334.     d "BALL!! THROW THE BALL!!"
  335.     m "D'aww, I can't say no to that face. Do you want to throw the ball, Eileen?"
  336.     hide dog
  337.     show eileen vhappy
  338.     e "Sure!"
  339.     n "Eileen throws the ball and the dog runs to fetch it. She returns with the ball in her mouth, tail wagging."
  340.     $ my_evidence.remove(e_ball)
  341.     hide eileen
  342.     show dog
  343.     d "THROW BALL!!"
  344.     hide dog
  345.     show eileen concerned
  346.     e "Drop it."
  347.     hide eileen
  348.     show dog
  349.     d "NO DROP... ONLY THROW!!"
  350.     hide dog
  351.     m2 "(I don't think we're getting that back...)"
  352.     $ threw_ball = True
  353.     jump park
  354.  
  355. label dog_dog:
  356.     show dog
  357.     m "Who's a good girl?"
  358.     d "Rrr? (Who among us is truly good?)"
  359.     m "Take a look at this evidence."
  360.     d "!"
  361.     m "That's right! It's youuuu!"
  362.     d "*aggressive tail wagging* (OH MY GOD)"
  363.     jump park
  364.  
  365. label dog_badge:
  366.     show dog
  367.     d "Shiny!"
  368.     m "Thanks!!"
  369.  
  370.     jump park
  371.  
  372. label dog_default:
  373.     show dog
  374.     d "*sniff, sniff*"
  375.     m "Hmm, she doesn't seem interested in this."
  376.     hide dog
  377.     show eileen vhappy
  378.     e "She's still a good girl, though."
  379.     n "We spend some time petting the dog."
  380.     jump park
  381.  
  382.  
  383.  
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement