Skip to content

Commit c3edd62

Browse files
AWSWCommunityAWSWCommunity
authored andcommitted
Clean up test bed
1 parent 24f9d02 commit c3edd62

File tree

8 files changed

+260
-0
lines changed

8 files changed

+260
-0
lines changed
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
#init stuff here
2+
3+
# We have normal, face, smirk, sad, disgust, rage, cry, and despair to work with for Anna.
4+
# These are declared in images.rpyc. Use the decompiler to get the expressions you need.
5+
6+
label anna_post_true_bootstrap:
7+
# As part of our test, the game jumps to this directly from the main menu, which means some initialization instructions aren't run.
8+
# The one that matters most is setting up the MC's player object. We need to do that here.
9+
# This wouldn't be required if you were jumping to the scene from somewhere after the game started.
10+
$ c = DynamicCharacter ("persistent.player_name", color=persistent.playercolor, callback=rolly)
11+
$ annascenesfinished = 4 # Set this to bypass the check for testing.
12+
jump anna_post_true_entry
13+
14+
# Our entry point from the patcher. In mod.py we tell ren'py to jump to this label after the true end.
15+
# We could have easily added this on to any point in the game: after a label, as a route, etc.
16+
label anna_post_true_entry:
17+
# Post true ending, the game locks all player interaction. We need to re-enable the UI controls to allow the play to play the scene.
18+
19+
if annascenesfinished != 4:
20+
return
21+
22+
$ can_cont = True
23+
$ restore_ui()
24+
stop music fadeout 1.0 # These stop any music or sounds that are playing.
25+
stop sound fadeout 1.0
26+
27+
scene black with fade # Fade to black
28+
$ renpy.pause (1.0) # Halt execution for 1.0 second. This will make the game sit at the black screen for 1 second before fading in np3 (look at images.rpy for the image IDs)
29+
scene np3 with fade # np3 is mapped to a specific cg file in the game. It is defined as "image np3 = 'bg/out/np/np3.jpg'"
30+
play music "mx/anna4.ogg" fadein 1.0 # Play some music with a fade in time of 1 second.
31+
$ renpy.pause (1.0)
32+
33+
# 'm' is the narrator character. This makes a text box with no name appear on the screen.
34+
m "The last few hours felt like a dream, or a memory of a dream I had many times before. Reza was dead, and both worlds were safe - for now. No doubt it would all make sense in the morning but now I just wanted to get home and get some rest. Anna and I walked back to town from the portal, together. "
35+
show anna normal with dissolve # The show instruction, well, shows a character. See images.rpy in the AWSW code for the whole list (you'll need these).
36+
$ renpy.pause(0.5)
37+
An "What are you going to do now?" # An is the identifier for anna's character object. Once again, defined in images.rpy. This is a Say instruction.
38+
c "I don't know. It seems like I've got everything right this time so I won't have to do it all over again. If I have to, I will. But a part of me just wants to continue on and see what happens."
39+
40+
# This changes Anna's expression to the second following keyword (smirk) when the say instruction fires off.
41+
An smirk "Great. I'll have to put up with you even more?" # this allows us to change a character's expression. It persists until another instruction that specifies a different expression.
42+
m "She was trying her best to sound sarcastic but I saw a smirk on her scaly lips."
43+
c "I guess you will."
44+
An normal "I don't know what I'll do. I still don't know if I'll be pardoned. I know what Bryce said, but he can only do so much if the courts decide I'm guilty."
45+
c "I don't think they'll arrest you. You may have broke the law, but it was for the greater good. Not everyone can see that, but I think enough people will."
46+
An "It would be ironic to be stuck in prison while a comet hits."
47+
m "Her expression changed, like the full realization of what she just said hit her."
48+
An sad "Are you really sure it will happen?"
49+
50+
menu:
51+
"I don't know.":
52+
c "I don't know. But I know it will be bad."
53+
"Yes.":
54+
c "Yes. I learned about the comet in school. When it hits, it will destroy your ecosystem. It will throw enough debris into the air it will block out the sun and freeze the planet in a winter that lasts a decade. Everything heavier than a kilogram will starve to death in a year."
55+
56+
An normal "Well... if it turns out I don't make it, I was glad to have known you for this short time. I was serious when I said you're the person I hate the least."
57+
c "I have to say, I barely hate you at all at this point."
58+
An smirk "Same here."
59+
m "I thought about something that had been bugging me for the last few days."
60+
61+
c "Seriously. Sneaking on to that farm and eating freshly-killed meat was the best first date I've ever been on. And the night we spent together... that wasn't just a one-off thing, was it? You said this might be our last time to do anything. Were you just looking to do something spontaneous or did you really want to?"
62+
63+
# Change Anna's expression back to normal, otherwise the previously set one would persist.
64+
An normal "If I'm going to be honest it was a bit of both. There was just so much going on at that point I don't think I was in my right mind. It was spontaneous, but I don't regret it. Do you?"
65+
66+
# 'c' is the MC.
67+
c "No. The idea would have been unthinkable when I arrived here a week ago. But now, getting to know you... I don't know. But I'm just wodnering... isn't that sort of thing frowned upon here? What would people think?"
68+
An "Humans have never been here before, so how could people have an opinion on something that's never happened before? A relationship between two different dragon species is unusual, but not unheard of. It's not illegal, if that's what you're thinking. But really, even if they did care, would you?"
69+
70+
# A menu. Each option is indented, followed by a colon. Anything indented after the choice will be executed if the choice is picked. After all choice-specific instructions are ran, the game will skip down below the menu.
71+
menu:
72+
"I guess you're right.":
73+
c "I guess you're right. It doesn't matter."
74+
An "If anything, they'd be jealous. Remember, humans are worshipped in our society. A week ago, humans were mythical creatures, and now, a few doezen people have met you."
75+
c "And now, one person gets to date you."
76+
An smirk "And that person is very lucky, indeed."
77+
"But I represent humanity as a whole.":
78+
c "But I represent humanity as a whole. I have to put on a good impression for my side as well."
79+
An "What do you mean? Do humans not like us?"
80+
c "It's not that they don't like you. On Earth, dragons are sometimes revered. Most people like them. It's just the thought of being romantically involved with one is so strange or distasteful. Remember, where I come from, humans are the only sentient animals. Dating another species would be seen as disgusting."
81+
An disgust "And you don't want to be associated with a dumb animal. Right, I get it."
82+
m "She started to turn off to the side and leave. I held on to her hand, gently but firmly."
83+
c "But I don't agree with them. You may not be human, but you're still a person, just as much as I am."
84+
"But I'm a public figure here.":
85+
c "But I'm a public figure here. People might not care what a stranger does, but everyone here recognizes me. I have to hold a higher standard."
86+
An "So what, you're afraid of what other people think?"
87+
c "That's not what I meant. I just have to guage public opinion on this, and I have to do it subtly."
88+
An "I didn't know you cared so much about public opinion. I thought you were above that."
89+
c "It's not just my opinion. I'm serving as humanity's ambassador. I can't put my desires above the success of my mission."
90+
An disgust "And I thought you were different. I was wrong about you. You're just like Emera. Were you lying about curing cancer, too?"
91+
c "Of course not, Anna, I would never lie about something like that. I'm on an important mission, so I can't just do whatever I want, or be with the people I want."
92+
93+
# The game skips to here after running all the choice-specific instructions.
94+
An face "I'm not a fan of poltics, if you haven't noticed. It's just a group of people trying to guess what everyone else wants, and at the same time, lying about what they themseves want. When you first came here I thought you'd be like one of {i}them{/i}. A selfish, corrupt beurocrat. But..."
95+
An smirk "...you're different."
96+
m "She made a warm, honest smile that was infectious. It was an expression I had seen on her face all too rarely."
97+
c "I guess I was just able to see something that others didn't."
98+
An normal "Sorry. I know I'm not the easiest person to deal with sometimes. Nobody else has given me a chance, and you've given me plenty. I know I don't deserve it."
99+
c "You do. You just don't know it yet, and I want to show you."
100+
m "The dragon smiled again."
101+
An smirk "You always know what to say."
102+
103+
menu:
104+
"I guess that's why I was chosen to be humanity's ambassador.":
105+
An normal "How do you do it? How do you get along with people so well?"
106+
c "I don't know. I think it's because I try to look a the good things in life and I'm just honest with people, and along the way, I just try to be nice. You'd be surprised how far that gets you."
107+
An "I guess I should try, now that I know I'm going to be sticking around for a bit longer. Before, I didn't really care how people saw me. I figured I'd either die or I'd invent a cure for cancer, then people would have to respect me, even if they didn't like me."
108+
109+
"That's my job.":
110+
An normal "Are you like this around everyone?"
111+
c "I get along with almost everyone. There are a few people that don't like me but there's nothing I can do about them."
112+
An sad "But how do I know you're being honest with me now? Part of politics is lying. Everyone knows that. Emera plays the political game so well you can never tell whether she's speaking her mind or simply regurgitating popular opinion."
113+
c "But I actually like you. I'm not just trying to get something out of you."
114+
An normal "Do you promise?"
115+
c "I promise."
116+
117+
An "Is everything just politics to you?"
118+
c "Not everything. Being with you isn't. That's why I like it."
119+
An sad "Nobody likes being with me."
120+
c "I do. When I'm with you I can forget about the problems between our two species, and my mission, even if it's only for a few hours. When I'm with you I get to relax."
121+
An normal "But you didn't come here to make friends. If your mission is so important, why are you wasting time with me at all?"
122+
c "Part of my mission is to learn about your kind, and in order to do that, I have to get to know your species. If all I wanted to do was interview people, I could have spent time with anyone."
123+
An sad "What do you mean, anyone?"
124+
125+
menu:
126+
"Remy.":
127+
c "I thought about the huge amount of information at his disposal. He could get me access to potentially all of the knowledge of your species."
128+
129+
"Adine.":
130+
c "She meets dozens of new people every day so she's an ambassador in her own way. If we worked together I thought we'd be more effective."
131+
132+
"Bryce.":
133+
c "As the chief of police, he's in a position of authority. With him, I could get access to people and places I might not otherwise have, and it would be a political step up from a simple ambassador. I'd have authority of my own."
134+
135+
"Lorem.":
136+
c "I can only meet so many people myself. Everyone else's experince with humans would have been through media. Lorem was crafting a story based on humans, and I thought if I could work with him, I could influence dragonkind's perception of humans however I wanted."
137+
138+
c "But in the end, it wasn't a political decision. It was an emotional one. I chose to be with you because I like you. I saw something in you, something that I don't think others do. Something that I don't think even you saw."
139+
An normal "What did you see?"
140+
m "The dragon stepped close to me. Her eyes were wide and I could see the row of streetlights in them, glowing faintly like a line of fireflies. Her eyes were filled with something I hadn't seen in them before: hope. The words gushed out before I knew they were coming."
141+
c "I saw potential. That you could be something great, if only somebody could show you. I thought that person could be me. You're brilliant and skilled, but hopelessly independent and stubborn. You know how people underestimate you, but I think you underestimate yourself."
142+
c "You're going to change the world, Anna, if only you believe in yourself and realize your true potential. But you won't get far without someone to support you. I thought I could help you. You're a better friend than any I've met here, and I thought you might become even more. Do you think it... do you think {i}we{/i} could happen?"
143+
144+
scene np4 with dissolve
145+
$ renpy.pause(1.0)
146+
m "Anna was quiet for a bit and the only sounds were our foorsteps. My shoes thunked against the path and her scaly claws clinked as they struck pebbles in the path."
147+
show anna normal with dissolve
148+
An "I think we can be more."
149+
An "We'll see what we become."
150+
scene np5e with dissolve
151+
$ renpy.pause(1.0)
152+
m "I hadn't realized it, but we had arrived at my doorstep. I wondered if I should invite her in. I wanted to, but so far she hadn't given me any indication she felt the same way. Luckily she broke the tension."
153+
show anna normal with dissolve
154+
An "You said cancer was cured in your world. How do they do it?"
155+
156+
menu:
157+
"I'm not a doctor.":
158+
c "I'm not a doctor, so I don't know the process exactly. I just know that if the cancer is detected early enough, it's almost never fatal. If I got cancer, I'd be worried, but I wouldn't lose sleep over it. I'm not going to pretend it's 100%% guaranteed to work, but you still have a chance."
159+
160+
"They give you lots of drugs.":
161+
c "They give you a lot of drugs, and if they find tumours there's radiation and surgery involved. From what I've heard, the process is unpleasant, but it's better than dying. I don't know how easy it will be with your different biology, but you still have a chance."
162+
163+
m "Anna smiled."
164+
stop music fadeout 4.0
165+
play sound "fx/door/handle.wav"
166+
$ renpy.pause(1.0)
167+
scene black with fade
168+
$ renpy.pause(4.0)
169+
170+
#play sound "fx/door/doorclose3.wav"
171+
return # Return to wherever we came from. It could be the main menu for testing, or back to the rest of the true ending.

mods/anna_post_true/mod.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import modlib
2+
from modlib import sprnt
3+
import renpy.sl2.slast as slast
4+
import renpy.parser as parser
5+
import renpy
6+
import renpy.ast as ast
7+
import modinfo
8+
import sys
9+
10+
ml = modlib.base
11+
12+
renpy.config.developer = True
13+
golab = ml.findlabel("anna_post_true_entry") # Getting the label from our additive code.
14+
posttruehook = ml.endingHooks.hookPostTrueEnding(golab) # If we wanted, we could have a scene play post true ending, after credits, but before the return to main_menu.
15+
16+
NoFunAllowed = False # Set this to true if you don't feel like playing through the true ending to watch the scene.
17+
if NoFunAllowed:
18+
tocompile = """
19+
screen dummy:
20+
imagebutton auto "ui/dev_%s.png" action [Start('anna_post_true_bootstrap'), Play("audio", "se/sounds/open.wav")] hovered Play("audio", "se/sounds/select.ogg") xalign 0.03 yalign 0.88
21+
""" # This is ren'py code we want to compile. The parser can accomplish this for us.
22+
rv = parser.parse("FNDummy", tocompile) # Assembles an AST for the above code.
23+
targetDisp = None
24+
for e in rv:
25+
if isinstance(e, ast.Init): # Find the init node. All screens are inserted into this node to be called on game initialization.
26+
# Get the first object in the block member of the init node (This is an object of type Screen). The block member is a list of nodes to be executed.
27+
# This will just contain the screen node, hence why we can use [0]. We know the screen will always occupy that slot. The screen contains a member called "screen" which is the actual code, the SLScreen.
28+
# Access the SLScreen's children, which will just contain one SLDisplayable, our target.
29+
targetDisp = e.block[0].screen.children[0]
30+
31+
ml.getsls('main_menu').children.append(targetDisp) # Append our compiled SLDisplayable to the main_menu screen. This inserts the 'dev test' button you see.
32+
24.9 KB
Loading
24.2 KB
Loading

mods/core/core.rpy

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
screen modmenu tag smallscreen:
2+
modal True
3+
4+
window id "modmenu" at popup:
5+
style "smallwindow"
6+
7+
vbox xalign 0.5 yalign 0.5:
8+
spacing 10
9+
text "Mods loaded: [modsDesc]" # No strings attached. Ren'py uses KP linebreaking by default.
10+
11+
imagebutton idle "image/ui/close_idle.png" hover "image/ui/close_hover.png" action [Hide("modmenu"), Hide("preferencesbg", transition=dissolve), ToggleVariable('navmenuopen', False), Play("audio", "se/sounds/close.ogg")] hovered Play("audio", "se/sounds/select.ogg") style "smallwindowclose" at nav_button
12+
13+
label _mod_fixansw:
14+
if _return:
15+
$ playmessage = True
16+
return
17+
18+
label _core_updateChapter:
19+
call _mod_getchapter
20+
$ mod_currentChapter = _return
21+
return
25.8 KB
Loading
25 KB
Loading

mods/core/stubs.rpy

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
label _mod_fixjmp: # Jump tables are ugly, but such is life when you're dealing with a very limited language.
2+
if not chapter4unplayed:
3+
jump chapter4chars
4+
elif not chapter3unplayed:
5+
jump chapter3chars
6+
elif not chapter2unplayed:
7+
jump chapter2chars
8+
else:
9+
jump chapter1chars
10+
11+
12+
label _mod_incc:
13+
if not chapter4unplayed:
14+
$ chapter4csplayed += 1
15+
elif not chapter3unplayed:
16+
$ chapter3csplayed += 1
17+
elif not chapter2unplayed:
18+
$ chapter2csplayed += 1
19+
else:
20+
$ chapter1csplayed += 1
21+
return
22+
23+
label _mod_getchapter:
24+
if not chapter4unplayed:
25+
return 4
26+
elif not chapter3unplayed:
27+
return 3
28+
elif not chapter2unplayed:
29+
return 2
30+
else:
31+
return 1
32+
33+
label _mod_fixui:
34+
$ can_cont = True
35+
$ restore_ui()
36+
return

0 commit comments

Comments
 (0)